Skip to content

Commit

Permalink
Merge pull request #966 from pooza/3_4_19
Browse files Browse the repository at this point in the history
3.4.19
  • Loading branch information
pooza authored Jan 28, 2023
2 parents 0a41942 + 79b9204 commit d963597
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 49 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ AllCops:
- '**/config.ru'
NewCops: enable
TargetRubyVersion: 3.2
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EndOfLine:
Expand Down Expand Up @@ -95,6 +99,8 @@ Metrics/PerceivedComplexity:
Max: 10
Minitest/MultipleAssertions:
Enabled: false
Minitest/TestFileName:
Enabled: false
Naming/RescuedExceptionsVariableName:
PreferredName: e
Rake:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'
ruby '~>3.2.0'
gem 'bootsnap', '>=1.9.0'
gem 'faye-websocket', github: 'pooza/faye-websocket-ruby'
gem 'feedjira', '~>3.0'
gem 'ginseng-core', github: 'pooza/ginseng-core', require: 'ginseng'
Expand Down
62 changes: 30 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ GIT

GIT
remote: https://github.com/pooza/ginseng-core.git
revision: daf7c8f93557eec6afb7f523d309e8e28e565203
revision: 5b05b42bf31ae8ab7b37f254bb9fd0a51fe461fd
specs:
ginseng-core (1.13.14)
actionpack (>= 7.0.4)
ginseng-core (1.13.18)
actionpack (>= 7.0.4.1)
activesupport (>= 6.1.3.2)
addressable (>= 2.8.0)
bundler (~> 2.0)
Expand All @@ -23,7 +23,7 @@ GIT
facets
fileutils (~> 1.7.0)
find
httparty
httparty (>= 0.21.0)
json-schema
loofah (>= 2.19.1)
mail
Expand All @@ -32,10 +32,11 @@ GIT
net-smtp
nokogiri (>= 1.13.10)
optparse
rack (>= 2.2.6.2)
rails-html-sanitizer (>= 1.4.4)
rake
rest-client
sanitize
sanitize (>= 6.0.1)
securerandom
set
time
Expand All @@ -52,32 +53,30 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actionpack (7.0.4)
actionview (= 7.0.4)
activesupport (= 7.0.4)
actionpack (7.0.4.2)
actionview (= 7.0.4.2)
activesupport (= 7.0.4.2)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4)
activesupport (= 7.0.4)
actionview (7.0.4.2)
activesupport (= 7.0.4.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (7.0.4)
activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bootsnap (1.15.0)
msgpack (~> 1.2)
builder (3.2.4)
cgi (0.3.6)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.0)
crass (1.0.6)
daemon-spawn (0.4.2)
date (3.3.3)
Expand All @@ -96,7 +95,7 @@ GEM
sax-machine (>= 1.0)
fileutils (1.7.0)
find (0.1.1)
fugit (1.8.0)
fugit (1.8.1)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
http-accept (1.7.0)
Expand All @@ -113,7 +112,7 @@ GEM
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0)
mail (2.8.0.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
Expand All @@ -124,7 +123,6 @@ GEM
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.17.0)
msgpack (1.6.0)
multi_json (1.15.0)
multi_xml (0.6.0)
net-imap (0.3.4)
Expand All @@ -137,50 +135,50 @@ GEM
net-smtp (0.3.3)
net-protocol
netrc (0.11.0)
nokogiri (1.14.0.rc1)
nokogiri (1.14.0)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.14.0.rc1-x86_64-linux)
nokogiri (1.14.0-x86_64-linux)
racc (~> 1.4)
optparse (0.3.1)
parallel (1.22.1)
parser (3.1.3.0)
parser (3.2.0.0)
ast (~> 2.4.1)
power_assert (2.0.3)
public_suffix (5.0.1)
raabro (1.4.0)
racc (1.6.2)
rack (2.2.5)
rack (2.2.6.2)
rack-test (2.0.2)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.1)
regexp_parser (2.6.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
ricecream (0.2.1)
rubocop (1.42.0)
rubocop (1.44.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-minitest (0.25.1)
rubocop-minitest (0.26.1)
rubocop (>= 0.90, < 2.0)
rubocop-performance (1.15.2)
rubocop (>= 1.7.0, < 2.0)
Expand All @@ -192,15 +190,16 @@ GEM
ruby-progressbar (1.11.0)
rufus-scheduler (3.8.2)
fugit (~> 1.1, >= 1.1.6)
sanitize (6.0.0)
sanitize (6.0.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sax-machine (1.3.2)
securerandom (0.2.2)
sequel (5.64.0)
set (1.0.3)
sqlite3 (1.5.4)
sqlite3 (1.6.0)
mini_portile2 (~> 2.8.0)
sqlite3 (1.6.0-x86_64-linux)
test-unit (3.5.7)
power_assert
time (0.2.1)
Expand All @@ -211,7 +210,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.3.0)
unicode-display_width (2.4.2)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -224,7 +223,6 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
bootsnap (>= 1.9.0)
faye-websocket!
feedjira (~> 3.0)
ginseng-core!
Expand All @@ -245,4 +243,4 @@ RUBY VERSION
ruby 3.2.0p0

BUNDLED WITH
2.4.1
2.4.5
12 changes: 0 additions & 12 deletions app/lib/tomato_shrieker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ def self.dir
return File.expand_path('../..', __dir__)
end

def self.setup_bootsnap
Bootsnap.setup(
cache_dir: File.join(dir, 'tmp/cache'),
development_mode: Environment.development?,
load_path_cache: true,
compile_cache_iseq: true,
compile_cache_yaml: true,
compile_cache_json: true,
)
end

def self.loader
config = YAML.load_file(File.join(dir, 'config/autoload.yaml'))
loader = Zeitwerk::Loader.new
Expand Down Expand Up @@ -50,7 +39,6 @@ def self.load_tasks
ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile')
Bundler.require
loader.setup
setup_bootsnap
setup_debug
ENV['RACK_ENV'] ||= Environment.type
Sequel.connect(Environment.dsn)
Expand Down
6 changes: 5 additions & 1 deletion app/lib/tomato_shrieker/daemon/scheduler_daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ class SchedulerDaemon < Ginseng::Daemon
include Package

def command
return Ginseng::CommandLine.new([
command = Ginseng::CommandLine.new([
File.join(Environment.dir, 'bin/scheduler_worker.rb'),
])
command.env['RUBY_YJIT_ENABLE'] = 'yes' if config['/ruby/jit']
command.env['BUNDLE_GEMFILE'] = File.join(Environment.dir, 'Gemfile')
command.env['RACK_ENV'] ||= Environment.type
return command
end

def motd
Expand Down
5 changes: 4 additions & 1 deletion app/lib/tomato_shrieker/source/command_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ def command
@command.args.push('-c')
@command.args.push(self['/source/command'])
end
@command.dir = self['/source/dir']
@command.dir = self['/source/dir'] || Environment.dir
@command.env = @params.dig('source', 'env') || {}
@command.env['RUBY_YJIT_ENABLE'] = 'yes' if config['/ruby/jit']
@command.env['BUNDLE_GEMFILE'] = File.join(@command.dir, 'Gemfile')
@command.env['RACK_ENV'] ||= Environment.type
end
return @command
end
Expand Down
2 changes: 1 addition & 1 deletion app/task/tomato/daemons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module TomatoShrieker
[:start, :stop].freeze.each do |action|
desc "#{action} #{daemon}"
task action do
ENV['RUBY_YJIT_ENABLE'] = '1' if config['/ruby/jit']
ENV['RUBY_YJIT_ENABLE'] = 'yes' if config['/ruby/jit']
sh "#{File.join(Environment.dir, 'bin', "#{daemon}_daemon.rb")} #{action}"
rescue => e
warn "#{e.class} #{daemon}:#{action} #{e.message}"
Expand Down
2 changes: 1 addition & 1 deletion config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package:
- [email protected]
license: MIT
url: https://github.com/pooza/tomato-shrieker
version: 3.4.17
version: 3.4.19
ruby:
jit: false
slack:
Expand Down

0 comments on commit d963597

Please sign in to comment.