rspec-remote_fixtures 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e56645e72d9aed2902fafbf7da230bb87e9a149b9ab501b340588143e506afee
4
- data.tar.gz: 109d60b0288b9d4968f7507f5943fd22fe834bbd1bf2a4d718bcba5182992261
3
+ metadata.gz: f7f7a8e89114ad9ee79263f5fc3ecb561ae872b192320179ebb788341bbe07cb
4
+ data.tar.gz: 5b84cca59c59af35c2107a40201d66291dc74c2813ce691893ddf4bfb963d36a
5
5
  SHA512:
6
- metadata.gz: 4a58f66e38610dbe75cd1601b05c0622e2c30ca986a863642b8df92ca4d640491d9df9c665b9283dba0e33368064c15a066df00e3e45ed41f5f09585fcd0862c
7
- data.tar.gz: '091bd17bcfd4ddf520df8270433ef5c38f6d4a33a7414fb9632c2875db7082ced63afafd133cc8cf284f1fe263f41f35d48f26f00795214c6dbac935facef621'
6
+ metadata.gz: e3ec4277b5e04dbe6afec3e9031321d4bc4e661bfbbb604ff31bd107b2b8dba6596410af723bf6ac903ac8e83276fcce837fd4977bb076afe25b68e83dad0356
7
+ data.tar.gz: 020eb610da282d553a9b26e5c71dd33cd130ab1419dd35789ca7960817509b7050e48004a35d1d8c72f2ede266002430fa32f9e176f5bda81eb8f96fad2477e1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-remote_fixtures (0.2.0)
4
+ rspec-remote_fixtures (0.2.1)
5
5
  activesupport (>= 6.1)
6
6
  aws-sdk-s3 (~> 1.0)
7
7
  rspec (~> 3.12)
data/README.md CHANGED
@@ -116,4 +116,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
116
116
 
117
117
  ## Contributing
118
118
 
119
- Bug reports and pull requests are welcome on GitHub at https://github.com/aleksclark/rspec-remote-fixtures.
119
+ Bug reports and pull requests are welcome on GitHub at https://github.com/aleksclark/rspec-remote_fixtures.
@@ -37,7 +37,7 @@ module RSpec
37
37
 
38
38
  def download(remote_path, local_path)
39
39
  report_download(remote_path, local_path)
40
- if defined? Timecop && Timecop&.frozen? # rubocop:disable Style/SafeNavigation
40
+ if (defined? Timecop) && Timecop.frozen?
41
41
  Timecop.unfreeze do
42
42
  perform_download(remote_path, local_path)
43
43
  end
@@ -57,7 +57,7 @@ module RSpec
57
57
 
58
58
  def report_download(remote_path, local_path)
59
59
  msg = "#{local_path} not present locally, retrieving from #{remote_path}"
60
- RSpec.configuration.reporter.message(msg)
60
+ RemoteFixtures.report(msg)
61
61
  end
62
62
 
63
63
  def digest_match?(obj, digest)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module RemoteFixtures
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -71,7 +71,7 @@ module RSpec
71
71
 
72
72
  def self.log_not_found(relative_path)
73
73
  msg = "Warning: fixture #{relative_path} not found in manifest, this spec may fail elsewhere!"
74
- RSpec.configuration.reporter.message(msg)
74
+ report(msg)
75
75
  end
76
76
 
77
77
  def self.upload(relative_path, digest)
@@ -79,6 +79,14 @@ module RSpec
79
79
  backend_inst.upload(full_path, digest)
80
80
  end
81
81
 
82
+ def self.report(msg)
83
+ if (defined? ::RSpec) && ::RSpec.respond_to?(:configuration)
84
+ ::RSpec.configuration.reporter.message(msg)
85
+ else
86
+ puts msg
87
+ end
88
+ end
89
+
82
90
  def self.setup_rspec!
83
91
  RSpec.configuration.fixture_path = Config.fixture_path if RSpec.configuration.respond_to?(:fixture_path=)
84
92
  if RSpec.configuration.respond_to?(:file_fixture_path=)
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'https://github.com/aleksclark/rspec-remote_fixtures'
14
14
  spec.required_ruby_version = '>= 2.6.0'
15
15
 
16
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
16
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
17
17
 
18
18
  spec.metadata['homepage_uri'] = spec.homepage
19
19
  spec.metadata['source_code_uri'] = 'https://github.com/aleksclark/rspec-remote_fixtures'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-remote_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleks Clark