fastly-rails 0.2.0 → 0.3.0
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 +4 -4
- data/lib/fastly-rails/active_record/surrogate_key.rb +3 -3
- data/lib/fastly-rails/mongoid/surrogate_key.rb +3 -3
- data/lib/fastly-rails/version.rb +1 -1
- data/test/dummy/db/migrate/20150312044151_add_service_id_to_books.rb +5 -0
- data/test/dummy/db/schema.rb +2 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1853 -0
- data/test/dummy/test/controllers/books_controller_test.rb +1 -2
- data/test/dummy/test/factories/books.rb +1 -0
- data/test/dummy/test/models/book_test.rb +12 -8
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/test_helper.rb +2 -4
- metadata +11 -9
@@ -38,21 +38,25 @@ describe Book do
|
|
38
38
|
assert_equal Book.table_key, book.table_key
|
39
39
|
end
|
40
40
|
|
41
|
-
describe '
|
41
|
+
describe 'fastly_service_identifier' do
|
42
42
|
before do
|
43
|
-
FastlyRails.configuration.service_id = '
|
43
|
+
FastlyRails.configuration.service_id = 'some-service-id'
|
44
44
|
end
|
45
45
|
|
46
|
-
it '
|
47
|
-
assert_respond_to Book, :
|
46
|
+
it 'is a class method' do
|
47
|
+
assert_respond_to Book, :fastly_service_identifier
|
48
48
|
end
|
49
49
|
|
50
|
-
it '
|
51
|
-
assert_respond_to book, :
|
50
|
+
it 'is an instance method' do
|
51
|
+
assert_respond_to book, :fastly_service_identifier
|
52
52
|
end
|
53
53
|
|
54
|
-
it '
|
55
|
-
assert_equal Book.
|
54
|
+
it 'is true that class.fastly_service_identifier == instance.fastly_service_identifier' do
|
55
|
+
assert_equal Book.fastly_service_identifier, book.fastly_service_identifier
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'does not equal the value of `service_id` on the model' do
|
59
|
+
refute_equal book.service_id, book.fastly_service_identifier
|
56
60
|
end
|
57
61
|
|
58
62
|
after do
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_helper.rb
CHANGED
@@ -31,8 +31,7 @@ class Minitest::Spec
|
|
31
31
|
stub_request(:any, "https://api.fastly.com/login").
|
32
32
|
to_return(
|
33
33
|
:status => 200,
|
34
|
-
:body => "{}"
|
35
|
-
:message => "{}"
|
34
|
+
:body => "{}"
|
36
35
|
)
|
37
36
|
stub_request(:post, /https:\/\/api.fastly.com\/service\/.*\/purge\/.*/)
|
38
37
|
.to_return(
|
@@ -59,8 +58,7 @@ class ActionDispatch::IntegrationTest
|
|
59
58
|
stub_request(:any, /.*/).
|
60
59
|
to_return(
|
61
60
|
:status => 200,
|
62
|
-
:body => "{}"
|
63
|
-
:message => "{}"
|
61
|
+
:body => "{}"
|
64
62
|
)
|
65
63
|
|
66
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael May
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -150,6 +150,9 @@ executables: []
|
|
150
150
|
extensions: []
|
151
151
|
extra_rdoc_files: []
|
152
152
|
files:
|
153
|
+
- MIT-LICENSE
|
154
|
+
- Rakefile
|
155
|
+
- lib/fastly-rails.rb
|
153
156
|
- lib/fastly-rails/action_controller/cache_control_headers.rb
|
154
157
|
- lib/fastly-rails/action_controller/surrogate_key_headers.rb
|
155
158
|
- lib/fastly-rails/active_record/surrogate_key.rb
|
@@ -160,9 +163,8 @@ files:
|
|
160
163
|
- lib/fastly-rails/mongoid/surrogate_key.rb
|
161
164
|
- lib/fastly-rails/rack/remove_set_cookie_header.rb
|
162
165
|
- lib/fastly-rails/version.rb
|
163
|
-
-
|
164
|
-
-
|
165
|
-
- Rakefile
|
166
|
+
- test/dummy/README.rdoc
|
167
|
+
- test/dummy/Rakefile
|
166
168
|
- test/dummy/app/assets/javascripts/application.js
|
167
169
|
- test/dummy/app/assets/stylesheets/application.css
|
168
170
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -175,6 +177,7 @@ files:
|
|
175
177
|
- test/dummy/bin/bundle
|
176
178
|
- test/dummy/bin/rails
|
177
179
|
- test/dummy/bin/rake
|
180
|
+
- test/dummy/config.ru
|
178
181
|
- test/dummy/config/application.rb
|
179
182
|
- test/dummy/config/boot.rb
|
180
183
|
- test/dummy/config/database.yml
|
@@ -192,8 +195,8 @@ files:
|
|
192
195
|
- test/dummy/config/initializers/wrap_parameters.rb
|
193
196
|
- test/dummy/config/locales/en.yml
|
194
197
|
- test/dummy/config/routes.rb
|
195
|
-
- test/dummy/config.ru
|
196
198
|
- test/dummy/db/migrate/20140407202136_create_books.rb
|
199
|
+
- test/dummy/db/migrate/20150312044151_add_service_id_to_books.rb
|
197
200
|
- test/dummy/db/schema.rb
|
198
201
|
- test/dummy/db/test.sqlite3
|
199
202
|
- test/dummy/log/development.log
|
@@ -202,8 +205,6 @@ files:
|
|
202
205
|
- test/dummy/public/422.html
|
203
206
|
- test/dummy/public/500.html
|
204
207
|
- test/dummy/public/favicon.ico
|
205
|
-
- test/dummy/Rakefile
|
206
|
-
- test/dummy/README.rdoc
|
207
208
|
- test/dummy/test/controllers/books_controller_test.rb
|
208
209
|
- test/dummy/test/factories/books.rb
|
209
210
|
- test/dummy/test/fixtures/books.yml
|
@@ -240,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
241
|
version: '0'
|
241
242
|
requirements: []
|
242
243
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.4.4
|
244
245
|
signing_key:
|
245
246
|
specification_version: 4
|
246
247
|
summary: Fastly instant purging integration for Rails
|
@@ -276,6 +277,7 @@ test_files:
|
|
276
277
|
- test/dummy/config/routes.rb
|
277
278
|
- test/dummy/config.ru
|
278
279
|
- test/dummy/db/migrate/20140407202136_create_books.rb
|
280
|
+
- test/dummy/db/migrate/20150312044151_add_service_id_to_books.rb
|
279
281
|
- test/dummy/db/schema.rb
|
280
282
|
- test/dummy/db/test.sqlite3
|
281
283
|
- test/dummy/log/development.log
|