Skip to content

Commit

Permalink
Repair and clean up specs and simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstreicher committed May 4, 2023
1 parent 39408e5 commit a8ee7f0
Show file tree
Hide file tree
Showing 22 changed files with 297 additions and 192 deletions.
15 changes: 15 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,19 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in servo.gemspec
gemspec

gem 'debug', '>= 1.0.0'
gem 'factory_bot'
gem 'faker'
gem 'rails'
gem 'rake', '~> 13.0'
gem 'rspec'
gem 'rubocop-faker'
gem 'rubocop-ordered_methods'
gem 'rubocop-performance'
gem 'rubocop-rails'
gem 'rubocop-rake'
gem 'rubocop-rspec'
gem 'rubocop-thread_safety'
gem 'rubocop'
gem 'sidekiq', '< 7'
gem 'test-prof'
197 changes: 138 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,149 +12,228 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionmailer (0.6.1)
actionpack (>= 0.9.5)
actionpack (6.1.7.2)
actionview (= 6.1.7.2)
activesupport (= 6.1.7.2)
rack (~> 2.0, >= 2.0.9)
actioncable (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.3)
actionpack (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
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 (6.1.7.2)
activesupport (= 6.1.7.2)
actiontext (7.0.4.3)
actionpack (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activemodel (6.1.7.2)
activesupport (= 6.1.7.2)
activerecord (6.1.7.2)
activemodel (= 6.1.7.2)
activesupport (= 6.1.7.2)
activesupport (6.1.7.2)
activejob (7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activestorage (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activesupport (= 7.0.4.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
builder (3.2.4)
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.0)
crass (1.0.6)
debug (1.6.3)
irb (>= 1.3.6)
date (3.3.3)
debug (1.7.2)
irb (>= 1.5.0)
reline (>= 0.3.1)
diff-lcs (1.5.0)
erubi (1.11.0)
erubi (1.12.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
faker (2.22.0)
faker (3.2.0)
i18n (>= 1.8.11, < 2)
globalid (1.0.1)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.12.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
interactor (3.1.2)
io-console (0.5.11)
irb (1.4.2)
io-console (0.6.0)
irb (1.6.4)
reline (>= 0.3.0)
json (2.6.2)
loofah (2.19.1)
json (2.6.3)
loofah (2.20.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
memery (1.4.1)
ruby2_keywords (~> 0.0.2)
mini_portile2 (2.8.0)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.0)
nokogiri (1.13.10)
net-imap (0.3.4)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.10-x86_64-darwin)
nokogiri (1.14.3-x86_64-darwin)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.1.1)
parallel (1.23.0)
parser (3.2.2.1)
ast (~> 2.4.1)
racc (1.6.0)
rack (2.2.6.3)
rack-test (2.0.2)
racc (1.6.2)
rack (2.2.7)
rack-test (2.1.0)
rack (>= 1.3)
rails (0.9.5)
actionmailer (>= 0.6.1)
actionpack (>= 1.4.0)
activerecord (>= 1.6.0)
rake (>= 0.4.15)
rails (7.0.4.3)
actioncable (= 7.0.4.3)
actionmailbox (= 7.0.4.3)
actionmailer (= 7.0.4.3)
actionpack (= 7.0.4.3)
actiontext (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activemodel (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
railties (= 7.0.4.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
redis (4.8.0)
regexp_parser (2.7.0)
reline (0.3.1)
redis (4.8.1)
regexp_parser (2.8.0)
reline (0.3.3)
io-console (~> 0.5)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.48.0)
rubocop (1.50.2)
json (~> 2.3)
parallel (~> 1.10)
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.26.0, < 2.0)
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.27.0)
rubocop-ast (1.28.1)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
rubocop-ordered_methods (0.9)
rubocop (>= 1.0)
rubocop-performance (1.16.0)
rubocop-performance (1.17.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.18.0)
rubocop-rails (2.19.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.19.0)
rubocop-rspec (2.20.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-thread_safety (0.4.4)
rubocop (>= 0.53.0)
ruby-progressbar (1.11.0)
rubocop-thread_safety (0.5.1)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
test-prof (1.2.0)
tzinfo (2.0.5)
test-prof (1.2.1)
thor (1.2.1)
timeout (0.3.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
wannabe_bool (0.7.1)
zeitwerk (2.6.7)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.8)

PLATFORMS
ruby
Expand Down
19 changes: 19 additions & 0 deletions lib/nettle/request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Nettle
class Request

def initialize

end

private

def path
end

def port
end

def url
end
end
end
2 changes: 0 additions & 2 deletions lib/servo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
require 'memery'
require 'wannabe_bool'
require 'zeitwerk'
require 'servo/base'
require 'servo/job'
require 'servo/version'

loader = Zeitwerk::Loader.for_gem
Expand Down
12 changes: 12 additions & 0 deletions lib/servo/active_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Servo
class ActiveJob < ActiveJob::Base
include Callable

def perform(**args)
call(**args)
end
end
end

18 changes: 18 additions & 0 deletions lib/servo/bar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true

require 'sidekiq'

module Servo
class Bar < SidekiqJob
include Callable
debugger
if defined?(Sidekiq)
include Sidekiq::Worker
end

def perform(**args)
call(**args)
end
end
end

Loading

0 comments on commit a8ee7f0

Please sign in to comment.