Skip to content

Commit

Permalink
update vcr gem to version 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 28, 2020
1 parent 2334206 commit 1b906dc
Show file tree
Hide file tree
Showing 272 changed files with 1,135 additions and 20,826 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto

spec/fixtures/vcr_cassettes/**/* -diff
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem "nokogiri", ">= 1.10.4"
gem "diffy", "~> 3.2", ">= 3.2.1"
gem "commonmarker", "~> 0.17.9"
gem "iso8601", "~> 0.9.0"
gem "maremma", ">= 4.1"
gem "maremma", "~> 4.6.1"
gem "bolognese", "~> 1.5"
gem "dalli", "~> 2.7", ">= 2.7.6"
gem "lograge", "~> 0.11.2"
Expand Down Expand Up @@ -98,7 +98,7 @@ group :test do
gem "capybara"
gem "webmock", "~> 3.1"
gem "hashdiff", [">= 1.0.0.beta1", "< 2.0.0"]
gem "vcr", "~> 3.0.3"
gem 'vcr', '~> 5.1'
gem "factory_bot_rails", "~> 4.8", ">= 4.8.2"
gem "shoulda-matchers", "~> 4.1", ">= 4.1.2"
gem "faker", "~> 1.9"
Expand Down
103 changes: 52 additions & 51 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ GEM
specs:
aasm (5.0.8)
concurrent-ruby (~> 1.0)
actioncable (5.2.4.1)
actionpack (= 5.2.4.1)
actioncable (5.2.4.2)
actionpack (= 5.2.4.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
actionmailer (5.2.4.2)
actionpack (= 5.2.4.2)
actionview (= 5.2.4.2)
activejob (= 5.2.4.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.1)
actionview (= 5.2.4.1)
activesupport (= 5.2.4.1)
actionpack (5.2.4.2)
actionview (= 5.2.4.2)
activesupport (= 5.2.4.2)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.1)
activesupport (= 5.2.4.1)
actionview (5.2.4.2)
activesupport (= 5.2.4.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -31,49 +31,49 @@ GEM
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.4.1)
activesupport (= 5.2.4.1)
activejob (5.2.4.2)
activesupport (= 5.2.4.2)
globalid (>= 0.3.6)
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
activemodel (5.2.4.2)
activesupport (= 5.2.4.2)
activerecord (5.2.4.2)
activemodel (= 5.2.4.2)
activesupport (= 5.2.4.2)
arel (>= 9.0)
activestorage (5.2.4.1)
actionpack (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (5.2.4.2)
actionpack (= 5.2.4.2)
activerecord (= 5.2.4.2)
marcel (~> 0.3.1)
activesupport (5.2.4.1)
activesupport (5.2.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
apollo-federation (1.0.2)
apollo-federation (1.0.3)
google-protobuf (~> 3.7)
graphql (~> 1.9.8)
arel (9.0.0)
ast (2.4.0)
audited (4.9.0)
activerecord (>= 4.2, < 6.1)
aws-eventstream (1.0.3)
aws-partitions (1.281.0)
aws-sdk-core (3.91.0)
aws-partitions (1.289.0)
aws-sdk-core (3.92.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.30.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.61.0)
aws-sdk-s3 (1.61.1)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.23.1)
aws-sdk-sqs (1.24.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.1)
Expand Down Expand Up @@ -330,7 +330,7 @@ GEM
nokogiri (~> 1.10.4)
oj (>= 2.8.3)
oj_mimic_json (~> 1.0, >= 1.0.1)
method_source (0.9.2)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
Expand All @@ -353,9 +353,9 @@ GEM
oj (3.10.5)
oj_mimic_json (1.0.1)
optimist (3.0.0)
pandoc-ruby (2.0.2)
pandoc-ruby (2.1.4)
parallel (1.19.1)
parser (2.7.0.4)
parser (2.7.0.5)
ast (~> 2.4.0)
postrank-uri (1.0.24)
addressable (>= 2.4.0)
Expand All @@ -379,27 +379,27 @@ GEM
rack (>= 1.0, < 3)
rack-utf8_sanitizer (1.7.0)
rack (>= 1.0, < 3.0)
rails (5.2.4.1)
actioncable (= 5.2.4.1)
actionmailer (= 5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
activemodel (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (= 5.2.4.1)
activesupport (= 5.2.4.1)
rails (5.2.4.2)
actioncable (= 5.2.4.2)
actionmailer (= 5.2.4.2)
actionpack (= 5.2.4.2)
actionview (= 5.2.4.2)
activejob (= 5.2.4.2)
activemodel (= 5.2.4.2)
activerecord (= 5.2.4.2)
activestorage (= 5.2.4.2)
activesupport (= 5.2.4.2)
bundler (>= 1.3.0)
railties (= 5.2.4.1)
railties (= 5.2.4.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.1)
actionpack (= 5.2.4.1)
activesupport (= 5.2.4.1)
railties (5.2.4.2)
actionpack (= 5.2.4.2)
activesupport (= 5.2.4.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
Expand Down Expand Up @@ -447,7 +447,7 @@ GEM
rspec (>= 3.0.0, < 4.0.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
rspec-expectations (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-graphql_matchers (1.2)
Expand All @@ -473,10 +473,11 @@ GEM
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
rubocop-rails (2.4.2)
rubocop-rails (2.5.0)
activesupport
rack (>= 1.1)
rubocop (>= 0.72.0)
ruby-enum (0.7.2)
ruby-enum (0.8.0)
i18n
ruby-progressbar (1.10.1)
ruby_dep (1.5.0)
Expand Down Expand Up @@ -512,7 +513,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
string_pattern (2.2.1)
string_pattern (2.2.2)
regexp_parser (~> 1.3, >= 1.3.0)
strip_attributes (1.9.2)
activemodel (>= 3.0, < 7.0)
Expand Down Expand Up @@ -544,7 +545,7 @@ GEM
uniform_notifier (1.13.0)
uuid (2.3.9)
macaddr (~> 1.0)
vcr (3.0.3)
vcr (5.1.0)
webmock (3.8.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand Down Expand Up @@ -618,7 +619,7 @@ DEPENDENCIES
logstash-event (~> 1.2, >= 1.2.02)
logstash-logger (~> 0.26.1)
mailgun-ruby (~> 1.1, >= 1.1.8)
maremma (>= 4.1)
maremma (~> 4.6.1)
mini_magick (~> 4.8)
mysql2 (~> 0.4.4)
nokogiri (>= 1.10.4)
Expand Down Expand Up @@ -652,7 +653,7 @@ DEPENDENCIES
test-prof (~> 0.10.2)
turnout (~> 2.5)
uuid (~> 2.3, >= 2.3.9)
vcr (~> 3.0.3)
vcr (~> 5.1)
webmock (~> 3.1)

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion app/models/usage_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def self.parse_message(id: nil, message: nil)
month: message["month"],
date_modified: message["created"] }.compact
end
end
end
10 changes: 5 additions & 5 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
require 'flipper/middleware/memoizer'
config.middleware.use Flipper::Middleware::Memoizer

config.after_initialize do
Bullet.enable = true
Bullet.rails_logger = true
Bullet.counter_cache_enable = false
end
# config.after_initialize do
# Bullet.enable = true
# Bullet.rails_logger = true
# Bullet.counter_cache_enable = false
# end
end

BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP']
12 changes: 6 additions & 6 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

config.after_initialize do
Bullet.enable = true
Bullet.rails_logger = true
Bullet.raise = true
Bullet.counter_cache_enable = false
end
# config.after_initialize do
# Bullet.enable = true
# Bullet.rails_logger = true
# Bullet.raise = true
# Bullet.counter_cache_enable = false
# end
end
6 changes: 3 additions & 3 deletions spec/concerns/helpable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
response = subject.get_url

expect(response.body.dig("data", "responseCode")).to eq(1)
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/"}, "ttl"=>86400, "timestamp"=>"2019-05-10T12:45:27Z"}])
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/"}, "ttl"=>86400, "timestamp"=>"2020-03-28T05:08:49Z"}])
end

context "https to http" do
Expand Down Expand Up @@ -131,7 +131,7 @@
response = subject.get_url

expect(response.body.dig("data", "responseCode")).to eq(1)
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2019-07-20T08:59:55Z"}])
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2020-03-28T05:08:50Z"}])
end

it 'draft doi' do
Expand All @@ -145,7 +145,7 @@
end

it 'server not responsible' do
subject = build(:doi, doi: "10.1371/journal.pbio.2001414", client: client, aasm_state: "findable")
subject = build(:doi, doi: "10.1371/journal.pbio.2001414", url: "https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2001414", client: client, aasm_state: "findable")
expect(subject.register_url.body).to eq("errors"=>[{"status"=>400, "title"=>{"responseCode"=>301, "message"=>"That prefix doesn't live here", "handle"=>"10.1371/JOURNAL.PBIO.2001414"}}])
end
end
Expand Down
Loading

0 comments on commit 1b906dc

Please sign in to comment.