rspec-snapshot 0.1.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ad0d5d187025c941d709184e5dc59c3bc0c4a3b8930e968da9542c73a554b51
4
- data.tar.gz: 2c7b8ea85fee0876131d0fa8fa2f9daaf1be595befd9dd5a362f879d385f6ad1
3
+ metadata.gz: e9e969397a7cd054e4bd77820f0e91574d45556659fcded20178ca52f8bc077d
4
+ data.tar.gz: ca056e2c01e588a69aa51bb86b88af081acff4abd580cf74b1b624f4e3d55822
5
5
  SHA512:
6
- metadata.gz: 05567f1f4c658a9d065c73634fcd73944f4263ac3616fe220db65e527f1b318ab5ecd3e7fde35fbc5234cde50c9f842541653b94fecf33baedcfb43a95c3ccb0
7
- data.tar.gz: 18a7088b304ee61b2fc8d1a2bb8d63ebbd2cf29949c63f30dbb226461a35d3ddfd104104e586bf1e4b2e00252362ce45ca73d4f42d05f380b3767bcb70862663
6
+ metadata.gz: 5e7415a66e8182852a55ac99d922bb03488114cc0c3cf97f56c49ea11ff419f2a53dfbb67bd6aa3cd5956a9f533d3a4c8933897e651a6dc5578296366be2df43
7
+ data.tar.gz: 69d2418bbfd2c94096ce3aae0dcb6a3415d8c217d491ddd502aa5324e0dd6a799ce595cfa9b846c9a2c474679301ac2ab3c2bd49d41010f39c5fa14c4d55aa2a
data/.rubocop.yml ADDED
@@ -0,0 +1,89 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ AllCops:
5
+ NewCops: "enable"
6
+ Exclude:
7
+ - "Gemfile"
8
+ - "Rakefile"
9
+ - "bin/**/*"
10
+ - "spec/fixtures/**/*"
11
+ TargetRubyVersion: 2.5
12
+
13
+ Layout/EmptyLinesAroundAttributeAccessor:
14
+ Enabled: true
15
+ Layout/LineLength:
16
+ Max: 80
17
+ Layout/SpaceAroundMethodCallOperator:
18
+ Enabled: true
19
+
20
+ Lint:
21
+ Severity: error
22
+ Lint/DeprecatedOpenSSLConstant:
23
+ Enabled: true
24
+ Lint/RaiseException:
25
+ Enabled: true
26
+ Lint/StructNewOverride:
27
+ Enabled: true
28
+
29
+ Metrics/BlockLength:
30
+ Exclude:
31
+ - "rspec-snapshot.gemspec"
32
+ - "spec/**/*"
33
+
34
+ RSpec/AnyInstance:
35
+ Enabled: true
36
+ RSpec/ContextWording:
37
+ Prefixes:
38
+ - when
39
+ - with
40
+ - without
41
+ - and
42
+ RSpec/ExampleLength:
43
+ Enabled: true
44
+ Max: 10
45
+ RSpec/ExpectInHook:
46
+ Enabled: true
47
+ RSpec/FilePath:
48
+ Enabled: true
49
+ RSpec/InstanceVariable:
50
+ Enabled: false
51
+ RSpec/LeakyConstantDeclaration:
52
+ Enabled: true
53
+ RSpec/LetSetup:
54
+ Enabled: true
55
+ RSpec/MessageSpies:
56
+ Enabled: true
57
+ RSpec/MultipleExpectations:
58
+ Enabled: true
59
+ RSpec/MultipleMemoizedHelpers:
60
+ Enabled: false
61
+ RSpec/NamedSubject:
62
+ Enabled: false # Disabled for preference
63
+ RSpec/NestedGroups:
64
+ Max: 6
65
+ RSpec/ScatteredSetup:
66
+ Enabled: true
67
+ RSpec/SubjectStub:
68
+ Enabled: true
69
+ RSpec/VerifiedDoubles:
70
+ Enabled: true
71
+
72
+ Style/AccessModifierDeclarations:
73
+ Enabled: false # Disabled since we follow Clean Code's newspaper code structure
74
+ Style/DoubleNegation:
75
+ Enabled: true
76
+ Style/ExponentialNotation:
77
+ Enabled: true
78
+ Style/HashEachMethods:
79
+ Enabled: true
80
+ Style/HashTransformKeys:
81
+ Enabled: true
82
+ Style/HashTransformValues:
83
+ Enabled: true
84
+ Style/LineEndConcatenation:
85
+ Enabled: false
86
+ Style/MultilineTernaryOperator:
87
+ Enabled: false # Disabled due to preference
88
+ Style/SlicingWithRange:
89
+ Enabled: true
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.3
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.5
5
- - 2.3.1
6
- before_install: gem install bundler -v 1.12.5
4
+ - 2.5.9
5
+ - 2.6.7
6
+ - 2.7.3
7
+ before_install: gem install bundler:2.2.20
data/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2016 Wei Zhu
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
19
+ OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # RSpec::Snapshot [![Build Status](https://travis-ci.org/yesmeck/rspec-snapshot.svg?branch=master)](https://travis-ci.org/yesmeck/rspec-snapshot)
1
+ # RSpec::Snapshot [![Build Status](https://travis-ci.com/levinmr/rspec-snapshot.svg?branch=master)](https://travis-ci.com/levinmr/rspec-snapshot)
2
2
 
3
- Adding snapshot testing to RSpec, inspired by [Jest](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html).
3
+ Adds snapshot testing to RSpec, inspired by [Jest](https://jestjs.io/).
4
4
 
5
5
  ## Installation
6
6
 
@@ -12,7 +12,7 @@ gem 'rspec-snapshot'
12
12
 
13
13
  And then execute:
14
14
 
15
- $ bundle
15
+ $ bundle install
16
16
 
17
17
  Or install it yourself as:
18
18
 
@@ -20,25 +20,35 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- ### Configration
23
+ The gem provides `match_snapshot` and `snapshot` RSpec matchers which take
24
+ a snapshot name as an argument like:
24
25
 
25
26
  ```ruby
26
- RSpec.configure do |config|
27
- # The default setting is `:relative`, which means snapshots will be generate to
28
- # the relative path of the spec file.
29
- config.snapshot_dir = "spec/fixtures/snapshots"
30
- end
27
+ # match_snapshot
28
+ expect(generated_email).to match_snapshot('welcome_email')
29
+
30
+ # match argument with snapshot
31
+ expect(logger).to have_received(:info).with(snapshot('log message'))
31
32
  ```
32
33
 
34
+ When a test is run using a snapshot matcher and a snapshot file does not exist
35
+ matching the passed name, the test value encountered will be serialized and
36
+ stored in your snapshot directory as the file: `#{snapshot_name}.snap`
37
+
38
+ When a test is run using a snapshot matcher and a snapshot file exists matching
39
+ the passed name, then the test value encountered will be serialized and
40
+ compared to the snapshot file contents. If the values match your test passes,
41
+ otherwise it fails.
42
+
33
43
  ### Rails request testing
34
44
 
35
45
  ```ruby
36
- RSpec.describe "Posts", type: :request do
37
- describe "GET /posts" do
38
- it "returns a list of post" do
46
+ RSpec.describe 'Posts', type: :request do
47
+ describe 'GET /posts' do
48
+ it 'returns a list of post' do
39
49
  get posts_path
40
50
 
41
- expect(response.body).to match_snapshot("get_posts")
51
+ expect(response.body).to match_snapshot('get_posts')
42
52
  end
43
53
  end
44
54
  end
@@ -47,28 +57,112 @@ end
47
57
  ### Rails view testing
48
58
 
49
59
  ```ruby
50
- RSpec.describe "widgets/index", type: :view do
51
- it "displays all the widgets" do
60
+ RSpec.describe 'widgets/index', type: :view do
61
+ it 'displays all the widgets' do
52
62
  assign(:widgets, [
53
- Widget.create!(:name => "slicer"),
54
- Widget.create!(:name => "dicer")
63
+ Widget.create!(:name => 'slicer'),
64
+ Widget.create!(:name => 'dicer')
55
65
  ])
56
66
 
57
67
  render
58
68
 
59
- expect(rendered).to match_snapshot("widgets/index")
69
+ expect(rendered).to match_snapshot('widgets/index')
60
70
  end
61
71
  end
62
72
  ```
63
73
 
64
- Use your imagination for other usages!
74
+ ### UPDATE_SNAPSHOTS environment variable
75
+
76
+ Occasionally you may want to regenerate all encountered snapshots for a set of
77
+ tests. To do this, just set the UPDATE_SNAPSHOTS environment variable for your
78
+ test command.
79
+
80
+ Update all snapshots
81
+
82
+ $ UPDATE_SNAPSHOTS=true bundle exec rspec
83
+
84
+ Update snapshots for some subset of tests
85
+
86
+ $ UPDATE_SNAPSHOTS=true bundle exec rspec spec/foo/bar
87
+
88
+ ## Configuration
89
+
90
+ Global configurations for rspec-snapshot are optional. Details below:
91
+
92
+ ```ruby
93
+ RSpec.configure do |config|
94
+ # The default setting is `:relative`, which means snapshot files will be
95
+ # created in a '__snapshots__' directory adjacent to the spec file where the
96
+ # matcher is used.
97
+ #
98
+ # Set this value to put all snapshots in a fixed directory
99
+ config.snapshot_dir = "spec/fixtures/snapshots"
100
+
101
+ # Defaults to using the awesome_print gem to serialize values for snapshots
102
+ #
103
+ # Set this value to use a custom snapshot serializer
104
+ config.snapshot_serializer = MyFavoriteSerializer
105
+ end
106
+ ```
107
+
108
+ ### Custom serializers
109
+
110
+ By default, values to be stored as snapshots are serialized to human readable
111
+ string form using the [awesome_print](https://github.com/awesome-print/awesome_print) gem.
112
+
113
+ You can pass custom serializers to `rspec-snapshot` if you prefer. Pass a serializer class name to the global RSpec config, or to an individual
114
+ matcher as a config option:
115
+
116
+ ```ruby
117
+ # Set a custom serializer for all tests
118
+ RSpec.configure do |config|
119
+ config.snapshot_serializer = MyCoolGeneralSerializer
120
+ end
121
+
122
+ # Set a custom serializer for this specific test
123
+ expect(html_response).to(
124
+ match_snapshot('html_response', { snapshot_serializer: MyAwesomeHTMLSerializer })
125
+ )
126
+ ```
127
+
128
+ Serializer classes are required to have one instance method `dump` which takes
129
+ the value to be serialized and returns a string.
130
+
131
+ ## Migration
132
+
133
+ If you're updating to version 2.x.x from 1.x.x, you may need to update all your existing snapshots since the serialization method has changed.
134
+
135
+ $ UPDATE_SNAPSHOTS=true bundle exec rspec
65
136
 
66
137
  ## Development
67
138
 
68
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
139
+ ### Initial Setup
69
140
 
70
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
141
+ Install a current version of ruby (> 2.5) and bundler. Then install gems
142
+
143
+ $ bundle install
144
+
145
+ ### Linting
146
+
147
+ $ bundle exec rubocop
148
+
149
+ ### Unit tests
150
+
151
+ $ bundle exec rspec
152
+
153
+ ### Interactive console with the gem code loaded
154
+
155
+ $ bin/console
156
+
157
+ ### Rake commands
158
+
159
+ To install this gem onto your local machine, run `bundle exec rake install`. To
160
+ release a new version, update the version number in `version.rb`, and then run
161
+ `bundle exec rake release`, which will create a git tag for the version, push
162
+ git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
71
163
 
72
164
  ## Contributing
73
165
 
74
- Bug reports and pull requests are welcome on GitHub at https://github.com/yesmeck/rspec-snapshot.
166
+ Bug reports and pull requests are welcome on GitHub at https://github.com/levinmr/rspec-snapshot.
167
+
168
+ A big thanks to the original author [@yesmeck](https://github.com/yesmeck).
@@ -1,4 +1,6 @@
1
- require "rspec"
2
- require "rspec/snapshot/version"
3
- require "rspec/snapshot/configuration"
4
- require "rspec/snapshot/matchers"
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec'
4
+ require 'rspec/snapshot/version'
5
+ require 'rspec/snapshot/configuration'
6
+ require 'rspec/snapshot/matchers'
@@ -1,11 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RSpec
4
+ # rubocop:disable Style/Documentation
2
5
  module Snapshot
6
+ # rubocop:disable Lint/EmptyClass
3
7
  class Configuration; end
8
+ # rubocop:enable Lint/EmptyClass
4
9
 
5
10
  def self.initialize_configuration(config)
6
- config.add_setting :snapshot_dir, :default => :relative
11
+ config.add_setting :snapshot_dir, default: :relative
12
+
13
+ config.add_setting :snapshot_serializer, default: nil
7
14
  end
8
15
 
9
16
  initialize_configuration RSpec.configuration
10
17
  end
18
+ # rubocop:enable Style/Documentation
11
19
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'awesome_print'
4
+
5
+ module RSpec
6
+ module Snapshot
7
+ # Serializes values in a human readable way for snapshots using the
8
+ # awesome_print gem
9
+ class DefaultSerializer
10
+ def dump(value)
11
+ value.ai(plain: true, indent: 2)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,12 +1,20 @@
1
- require "rspec/snapshot/matchers/match_snapshot"
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/snapshot/matchers/match_snapshot'
2
4
 
3
5
  module RSpec
4
6
  module Snapshot
7
+ # rubocop:disable Style/Documentation
5
8
  module Matchers
6
- def match_snapshot(snapshot_name)
7
- MatchSnapShot.new(self.class.metadata, snapshot_name)
9
+ def match_snapshot(snapshot_name, config = {})
10
+ MatchSnapShot.new(RSpec.current_example.metadata,
11
+ snapshot_name,
12
+ config)
8
13
  end
14
+
15
+ alias snapshot match_snapshot
9
16
  end
17
+ # rubocop:enable Style/Documentation
10
18
  end
11
19
  end
12
20
 
@@ -1,35 +1,95 @@
1
- require "fileutils"
1
+ # frozen_string_literal: true
2
+
3
+ require 'fileutils'
4
+ require 'rspec/snapshot/default_serializer'
2
5
 
3
6
  module RSpec
4
7
  module Snapshot
5
8
  module Matchers
9
+ # RSpec matcher for snapshot testing
6
10
  class MatchSnapShot
7
11
  attr_reader :actual, :expected
8
12
 
9
- def initialize(metadata, snapshot_name)
13
+ def initialize(metadata, snapshot_name, config)
10
14
  @metadata = metadata
11
15
  @snapshot_name = snapshot_name
16
+ @config = config
17
+ @serializer = serializer_class.new
18
+ @snapshot_path = File.join(snapshot_dir, "#{@snapshot_name}.snap")
19
+ create_snapshot_dir
20
+ end
21
+
22
+ private def serializer_class
23
+ if @config[:snapshot_serializer]
24
+ @config[:snapshot_serializer]
25
+ elsif RSpec.configuration.snapshot_serializer
26
+ RSpec.configuration.snapshot_serializer
27
+ else
28
+ DefaultSerializer
29
+ end
30
+ end
31
+
32
+ private def snapshot_dir
33
+ if RSpec.configuration.snapshot_dir.to_s == 'relative'
34
+ File.dirname(@metadata[:file_path]) << '/__snapshots__'
35
+ else
36
+ RSpec.configuration.snapshot_dir
37
+ end
38
+ end
39
+
40
+ private def create_snapshot_dir
41
+ return if Dir.exist?(File.dirname(@snapshot_path))
42
+
43
+ FileUtils.mkdir_p(File.dirname(@snapshot_path))
12
44
  end
13
45
 
14
46
  def matches?(actual)
15
- @actual = actual
16
- filename = "#{@snapshot_name}.snap"
17
- snap_path = File.join(snapshot_dir, filename)
18
- FileUtils.mkdir_p(File.dirname(snap_path)) unless Dir.exist?(File.dirname(snap_path))
19
- if File.exist?(snap_path)
20
- file = File.new(snap_path)
21
- @expected = file.read
22
- file.close
23
- @actual.to_s == @expected
47
+ @actual = serialize(actual)
48
+
49
+ write_snapshot
50
+
51
+ @expected = read_snapshot
52
+
53
+ @actual == @expected
54
+ end
55
+
56
+ # === is the method called when matching an argument
57
+ alias === matches?
58
+
59
+ private def serialize(value)
60
+ if value.is_a?(String)
61
+ value
24
62
  else
25
- RSpec.configuration.reporter.message "Generate #{snap_path}"
26
- file = File.new(snap_path, "w+")
27
- file.write(@actual)
28
- file.close
29
- true
63
+ @serializer.dump(value)
30
64
  end
31
65
  end
32
66
 
67
+ private def write_snapshot
68
+ return unless should_write?
69
+
70
+ RSpec.configuration.reporter.message(
71
+ "Snapshot written: #{@snapshot_path}"
72
+ )
73
+ file = File.new(@snapshot_path, 'w+')
74
+ file.write(@actual)
75
+ file.close
76
+ end
77
+
78
+ private def should_write?
79
+ update_snapshots? || !File.exist?(@snapshot_path)
80
+ end
81
+
82
+ private def update_snapshots?
83
+ ENV['UPDATE_SNAPSHOTS']
84
+ end
85
+
86
+ private def read_snapshot
87
+ file = File.new(@snapshot_path)
88
+ value = file.read
89
+ file.close
90
+ value
91
+ end
92
+
33
93
  def diffable?
34
94
  true
35
95
  end
@@ -38,12 +98,8 @@ module RSpec
38
98
  "\nexpected: #{@expected}\n got: #{@actual}\n"
39
99
  end
40
100
 
41
- def snapshot_dir
42
- if RSpec.configuration.snapshot_dir.to_s == 'relative'
43
- File.dirname(@metadata[:file_path]) << "/__snapshots__"
44
- else
45
- RSpec.configuration.snapshot_dir
46
- end
101
+ def failure_message_when_negated
102
+ "\nexpected: #{@expected} not to match #{@actual}\n"
47
103
  end
48
104
  end
49
105
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RSpec
2
4
  module Snapshot
3
- VERSION = "0.1.2"
5
+ VERSION = '2.0.0'
4
6
  end
5
7
  end
@@ -1,27 +1,37 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'rspec/snapshot/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "rspec-snapshot"
8
+ spec.name = 'rspec-snapshot'
8
9
  spec.version = RSpec::Snapshot::VERSION
9
- spec.authors = ["Wei Zhu"]
10
- spec.email = ["yesmeck@gmail.com"]
10
+ spec.authors = ['Mike Levin']
11
+ spec.email = ['michael_r_levin@yahoo.com']
12
+ spec.license = 'MIT'
11
13
 
12
- spec.summary = %q{RSpec Snapshot Matcher}
13
- spec.description = %q{Adding snapshot testing to RSpec}
14
- spec.homepage = "https://github.com/yesmeck/rspec-snapshot"
14
+ spec.summary = 'RSpec Snapshot Matcher'
15
+ spec.description = 'Adding snapshot testing to RSpec'
16
+ spec.homepage = 'https://github.com/levinmr/rspec-snapshot'
15
17
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ f.match(%r{^(test|spec|features)/})
20
+ end
21
+ spec.bindir = 'exe'
18
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
23
+ spec.require_paths = ['lib']
24
+
25
+ spec.required_ruby_version = '>= 2.5.0'
20
26
 
21
- spec.add_dependency "rspec", "> 3.0.0"
27
+ spec.add_dependency 'awesome_print', '> 1.0.0'
28
+ spec.add_dependency 'rspec', '> 3.0.0'
22
29
 
23
- spec.add_development_dependency "bundler", "~> 1.12"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "pry", "~> 0.10.4"
26
- spec.add_development_dependency "activesupport", "~> 5.0.0"
30
+ spec.add_development_dependency 'bundler', '~> 2.2'
31
+ spec.add_development_dependency 'byebug'
32
+ spec.add_development_dependency 'pry-byebug'
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
+ spec.add_development_dependency 'rubocop', '~> 1.17'
35
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.4'
36
+ spec.add_development_dependency 'simplecov'
27
37
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Wei Zhu
8
- autorequire:
7
+ - Mike Levin
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-29 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: awesome_print
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -30,81 +44,127 @@ dependencies:
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '1.12'
47
+ version: '2.2'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '1.12'
54
+ version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: rake
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
87
  - - "~>"
46
88
  - !ruby/object:Gem::Version
47
- version: '10.0'
89
+ version: '13.0'
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
94
  - - "~>"
53
95
  - !ruby/object:Gem::Version
54
- version: '10.0'
96
+ version: '13.0'
55
97
  - !ruby/object:Gem::Dependency
56
- name: pry
98
+ name: rubocop
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
101
  - - "~>"
60
102
  - !ruby/object:Gem::Version
61
- version: 0.10.4
103
+ version: '1.17'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
108
  - - "~>"
67
109
  - !ruby/object:Gem::Version
68
- version: 0.10.4
110
+ version: '1.17'
69
111
  - !ruby/object:Gem::Dependency
70
- name: activesupport
112
+ name: rubocop-rspec
71
113
  requirement: !ruby/object:Gem::Requirement
72
114
  requirements:
73
115
  - - "~>"
74
116
  - !ruby/object:Gem::Version
75
- version: 5.0.0
117
+ version: '2.4'
76
118
  type: :development
77
119
  prerelease: false
78
120
  version_requirements: !ruby/object:Gem::Requirement
79
121
  requirements:
80
122
  - - "~>"
81
123
  - !ruby/object:Gem::Version
82
- version: 5.0.0
124
+ version: '2.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
83
139
  description: Adding snapshot testing to RSpec
84
140
  email:
85
- - yesmeck@gmail.com
141
+ - michael_r_levin@yahoo.com
86
142
  executables: []
87
143
  extensions: []
88
144
  extra_rdoc_files: []
89
145
  files:
90
146
  - ".gitignore"
91
147
  - ".rspec"
148
+ - ".rubocop.yml"
149
+ - ".ruby-version"
92
150
  - ".travis.yml"
93
151
  - Gemfile
152
+ - LICENSE.md
94
153
  - README.md
95
154
  - Rakefile
96
155
  - bin/console
97
- - bin/setup
98
156
  - lib/rspec/snapshot.rb
99
157
  - lib/rspec/snapshot/configuration.rb
158
+ - lib/rspec/snapshot/default_serializer.rb
100
159
  - lib/rspec/snapshot/matchers.rb
101
160
  - lib/rspec/snapshot/matchers/match_snapshot.rb
102
161
  - lib/rspec/snapshot/version.rb
103
162
  - rspec-snapshot.gemspec
104
- homepage: https://github.com/yesmeck/rspec-snapshot
105
- licenses: []
163
+ homepage: https://github.com/levinmr/rspec-snapshot
164
+ licenses:
165
+ - MIT
106
166
  metadata: {}
107
- post_install_message:
167
+ post_install_message:
108
168
  rdoc_options: []
109
169
  require_paths:
110
170
  - lib
@@ -112,15 +172,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
172
  requirements:
113
173
  - - ">="
114
174
  - !ruby/object:Gem::Version
115
- version: '0'
175
+ version: 2.5.0
116
176
  required_rubygems_version: !ruby/object:Gem::Requirement
117
177
  requirements:
118
178
  - - ">="
119
179
  - !ruby/object:Gem::Version
120
180
  version: '0'
121
181
  requirements: []
122
- rubygems_version: 3.0.3
123
- signing_key:
182
+ rubygems_version: 3.1.6
183
+ signing_key:
124
184
  specification_version: 4
125
185
  summary: RSpec Snapshot Matcher
126
186
  test_files: []
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here