museo 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: 9e891c8a0cc89e8b248947665837dba154b3ef04
4
- data.tar.gz: 102b26844c89cbc800331245f904aa9ee06b219c
3
+ metadata.gz: 26989e84305268437353daf6eb4facecaace02bf
4
+ data.tar.gz: 8914c844fa5b3be86d958a6cd31deca8e4c93492
5
5
  SHA512:
6
- metadata.gz: 4d1a3ce1ba8a7fc7d5080d2ab438e6765dc698d6ae66b15d5b2afc811b30344f00af0145b42fefc409ae9a3652ece0c7e17e862d4a747ca3f283f1f19d4974fd
7
- data.tar.gz: c653d3c0d92891ec6c0ddc2ba241167e9a85e87facbc8fe1c1d9932ab994e52c25dad7b91011834cde457f13f7ee06213205cba73f0e30633a0ce5c205085e8a
6
+ metadata.gz: 9ff14ce74bb2bebda7978f3ccc89b9012553add5fd0675e654a222c613ba812e5956012dabb6580329790b74d228fba9e680325e4f117c7883f1b918492477ca
7
+ data.tar.gz: d10b5110550dba5a344e87e481c7d3ea5068e2db5192a3d42e42a260ebe821cdf3850993ca55b27c75b1ed778235e013b3296f4c5211901c3bd8865a34dfb6c4
data/Appraisals CHANGED
@@ -1,10 +1,10 @@
1
1
  appraise "rails-5" do
2
2
  gem "rspec", "3.5.0"
3
- gem "rails", "5.0.0"
3
+ gem "rails", "5.1.2"
4
4
  end
5
5
 
6
6
  appraise "rails-4" do
7
7
  gem "rspec", "2.99"
8
8
  gem "rake", "11.3.0"
9
- gem "rails", "4.2.0"
9
+ gem "rails", "4.2.9"
10
10
  end
data/README.md CHANGED
@@ -53,12 +53,42 @@ Commands:
53
53
  museo list [MATCHER] # List snapshots that match MATCHER
54
54
  ```
55
55
 
56
+ ### RSpec
57
+
58
+ ```ruby
59
+ RSpec.describe ProductsController, type: :controller do
60
+ include Museo::RSpecIntegration
61
+
62
+ describe "GET #index" do
63
+ snapshot "with no params" do
64
+ get :index
65
+ end
66
+ end
67
+ end
68
+ ```
69
+
70
+ ### Minitest
71
+
72
+ ```ruby
73
+ require "test_helper"
74
+
75
+ class ProductsControllerTest < ActionController::TestCase
76
+ include Museo::MinitestIntegration
77
+
78
+ snapshot "#index with no params" do
79
+ get :index
80
+ end
81
+ end
82
+ ```
83
+
56
84
  ## Getting Started
57
85
 
58
86
  Museo makes a custom testing command available to your controller tests to save and compare snapshots.
59
87
 
60
88
  These examples will be written with Minitest, but there are examples below for how to work with RSpec as well.
61
89
 
90
+ _Note: all code from this guide can be found at the [museo-example](https://github.com/danielma/museo-example) repo_
91
+
62
92
  Let's start with a simple setup and write some snapshot tests.
63
93
 
64
94
  `app/controllers/products_controller.rb`
@@ -4,6 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rspec", "2.99"
6
6
  gem "rake", "11.3.0"
7
- gem "rails", "4.2.0"
7
+ gem "rails", "4.2.9"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -1,64 +1,64 @@
1
1
  PATH
2
- remote: ../
2
+ remote: ..
3
3
  specs:
4
- museo (0.1.0)
5
- rails (>= 4, < 5.1)
4
+ museo (0.2.0)
5
+ rails (>= 4, < 6)
6
+ thor
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- actionmailer (4.2.0)
11
- actionpack (= 4.2.0)
12
- actionview (= 4.2.0)
13
- activejob (= 4.2.0)
11
+ actionmailer (4.2.9)
12
+ actionpack (= 4.2.9)
13
+ actionview (= 4.2.9)
14
+ activejob (= 4.2.9)
14
15
  mail (~> 2.5, >= 2.5.4)
15
16
  rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.0)
17
- actionview (= 4.2.0)
18
- activesupport (= 4.2.0)
19
- rack (~> 1.6.0)
17
+ actionpack (4.2.9)
18
+ actionview (= 4.2.9)
19
+ activesupport (= 4.2.9)
20
+ rack (~> 1.6)
20
21
  rack-test (~> 0.6.2)
21
22
  rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
- actionview (4.2.0)
24
- activesupport (= 4.2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.9)
25
+ activesupport (= 4.2.9)
25
26
  builder (~> 3.1)
26
27
  erubis (~> 2.7.0)
27
28
  rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
29
- activejob (4.2.0)
30
- activesupport (= 4.2.0)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
30
+ activejob (4.2.9)
31
+ activesupport (= 4.2.9)
31
32
  globalid (>= 0.3.0)
32
- activemodel (4.2.0)
33
- activesupport (= 4.2.0)
33
+ activemodel (4.2.9)
34
+ activesupport (= 4.2.9)
34
35
  builder (~> 3.1)
35
- activerecord (4.2.0)
36
- activemodel (= 4.2.0)
37
- activesupport (= 4.2.0)
36
+ activerecord (4.2.9)
37
+ activemodel (= 4.2.9)
38
+ activesupport (= 4.2.9)
38
39
  arel (~> 6.0)
39
- activesupport (4.2.0)
40
+ activesupport (4.2.9)
40
41
  i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
42
42
  minitest (~> 5.1)
43
43
  thread_safe (~> 0.3, >= 0.3.4)
44
44
  tzinfo (~> 1.1)
45
- appraisal (2.1.0)
45
+ appraisal (2.2.0)
46
46
  bundler
47
47
  rake
48
48
  thor (>= 0.14.0)
49
- arel (6.0.3)
49
+ arel (6.0.4)
50
50
  ast (2.3.0)
51
- awesome_print (1.7.0)
52
- builder (3.2.2)
51
+ awesome_print (1.8.0)
52
+ builder (3.2.3)
53
53
  coderay (1.1.1)
54
- concurrent-ruby (1.0.2)
55
- diff-lcs (1.2.5)
54
+ concurrent-ruby (1.0.5)
55
+ diff-lcs (1.3)
56
56
  erubis (2.7.0)
57
- ffi (1.9.14)
57
+ ffi (1.9.18)
58
58
  formatador (0.2.5)
59
- globalid (0.3.7)
60
- activesupport (>= 4.1.0)
61
- guard (2.14.0)
59
+ globalid (0.4.0)
60
+ activesupport (>= 4.2.0)
61
+ guard (2.14.1)
62
62
  formatador (>= 0.2.4)
63
63
  listen (>= 2.7, < 4.0)
64
64
  lumberjack (~> 1.0)
@@ -75,73 +75,74 @@ GEM
75
75
  guard (~> 2.1)
76
76
  guard-compat (~> 1.1)
77
77
  rspec (>= 2.99.0, < 4.0)
78
- i18n (0.7.0)
79
- json (1.8.3)
78
+ i18n (0.8.6)
80
79
  listen (3.1.5)
81
80
  rb-fsevent (~> 0.9, >= 0.9.4)
82
81
  rb-inotify (~> 0.9, >= 0.9.7)
83
82
  ruby_dep (~> 1.2)
84
83
  loofah (2.0.3)
85
84
  nokogiri (>= 1.5.9)
86
- lumberjack (1.0.10)
87
- mail (2.6.4)
85
+ lumberjack (1.0.12)
86
+ mail (2.6.6)
88
87
  mime-types (>= 1.16, < 4)
89
88
  method_source (0.8.2)
90
89
  mime-types (3.1)
91
90
  mime-types-data (~> 3.2015)
92
91
  mime-types-data (3.2016.0521)
93
- mini_portile2 (2.1.0)
94
- minitest (5.10.1)
92
+ mini_portile2 (2.2.0)
93
+ minitest (5.10.3)
95
94
  nenv (0.3.0)
96
- nokogiri (1.6.8.1)
97
- mini_portile2 (~> 2.1.0)
95
+ nokogiri (1.8.0)
96
+ mini_portile2 (~> 2.2.0)
98
97
  notiffany (0.1.1)
99
98
  nenv (~> 0.1)
100
99
  shellany (~> 0.0)
101
- parser (2.3.3.1)
100
+ parallel (1.12.0)
101
+ parser (2.4.0.0)
102
102
  ast (~> 2.2)
103
103
  powerpack (0.1.1)
104
104
  pry (0.10.4)
105
105
  coderay (~> 1.1.0)
106
106
  method_source (~> 0.8.1)
107
107
  slop (~> 3.4)
108
- rack (1.6.5)
108
+ rack (1.6.8)
109
109
  rack-test (0.6.3)
110
110
  rack (>= 1.0)
111
- rails (4.2.0)
112
- actionmailer (= 4.2.0)
113
- actionpack (= 4.2.0)
114
- actionview (= 4.2.0)
115
- activejob (= 4.2.0)
116
- activemodel (= 4.2.0)
117
- activerecord (= 4.2.0)
118
- activesupport (= 4.2.0)
111
+ rails (4.2.9)
112
+ actionmailer (= 4.2.9)
113
+ actionpack (= 4.2.9)
114
+ actionview (= 4.2.9)
115
+ activejob (= 4.2.9)
116
+ activemodel (= 4.2.9)
117
+ activerecord (= 4.2.9)
118
+ activesupport (= 4.2.9)
119
119
  bundler (>= 1.3.0, < 2.0)
120
- railties (= 4.2.0)
120
+ railties (= 4.2.9)
121
121
  sprockets-rails
122
122
  rails-deprecated_sanitizer (1.0.3)
123
123
  activesupport (>= 4.2.0.alpha)
124
- rails-dom-testing (1.0.7)
124
+ rails-dom-testing (1.0.8)
125
125
  activesupport (>= 4.2.0.beta, < 5.0)
126
- nokogiri (~> 1.6.0)
126
+ nokogiri (~> 1.6)
127
127
  rails-deprecated_sanitizer (>= 1.0.1)
128
128
  rails-html-sanitizer (1.0.3)
129
129
  loofah (~> 2.0)
130
- railties (4.2.0)
131
- actionpack (= 4.2.0)
132
- activesupport (= 4.2.0)
130
+ railties (4.2.9)
131
+ actionpack (= 4.2.9)
132
+ activesupport (= 4.2.9)
133
133
  rake (>= 0.8.7)
134
134
  thor (>= 0.18.1, < 2.0)
135
- rainbow (2.1.0)
135
+ rainbow (2.2.2)
136
+ rake
136
137
  rake (11.3.0)
137
- rb-fsevent (0.9.8)
138
- rb-inotify (0.9.7)
139
- ffi (>= 0.5.0)
138
+ rb-fsevent (0.10.2)
139
+ rb-inotify (0.9.10)
140
+ ffi (>= 0.5.0, < 2)
140
141
  rspec (2.99.0)
141
142
  rspec-core (~> 2.99.0)
142
143
  rspec-expectations (~> 2.99.0)
143
144
  rspec-mocks (~> 2.99.0)
144
- rspec-collection_matchers (1.1.2)
145
+ rspec-collection_matchers (1.1.3)
145
146
  rspec-expectations (>= 2.99.0.beta1)
146
147
  rspec-core (2.99.2)
147
148
  rspec-expectations (2.99.2)
@@ -156,8 +157,9 @@ GEM
156
157
  rspec-core (~> 2.99.0)
157
158
  rspec-expectations (~> 2.99.0)
158
159
  rspec-mocks (~> 2.99.0)
159
- rubocop (0.46.0)
160
- parser (>= 2.3.1.1, < 3.0)
160
+ rubocop (0.49.1)
161
+ parallel (~> 1.10)
162
+ parser (>= 2.3.3.1, < 3.0)
161
163
  powerpack (~> 0.1)
162
164
  rainbow (>= 1.99.1, < 3.0)
163
165
  ruby-progressbar (~> 1.7)
@@ -166,7 +168,7 @@ GEM
166
168
  ruby_dep (1.5.0)
167
169
  shellany (0.0.1)
168
170
  slop (3.6.0)
169
- sprockets (3.7.0)
171
+ sprockets (3.7.1)
170
172
  concurrent-ruby (~> 1.0)
171
173
  rack (> 1, < 3)
172
174
  sprockets-rails (3.2.0)
@@ -174,10 +176,10 @@ GEM
174
176
  activesupport (>= 4.0)
175
177
  sprockets (>= 3.0.0)
176
178
  thor (0.19.4)
177
- thread_safe (0.3.5)
178
- tzinfo (1.2.2)
179
+ thread_safe (0.3.6)
180
+ tzinfo (1.2.3)
179
181
  thread_safe (~> 0.1)
180
- unicode-display_width (1.1.2)
182
+ unicode-display_width (1.3.0)
181
183
 
182
184
  PLATFORMS
183
185
  ruby
@@ -190,11 +192,11 @@ DEPENDENCIES
190
192
  guard-rspec
191
193
  museo!
192
194
  pry
193
- rails (= 4.2.0)
195
+ rails (= 4.2.9)
194
196
  rake (= 11.3.0)
195
197
  rspec (= 2.99)
196
198
  rspec-rails
197
199
  rubocop (~> 0.42)
198
200
 
199
201
  BUNDLED WITH
200
- 1.13.6
202
+ 1.15.3
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rspec", "3.5.0"
6
- gem "rails", "5.0.0"
6
+ gem "rails", "5.1.2"
7
7
 
8
- gemspec :path => "../"
8
+ gemspec path: "../"
@@ -1,66 +1,67 @@
1
1
  PATH
2
- remote: ../
2
+ remote: ..
3
3
  specs:
4
- museo (0.1.0)
5
- rails (>= 4, < 5.1)
4
+ museo (0.2.0)
5
+ rails (>= 4, < 6)
6
+ thor
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- actioncable (5.0.0)
11
- actionpack (= 5.0.0)
12
- nio4r (~> 1.2)
11
+ actioncable (5.1.2)
12
+ actionpack (= 5.1.2)
13
+ nio4r (~> 2.0)
13
14
  websocket-driver (~> 0.6.1)
14
- actionmailer (5.0.0)
15
- actionpack (= 5.0.0)
16
- actionview (= 5.0.0)
17
- activejob (= 5.0.0)
15
+ actionmailer (5.1.2)
16
+ actionpack (= 5.1.2)
17
+ actionview (= 5.1.2)
18
+ activejob (= 5.1.2)
18
19
  mail (~> 2.5, >= 2.5.4)
19
20
  rails-dom-testing (~> 2.0)
20
- actionpack (5.0.0)
21
- actionview (= 5.0.0)
22
- activesupport (= 5.0.0)
21
+ actionpack (5.1.2)
22
+ actionview (= 5.1.2)
23
+ activesupport (= 5.1.2)
23
24
  rack (~> 2.0)
24
25
  rack-test (~> 0.6.3)
25
26
  rails-dom-testing (~> 2.0)
26
27
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.0.0)
28
- activesupport (= 5.0.0)
28
+ actionview (5.1.2)
29
+ activesupport (= 5.1.2)
29
30
  builder (~> 3.1)
30
- erubis (~> 2.7.0)
31
+ erubi (~> 1.4)
31
32
  rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
- activejob (5.0.0)
34
- activesupport (= 5.0.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.1.2)
35
+ activesupport (= 5.1.2)
35
36
  globalid (>= 0.3.6)
36
- activemodel (5.0.0)
37
- activesupport (= 5.0.0)
38
- activerecord (5.0.0)
39
- activemodel (= 5.0.0)
40
- activesupport (= 5.0.0)
41
- arel (~> 7.0)
42
- activesupport (5.0.0)
37
+ activemodel (5.1.2)
38
+ activesupport (= 5.1.2)
39
+ activerecord (5.1.2)
40
+ activemodel (= 5.1.2)
41
+ activesupport (= 5.1.2)
42
+ arel (~> 8.0)
43
+ activesupport (5.1.2)
43
44
  concurrent-ruby (~> 1.0, >= 1.0.2)
44
45
  i18n (~> 0.7)
45
46
  minitest (~> 5.1)
46
47
  tzinfo (~> 1.1)
47
- appraisal (2.1.0)
48
+ appraisal (2.2.0)
48
49
  bundler
49
50
  rake
50
51
  thor (>= 0.14.0)
51
- arel (7.1.4)
52
+ arel (8.0.0)
52
53
  ast (2.3.0)
53
- awesome_print (1.7.0)
54
- builder (3.2.2)
54
+ awesome_print (1.8.0)
55
+ builder (3.2.3)
55
56
  coderay (1.1.1)
56
- concurrent-ruby (1.0.2)
57
- diff-lcs (1.2.5)
58
- erubis (2.7.0)
59
- ffi (1.9.14)
57
+ concurrent-ruby (1.0.5)
58
+ diff-lcs (1.3)
59
+ erubi (1.6.1)
60
+ ffi (1.9.18)
60
61
  formatador (0.2.5)
61
- globalid (0.3.7)
62
- activesupport (>= 4.1.0)
63
- guard (2.14.0)
62
+ globalid (0.4.0)
63
+ activesupport (>= 4.2.0)
64
+ guard (2.14.1)
64
65
  formatador (>= 0.2.4)
65
66
  listen (>= 2.7, < 4.0)
66
67
  lumberjack (~> 1.0)
@@ -77,67 +78,69 @@ GEM
77
78
  guard (~> 2.1)
78
79
  guard-compat (~> 1.1)
79
80
  rspec (>= 2.99.0, < 4.0)
80
- i18n (0.7.0)
81
+ i18n (0.8.6)
81
82
  listen (3.1.5)
82
83
  rb-fsevent (~> 0.9, >= 0.9.4)
83
84
  rb-inotify (~> 0.9, >= 0.9.7)
84
85
  ruby_dep (~> 1.2)
85
86
  loofah (2.0.3)
86
87
  nokogiri (>= 1.5.9)
87
- lumberjack (1.0.10)
88
- mail (2.6.4)
88
+ lumberjack (1.0.12)
89
+ mail (2.6.6)
89
90
  mime-types (>= 1.16, < 4)
90
91
  method_source (0.8.2)
91
92
  mime-types (3.1)
92
93
  mime-types-data (~> 3.2015)
93
94
  mime-types-data (3.2016.0521)
94
- mini_portile2 (2.1.0)
95
- minitest (5.10.1)
95
+ mini_portile2 (2.2.0)
96
+ minitest (5.10.3)
96
97
  nenv (0.3.0)
97
- nio4r (1.2.1)
98
- nokogiri (1.6.8.1)
99
- mini_portile2 (~> 2.1.0)
98
+ nio4r (2.1.0)
99
+ nokogiri (1.8.0)
100
+ mini_portile2 (~> 2.2.0)
100
101
  notiffany (0.1.1)
101
102
  nenv (~> 0.1)
102
103
  shellany (~> 0.0)
103
- parser (2.3.3.1)
104
+ parallel (1.12.0)
105
+ parser (2.4.0.0)
104
106
  ast (~> 2.2)
105
107
  powerpack (0.1.1)
106
108
  pry (0.10.4)
107
109
  coderay (~> 1.1.0)
108
110
  method_source (~> 0.8.1)
109
111
  slop (~> 3.4)
110
- rack (2.0.1)
112
+ rack (2.0.3)
111
113
  rack-test (0.6.3)
112
114
  rack (>= 1.0)
113
- rails (5.0.0)
114
- actioncable (= 5.0.0)
115
- actionmailer (= 5.0.0)
116
- actionpack (= 5.0.0)
117
- actionview (= 5.0.0)
118
- activejob (= 5.0.0)
119
- activemodel (= 5.0.0)
120
- activerecord (= 5.0.0)
121
- activesupport (= 5.0.0)
115
+ rails (5.1.2)
116
+ actioncable (= 5.1.2)
117
+ actionmailer (= 5.1.2)
118
+ actionpack (= 5.1.2)
119
+ actionview (= 5.1.2)
120
+ activejob (= 5.1.2)
121
+ activemodel (= 5.1.2)
122
+ activerecord (= 5.1.2)
123
+ activesupport (= 5.1.2)
122
124
  bundler (>= 1.3.0, < 2.0)
123
- railties (= 5.0.0)
125
+ railties (= 5.1.2)
124
126
  sprockets-rails (>= 2.0.0)
125
- rails-dom-testing (2.0.1)
126
- activesupport (>= 4.2.0, < 6.0)
127
- nokogiri (~> 1.6.0)
127
+ rails-dom-testing (2.0.3)
128
+ activesupport (>= 4.2.0)
129
+ nokogiri (>= 1.6)
128
130
  rails-html-sanitizer (1.0.3)
129
131
  loofah (~> 2.0)
130
- railties (5.0.0)
131
- actionpack (= 5.0.0)
132
- activesupport (= 5.0.0)
132
+ railties (5.1.2)
133
+ actionpack (= 5.1.2)
134
+ activesupport (= 5.1.2)
133
135
  method_source
134
136
  rake (>= 0.8.7)
135
137
  thor (>= 0.18.1, < 2.0)
136
- rainbow (2.1.0)
138
+ rainbow (2.2.2)
139
+ rake
137
140
  rake (12.0.0)
138
- rb-fsevent (0.9.8)
139
- rb-inotify (0.9.7)
140
- ffi (>= 0.5.0)
141
+ rb-fsevent (0.10.2)
142
+ rb-inotify (0.9.10)
143
+ ffi (>= 0.5.0, < 2)
141
144
  rspec (3.5.0)
142
145
  rspec-core (~> 3.5.0)
143
146
  rspec-expectations (~> 3.5.0)
@@ -159,8 +162,9 @@ GEM
159
162
  rspec-mocks (~> 3.5.0)
160
163
  rspec-support (~> 3.5.0)
161
164
  rspec-support (3.5.0)
162
- rubocop (0.46.0)
163
- parser (>= 2.3.1.1, < 3.0)
165
+ rubocop (0.49.1)
166
+ parallel (~> 1.10)
167
+ parser (>= 2.3.3.1, < 3.0)
164
168
  powerpack (~> 0.1)
165
169
  rainbow (>= 1.99.1, < 3.0)
166
170
  ruby-progressbar (~> 1.7)
@@ -169,7 +173,7 @@ GEM
169
173
  ruby_dep (1.5.0)
170
174
  shellany (0.0.1)
171
175
  slop (3.6.0)
172
- sprockets (3.7.0)
176
+ sprockets (3.7.1)
173
177
  concurrent-ruby (~> 1.0)
174
178
  rack (> 1, < 3)
175
179
  sprockets-rails (3.2.0)
@@ -177,11 +181,11 @@ GEM
177
181
  activesupport (>= 4.0)
178
182
  sprockets (>= 3.0.0)
179
183
  thor (0.19.4)
180
- thread_safe (0.3.5)
181
- tzinfo (1.2.2)
184
+ thread_safe (0.3.6)
185
+ tzinfo (1.2.3)
182
186
  thread_safe (~> 0.1)
183
- unicode-display_width (1.1.2)
184
- websocket-driver (0.6.4)
187
+ unicode-display_width (1.3.0)
188
+ websocket-driver (0.6.5)
185
189
  websocket-extensions (>= 0.1.0)
186
190
  websocket-extensions (0.1.2)
187
191
 
@@ -196,10 +200,10 @@ DEPENDENCIES
196
200
  guard-rspec
197
201
  museo!
198
202
  pry
199
- rails (= 5.0.0)
203
+ rails (= 5.1.2)
200
204
  rspec (= 3.5.0)
201
205
  rspec-rails
202
206
  rubocop (~> 0.42)
203
207
 
204
208
  BUNDLED WITH
205
- 1.13.6
209
+ 1.15.3
@@ -38,6 +38,14 @@ module Museo
38
38
  def clear_configuration!
39
39
  @configuration = Configuration.new
40
40
  end
41
+
42
+ def clear!(matcher = nil)
43
+ directory_to_clear = pathname(matcher)
44
+
45
+ return unless File.directory?(directory_to_clear)
46
+
47
+ FileUtils.remove_dir(directory_to_clear)
48
+ end
41
49
  end
42
50
 
43
51
  class Configuration
@@ -17,12 +17,9 @@ module Museo
17
17
  desc "clear [MATCHER]", "Clear snapshots that match MATCHER"
18
18
  def clear(matcher = nil)
19
19
  list(matcher)
20
- directory_to_clear = find_directory(matcher)
21
-
22
- return unless File.directory?(directory_to_clear)
23
20
 
24
21
  puts "Removing snapshots"
25
- FileUtils.remove_dir(directory_to_clear)
22
+ Museo.clear!(matcher)
26
23
  end
27
24
 
28
25
  private
@@ -1,3 +1,3 @@
1
1
  module Museo
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "rails", ">= 4", "< 5.1"
21
+ spec.add_dependency "rails", ">= 4", "< 6"
22
22
  spec.add_dependency "thor"
23
23
  spec.add_development_dependency "appraisal"
24
24
  spec.add_development_dependency "rubocop", "~> 0.42"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: museo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Ma
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-16 00:00:00.000000000 Z
11
+ date: 2017-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.1'
22
+ version: '6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.1'
32
+ version: '6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: thor
35
35
  requirement: !ruby/object:Gem::Requirement