Skip to content

Commit

Permalink
Merge pull request #5 from linuxfrorg/rename-board-sse-linuxfr
Browse files Browse the repository at this point in the history
rename the whole project with the git repository name
  • Loading branch information
Trim authored Mar 22, 2024
2 parents ac0912b + f105f0c commit 0ae756f
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 33 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ when something is said with Server-Sent Event / EventSource.
How to use it?
--------------

You can nstall the gem with `gem install board-linuxfr` [using the linuxfrorg
Github Package Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry#installing-a-package).
Then, you can launch it on local with `board-linuxfr -S /tmp/board.sock`
You can nstall the gem with `gem install board-sse-linuxfr.org`.

Then, you can launch it on local with `board-sse-linuxfr.org -S /tmp/board.sock`
and it will listen on a UNIX socket at `/tmp/board.sock`.

Another way is to use a container engine (like Docker or Podman) and a
Expand All @@ -23,8 +23,8 @@ See also
--------

* [Git repository](https://github.com/linuxfrorg/board-sse-LinuxFr.org)
* For versions >= 0.1.4: [Github Package repostory](https://github.com/linuxfrorg/board-sse-linuxfr.org/pkgs/rubygems/board-linuxfr)
* For older version: [Rubygems page](https://rubygems.org/gems/board-linuxfr)
* For versions >= 1.0.0: [Rubygems board-sse-linuxfr.org](https://rubygems.org/gems/board-sse-linuxfr.org)
* For older version: [old Rubygems board-linuxfr](https://rubygems.org/gems/board-linuxfr)


Copyright
Expand Down
3 changes: 0 additions & 3 deletions bin/board-linuxfr

This file was deleted.

3 changes: 3 additions & 0 deletions bin/board-sse-linuxfr.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby

require "board-sse-linuxfr.org"
13 changes: 8 additions & 5 deletions board-linuxfr.gemspec → board-sse-linuxfr.org.gemspec
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require './lib/board-linuxfr/version'
require './lib/board-sse-linuxfr.org/version'

Gem::Specification.new do |s|
s.name = "board-sse-linuxfr.org"
s.version = BoardLinuxfr::VERSION
s.version = BoardSseLinuxfrOrg::VERSION
s.licenses = ["AGPL-3.0-only"]
s.authors = ["Bruno Michel", "Adrien Dorsaz"]
s.email = "adrien@adorsaz.ch"
s.homepage = "https://github.com/linuxfrorg/board-sse-linuxfr.org"
s.summary = "Push notifications for the board of LinuxFr.org"
s.description = "Push notifications for the board of LinuxFr.org via Server-Sent Events"
s.summary = "Board for LinuxFr.org"
s.description = <<~EOD
Users of the LinuxFr.org website can chat on a space called the board (« la tribune » in french).
This Ruby daemon notifies the users when something is said with Server-Sent Event / EventSource.
EOD

s.files = Dir['lib/**/*.rb'] + Dir['bin/*']
s.platform = Gem::Platform::RUBY
s.executables = ["board-linuxfr"]
s.executables = ["board-sse-linuxfr.org"]
s.require_path = 'lib'

s.add_runtime_dependency "goliath", "~>1.0", ">= 1.0.7"
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
linuxfr-board:
board-sse-linuxfr.og:
build:
context: .
dockerfile: ./deployment/Containerfile
Expand Down
21 changes: 12 additions & 9 deletions deployment/Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM ruby:3-slim-bookworm AS build
FROM docker.io/ruby:3-slim-bookworm AS build

LABEL org.opencontainers.image.title="LinuxFr.org boards"
LABEL org.opencontainers.image.description="Chat rooms for LinuxFr"

LABEL org.opencontainers.image.title="Board for LinuxFr.org"
LABEL org.opencontainers.image.description="Users of the LinuxFr.org website can chat on a space called the board (« la tribune » in french). \
This Ruby daemon notifies the users when something is said with Server-Sent Event / EventSource."
LABEL org.opencontainers.image.source="https://github.com/linuxfrorg/board-sse-linuxfr.org"
LABEL org.opencontainers.image.url="https://github.com/linuxfrorg/board-sse-linuxfr.org"
LABEL org.opencontainers.image.licenses="AGPL-3.0-only"
Expand All @@ -19,16 +22,16 @@ RUN \
apt-get clean;

USER ${UID}
WORKDIR /linuxfr-board
ENV HOME=/linuxfr-board
WORKDIR /board-sse-linuxfr.org
ENV HOME=/board-sse-linuxfr.org

# Install board-linuxfr
# Install board-sse-linuxfr.org
COPY --chown=${UID}:0 --chmod=770 . .
RUN gem build board-linuxfr.gemspec
RUN gem build board-sse-linuxfr.org.gemspec

FROM build as productioproduction
FROM build as production

RUN gem install ./board-linuxfr-*.gem
RUN gem install ./board-sse-linuxfr.org-*.gem

# Clean development dependencies
USER 0
Expand All @@ -37,5 +40,5 @@ RUN apt purge --autoremove -y build-essential ruby-dev
USER ${UID}
EXPOSE 9000

CMD ["board-linuxfr"]
CMD ["board-sse-linuxfr.org"]

3 changes: 0 additions & 3 deletions lib/board-linuxfr/version.rb

This file was deleted.

8 changes: 4 additions & 4 deletions lib/board-linuxfr.rb → lib/board-sse-linuxfr.org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
require "yajl"


class BoardLinuxfr < Goliath::API
autoload :Cache, "board-linuxfr/cache"
autoload :RedisPlugin, "board-linuxfr/redis_plugin"
autoload :VERSION, "board-linuxfr/version"
class BoardSseLinuxfrOrg < Goliath::API
autoload :Cache, "board-sse-linuxfr.org/cache"
autoload :RedisPlugin, "board-sse-linuxfr.org/redis_plugin"
autoload :VERSION, "board-sse-linuxfr.org/version"

plugin RedisPlugin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class BoardLinuxfr
class BoardSseLinuxfrOrg
class Cache
CAPACITY = 10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
require "em-synchrony"
require "redis"
require "redis/connection/synchrony"
require "board-linuxfr/cache"
require "board-sse-linuxfr.org/cache"


class BoardLinuxfr
class BoardSseLinuxfrOrg
class RedisPlugin
def initialize(address, port, config, status, logger)
logger.info "Initializing the Redis plugin"
Expand Down
3 changes: 3 additions & 0 deletions lib/board-sse-linuxfr.org/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class BoardSseLinuxfrOrg
VERSION = "1.0.0"
end

0 comments on commit 0ae756f

Please sign in to comment.