rapporteur 3.5.1 → 3.6.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: f8784fb86dab0544971bd66b4ca106ca445175da
4
- data.tar.gz: dfb30e4b43f0d6c58632e2f6e5f46fa2459901a8
3
+ metadata.gz: 7f822623e2116b6242b2c03aa79dfdf9dd9de3bf
4
+ data.tar.gz: '081da8aa11cdc0c58897950ccb92e3628c6ca2dd'
5
5
  SHA512:
6
- metadata.gz: 8e9542d1ad27f7da7f64985128486c4c9dd2faf1550e6659987f37700b5a17949df6df9b840581b9531a914fc72307678ef3d42b11fc38e281a072cf88171fc3
7
- data.tar.gz: 858b38cdc1dc8a297f1bac3769108163f2700af467739d537c5e682e9bfd6e77d40541df280dae42c141e92286d799286e1e8860aa0768f58f82adc88409bcfb
6
+ metadata.gz: c466833304272ab37c828c7aac7032f4addaf309c8ecad0b10404212720f0291be2b3b1a773da101bfd1484c9e4559a9bfab1df19a479882a02a666cf9dff89d
7
+ data.tar.gz: 7f6ac5829be1f11e402f462254e5de17bf478a4f27f8ce79177eae5ec4bc771e7da3fd2871a530c0be002baccabddbd5784a019bc6caed587ec4cc2a1b6f2e6f
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
4
  /gemfiles/*.lock
5
+ /gemfiles/.bundle/
5
6
  /_yardoc/
6
7
  /coverage/
7
8
  /doc/
@@ -9,5 +10,8 @@
9
10
  /spec/reports/
10
11
  /tmp/
11
12
 
13
+ # rspec failure tracking
14
+ .rspec_status
15
+
12
16
  /.ruby-version
13
17
  *.sqlite
@@ -1,30 +1,17 @@
1
- before_install: gem install bundler -v 1.14.3
1
+ before_install: gem install bundler -v 1.15.1
2
2
  cache: bundler
3
3
  gemfile:
4
- - gemfiles/rails3.2.gemfile
5
- - gemfiles/rails4.x.gemfile
4
+ - gemfiles/rails4.2.x.gemfile
6
5
  - gemfiles/rails5.x.gemfile
7
6
  - gemfiles/sinatra1.x.gemfile
7
+ - gemfiles/sinatra2.x.gemfile
8
8
  language: ruby
9
9
  matrix:
10
- allow_failures:
11
- # json 1.8.3 fails to build under 2.4.0
12
- - rvm: 2.4.0
13
- gemfile: gemfiles/rails3.2.gemfile
14
- - rvm: 2.4.0
15
- gemfile: gemfiles/rails4.x.gemfile
16
- - rvm: 2.4.0
17
- gemfile: gemfiles/sinatra1.x.gemfile
18
- exclude:
19
- # rails 5 requires Ruby 2.2.2+
20
- - rvm: 2.1.10
21
- gemfile: gemfiles/rails5.x.gemfile
22
10
  fast_finish: true
23
11
  notifications:
24
12
  email: false
25
13
  rvm:
26
- - 2.1.10
27
- - 2.2.6
28
- - 2.3.3
29
- - 2.4.0
14
+ - 2.2.7
15
+ - 2.3.4
16
+ - 2.4.1
30
17
  sudo: false
data/Appraisals CHANGED
@@ -1,10 +1,5 @@
1
- appraise "rails3.2" do
2
- gem "railties", "~> 3.2.0"
3
- gem "test-unit", "~> 3.0"
4
- end
5
-
6
- appraise "rails4.x" do
7
- gem "railties", "~> 4.0"
1
+ appraise "rails4.2.x" do
2
+ gem "railties", "~> 4.2.0"
8
3
  end
9
4
 
10
5
  appraise "rails5.x" do
@@ -14,3 +9,7 @@ end
14
9
  appraise "sinatra1.x" do
15
10
  gem "sinatra", "~> 1.4"
16
11
  end
12
+
13
+ appraise "sinatra2.x" do
14
+ gem "sinatra", "~> 2.0"
15
+ end
@@ -10,6 +10,12 @@
10
10
 
11
11
  * No significant changes.
12
12
 
13
+ ## [3.6.0][] / 2017-06-10
14
+
15
+ * Add `expires_now` to the Rails controller's status response. This ensures the
16
+ `Cache-Control` header instructs the client to not cache the response and
17
+ avoids the `ETag` header being generated.
18
+
13
19
  ## [3.5.1][] / 2016-02-08
14
20
 
15
21
  * Fix automatic Rapporteur mount detection logic under Rails 4.0 and 4.1. The
@@ -155,4 +161,5 @@
155
161
  [3.4.0]: https://github.com/envylabs/rapporteur/compare/v3.3.0...v3.4.0
156
162
  [3.5.0]: https://github.com/envylabs/rapporteur/compare/v3.4.0...v3.5.0
157
163
  [3.5.1]: https://github.com/envylabs/rapporteur/compare/v3.5.0...v3.5.1
158
- [HEAD]: https://github.com/envylabs/rapporteur/compare/v3.5.1...master
164
+ [3.6.0]: https://github.com/envylabs/rapporteur/compare/v3.5.1...v3.6.0
165
+ [HEAD]: https://github.com/envylabs/rapporteur/compare/v3.6.0...master
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
5
- gem "sqlite3", :platforms => :ruby
4
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
5
+ gem 'sqlite3', platforms: :ruby
data/README.md CHANGED
@@ -54,16 +54,16 @@ Supported Ruby versions:
54
54
  * MRI 2.4
55
55
  * MRI 2.3
56
56
  * MRI 2.2
57
- * MRI 2.1
58
57
 
59
- Supported Rails versions:
58
+ Supported frameworks:
60
59
 
61
60
  * Rails 5.x.
62
- * Rails 4.x.
63
- * Rails 3.2.x.
61
+ * Rails 4.2+.
62
+ * Sinatra 2.x.
63
+ * Sinatra 1.x.
64
64
 
65
- Non-Rails environments are also supported (such as Sinatra), see Usage below
66
- for details.
65
+ Older versions of Ruby and frameworks may also work with this library, however
66
+ they are not officially supported.
67
67
 
68
68
  ## Usage
69
69
 
@@ -1,6 +1,7 @@
1
1
  module Rapporteur
2
2
  class StatusesController < ApplicationController
3
3
  def show
4
+ expires_now
4
5
  respond_to do |format|
5
6
  format.json do
6
7
  resource = Rapporteur.run
@@ -11,4 +11,4 @@ require "rapporteur"
11
11
  # Pry.start
12
12
 
13
13
  require "irb"
14
- IRB.start
14
+ IRB.start(__FILE__)
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
+ gem "sqlite3", platforms: :ruby
7
+ gem "railties", "~> 4.2.0"
8
+
9
+ gemspec path: "../"
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
- gem "sqlite3", :platforms => :ruby
5
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
+ gem "sqlite3", platforms: :ruby
7
7
  gem "railties", "~> 5.0"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
- gem "sqlite3", :platforms => :ruby
5
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
+ gem "sqlite3", platforms: :ruby
7
7
  gem "sinatra", "~> 1.4"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
+ gem "sqlite3", platforms: :ruby
7
+ gem "sinatra", "~> 2.0"
8
+
9
+ gemspec path: "../"
@@ -7,8 +7,18 @@ shared_examples_for 'a successful status response' do
7
7
  expect(response.response_code).to(eq(200))
8
8
  end
9
9
 
10
- it 'responds with a JSON content header' do
11
- expect(response.content_type).to(eq(Mime[:json]))
10
+ context 'the response headers' do
11
+ it 'contains a Content-Type JSON header' do
12
+ expect(response.content_type).to(eq(Mime[:json]))
13
+ end
14
+
15
+ it 'does not contain an ETag header' do
16
+ expect(response.headers).not_to have_key('ETag')
17
+ end
18
+
19
+ it 'contains a Cache-Control header which disables client caching' do
20
+ expect(response.headers.fetch('Cache-Control')).to eq('no-cache')
21
+ end
12
22
  end
13
23
 
14
24
  context 'the response payload' do
@@ -25,13 +35,25 @@ shared_examples_for 'an erred status response' do
25
35
  expect(response.response_code).to(eq(500))
26
36
  end
27
37
 
28
- it 'responds with a JSON content header' do
29
- expect(response.content_type).to(eq(Mime[:json]))
38
+ context 'the response headers' do
39
+ it 'contains a Content-Type JSON header' do
40
+ expect(response.content_type).to(eq(Mime[:json]))
41
+ end
42
+
43
+ it 'does not contain an ETag header' do
44
+ expect(response.headers).not_to have_key('ETag')
45
+ end
46
+
47
+ it 'contains a Cache-Control header which disables client caching' do
48
+ expect(response.headers.fetch('Cache-Control')).to eq('no-cache')
49
+ end
30
50
  end
31
51
 
32
- it 'contains errors' do
33
- expect(parsed_body).to(have_key('errors'))
34
- expect(parsed_body.fetch('errors')).not_to(be_empty)
52
+ context 'the response payload' do
53
+ it 'contains errors' do
54
+ expect(parsed_body).to(have_key('errors'))
55
+ expect(parsed_body.fetch('errors')).not_to(be_empty)
56
+ end
35
57
  end
36
58
  end
37
59
 
@@ -7,8 +7,18 @@ shared_examples_for 'a successful status response' do
7
7
  expect(response.response_code).to(eq(200))
8
8
  end
9
9
 
10
- it 'responds with a JSON content header' do
11
- expect(response.content_type).to(eq(Mime[:json]))
10
+ context 'the response headers' do
11
+ it 'contains a Content-Type JSON header' do
12
+ expect(response.content_type).to(eq(Mime[:json]))
13
+ end
14
+
15
+ it 'does not contain an ETag header' do
16
+ expect(response.headers).not_to have_key('ETag')
17
+ end
18
+
19
+ it 'contains a Cache-Control header which disables client caching' do
20
+ expect(response.headers.fetch('Cache-Control')).to eq('no-cache')
21
+ end
12
22
  end
13
23
 
14
24
  context 'the response payload' do
@@ -25,13 +35,25 @@ shared_examples_for 'an erred status response' do
25
35
  expect(response.response_code).to(eq(500))
26
36
  end
27
37
 
28
- it 'responds with a JSON content header' do
29
- expect(response.content_type).to(eq(Mime[:json]))
38
+ context 'the response headers' do
39
+ it 'contains a Content-Type JSON header' do
40
+ expect(response.content_type).to(eq(Mime[:json]))
41
+ end
42
+
43
+ it 'does not contain an ETag header' do
44
+ expect(response.headers).not_to have_key('ETag')
45
+ end
46
+
47
+ it 'contains a Cache-Control header which disables client caching' do
48
+ expect(response.headers.fetch('Cache-Control')).to eq('no-cache')
49
+ end
30
50
  end
31
51
 
32
- it 'contains errors' do
33
- expect(parsed_body).to(have_key('errors'))
34
- expect(parsed_body.fetch('errors')).not_to(be_empty)
52
+ context 'the response payload' do
53
+ it 'contains errors' do
54
+ expect(parsed_body).to(have_key('errors'))
55
+ expect(parsed_body.fetch('errors')).not_to(be_empty)
56
+ end
35
57
  end
36
58
  end
37
59
 
@@ -1,3 +1,3 @@
1
1
  module Rapporteur
2
- VERSION = "3.5.1".freeze
2
+ VERSION = "3.6.0".freeze
3
3
  end
@@ -23,9 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'i18n', '~> 0.6'
24
24
 
25
25
  spec.add_development_dependency "appraisal", "~> 2.1"
26
- spec.add_development_dependency "bundler", "~> 1.14"
26
+ spec.add_development_dependency "bundler", "~> 1.15"
27
27
  spec.add_development_dependency "combustion", "~> 0.5", ">= 0.5.1"
28
28
  spec.add_development_dependency "rails", ">= 3.1", "< 6"
29
- spec.add_development_dependency "rspec-rails", "~> 3.2"
29
+ spec.add_development_dependency "rake", "~> 12.0"
30
30
  spec.add_development_dependency "rspec-collection_matchers", "~> 1.0"
31
+ spec.add_development_dependency "rspec-rails", "~> 3.2"
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapporteur
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Envy Labs
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-02-09 00:00:00.000000000 Z
12
+ date: 2017-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '1.14'
48
+ version: '1.15'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '1.14'
55
+ version: '1.15'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: combustion
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -94,19 +94,19 @@ dependencies:
94
94
  - !ruby/object:Gem::Version
95
95
  version: '6'
96
96
  - !ruby/object:Gem::Dependency
97
- name: rspec-rails
97
+ name: rake
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '3.2'
102
+ version: '12.0'
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '3.2'
109
+ version: '12.0'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: rspec-collection_matchers
112
112
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,20 @@ dependencies:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
123
  version: '1.0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: rspec-rails
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '3.2'
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '3.2'
124
138
  description: An engine that provides common status polling endpoint.
125
139
  email:
126
140
  - ''
@@ -144,10 +158,10 @@ files:
144
158
  - config.ru
145
159
  - config/locales/en.yml
146
160
  - config/routes.rb
147
- - gemfiles/rails3.2.gemfile
148
- - gemfiles/rails4.x.gemfile
161
+ - gemfiles/rails4.2.x.gemfile
149
162
  - gemfiles/rails5.x.gemfile
150
163
  - gemfiles/sinatra1.x.gemfile
164
+ - gemfiles/sinatra2.x.gemfile
151
165
  - lib/rapporteur.rb
152
166
  - lib/rapporteur/check_list.rb
153
167
  - lib/rapporteur/checker.rb
@@ -181,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
195
  version: '0'
182
196
  requirements: []
183
197
  rubyforge_project:
184
- rubygems_version: 2.5.2
198
+ rubygems_version: 2.6.11
185
199
  signing_key:
186
200
  specification_version: 4
187
201
  summary: An engine that provides common status polling endpoint.
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
- gem "sqlite3", :platforms => :ruby
7
- gem "railties", "~> 3.2.0"
8
- gem "test-unit", "~> 3.0"
9
-
10
- gemspec :path => "../"
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
- gem "sqlite3", :platforms => :ruby
7
- gem "railties", "~> 4.0"
8
-
9
- gemspec :path => "../"