fastly-rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,8 +6,7 @@ class BooksControllerTest < ActionController::TestCase
6
6
  WebMock.stub_request(:any, /.*/).
7
7
  to_return(
8
8
  :status => 200,
9
- :body => "{}",
10
- :message => "{}"
9
+ :body => "{}"
11
10
  )
12
11
  @no_of_books = 5
13
12
  create_list :book, @no_of_books
@@ -3,5 +3,6 @@
3
3
  FactoryGirl.define do
4
4
  factory :book do
5
5
  name { Faker::Movie.title }
6
+ service_id 'asdf'
6
7
  end
7
8
  end
@@ -38,21 +38,25 @@ describe Book do
38
38
  assert_equal Book.table_key, book.table_key
39
39
  end
40
40
 
41
- describe 'service_id' do
41
+ describe 'fastly_service_identifier' do
42
42
  before do
43
- FastlyRails.configuration.service_id = 'someserviceid'
43
+ FastlyRails.configuration.service_id = 'some-service-id'
44
44
  end
45
45
 
46
- it 'should have class.service_id' do
47
- assert_respond_to Book, :service_id
46
+ it 'is a class method' do
47
+ assert_respond_to Book, :fastly_service_identifier
48
48
  end
49
49
 
50
- it 'should have instance.service_id' do
51
- assert_respond_to book, :service_id
50
+ it 'is an instance method' do
51
+ assert_respond_to book, :fastly_service_identifier
52
52
  end
53
53
 
54
- it 'should be class.service_id == instance.service_id' do
55
- assert_equal Book.service_id, book.service_id
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
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.2.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: 2014-10-02 00:00:00.000000000 Z
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
- - lib/fastly-rails.rb
164
- - MIT-LICENSE
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.0.14
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