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 +4 -4
- data/.gitignore +4 -0
- data/.travis.yml +6 -19
- data/Appraisals +6 -7
- data/CHANGELOG.md +8 -1
- data/Gemfile +2 -2
- data/README.md +6 -6
- data/app/controllers/rapporteur/statuses_controller.rb +1 -0
- data/bin/console +1 -1
- data/gemfiles/rails4.2.x.gemfile +9 -0
- data/gemfiles/rails5.x.gemfile +3 -3
- data/gemfiles/sinatra1.x.gemfile +3 -3
- data/gemfiles/sinatra2.x.gemfile +9 -0
- data/lib/rapporteur/rspec.rb +29 -7
- data/lib/rapporteur/rspec3.rb +29 -7
- data/lib/rapporteur/version.rb +1 -1
- data/rapporteur.gemspec +3 -2
- metadata +24 -10
- data/gemfiles/rails3.2.gemfile +0 -10
- data/gemfiles/rails4.x.gemfile +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f822623e2116b6242b2c03aa79dfdf9dd9de3bf
|
4
|
+
data.tar.gz: '081da8aa11cdc0c58897950ccb92e3628c6ca2dd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c466833304272ab37c828c7aac7032f4addaf309c8ecad0b10404212720f0291be2b3b1a773da101bfd1484c9e4559a9bfab1df19a479882a02a666cf9dff89d
|
7
|
+
data.tar.gz: 7f6ac5829be1f11e402f462254e5de17bf478a4f27f8ce79177eae5ec4bc771e7da3fd2871a530c0be002baccabddbd5784a019bc6caed587ec4cc2a1b6f2e6f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,30 +1,17 @@
|
|
1
|
-
before_install: gem install bundler -v 1.
|
1
|
+
before_install: gem install bundler -v 1.15.1
|
2
2
|
cache: bundler
|
3
3
|
gemfile:
|
4
|
-
- gemfiles/
|
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.
|
27
|
-
- 2.
|
28
|
-
- 2.
|
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 "
|
2
|
-
gem "railties", "~>
|
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
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
[
|
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
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
|
58
|
+
Supported frameworks:
|
60
59
|
|
61
60
|
* Rails 5.x.
|
62
|
-
* Rails 4.
|
63
|
-
*
|
61
|
+
* Rails 4.2+.
|
62
|
+
* Sinatra 2.x.
|
63
|
+
* Sinatra 1.x.
|
64
64
|
|
65
|
-
|
66
|
-
|
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
|
|
data/bin/console
CHANGED
data/gemfiles/rails5.x.gemfile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord-jdbcsqlite3-adapter", :
|
6
|
-
gem "sqlite3", :
|
5
|
+
gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
|
6
|
+
gem "sqlite3", platforms: :ruby
|
7
7
|
gem "railties", "~> 5.0"
|
8
8
|
|
9
|
-
gemspec :
|
9
|
+
gemspec path: "../"
|
data/gemfiles/sinatra1.x.gemfile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord-jdbcsqlite3-adapter", :
|
6
|
-
gem "sqlite3", :
|
5
|
+
gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
|
6
|
+
gem "sqlite3", platforms: :ruby
|
7
7
|
gem "sinatra", "~> 1.4"
|
8
8
|
|
9
|
-
gemspec :
|
9
|
+
gemspec path: "../"
|
data/lib/rapporteur/rspec.rb
CHANGED
@@ -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
|
-
|
11
|
-
|
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
|
-
|
29
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
|
data/lib/rapporteur/rspec3.rb
CHANGED
@@ -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
|
-
|
11
|
-
|
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
|
-
|
29
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
|
data/lib/rapporteur/version.rb
CHANGED
data/rapporteur.gemspec
CHANGED
@@ -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.
|
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 "
|
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.
|
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-
|
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.
|
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.
|
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:
|
97
|
+
name: rake
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
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: '
|
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/
|
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.
|
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.
|
data/gemfiles/rails3.2.gemfile
DELETED
data/gemfiles/rails4.x.gemfile
DELETED