Merge pull request #121 from SuperTux88/update-ruby-and-gems
Drop ruby 2.5 (EOL) and 2.6 (EOL soon) and update gems
This commit is contained in:
commit
9ea7115362
25 changed files with 227 additions and 167 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
engines:
|
engines:
|
||||||
rubocop:
|
rubocop:
|
||||||
enabled: true
|
enabled: true
|
||||||
channel: rubocop-1-10-0
|
channel: rubocop-1-22-3
|
||||||
bundler-audit:
|
bundler-audit:
|
||||||
enabled: true
|
enabled: true
|
||||||
ratings:
|
ratings:
|
||||||
|
|
|
||||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -14,10 +14,9 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
ruby:
|
ruby:
|
||||||
- 3.0
|
- "3.1"
|
||||||
- 2.7
|
- "3.0"
|
||||||
- 2.6
|
- "2.7"
|
||||||
- 2.5
|
|
||||||
gemfile:
|
gemfile:
|
||||||
- Gemfile
|
- Gemfile
|
||||||
- test/gemfiles/no-rails.Gemfile
|
- test/gemfiles/no-rails.Gemfile
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
require: rubocop-rails
|
require:
|
||||||
|
- rubocop-rails
|
||||||
|
- rubocop-rake
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: 2.5
|
TargetRubyVersion: 2.7
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
Exclude:
|
Exclude:
|
||||||
- "bin/**/*"
|
- "bin/**/*"
|
||||||
|
|
@ -12,7 +14,7 @@ Rails:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Commonly used screens these days easily fit more than 80 characters.
|
# Commonly used screens these days easily fit more than 80 characters.
|
||||||
Metrics/LineLength:
|
Layout/LineLength:
|
||||||
Max: 120
|
Max: 120
|
||||||
|
|
||||||
# Too short methods lead to extraction of single-use methods, which can make
|
# Too short methods lead to extraction of single-use methods, which can make
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
3.0
|
3.1
|
||||||
|
|
|
||||||
5
Gemfile
5
Gemfile
|
|
@ -21,8 +21,9 @@ group :development do
|
||||||
# code style
|
# code style
|
||||||
gem "pronto", "0.11.0", require: false
|
gem "pronto", "0.11.0", require: false
|
||||||
gem "pronto-rubocop", "0.11.1", require: false
|
gem "pronto-rubocop", "0.11.1", require: false
|
||||||
gem "rubocop", "1.18.0", require: false
|
gem "rubocop", "1.23.0", require: false
|
||||||
gem "rubocop-rails", "2.11.1", require: false
|
gem "rubocop-rails", "2.12.4", require: false
|
||||||
|
gem "rubocop-rake", "0.6.0", require: false
|
||||||
|
|
||||||
# debugging
|
# debugging
|
||||||
gem "pry"
|
gem "pry"
|
||||||
|
|
|
||||||
104
Gemfile.lock
104
Gemfile.lock
|
|
@ -19,26 +19,26 @@ PATH
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actionpack (6.1.4)
|
actionpack (6.1.4.1)
|
||||||
actionview (= 6.1.4)
|
actionview (= 6.1.4.1)
|
||||||
activesupport (= 6.1.4)
|
activesupport (= 6.1.4.1)
|
||||||
rack (~> 2.0, >= 2.0.9)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actionview (6.1.4)
|
actionview (6.1.4.1)
|
||||||
activesupport (= 6.1.4)
|
activesupport (= 6.1.4.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activesupport (6.1.4)
|
activesupport (6.1.4.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
zeitwerk (~> 2.3)
|
||||||
addressable (2.7.0)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
|
|
@ -51,25 +51,31 @@ GEM
|
||||||
diff-lcs (1.4.4)
|
diff-lcs (1.4.4)
|
||||||
docile (1.4.0)
|
docile (1.4.0)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
ethon (0.14.0)
|
ethon (0.15.0)
|
||||||
ffi (>= 1.15.0)
|
ffi (>= 1.15.0)
|
||||||
fabrication (2.22.0)
|
fabrication (2.22.0)
|
||||||
faraday (1.4.3)
|
faraday (1.8.0)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-em_synchrony (~> 1.0)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday-excon (~> 1.1)
|
faraday-excon (~> 1.1)
|
||||||
|
faraday-httpclient (~> 1.0.1)
|
||||||
faraday-net_http (~> 1.0)
|
faraday-net_http (~> 1.0)
|
||||||
faraday-net_http_persistent (~> 1.1)
|
faraday-net_http_persistent (~> 1.1)
|
||||||
|
faraday-patron (~> 1.0)
|
||||||
|
faraday-rack (~> 1.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ruby2_keywords (>= 0.0.4)
|
ruby2_keywords (>= 0.0.4)
|
||||||
faraday-em_http (1.0.0)
|
faraday-em_http (1.0.0)
|
||||||
faraday-em_synchrony (1.0.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
faraday-excon (1.1.0)
|
faraday-excon (1.1.0)
|
||||||
|
faraday-httpclient (1.0.1)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.1)
|
||||||
faraday-net_http_persistent (1.1.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday_middleware (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
|
faraday-rack (1.0.0)
|
||||||
|
faraday_middleware (1.2.0)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
ffi (1.15.3)
|
ffi (1.15.4)
|
||||||
fuubar (2.5.1)
|
fuubar (2.5.1)
|
||||||
rspec-core (~> 3.0)
|
rspec-core (~> 3.0)
|
||||||
ruby-progressbar (~> 1.4)
|
ruby-progressbar (~> 1.4)
|
||||||
|
|
@ -77,42 +83,42 @@ GEM
|
||||||
httparty (~> 0.18)
|
httparty (~> 0.18)
|
||||||
terminal-table (~> 1.5, >= 1.5.1)
|
terminal-table (~> 1.5, >= 1.5.1)
|
||||||
hashdiff (1.0.1)
|
hashdiff (1.0.1)
|
||||||
httparty (0.18.1)
|
httparty (0.20.0)
|
||||||
mime-types (~> 3.0)
|
mime-types (~> 3.0)
|
||||||
multi_xml (>= 0.5.2)
|
multi_xml (>= 0.5.2)
|
||||||
i18n (1.8.10)
|
i18n (1.8.11)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
json-schema (2.8.1)
|
json-schema (2.8.1)
|
||||||
addressable (>= 2.4)
|
addressable (>= 2.4)
|
||||||
json-schema-rspec (0.0.4)
|
json-schema-rspec (0.0.4)
|
||||||
json-schema (~> 2.5)
|
json-schema (~> 2.5)
|
||||||
rspec
|
rspec
|
||||||
listen (3.5.1)
|
listen (3.7.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
loofah (2.10.0)
|
loofah (2.12.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
macaddr (1.7.2)
|
macaddr (1.7.2)
|
||||||
systemu (~> 2.6.5)
|
systemu (~> 2.6.5)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mime-types (3.3.1)
|
mime-types (3.4.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2021.0225)
|
mime-types-data (3.2021.1115)
|
||||||
mini_portile2 (2.5.3)
|
mini_portile2 (2.8.0)
|
||||||
minitest (5.14.4)
|
minitest (5.14.4)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
nokogiri (1.11.7)
|
nokogiri (1.13.3)
|
||||||
mini_portile2 (~> 2.5.0)
|
mini_portile2 (~> 2.8.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nyan-cat-formatter (0.12.0)
|
nyan-cat-formatter (0.12.0)
|
||||||
rspec (>= 2.99, >= 2.14.2, < 4)
|
rspec (>= 2.99, >= 2.14.2, < 4)
|
||||||
octokit (4.21.0)
|
octokit (4.21.0)
|
||||||
faraday (>= 0.9)
|
faraday (>= 0.9)
|
||||||
sawyer (~> 0.8.0, >= 0.5.3)
|
sawyer (~> 0.8.0, >= 0.5.3)
|
||||||
parallel (1.20.1)
|
parallel (1.21.0)
|
||||||
parser (3.0.1.1)
|
parser (3.0.3.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
pronto (0.11.0)
|
pronto (0.11.0)
|
||||||
gitlab (~> 4.4, >= 4.4.0)
|
gitlab (~> 4.4, >= 4.4.0)
|
||||||
|
|
@ -125,30 +131,30 @@ GEM
|
||||||
pronto-rubocop (0.11.1)
|
pronto-rubocop (0.11.1)
|
||||||
pronto (~> 0.11.0)
|
pronto (~> 0.11.0)
|
||||||
rubocop (>= 0.63.1, < 2.0)
|
rubocop (>= 0.63.1, < 2.0)
|
||||||
pry (0.13.1)
|
pry (0.14.1)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
pry-byebug (3.9.0)
|
pry-byebug (3.8.0)
|
||||||
byebug (~> 11.0)
|
byebug (~> 11.0)
|
||||||
pry (~> 0.13.0)
|
pry (~> 0.10)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
racc (1.5.2)
|
racc (1.6.0)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.3.0)
|
rails-html-sanitizer (1.4.2)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
railties (6.1.4)
|
railties (6.1.4.1)
|
||||||
actionpack (= 6.1.4)
|
actionpack (= 6.1.4.1)
|
||||||
activesupport (= 6.1.4)
|
activesupport (= 6.1.4.1)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.13)
|
rake (>= 0.13)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
rake (13.0.3)
|
rake (13.0.6)
|
||||||
rb-fsevent (0.11.0)
|
rb-fsevent (0.11.0)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
|
|
@ -169,7 +175,7 @@ GEM
|
||||||
rspec-mocks (3.10.2)
|
rspec-mocks (3.10.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-rails (5.0.1)
|
rspec-rails (5.0.2)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
|
|
@ -177,24 +183,26 @@ GEM
|
||||||
rspec-expectations (~> 3.10)
|
rspec-expectations (~> 3.10)
|
||||||
rspec-mocks (~> 3.10)
|
rspec-mocks (~> 3.10)
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.10.2)
|
rspec-support (3.10.3)
|
||||||
rubocop (1.18.0)
|
rubocop (1.23.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.0.0.0)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 1.7.0, < 2.0)
|
rubocop-ast (>= 1.12.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.7.0)
|
rubocop-ast (1.13.0)
|
||||||
parser (>= 3.0.1.1)
|
parser (>= 3.0.1.1)
|
||||||
rubocop-rails (2.11.1)
|
rubocop-rails (2.12.4)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
|
rubocop-rake (0.6.0)
|
||||||
|
rubocop (~> 1.0)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
ruby2_keywords (0.0.4)
|
ruby2_keywords (0.0.5)
|
||||||
rugged (1.0.1)
|
rugged (1.0.1)
|
||||||
sawyer (0.8.2)
|
sawyer (0.8.2)
|
||||||
addressable (>= 2.3.5)
|
addressable (>= 2.3.5)
|
||||||
|
|
@ -208,23 +216,22 @@ GEM
|
||||||
simplecov (>= 0.4.1)
|
simplecov (>= 0.4.1)
|
||||||
simplecov_json_formatter (0.1.3)
|
simplecov_json_formatter (0.1.3)
|
||||||
systemu (2.6.5)
|
systemu (2.6.5)
|
||||||
terminal-table (1.8.0)
|
terminal-table (1.6.0)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
typhoeus (1.4.0)
|
typhoeus (1.4.0)
|
||||||
ethon (>= 0.9.0)
|
ethon (>= 0.9.0)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (1.7.0)
|
unicode-display_width (2.1.0)
|
||||||
uuid (2.3.9)
|
uuid (2.3.9)
|
||||||
macaddr (~> 1.0)
|
macaddr (~> 1.0)
|
||||||
valid (1.2.0)
|
valid (1.2.0)
|
||||||
webmock (3.13.0)
|
webmock (3.14.0)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.8.0)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff (>= 0.4.0, < 2.0.0)
|
hashdiff (>= 0.4.0, < 2.0.0)
|
||||||
yard (0.9.26)
|
yard (0.9.26)
|
||||||
zeitwerk (2.4.2)
|
zeitwerk (2.5.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
@ -247,12 +254,13 @@ DEPENDENCIES
|
||||||
rspec-collection_matchers (~> 1.2.0)
|
rspec-collection_matchers (~> 1.2.0)
|
||||||
rspec-json_expectations (~> 2.1)
|
rspec-json_expectations (~> 2.1)
|
||||||
rspec-rails (~> 5.0.1)
|
rspec-rails (~> 5.0.1)
|
||||||
rubocop (= 1.18.0)
|
rubocop (= 1.23.0)
|
||||||
rubocop-rails (= 2.11.1)
|
rubocop-rails (= 2.12.4)
|
||||||
|
rubocop-rake (= 0.6.0)
|
||||||
simplecov (= 0.21.2)
|
simplecov (= 0.21.2)
|
||||||
simplecov-rcov (= 0.2.3)
|
simplecov-rcov (= 0.2.3)
|
||||||
webmock (~> 3.0)
|
webmock (~> 3.0)
|
||||||
yard
|
yard
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.21
|
2.3.7
|
||||||
|
|
|
||||||
1
Rakefile
1
Rakefile
|
|
@ -29,5 +29,6 @@ end
|
||||||
|
|
||||||
Bundler::GemHelper.install_tasks name: "diaspora_federation"
|
Bundler::GemHelper.install_tasks name: "diaspora_federation"
|
||||||
|
|
||||||
|
desc "Run all tests"
|
||||||
task test: :spec
|
task test: :spec
|
||||||
task default: :test
|
task default: :test
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,11 @@ Gem::Specification.new do |s|
|
||||||
s.description = "This gem provides JSON schemas (currently one schema) for "\
|
s.description = "This gem provides JSON schemas (currently one schema) for "\
|
||||||
"validating JSON serialized federation objects."
|
"validating JSON serialized federation objects."
|
||||||
s.license = "AGPL-3.0"
|
s.license = "AGPL-3.0"
|
||||||
|
s.metadata = {
|
||||||
|
"rubygems_mfa_required" => "true"
|
||||||
|
}
|
||||||
|
|
||||||
s.files = Dir["lib/diaspora_federation/schemas.rb", "lib/diaspora_federation/schemas/*.json"]
|
s.files = Dir["lib/diaspora_federation/schemas.rb", "lib/diaspora_federation/schemas/*.json"]
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.5"
|
s.required_ruby_version = ">= 2.7"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,14 @@ Gem::Specification.new do |s|
|
||||||
s.summary = "diaspora* federation rails engine"
|
s.summary = "diaspora* federation rails engine"
|
||||||
s.description = "A rails engine that adds the diaspora* federation protocol to a rails app"
|
s.description = "A rails engine that adds the diaspora* federation protocol to a rails app"
|
||||||
s.license = "AGPL-3.0"
|
s.license = "AGPL-3.0"
|
||||||
|
s.metadata = {
|
||||||
|
"rubygems_mfa_required" => "true"
|
||||||
|
}
|
||||||
|
|
||||||
s.files = Dir["app/**/*", "config/routes.rb", "config/initializers/*",
|
s.files = Dir["app/**/*", "config/routes.rb", "config/initializers/*",
|
||||||
"lib/diaspora_federation/{engine,rails}.rb", "LICENSE", "README.md", "Changelog.md"]
|
"lib/diaspora_federation/{engine,rails}.rb", "LICENSE", "README.md", "Changelog.md"]
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.5"
|
s.required_ruby_version = ">= 2.7"
|
||||||
|
|
||||||
s.add_dependency "actionpack", ">= 5.2", "< 7"
|
s.add_dependency "actionpack", ">= 5.2", "< 7"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,13 @@ Gem::Specification.new do |s|
|
||||||
s.description = "This gem provides some supplimentary code (factory definitions), that"\
|
s.description = "This gem provides some supplimentary code (factory definitions), that"\
|
||||||
"helps to build tests for users of the diaspora_federation gem."
|
"helps to build tests for users of the diaspora_federation gem."
|
||||||
s.license = "AGPL-3.0"
|
s.license = "AGPL-3.0"
|
||||||
|
s.metadata = {
|
||||||
|
"rubygems_mfa_required" => "true"
|
||||||
|
}
|
||||||
|
|
||||||
s.files = Dir["lib/diaspora_federation/test.rb", "lib/diaspora_federation/test/*"]
|
s.files = Dir["lib/diaspora_federation/test.rb", "lib/diaspora_federation/test/*"]
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.5"
|
s.required_ruby_version = ">= 2.7"
|
||||||
|
|
||||||
s.add_dependency "diaspora_federation", DiasporaFederation::VERSION
|
s.add_dependency "diaspora_federation", DiasporaFederation::VERSION
|
||||||
s.add_dependency "fabrication", "~> 2.16"
|
s.add_dependency "fabrication", "~> 2.16"
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,17 @@ Gem::Specification.new do |s|
|
||||||
"de-/encryption of Entities in the protocols used for communication " \
|
"de-/encryption of Entities in the protocols used for communication " \
|
||||||
"among the various installations of Diaspora*"
|
"among the various installations of Diaspora*"
|
||||||
s.license = "AGPL-3.0"
|
s.license = "AGPL-3.0"
|
||||||
|
s.metadata = {
|
||||||
|
"rubygems_mfa_required" => "true"
|
||||||
|
}
|
||||||
|
|
||||||
s.files = Dir["lib/**/*", "LICENSE", "README.md", "Changelog.md"] -
|
s.files = Dir["lib/**/*", "LICENSE", "README.md", "Changelog.md"] -
|
||||||
Dir["lib/diaspora_federation/{engine,rails,schemas,test}.rb",
|
Dir["lib/diaspora_federation/{engine,rails,schemas,test}.rb",
|
||||||
"lib/diaspora_federation/schemas/*",
|
"lib/diaspora_federation/schemas/*",
|
||||||
"lib/diaspora_federation/test/*",
|
"lib/diaspora_federation/test/*",
|
||||||
"lib/tasks/*.rake"]
|
"lib/tasks/*.rake"]
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.5"
|
s.required_ruby_version = ">= 2.7"
|
||||||
|
|
||||||
s.add_dependency "faraday", "~> 1.0"
|
s.add_dependency "faraday", "~> 1.0"
|
||||||
s.add_dependency "faraday_middleware", "~> 1.0"
|
s.add_dependency "faraday_middleware", "~> 1.0"
|
||||||
|
|
|
||||||
|
|
@ -95,9 +95,9 @@ module DiasporaFederation
|
||||||
# The order for signing
|
# The order for signing
|
||||||
# @return [Array]
|
# @return [Array]
|
||||||
def signature_order
|
def signature_order
|
||||||
@signature_order || self.class.class_props.keys.reject {|key|
|
@signature_order || (self.class.class_props.keys.reject {|key|
|
||||||
self.class.optional_props.include?(key) && public_send(key).nil?
|
self.class.optional_props.include?(key) && public_send(key).nil?
|
||||||
} - %i[author_signature parent]
|
} - %i[author_signature parent])
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
@ -136,7 +136,7 @@ module DiasporaFederation
|
||||||
|
|
||||||
def signature_order=(order)
|
def signature_order=(order)
|
||||||
prop_names = self.class.class_props.keys.map(&:to_s)
|
prop_names = self.class.class_props.keys.map(&:to_s)
|
||||||
@signature_order = order.reject {|name| name =~ /signature/ }
|
@signature_order = order.grep_v(/signature/)
|
||||||
.map {|name| prop_names.include?(name) ? name.to_sym : name }
|
.map {|name| prop_names.include?(name) ? name.to_sym : name }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ module DiasporaFederation
|
||||||
end
|
end
|
||||||
|
|
||||||
def setable_property?(type, val)
|
def setable_property?(type, val)
|
||||||
setable_string?(type, val) || type == :timestamp && val.is_a?(Time)
|
setable_string?(type, val) || (type == :timestamp && val.is_a?(Time))
|
||||||
end
|
end
|
||||||
|
|
||||||
def setable_string?(type, val)
|
def setable_string?(type, val)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ module DiasporaFederation
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"></meta>
|
<meta charset="UTF-8"/>
|
||||||
<title>#{person.full_name}</title>
|
<title>#{person.full_name}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -86,19 +86,19 @@ module DiasporaFederation
|
||||||
<dl class="entity_photo">
|
<dl class="entity_photo">
|
||||||
<dt>Photo</dt>
|
<dt>Photo</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="300" height="300" src="#{photo_large_url}"></img>
|
<img class="photo avatar" width="300" height="300" src="#{photo_large_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="entity_photo_medium">
|
<dl class="entity_photo_medium">
|
||||||
<dt>Photo_medium</dt>
|
<dt>Photo_medium</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="100" height="100" src="#{photo_medium_url}"></img>
|
<img class="photo avatar" width="100" height="100" src="#{photo_medium_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="entity_photo_small">
|
<dl class="entity_photo_small">
|
||||||
<dt>Photo_small</dt>
|
<dt>Photo_small</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="50" height="50" src="#{photo_small_url}"></img>
|
<img class="photo avatar" width="50" height="50" src="#{photo_small_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -137,10 +137,9 @@ module DiasporaFederation
|
||||||
it "reads minimal hCard" do
|
it "reads minimal hCard" do
|
||||||
minimal_html = <<~HTML
|
minimal_html = <<~HTML
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<title>#{person.full_name}</title>
|
<title>#{person.full_name}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -187,19 +186,19 @@ module DiasporaFederation
|
||||||
<dl class="entity_photo">
|
<dl class="entity_photo">
|
||||||
<dt>Photo</dt>
|
<dt>Photo</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="300" height="300" src="#{photo_large_url}" />
|
<img class="photo avatar" width="300" height="300" src="#{photo_large_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="entity_photo_medium">
|
<dl class="entity_photo_medium">
|
||||||
<dt>Photo_medium</dt>
|
<dt>Photo_medium</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="100" height="100" src="#{photo_medium_url}" />
|
<img class="photo avatar" width="100" height="100" src="#{photo_medium_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="entity_photo_small">
|
<dl class="entity_photo_small">
|
||||||
<dt>Photo_small</dt>
|
<dt>Photo_small</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<img class="photo avatar" width="50" height="50" src="#{photo_small_url}" />
|
<img class="photo avatar" width="50" height="50" src="#{photo_small_url}"/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ module DiasporaFederation
|
||||||
expect(entity.test1).to be_nil
|
expect(entity.test1).to be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
let(:invalid_data) { {test1: "as;df", test2: nil, test3: "no boolean"} }
|
let(:invalid_data) { {test1: "as;df", test2: nil, test3: "no boolean"} }
|
||||||
|
|
||||||
it "validates the entity and raise an error with failed properties if not valid" do
|
it "validates the entity and raise an error with failed properties if not valid" do
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ module DiasporaFederation
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't fail when the entity doesn't have optional props" do
|
it "doesn't fail when the entity doesn't have optional props" do
|
||||||
entity = OpenStruct.new(test1: nil)
|
entity = Struct.new(:test1).new(nil)
|
||||||
validator = Validators::TestUnknownEntityValidator.new(entity)
|
validator = Validators::TestUnknownEntityValidator.new(entity)
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
expect(validator.errors).to include(:test1)
|
expect(validator.errors).to include(:test1)
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,13 @@ describe Validation::Rule::Birthday do
|
||||||
expect(described_class.new.error_key).to eq(:birthday)
|
expect(described_class.new.error_key).to eq(:birthday)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("BirthdayHolder", Struct.new(:birthday))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates a date object" do
|
it "validates a date object" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(birthday: Date.new))
|
validator = Validation::Validator.new(BirthdayHolder.new(Date.new))
|
||||||
validator.rule(:birthday, :birthday)
|
validator.rule(:birthday, :birthday)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -22,7 +26,7 @@ describe Validation::Rule::Birthday do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a string" do
|
it "validates a string" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(birthday: "2015-07-19"))
|
validator = Validation::Validator.new(BirthdayHolder.new("2015-07-19"))
|
||||||
validator.rule(:birthday, :birthday)
|
validator.rule(:birthday, :birthday)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -31,7 +35,7 @@ describe Validation::Rule::Birthday do
|
||||||
|
|
||||||
it "allows nil and empty" do
|
it "allows nil and empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(birthday: val))
|
validator = Validation::Validator.new(BirthdayHolder.new(val))
|
||||||
validator.rule(:birthday, :birthday)
|
validator.rule(:birthday, :birthday)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -40,7 +44,7 @@ describe Validation::Rule::Birthday do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for invalid date string" do
|
it "fails for invalid date string" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(birthday: "i'm no date"))
|
validator = Validation::Validator.new(BirthdayHolder.new("i'm no date"))
|
||||||
validator.rule(:birthday, :birthday)
|
validator.rule(:birthday, :birthday)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ describe Validation::Rule::Boolean do
|
||||||
it "will not accept parameters" do
|
it "will not accept parameters" do
|
||||||
validator = Validation::Validator.new({})
|
validator = Validation::Validator.new({})
|
||||||
expect {
|
expect {
|
||||||
validator.rule(:number, numeric: {param: true})
|
validator.rule(:boolean, boolean: {param: true})
|
||||||
}.to raise_error ArgumentError
|
}.to raise_error ArgumentError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -12,11 +12,15 @@ describe Validation::Rule::Boolean do
|
||||||
expect(described_class.new.error_key).to eq(:boolean)
|
expect(described_class.new.error_key).to eq(:boolean)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("BooleanHolder", Struct.new(:boolean))
|
||||||
|
end
|
||||||
|
|
||||||
context "strings" do
|
context "strings" do
|
||||||
it "validates boolean-esque strings" do
|
it "validates boolean-esque strings" do
|
||||||
%w[true false yes no t f y n 1 0].each do |str|
|
%w[true false yes no t f y n 1 0].each do |str|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: str))
|
validator = Validation::Validator.new(BooleanHolder.new(str))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -25,7 +29,7 @@ describe Validation::Rule::Boolean do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for non-boolean-esque strings" do
|
it "fails for non-boolean-esque strings" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: "asdf"))
|
validator = Validation::Validator.new(BooleanHolder.new("asdf"))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -36,7 +40,7 @@ describe Validation::Rule::Boolean do
|
||||||
context "numbers" do
|
context "numbers" do
|
||||||
it "validates 0 and 1 to boolean" do
|
it "validates 0 and 1 to boolean" do
|
||||||
[0, 1].each do |num|
|
[0, 1].each do |num|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: num))
|
validator = Validation::Validator.new(BooleanHolder.new(num))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -45,7 +49,7 @@ describe Validation::Rule::Boolean do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for all other numbers" do
|
it "fails for all other numbers" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: 1234))
|
validator = Validation::Validator.new(BooleanHolder.new(1234))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -56,7 +60,7 @@ describe Validation::Rule::Boolean do
|
||||||
context "boolean types" do
|
context "boolean types" do
|
||||||
it "validates true and false" do
|
it "validates true and false" do
|
||||||
[true, false].each do |bln|
|
[true, false].each do |bln|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: bln))
|
validator = Validation::Validator.new(BooleanHolder.new(bln))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -67,7 +71,7 @@ describe Validation::Rule::Boolean do
|
||||||
|
|
||||||
it "fails if nil or empty" do
|
it "fails if nil or empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(boolean: val))
|
validator = Validation::Validator.new(BooleanHolder.new(val))
|
||||||
validator.rule(:boolean, :boolean)
|
validator.rule(:boolean, :boolean)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,13 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
expect(described_class.new(maximum: 5).error_key).to eq(:diaspora_id_list)
|
expect(described_class.new(maximum: 5).error_key).to eq(:diaspora_id_list)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("DiasporaIdsHolder", Struct.new(:ids))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates less ids" do
|
it "validates less ids" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: id_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(id_str))
|
||||||
validator.rule(:ids, diaspora_id_list: {maximum: 5})
|
validator.rule(:ids, diaspora_id_list: {maximum: 5})
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -50,7 +54,7 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
|
|
||||||
it "fails for less but non ids" do
|
it "fails for less but non ids" do
|
||||||
bad_str = "user@example.com;i am a weird diaspora* ID @@@ ### 12345;shouldnt be reached by a rule"
|
bad_str = "user@example.com;i am a weird diaspora* ID @@@ ### 12345;shouldnt be reached by a rule"
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: bad_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(bad_str))
|
||||||
validator.rule(:ids, diaspora_id_list: {maximum: 5})
|
validator.rule(:ids, diaspora_id_list: {maximum: 5})
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -58,7 +62,7 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates exactly as many ids" do
|
it "validates exactly as many ids" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: id_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(id_str))
|
||||||
validator.rule(:ids, diaspora_id_list: {minimum: 3, maximum: 3})
|
validator.rule(:ids, diaspora_id_list: {minimum: 3, maximum: 3})
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -66,7 +70,7 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates without params" do
|
it "validates without params" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: id_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(id_str))
|
||||||
validator.rule(:ids, :diaspora_id_list)
|
validator.rule(:ids, :diaspora_id_list)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -74,7 +78,7 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for too many ids" do
|
it "fails for too many ids" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: id_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(id_str))
|
||||||
validator.rule(:ids, diaspora_id_list: {maximum: 2})
|
validator.rule(:ids, diaspora_id_list: {maximum: 2})
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -82,7 +86,7 @@ describe Validation::Rule::DiasporaIdList do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for too less ids" do
|
it "fails for too less ids" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(ids: id_str))
|
validator = Validation::Validator.new(DiasporaIdsHolder.new(id_str))
|
||||||
validator.rule(:ids, diaspora_id_list: {minimum: 4})
|
validator.rule(:ids, diaspora_id_list: {minimum: 4})
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,13 @@ describe Validation::Rule::DiasporaId do
|
||||||
expect(described_class.new.error_key).to eq(:diaspora_id)
|
expect(described_class.new.error_key).to eq(:diaspora_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("DiasporaIdHolder", Struct.new(:diaspora_id))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates a normal diaspora* ID" do
|
it "validates a normal diaspora* ID" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@example.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@example.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -22,7 +26,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a diaspora* ID with localhost" do
|
it "validates a diaspora* ID with localhost" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@localhost"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@localhost"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -30,7 +34,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a diaspora* ID with port" do
|
it "validates a diaspora* ID with port" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@example.com:3000"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@example.com:3000"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -38,7 +42,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a diaspora* ID with IPv4 address" do
|
it "validates a diaspora* ID with IPv4 address" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@123.45.67.89"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@123.45.67.89"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -46,7 +50,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a diaspora* ID with IPv6 address" do
|
it "validates a diaspora* ID with IPv6 address" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@[2001:1234:5678:90ab:cdef::1]"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@[2001:1234:5678:90ab:cdef::1]"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -54,7 +58,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a diaspora* ID with . and -" do
|
it "validates a diaspora* ID with . and -" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some-fancy.user@example.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some-fancy.user@example.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -62,7 +66,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID contains a / in the domain-name" do
|
it "fails if the diaspora* ID contains a / in the domain-name" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@example.com/friendica"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@example.com/friendica"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -70,7 +74,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID contains a _ in the domain-name" do
|
it "fails if the diaspora* ID contains a _ in the domain-name" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@invalid_domain.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@invalid_domain.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -78,7 +82,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID contains a special-chars in the username" do
|
it "fails if the diaspora* ID contains a special-chars in the username" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user$^%@example.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user$^%@example.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -86,7 +90,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID contains uppercase characters in the username" do
|
it "fails if the diaspora* ID contains uppercase characters in the username" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "SOME_USER@example.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("SOME_USER@example.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -94,7 +98,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID contains uppercase characters in the domain-name" do
|
it "fails if the diaspora* ID contains uppercase characters in the domain-name" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "some_user@EXAMPLE.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("some_user@EXAMPLE.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -102,7 +106,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the diaspora* ID is longer than 255 characters" do
|
it "fails if the diaspora* ID is longer than 255 characters" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: "#{'a' * 244}@example.com"))
|
validator = Validation::Validator.new(DiasporaIdHolder.new("#{'a' * 244}@example.com"))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -111,7 +115,7 @@ describe Validation::Rule::DiasporaId do
|
||||||
|
|
||||||
it "fails for nil and empty" do
|
it "fails for nil and empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(diaspora_id: val))
|
validator = Validation::Validator.new(DiasporaIdHolder.new(val))
|
||||||
validator.rule(:diaspora_id, :diaspora_id)
|
validator.rule(:diaspora_id, :diaspora_id)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,13 @@ describe Validation::Rule::Guid do
|
||||||
expect(described_class.new.error_key).to eq(:guid)
|
expect(described_class.new.error_key).to eq(:guid)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("GuidHolder", Struct.new(:guid))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates a string at least 16 chars long, consisting of [0-9a-f] (diaspora)" do
|
it "validates a string at least 16 chars long, consisting of [0-9a-f] (diaspora)" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: "abcdef0123456789"))
|
validator = Validation::Validator.new(GuidHolder.new("abcdef0123456789"))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -22,9 +26,7 @@ describe Validation::Rule::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a long string with random characters and [-_@.:] (redmatrix)" do
|
it "validates a long string with random characters and [-_@.:] (redmatrix)" do
|
||||||
validator = Validation::Validator.new(
|
validator = Validation::Validator.new(GuidHolder.new("1234567890ABCDefgh_ijkl-mnopqrSTUVwxyz@example.com:3000"))
|
||||||
OpenStruct.new(guid: "1234567890ABCDefgh_ijkl-mnopqrSTUVwxyz@example.com:3000")
|
|
||||||
)
|
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -32,7 +34,7 @@ describe Validation::Rule::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the string is too short" do
|
it "fails if the string is too short" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: "012345"))
|
validator = Validation::Validator.new(GuidHolder.new("012345"))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -40,7 +42,7 @@ describe Validation::Rule::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the string is too long" do
|
it "fails if the string is too long" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: "a" * 256))
|
validator = Validation::Validator.new(GuidHolder.new("a" * 256))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -48,7 +50,7 @@ describe Validation::Rule::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the string contains special chars at the end" do
|
it "fails if the string contains special chars at the end" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: "abcdef0123456789."))
|
validator = Validation::Validator.new(GuidHolder.new("abcdef0123456789."))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -56,7 +58,7 @@ describe Validation::Rule::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the string contains invalid chars" do
|
it "fails if the string contains invalid chars" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: "ghijklmnopqrstuvwxyz++"))
|
validator = Validation::Validator.new(GuidHolder.new("ghijklmnopqrstuvwxyz++"))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -65,7 +67,7 @@ describe Validation::Rule::Guid do
|
||||||
|
|
||||||
it "fails if the string is empty" do
|
it "fails if the string is empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(guid: val))
|
validator = Validation::Validator.new(GuidHolder.new(val))
|
||||||
validator.rule(:guid, :guid)
|
validator.rule(:guid, :guid)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -12,34 +12,38 @@ describe Validation::Rule::NotNil do
|
||||||
expect(described_class.new.error_key).to eq(:not_nil)
|
expect(described_class.new.error_key).to eq(:not_nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("ValueHolder", Struct.new(:value))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates a string" do
|
it "validates a string" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(not_nil: "abcd"))
|
validator = Validation::Validator.new(ValueHolder.new("abcd"))
|
||||||
validator.rule(:not_nil, :not_nil)
|
validator.rule(:value, :not_nil)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
expect(validator.errors).to be_empty
|
expect(validator.errors).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates a object" do
|
it "validates a object" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(not_nil: Object.new))
|
validator = Validation::Validator.new(ValueHolder.new(Object.new))
|
||||||
validator.rule(:not_nil, :not_nil)
|
validator.rule(:value, :not_nil)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
expect(validator.errors).to be_empty
|
expect(validator.errors).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if it is nil" do
|
it "fails if it is nil" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(not_nil: nil))
|
validator = Validation::Validator.new(ValueHolder.new(nil))
|
||||||
validator.rule(:not_nil, :not_nil)
|
validator.rule(:value, :not_nil)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
expect(validator.errors).to include(:not_nil)
|
expect(validator.errors).to include(:value)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "allows an empty string" do
|
it "allows an empty string" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(not_nil: ""))
|
validator = Validation::Validator.new(ValueHolder.new(""))
|
||||||
validator.rule(:not_nil, :not_nil)
|
validator.rule(:value, :not_nil)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
expect(validator.errors).to be_empty
|
expect(validator.errors).to be_empty
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,11 @@ describe Validation::Rule::PublicKey do
|
||||||
expect(described_class.new.error_key).to eq(:public_key)
|
expect(described_class.new.error_key).to eq(:public_key)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
|
before do
|
||||||
|
stub_const("PublicKeyHolder", Struct.new(:key))
|
||||||
|
end
|
||||||
|
|
||||||
["PUBLIC KEY", "RSA PUBLIC KEY"].each do |key_type|
|
["PUBLIC KEY", "RSA PUBLIC KEY"].each do |key_type|
|
||||||
context key_type do
|
context key_type do
|
||||||
let(:prefix) { "-----BEGIN #{key_type}-----" }
|
let(:prefix) { "-----BEGIN #{key_type}-----" }
|
||||||
|
|
@ -21,7 +25,7 @@ describe Validation::Rule::PublicKey do
|
||||||
let(:key) { "#{prefix}\nAAAAAA==\n#{suffix}\n" }
|
let(:key) { "#{prefix}\nAAAAAA==\n#{suffix}\n" }
|
||||||
|
|
||||||
it "validates an exported RSA key" do
|
it "validates an exported RSA key" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(key: key))
|
validator = Validation::Validator.new(PublicKeyHolder.new(key))
|
||||||
validator.rule(:key, :public_key)
|
validator.rule(:key, :public_key)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -29,7 +33,7 @@ describe Validation::Rule::PublicKey do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "strips whitespace" do
|
it "strips whitespace" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(key: " \n #{key}\n \n "))
|
validator = Validation::Validator.new(PublicKeyHolder.new(" \n #{key}\n \n "))
|
||||||
validator.rule(:key, :public_key)
|
validator.rule(:key, :public_key)
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -37,7 +41,7 @@ describe Validation::Rule::PublicKey do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the prefix is missing" do
|
it "fails if the prefix is missing" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(key: "\nAAAAAA==\n#{suffix}\n"))
|
validator = Validation::Validator.new(PublicKeyHolder.new("\nAAAAAA==\n#{suffix}\n"))
|
||||||
validator.rule(:key, :public_key)
|
validator.rule(:key, :public_key)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -45,7 +49,7 @@ describe Validation::Rule::PublicKey do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails if the suffix is missing" do
|
it "fails if the suffix is missing" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(key: "#{prefix}\nAAAAAA==\n\n"))
|
validator = Validation::Validator.new(PublicKeyHolder.new("#{prefix}\nAAAAAA==\n\n"))
|
||||||
validator.rule(:key, :public_key)
|
validator.rule(:key, :public_key)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -54,7 +58,7 @@ describe Validation::Rule::PublicKey do
|
||||||
|
|
||||||
it "fails if the key is nil or empty" do
|
it "fails if the key is nil or empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(key: val))
|
validator = Validation::Validator.new(PublicKeyHolder.new(val))
|
||||||
validator.rule(:key, :public_key)
|
validator.rule(:key, :public_key)
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,15 @@ describe Validation::Rule::TagCount do
|
||||||
expect(described_class.new(maximum: 5).error_key).to eq(:tag_count)
|
expect(described_class.new(maximum: 5).error_key).to eq(:tag_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "validation" do
|
context "when validating" do
|
||||||
let(:tag_str) { "#i #love #tags" }
|
let(:tag_str) { "#i #love #tags" }
|
||||||
|
|
||||||
|
before do
|
||||||
|
stub_const("TagsHolder", Struct.new(:tags))
|
||||||
|
end
|
||||||
|
|
||||||
it "validates less tags" do
|
it "validates less tags" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(tags: tag_str))
|
validator = Validation::Validator.new(TagsHolder.new(tag_str))
|
||||||
validator.rule(:tags, tag_count: {maximum: 5})
|
validator.rule(:tags, tag_count: {maximum: 5})
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -33,7 +37,7 @@ describe Validation::Rule::TagCount do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates exactly as many tags" do
|
it "validates exactly as many tags" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(tags: tag_str))
|
validator = Validation::Validator.new(TagsHolder.new(tag_str))
|
||||||
validator.rule(:tags, tag_count: {maximum: 3})
|
validator.rule(:tags, tag_count: {maximum: 3})
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
@ -41,7 +45,7 @@ describe Validation::Rule::TagCount do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails for too many tags" do
|
it "fails for too many tags" do
|
||||||
validator = Validation::Validator.new(OpenStruct.new(tags: tag_str))
|
validator = Validation::Validator.new(TagsHolder.new(tag_str))
|
||||||
validator.rule(:tags, tag_count: {maximum: 1})
|
validator.rule(:tags, tag_count: {maximum: 1})
|
||||||
|
|
||||||
expect(validator).not_to be_valid
|
expect(validator).not_to be_valid
|
||||||
|
|
@ -50,7 +54,7 @@ describe Validation::Rule::TagCount do
|
||||||
|
|
||||||
it "allows nil and empty" do
|
it "allows nil and empty" do
|
||||||
[nil, ""].each do |val|
|
[nil, ""].each do |val|
|
||||||
validator = Validation::Validator.new(OpenStruct.new(tags: val))
|
validator = Validation::Validator.new(TagsHolder.new(val))
|
||||||
validator.rule(:tags, tag_count: {maximum: 5})
|
validator.rule(:tags, tag_count: {maximum: 5})
|
||||||
|
|
||||||
expect(validator).to be_valid
|
expect(validator).to be_valid
|
||||||
|
|
|
||||||
|
|
@ -16,31 +16,37 @@ PATH
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
addressable (2.7.0)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
crack (0.4.5)
|
crack (0.4.5)
|
||||||
rexml
|
rexml
|
||||||
diff-lcs (1.4.4)
|
diff-lcs (1.4.4)
|
||||||
docile (1.4.0)
|
docile (1.4.0)
|
||||||
ethon (0.14.0)
|
ethon (0.15.0)
|
||||||
ffi (>= 1.15.0)
|
ffi (>= 1.15.0)
|
||||||
fabrication (2.22.0)
|
fabrication (2.22.0)
|
||||||
faraday (1.4.3)
|
faraday (1.8.0)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-em_synchrony (~> 1.0)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday-excon (~> 1.1)
|
faraday-excon (~> 1.1)
|
||||||
|
faraday-httpclient (~> 1.0.1)
|
||||||
faraday-net_http (~> 1.0)
|
faraday-net_http (~> 1.0)
|
||||||
faraday-net_http_persistent (~> 1.1)
|
faraday-net_http_persistent (~> 1.1)
|
||||||
|
faraday-patron (~> 1.0)
|
||||||
|
faraday-rack (~> 1.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ruby2_keywords (>= 0.0.4)
|
ruby2_keywords (>= 0.0.4)
|
||||||
faraday-em_http (1.0.0)
|
faraday-em_http (1.0.0)
|
||||||
faraday-em_synchrony (1.0.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
faraday-excon (1.1.0)
|
faraday-excon (1.1.0)
|
||||||
|
faraday-httpclient (1.0.1)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.1)
|
||||||
faraday-net_http_persistent (1.1.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday_middleware (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
|
faraday-rack (1.0.0)
|
||||||
|
faraday_middleware (1.2.0)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
ffi (1.15.3)
|
ffi (1.15.4)
|
||||||
fuubar (2.5.1)
|
fuubar (2.5.1)
|
||||||
rspec-core (~> 3.0)
|
rspec-core (~> 3.0)
|
||||||
ruby-progressbar (~> 1.4)
|
ruby-progressbar (~> 1.4)
|
||||||
|
|
@ -52,14 +58,16 @@ GEM
|
||||||
rspec
|
rspec
|
||||||
macaddr (1.7.2)
|
macaddr (1.7.2)
|
||||||
systemu (~> 2.6.5)
|
systemu (~> 2.6.5)
|
||||||
|
mini_portile2 (2.8.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
nokogiri (1.11.7-x86_64-linux)
|
nokogiri (1.13.3)
|
||||||
|
mini_portile2 (~> 2.8.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nyan-cat-formatter (0.12.0)
|
nyan-cat-formatter (0.12.0)
|
||||||
rspec (>= 2.99, >= 2.14.2, < 4)
|
rspec (>= 2.99, >= 2.14.2, < 4)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
racc (1.5.2)
|
racc (1.6.0)
|
||||||
rake (13.0.3)
|
rake (13.0.6)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rspec (3.10.0)
|
rspec (3.10.0)
|
||||||
rspec-core (~> 3.10.0)
|
rspec-core (~> 3.10.0)
|
||||||
|
|
@ -76,9 +84,9 @@ GEM
|
||||||
rspec-mocks (3.10.2)
|
rspec-mocks (3.10.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-support (3.10.2)
|
rspec-support (3.10.3)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
ruby2_keywords (0.0.4)
|
ruby2_keywords (0.0.5)
|
||||||
simplecov (0.21.2)
|
simplecov (0.21.2)
|
||||||
docile (~> 1.1)
|
docile (~> 1.1)
|
||||||
simplecov-html (~> 0.11)
|
simplecov-html (~> 0.11)
|
||||||
|
|
@ -93,8 +101,8 @@ GEM
|
||||||
uuid (2.3.9)
|
uuid (2.3.9)
|
||||||
macaddr (~> 1.0)
|
macaddr (~> 1.0)
|
||||||
valid (1.2.0)
|
valid (1.2.0)
|
||||||
webmock (3.13.0)
|
webmock (3.14.0)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.8.0)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff (>= 0.4.0, < 2.0.0)
|
hashdiff (>= 0.4.0, < 2.0.0)
|
||||||
|
|
||||||
|
|
@ -117,4 +125,4 @@ DEPENDENCIES
|
||||||
webmock (~> 3.0)
|
webmock (~> 3.0)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.21
|
2.3.7
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue