rapporteur 3.6.2 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +13 -0
- data/.github/workflows/tests.yml +44 -0
- data/.gitignore +0 -2
- data/.rspec +1 -0
- data/.rubocop.yml +27 -0
- data/.yamllint +7 -0
- data/Appraisals +11 -6
- data/CHANGELOG.md +29 -3
- data/Gemfile.lock +221 -0
- data/README.md +9 -16
- data/app/controllers/rapporteur/statuses_controller.rb +2 -0
- data/config/locales/en.yml +2 -0
- data/config/routes.rb +6 -2
- data/gemfiles/rails5.2.gemfile +9 -0
- data/gemfiles/{sinatra1.x.gemfile → rails6.0.gemfile} +1 -1
- data/gemfiles/{rails5.x.gemfile → rails6.1.gemfile} +1 -1
- data/gemfiles/{rails4.2.x.gemfile → rails_latest.gemfile} +1 -1
- data/lib/rapporteur/checks/active_record_check.rb +1 -1
- data/lib/rapporteur/message_list.rb +8 -9
- data/lib/rapporteur/revision.rb +1 -1
- data/lib/rapporteur/rspec.rb +5 -13
- data/lib/rapporteur/rspec3.rb +5 -13
- data/lib/rapporteur/version.rb +1 -1
- data/rapporteur.gemspec +15 -12
- metadata +57 -30
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9656e4f781edf1a61a1ac9ce4e3cd6a28e2acda42131f2d3cc00805c419a7b17
|
4
|
+
data.tar.gz: 34c052ddec4abdca563d6e8c6ef0ec44649a2c373b9eb14cf497c5e47cde5242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06d0410edcd10d46ea95b763b63bf45c819ddcb51cce32b3b3c181d837063c399ecc5421c30e39cb8eec31d6d8fcf5fca494c363296e23d12432b1f23afc9a97
|
7
|
+
data.tar.gz: aa84ce236ab0a7177dde501a8063970e12c5bf76b0f82b109f827eea9b9e66a891175e4918ef6e942a3ad9657d2f9376f46776a7068755bf854e91d464850d77
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
updates:
|
3
|
+
- allow:
|
4
|
+
- dependency-type: "direct"
|
5
|
+
- dependency-type: "indirect"
|
6
|
+
directory: "/"
|
7
|
+
open-pull-requests-limit: 10
|
8
|
+
package-ecosystem: "bundler"
|
9
|
+
schedule:
|
10
|
+
interval: "daily"
|
11
|
+
time: "10:00"
|
12
|
+
versioning-strategy: "increase-if-necessary"
|
13
|
+
version: 2
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
jobs:
|
3
|
+
release_github:
|
4
|
+
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')"
|
5
|
+
name: "Deploy to GitHub Packages"
|
6
|
+
needs: "tests"
|
7
|
+
runs-on: "ubuntu-latest"
|
8
|
+
steps:
|
9
|
+
- uses: "actions/checkout@v2"
|
10
|
+
- uses: "ruby/setup-ruby@v1"
|
11
|
+
with:
|
12
|
+
bundler-cache: true
|
13
|
+
ruby-version: "2.7"
|
14
|
+
- name: "Publish to GitHub"
|
15
|
+
uses: "jstastny/publish-gem-to-github@v1.3"
|
16
|
+
with:
|
17
|
+
owner: "envylabs"
|
18
|
+
token: "${{ secrets.GITHUB_TOKEN }}"
|
19
|
+
tests:
|
20
|
+
env:
|
21
|
+
BUNDLE_GEMFILE: "${{matrix.gemfile}}"
|
22
|
+
runs-on: "ubuntu-latest"
|
23
|
+
steps:
|
24
|
+
- uses: "actions/checkout@v2"
|
25
|
+
- uses: "ruby/setup-ruby@v1"
|
26
|
+
with:
|
27
|
+
bundler-cache: true
|
28
|
+
ruby-version: "2.7"
|
29
|
+
- name: "Run Tests"
|
30
|
+
run: "bundle exec rake spec"
|
31
|
+
- name: "Check Ruby Style"
|
32
|
+
run: "bundle exec rubocop -c ./.rubocop.yml -fq"
|
33
|
+
strategy:
|
34
|
+
fail-fast: false
|
35
|
+
matrix:
|
36
|
+
gemfile:
|
37
|
+
- "Gemfile"
|
38
|
+
- "gemfiles/rails5.2.gemfile"
|
39
|
+
- "gemfiles/rails6.0.gemfile"
|
40
|
+
- "gemfiles/rails6.1.gemfile"
|
41
|
+
- "gemfiles/rails_latest.gemfile"
|
42
|
+
- "gemfiles/sinatra2.x.gemfile"
|
43
|
+
name: "Test and Release"
|
44
|
+
"on": ["push"]
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
inherit_gem:
|
4
|
+
rubocop-rails_config:
|
5
|
+
- "config/rails.yml"
|
6
|
+
|
7
|
+
AllCops:
|
8
|
+
Exclude:
|
9
|
+
- 'gemfiles/*'
|
10
|
+
- 'gemfiles/**/*'
|
11
|
+
- 'vendor/**/*'
|
12
|
+
TargetRubyVersion: 2.5
|
13
|
+
|
14
|
+
Layout/CaseIndentation:
|
15
|
+
EnforcedStyle: "end"
|
16
|
+
|
17
|
+
Layout/EmptyLinesAroundAccessModifier:
|
18
|
+
EnforcedStyle: "around"
|
19
|
+
|
20
|
+
Layout/EndOfLine:
|
21
|
+
EnforcedStyle: "lf"
|
22
|
+
|
23
|
+
Layout/IndentationConsistency:
|
24
|
+
EnforcedStyle: "normal"
|
25
|
+
|
26
|
+
Style/StringLiterals:
|
27
|
+
EnforcedStyle: "single_quotes"
|
data/.yamllint
ADDED
data/Appraisals
CHANGED
@@ -1,15 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise '
|
4
|
-
gem '
|
3
|
+
appraise 'rails5.2' do
|
4
|
+
gem 'rails', '~> 5.2.0'
|
5
|
+
gem 'sqlite3', '< 1.4', platforms: :ruby
|
5
6
|
end
|
6
7
|
|
7
|
-
appraise '
|
8
|
-
gem '
|
8
|
+
appraise 'rails6.0' do
|
9
|
+
gem 'rails', '~> 6.0.0'
|
9
10
|
end
|
10
11
|
|
11
|
-
appraise '
|
12
|
-
gem '
|
12
|
+
appraise 'rails6.1' do
|
13
|
+
gem 'rails', '~> 6.1.0'
|
14
|
+
end
|
15
|
+
|
16
|
+
appraise 'rails-latest' do
|
17
|
+
gem 'rails'
|
13
18
|
end
|
14
19
|
|
15
20
|
appraise 'sinatra2.x' do
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,35 @@
|
|
1
1
|
# Rapporteur changelog
|
2
2
|
|
3
3
|
[![Gem Version](http://img.shields.io/gem/v/rapporteur.svg?style=flat)](http://rubygems.org/gems/rapporteur)
|
4
|
-
[![
|
5
|
-
[![
|
4
|
+
[![Test and Release](https://github.com/envylabs/rapporteur/actions/workflows/tests.yml/badge.svg)](https://github.com/envylabs/rapporteur/actions/workflows/tests.yml)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/8c498efff627b93db4b9/maintainability)](https://codeclimate.com/github/envylabs/rapporteur/maintainability)
|
6
6
|
[![Inline docs](http://inch-ci.org/github/envylabs/rapporteur.svg?branch=master)](http://inch-ci.org/github/envylabs/rapporteur)
|
7
7
|
|
8
8
|
## [HEAD][] / unreleased
|
9
9
|
|
10
10
|
* No significant changes.
|
11
11
|
|
12
|
+
## [3.7.2][] / 2021-06-22
|
13
|
+
|
14
|
+
* Test support for Rails 6.1.
|
15
|
+
|
16
|
+
## [3.7.1][] / 2020-09-25
|
17
|
+
|
18
|
+
* Fix a Ruby 2.7 keyword argument deprecation warning in MessageList.
|
19
|
+
|
20
|
+
## [3.7.0][] / 2020-01-02
|
21
|
+
|
22
|
+
* Add and test support for Rails 6.0. This also drops explicit testing of Rails
|
23
|
+
5.0 and 5.1 as they are no longer officially maintained.
|
24
|
+
|
25
|
+
## [3.6.4][] / 2019-04-04
|
26
|
+
|
27
|
+
* Maintenance release, no functional changes.
|
28
|
+
|
29
|
+
## [3.6.3][] / 2018-10-03
|
30
|
+
|
31
|
+
* Ensure the `Rapporteur::ApplicationController` is loaded and utilized.
|
32
|
+
|
12
33
|
## [3.6.2][] / 2018-09-11
|
13
34
|
|
14
35
|
* Allow i18n 1.x versions as a dependency.
|
@@ -177,4 +198,9 @@
|
|
177
198
|
[3.6.0]: https://github.com/envylabs/rapporteur/compare/v3.5.1...v3.6.0
|
178
199
|
[3.6.1]: https://github.com/envylabs/rapporteur/compare/v3.6.0...v3.6.1
|
179
200
|
[3.6.2]: https://github.com/envylabs/rapporteur/compare/v3.6.1...v3.6.2
|
180
|
-
[
|
201
|
+
[3.6.3]: https://github.com/envylabs/rapporteur/compare/v3.6.2...v3.6.3
|
202
|
+
[3.6.4]: https://github.com/envylabs/rapporteur/compare/v3.6.3...v3.6.4
|
203
|
+
[3.7.0]: https://github.com/envylabs/rapporteur/compare/v3.6.4...v3.7.0
|
204
|
+
[3.7.1]: https://github.com/envylabs/rapporteur/compare/v3.7.0...v3.7.1
|
205
|
+
[3.7.2]: https://github.com/envylabs/rapporteur/compare/v3.7.1...v3.7.2
|
206
|
+
[HEAD]: https://github.com/envylabs/rapporteur/compare/v3.7.2...master
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rapporteur (3.7.2)
|
5
|
+
i18n (>= 0.6, < 2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (6.1.3.2)
|
11
|
+
actionpack (= 6.1.3.2)
|
12
|
+
activesupport (= 6.1.3.2)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailbox (6.1.3.2)
|
16
|
+
actionpack (= 6.1.3.2)
|
17
|
+
activejob (= 6.1.3.2)
|
18
|
+
activerecord (= 6.1.3.2)
|
19
|
+
activestorage (= 6.1.3.2)
|
20
|
+
activesupport (= 6.1.3.2)
|
21
|
+
mail (>= 2.7.1)
|
22
|
+
actionmailer (6.1.3.2)
|
23
|
+
actionpack (= 6.1.3.2)
|
24
|
+
actionview (= 6.1.3.2)
|
25
|
+
activejob (= 6.1.3.2)
|
26
|
+
activesupport (= 6.1.3.2)
|
27
|
+
mail (~> 2.5, >= 2.5.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
actionpack (6.1.3.2)
|
30
|
+
actionview (= 6.1.3.2)
|
31
|
+
activesupport (= 6.1.3.2)
|
32
|
+
rack (~> 2.0, >= 2.0.9)
|
33
|
+
rack-test (>= 0.6.3)
|
34
|
+
rails-dom-testing (~> 2.0)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
+
actiontext (6.1.3.2)
|
37
|
+
actionpack (= 6.1.3.2)
|
38
|
+
activerecord (= 6.1.3.2)
|
39
|
+
activestorage (= 6.1.3.2)
|
40
|
+
activesupport (= 6.1.3.2)
|
41
|
+
nokogiri (>= 1.8.5)
|
42
|
+
actionview (6.1.3.2)
|
43
|
+
activesupport (= 6.1.3.2)
|
44
|
+
builder (~> 3.1)
|
45
|
+
erubi (~> 1.4)
|
46
|
+
rails-dom-testing (~> 2.0)
|
47
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
+
activejob (6.1.3.2)
|
49
|
+
activesupport (= 6.1.3.2)
|
50
|
+
globalid (>= 0.3.6)
|
51
|
+
activemodel (6.1.3.2)
|
52
|
+
activesupport (= 6.1.3.2)
|
53
|
+
activerecord (6.1.3.2)
|
54
|
+
activemodel (= 6.1.3.2)
|
55
|
+
activesupport (= 6.1.3.2)
|
56
|
+
activestorage (6.1.3.2)
|
57
|
+
actionpack (= 6.1.3.2)
|
58
|
+
activejob (= 6.1.3.2)
|
59
|
+
activerecord (= 6.1.3.2)
|
60
|
+
activesupport (= 6.1.3.2)
|
61
|
+
marcel (~> 1.0.0)
|
62
|
+
mini_mime (~> 1.0.2)
|
63
|
+
activesupport (6.1.3.2)
|
64
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
65
|
+
i18n (>= 1.6, < 2)
|
66
|
+
minitest (>= 5.1)
|
67
|
+
tzinfo (~> 2.0)
|
68
|
+
zeitwerk (~> 2.3)
|
69
|
+
appraisal (2.4.0)
|
70
|
+
bundler
|
71
|
+
rake
|
72
|
+
thor (>= 0.14.0)
|
73
|
+
ast (2.4.2)
|
74
|
+
builder (3.2.4)
|
75
|
+
combustion (1.3.1)
|
76
|
+
activesupport (>= 3.0.0)
|
77
|
+
railties (>= 3.0.0)
|
78
|
+
thor (>= 0.14.6)
|
79
|
+
concurrent-ruby (1.1.9)
|
80
|
+
crass (1.0.6)
|
81
|
+
diff-lcs (1.4.4)
|
82
|
+
erubi (1.10.0)
|
83
|
+
globalid (0.4.2)
|
84
|
+
activesupport (>= 4.2.0)
|
85
|
+
i18n (1.8.10)
|
86
|
+
concurrent-ruby (~> 1.0)
|
87
|
+
loofah (2.10.0)
|
88
|
+
crass (~> 1.0.2)
|
89
|
+
nokogiri (>= 1.5.9)
|
90
|
+
mail (2.7.1)
|
91
|
+
mini_mime (>= 0.1.1)
|
92
|
+
marcel (1.0.1)
|
93
|
+
method_source (1.0.0)
|
94
|
+
mini_mime (1.0.3)
|
95
|
+
mini_portile2 (2.5.3)
|
96
|
+
minitest (5.14.4)
|
97
|
+
nio4r (2.5.7)
|
98
|
+
nokogiri (1.11.7)
|
99
|
+
mini_portile2 (~> 2.5.0)
|
100
|
+
racc (~> 1.4)
|
101
|
+
parallel (1.20.1)
|
102
|
+
parser (3.0.1.1)
|
103
|
+
ast (~> 2.4.1)
|
104
|
+
racc (1.5.2)
|
105
|
+
rack (2.2.3)
|
106
|
+
rack-test (1.1.0)
|
107
|
+
rack (>= 1.0, < 3)
|
108
|
+
rails (6.1.3.2)
|
109
|
+
actioncable (= 6.1.3.2)
|
110
|
+
actionmailbox (= 6.1.3.2)
|
111
|
+
actionmailer (= 6.1.3.2)
|
112
|
+
actionpack (= 6.1.3.2)
|
113
|
+
actiontext (= 6.1.3.2)
|
114
|
+
actionview (= 6.1.3.2)
|
115
|
+
activejob (= 6.1.3.2)
|
116
|
+
activemodel (= 6.1.3.2)
|
117
|
+
activerecord (= 6.1.3.2)
|
118
|
+
activestorage (= 6.1.3.2)
|
119
|
+
activesupport (= 6.1.3.2)
|
120
|
+
bundler (>= 1.15.0)
|
121
|
+
railties (= 6.1.3.2)
|
122
|
+
sprockets-rails (>= 2.0.0)
|
123
|
+
rails-dom-testing (2.0.3)
|
124
|
+
activesupport (>= 4.2.0)
|
125
|
+
nokogiri (>= 1.6)
|
126
|
+
rails-html-sanitizer (1.3.0)
|
127
|
+
loofah (~> 2.3)
|
128
|
+
railties (6.1.3.2)
|
129
|
+
actionpack (= 6.1.3.2)
|
130
|
+
activesupport (= 6.1.3.2)
|
131
|
+
method_source
|
132
|
+
rake (>= 0.8.7)
|
133
|
+
thor (~> 1.0)
|
134
|
+
rainbow (3.0.0)
|
135
|
+
rake (13.0.3)
|
136
|
+
regexp_parser (2.1.1)
|
137
|
+
rexml (3.2.5)
|
138
|
+
rspec-collection_matchers (1.2.0)
|
139
|
+
rspec-expectations (>= 2.99.0.beta1)
|
140
|
+
rspec-core (3.10.1)
|
141
|
+
rspec-support (~> 3.10.0)
|
142
|
+
rspec-expectations (3.10.1)
|
143
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
144
|
+
rspec-support (~> 3.10.0)
|
145
|
+
rspec-mocks (3.10.2)
|
146
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
147
|
+
rspec-support (~> 3.10.0)
|
148
|
+
rspec-rails (5.0.1)
|
149
|
+
actionpack (>= 5.2)
|
150
|
+
activesupport (>= 5.2)
|
151
|
+
railties (>= 5.2)
|
152
|
+
rspec-core (~> 3.10)
|
153
|
+
rspec-expectations (~> 3.10)
|
154
|
+
rspec-mocks (~> 3.10)
|
155
|
+
rspec-support (~> 3.10)
|
156
|
+
rspec-support (3.10.2)
|
157
|
+
rubocop (1.17.0)
|
158
|
+
parallel (~> 1.10)
|
159
|
+
parser (>= 3.0.0.0)
|
160
|
+
rainbow (>= 2.2.2, < 4.0)
|
161
|
+
regexp_parser (>= 1.8, < 3.0)
|
162
|
+
rexml
|
163
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
164
|
+
ruby-progressbar (~> 1.7)
|
165
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
166
|
+
rubocop-ast (1.7.0)
|
167
|
+
parser (>= 3.0.1.1)
|
168
|
+
rubocop-packaging (0.5.1)
|
169
|
+
rubocop (>= 0.89, < 2.0)
|
170
|
+
rubocop-performance (1.11.3)
|
171
|
+
rubocop (>= 1.7.0, < 2.0)
|
172
|
+
rubocop-ast (>= 0.4.0)
|
173
|
+
rubocop-rails (2.11.0)
|
174
|
+
activesupport (>= 4.2.0)
|
175
|
+
rack (>= 1.1)
|
176
|
+
rubocop (>= 1.7.0, < 2.0)
|
177
|
+
rubocop-rails_config (1.5.4)
|
178
|
+
railties (>= 5.0)
|
179
|
+
rubocop (>= 1.13)
|
180
|
+
rubocop-ast (>= 1.0.1)
|
181
|
+
rubocop-packaging (~> 0.5)
|
182
|
+
rubocop-performance (~> 1.11)
|
183
|
+
rubocop-rails (~> 2.0)
|
184
|
+
ruby-progressbar (1.11.0)
|
185
|
+
sprockets (4.0.2)
|
186
|
+
concurrent-ruby (~> 1.0)
|
187
|
+
rack (> 1, < 3)
|
188
|
+
sprockets-rails (3.2.2)
|
189
|
+
actionpack (>= 4.0)
|
190
|
+
activesupport (>= 4.0)
|
191
|
+
sprockets (>= 3.0.0)
|
192
|
+
sqlite3 (1.4.2)
|
193
|
+
thor (1.1.0)
|
194
|
+
tzinfo (2.0.4)
|
195
|
+
concurrent-ruby (~> 1.0)
|
196
|
+
unicode-display_width (2.0.0)
|
197
|
+
websocket-driver (0.7.5)
|
198
|
+
websocket-extensions (>= 0.1.0)
|
199
|
+
websocket-extensions (0.1.5)
|
200
|
+
zeitwerk (2.4.2)
|
201
|
+
|
202
|
+
PLATFORMS
|
203
|
+
java
|
204
|
+
ruby
|
205
|
+
|
206
|
+
DEPENDENCIES
|
207
|
+
activerecord-jdbcsqlite3-adapter
|
208
|
+
appraisal (~> 2.1)
|
209
|
+
bundler (~> 2.0)
|
210
|
+
combustion (~> 1.0)
|
211
|
+
rails (>= 3.1, < 7)
|
212
|
+
rake (~> 13.0)
|
213
|
+
rapporteur!
|
214
|
+
rspec-collection_matchers (~> 1.0)
|
215
|
+
rspec-rails (~> 5.0)
|
216
|
+
rubocop (~> 1.0)
|
217
|
+
rubocop-rails_config (~> 1.0)
|
218
|
+
sqlite3
|
219
|
+
|
220
|
+
BUNDLED WITH
|
221
|
+
2.2.20
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Rapporteur (rap-or-TUHR)
|
2
2
|
|
3
3
|
[![Gem Version](http://img.shields.io/gem/v/rapporteur.svg?style=flat)](http://rubygems.org/gems/rapporteur)
|
4
|
-
[![
|
5
|
-
[![
|
4
|
+
[![Test and Release](https://github.com/envylabs/rapporteur/actions/workflows/tests.yml/badge.svg)](https://github.com/envylabs/rapporteur/actions/workflows/tests.yml)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/8c498efff627b93db4b9/maintainability)](https://codeclimate.com/github/envylabs/rapporteur/maintainability)
|
6
6
|
[![Inline docs](http://inch-ci.org/github/envylabs/rapporteur.svg?branch=master)](http://inch-ci.org/github/envylabs/rapporteur)
|
7
7
|
|
8
8
|
|
@@ -48,21 +48,14 @@ $ bundle install
|
|
48
48
|
|
49
49
|
### Supported environments
|
50
50
|
|
51
|
-
|
51
|
+
This library follows the maintenance policy of
|
52
|
+
[Ruby](https://www.ruby-lang.org/en/downloads/branches/),
|
53
|
+
[Ruby on Rails](https://guides.rubyonrails.org/maintenance_policy.html), and
|
54
|
+
[Sinatra](https://github.com/sinatra/sinatra/blob/master/MAINTENANCE.md) for
|
55
|
+
testing and maintaining these environments.
|
52
56
|
|
53
|
-
|
54
|
-
|
55
|
-
* MRI 2.2
|
56
|
-
|
57
|
-
Supported frameworks:
|
58
|
-
|
59
|
-
* Rails 5.x.
|
60
|
-
* Rails 4.2+.
|
61
|
-
* Sinatra 2.x.
|
62
|
-
* Sinatra 1.x.
|
63
|
-
|
64
|
-
Older versions of Ruby and frameworks may also work with this library, however
|
65
|
-
they are not officially supported.
|
57
|
+
Unsupported versions of Ruby, Ruby on Rails, or Sinatra may also work with this
|
58
|
+
library, however they are not officially supported or tested against.
|
66
59
|
|
67
60
|
## Usage
|
68
61
|
|
data/config/routes.rb
CHANGED
@@ -4,8 +4,12 @@ Rapporteur::Engine.routes.draw do
|
|
4
4
|
get '/(.:format)', to: 'statuses#show', as: :status
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
explicitly_mounted = Rails.application.routes.routes.any? { |r|
|
8
|
+
(Rapporteur::Engine == r.app) || (r.app.respond_to?(:app) && Rapporteur::Engine == r.app.app)
|
9
|
+
}
|
10
|
+
|
11
|
+
unless explicitly_mounted
|
12
|
+
ActiveSupport::Deprecation.warn('Rapporteur was not explicitly mounted in your application. Please add an explicit mount call to your /config/routes.rb. Automatically mounted Rapporteur::Engine to /status for backward compatibility. This will be no longer automatically mount in Rapporteur 4.') # rubocop:disable Layout/LineLength
|
9
13
|
Rails.application.routes.draw do
|
10
14
|
mount Rapporteur::Engine, at: '/status'
|
11
15
|
end
|
@@ -75,9 +75,9 @@ module Rapporteur
|
|
75
75
|
# Returns an Array containing Strings of messages.
|
76
76
|
#
|
77
77
|
def full_messages
|
78
|
-
@messages.map
|
79
|
-
attribute_messages.
|
80
|
-
|
78
|
+
@messages.map { |attribute, attribute_messages|
|
79
|
+
attribute_messages.map { |message| "#{attribute} #{message}" }
|
80
|
+
}.flatten
|
81
81
|
end
|
82
82
|
|
83
83
|
# Public: Returns the added attributes and their messages as a Hash, keyed
|
@@ -98,10 +98,10 @@ module Rapporteur
|
|
98
98
|
hash = {}
|
99
99
|
@messages.each_pair do |key, value|
|
100
100
|
hash[key] = if value.size == 1
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
value.first
|
102
|
+
else
|
103
|
+
value.to_a
|
104
|
+
end
|
105
105
|
end
|
106
106
|
hash
|
107
107
|
end
|
@@ -109,8 +109,7 @@ module Rapporteur
|
|
109
109
|
private
|
110
110
|
|
111
111
|
def generate_message(key, type, i18n_options)
|
112
|
-
I18n.translate(type, i18n_options.merge(default: [type, type.to_s],
|
113
|
-
scope: [:rapporteur, @list_type, key]))
|
112
|
+
I18n.translate(type, **i18n_options.merge(default: [type, type.to_s], scope: [:rapporteur, @list_type, key]))
|
114
113
|
end
|
115
114
|
|
116
115
|
def normalize_message(attribute, message, i18n_options)
|
data/lib/rapporteur/revision.rb
CHANGED
data/lib/rapporteur/rspec.rb
CHANGED
@@ -11,15 +11,11 @@ shared_examples_for 'a successful status response' do
|
|
11
11
|
|
12
12
|
context 'the response headers' do
|
13
13
|
it 'contains a Content-Type JSON header' do
|
14
|
-
expect(response.
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'does not contain an ETag header' do
|
18
|
-
expect(response.headers).not_to have_key('ETag')
|
14
|
+
expect(response.media_type).to(eq(Mime[:json]))
|
19
15
|
end
|
20
16
|
|
21
17
|
it 'contains a Cache-Control header which disables client caching' do
|
22
|
-
expect(response.headers.fetch('Cache-Control')).to
|
18
|
+
expect(response.headers.fetch('Cache-Control')).to include('no-cache')
|
23
19
|
end
|
24
20
|
end
|
25
21
|
|
@@ -39,15 +35,11 @@ shared_examples_for 'an erred status response' do
|
|
39
35
|
|
40
36
|
context 'the response headers' do
|
41
37
|
it 'contains a Content-Type JSON header' do
|
42
|
-
expect(response.
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'does not contain an ETag header' do
|
46
|
-
expect(response.headers).not_to have_key('ETag')
|
38
|
+
expect(response.media_type).to(eq(Mime[:json]))
|
47
39
|
end
|
48
40
|
|
49
41
|
it 'contains a Cache-Control header which disables client caching' do
|
50
|
-
expect(response.headers.fetch('Cache-Control')).to
|
42
|
+
expect(response.headers.fetch('Cache-Control')).to include('no-cache')
|
51
43
|
end
|
52
44
|
end
|
53
45
|
|
@@ -77,7 +69,7 @@ end
|
|
77
69
|
RSpec::Matchers.define :include_status_message do |name, message|
|
78
70
|
match do |response|
|
79
71
|
@body = JSON.parse(response.body)
|
80
|
-
@body.
|
72
|
+
@body.has_key?(name) && @body.fetch(name).match(message)
|
81
73
|
end
|
82
74
|
|
83
75
|
failure_message_for_should do |_actual|
|
data/lib/rapporteur/rspec3.rb
CHANGED
@@ -11,15 +11,11 @@ shared_examples_for 'a successful status response' do
|
|
11
11
|
|
12
12
|
context 'the response headers' do
|
13
13
|
it 'contains a Content-Type JSON header' do
|
14
|
-
expect(response.
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'does not contain an ETag header' do
|
18
|
-
expect(response.headers).not_to have_key('ETag')
|
14
|
+
expect(response.media_type).to(eq(Mime[:json]))
|
19
15
|
end
|
20
16
|
|
21
17
|
it 'contains a Cache-Control header which disables client caching' do
|
22
|
-
expect(response.headers.fetch('Cache-Control')).to
|
18
|
+
expect(response.headers.fetch('Cache-Control')).to include('no-cache')
|
23
19
|
end
|
24
20
|
end
|
25
21
|
|
@@ -39,15 +35,11 @@ shared_examples_for 'an erred status response' do
|
|
39
35
|
|
40
36
|
context 'the response headers' do
|
41
37
|
it 'contains a Content-Type JSON header' do
|
42
|
-
expect(response.
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'does not contain an ETag header' do
|
46
|
-
expect(response.headers).not_to have_key('ETag')
|
38
|
+
expect(response.media_type).to(eq(Mime[:json]))
|
47
39
|
end
|
48
40
|
|
49
41
|
it 'contains a Cache-Control header which disables client caching' do
|
50
|
-
expect(response.headers.fetch('Cache-Control')).to
|
42
|
+
expect(response.headers.fetch('Cache-Control')).to include('no-cache')
|
51
43
|
end
|
52
44
|
end
|
53
45
|
|
@@ -74,7 +66,7 @@ RSpec::Matchers.define :include_status_message do |name, message|
|
|
74
66
|
match do |response|
|
75
67
|
@body = JSON.parse(response.body)
|
76
68
|
|
77
|
-
@body.
|
69
|
+
@body.has_key?(name) && @body.fetch(name).match(message)
|
78
70
|
end
|
79
71
|
|
80
72
|
failure_message do |_actual|
|
data/lib/rapporteur/version.rb
CHANGED
data/rapporteur.gemspec
CHANGED
@@ -1,22 +1,23 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
5
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
require 'rapporteur/version'
|
3
|
+
require_relative 'lib/rapporteur/version'
|
7
4
|
|
8
5
|
Gem::Specification.new do |spec|
|
9
6
|
spec.name = 'rapporteur'
|
10
7
|
spec.version = Rapporteur::VERSION
|
11
|
-
spec.authors = ['Envy Labs'
|
8
|
+
spec.authors = ['Envy Labs']
|
12
9
|
spec.email = ['']
|
13
10
|
spec.description = 'An engine that provides common status polling endpoint.'
|
14
11
|
spec.summary = 'An engine that provides common status polling endpoint.'
|
15
12
|
spec.homepage = 'https://github.com/envylabs/rapporteur'
|
16
13
|
spec.license = 'MIT'
|
14
|
+
spec.required_ruby_version = '>= 2.4.0'
|
17
15
|
|
18
|
-
spec.
|
19
|
-
|
16
|
+
spec.metadata['source_code_uri'] = 'https://github.com/envylabs/rapporteur'
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/envylabs/rapporteur/blob/master/CHANGELOG.md'
|
18
|
+
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
21
|
end
|
21
22
|
spec.bindir = 'exe'
|
22
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -25,10 +26,12 @@ Gem::Specification.new do |spec|
|
|
25
26
|
spec.add_dependency 'i18n', '>= 0.6', '< 2'
|
26
27
|
|
27
28
|
spec.add_development_dependency 'appraisal', '~> 2.1'
|
28
|
-
spec.add_development_dependency 'bundler', '~>
|
29
|
-
spec.add_development_dependency 'combustion', '~>
|
30
|
-
spec.add_development_dependency 'rails', '>= 3.1', '<
|
31
|
-
spec.add_development_dependency 'rake', '~>
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
|
+
spec.add_development_dependency 'combustion', '~> 1.0'
|
31
|
+
spec.add_development_dependency 'rails', '>= 3.1', '< 7'
|
32
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
32
33
|
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.0'
|
33
|
-
spec.add_development_dependency 'rspec-rails', '~>
|
34
|
+
spec.add_development_dependency 'rspec-rails', '~> 5.0'
|
35
|
+
spec.add_development_dependency 'rubocop', '~> 1.0'
|
36
|
+
spec.add_development_dependency 'rubocop-rails_config', '~> 1.0'
|
34
37
|
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rapporteur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Envy Labs
|
8
|
-
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: exe
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: i18n
|
@@ -51,34 +50,28 @@ dependencies:
|
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
53
|
+
version: '2.0'
|
55
54
|
type: :development
|
56
55
|
prerelease: false
|
57
56
|
version_requirements: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
60
|
+
version: '2.0'
|
62
61
|
- !ruby/object:Gem::Dependency
|
63
62
|
name: combustion
|
64
63
|
requirement: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
69
|
-
- - ">="
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: 0.5.1
|
67
|
+
version: '1.0'
|
72
68
|
type: :development
|
73
69
|
prerelease: false
|
74
70
|
version_requirements: !ruby/object:Gem::Requirement
|
75
71
|
requirements:
|
76
72
|
- - "~>"
|
77
73
|
- !ruby/object:Gem::Version
|
78
|
-
version: '0
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 0.5.1
|
74
|
+
version: '1.0'
|
82
75
|
- !ruby/object:Gem::Dependency
|
83
76
|
name: rails
|
84
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,7 +81,7 @@ dependencies:
|
|
88
81
|
version: '3.1'
|
89
82
|
- - "<"
|
90
83
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
84
|
+
version: '7'
|
92
85
|
type: :development
|
93
86
|
prerelease: false
|
94
87
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -98,21 +91,21 @@ dependencies:
|
|
98
91
|
version: '3.1'
|
99
92
|
- - "<"
|
100
93
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
94
|
+
version: '7'
|
102
95
|
- !ruby/object:Gem::Dependency
|
103
96
|
name: rake
|
104
97
|
requirement: !ruby/object:Gem::Requirement
|
105
98
|
requirements:
|
106
99
|
- - "~>"
|
107
100
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
101
|
+
version: '13.0'
|
109
102
|
type: :development
|
110
103
|
prerelease: false
|
111
104
|
version_requirements: !ruby/object:Gem::Requirement
|
112
105
|
requirements:
|
113
106
|
- - "~>"
|
114
107
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
108
|
+
version: '13.0'
|
116
109
|
- !ruby/object:Gem::Dependency
|
117
110
|
name: rspec-collection_matchers
|
118
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,14 +126,42 @@ dependencies:
|
|
133
126
|
requirements:
|
134
127
|
- - "~>"
|
135
128
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
129
|
+
version: '5.0'
|
137
130
|
type: :development
|
138
131
|
prerelease: false
|
139
132
|
version_requirements: !ruby/object:Gem::Requirement
|
140
133
|
requirements:
|
141
134
|
- - "~>"
|
142
135
|
- !ruby/object:Gem::Version
|
143
|
-
version: '
|
136
|
+
version: '5.0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: rubocop
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.0'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '1.0'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-rails_config
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '1.0'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '1.0'
|
144
165
|
description: An engine that provides common status polling endpoint.
|
145
166
|
email:
|
146
167
|
- ''
|
@@ -148,12 +169,16 @@ executables: []
|
|
148
169
|
extensions: []
|
149
170
|
extra_rdoc_files: []
|
150
171
|
files:
|
172
|
+
- ".github/dependabot.yml"
|
173
|
+
- ".github/workflows/tests.yml"
|
151
174
|
- ".gitignore"
|
152
175
|
- ".rspec"
|
153
|
-
- ".
|
176
|
+
- ".rubocop.yml"
|
177
|
+
- ".yamllint"
|
154
178
|
- Appraisals
|
155
179
|
- CHANGELOG.md
|
156
180
|
- Gemfile
|
181
|
+
- Gemfile.lock
|
157
182
|
- LICENSE.txt
|
158
183
|
- README.md
|
159
184
|
- Rakefile
|
@@ -164,9 +189,10 @@ files:
|
|
164
189
|
- config.ru
|
165
190
|
- config/locales/en.yml
|
166
191
|
- config/routes.rb
|
167
|
-
- gemfiles/
|
168
|
-
- gemfiles/
|
169
|
-
- gemfiles/
|
192
|
+
- gemfiles/rails5.2.gemfile
|
193
|
+
- gemfiles/rails6.0.gemfile
|
194
|
+
- gemfiles/rails6.1.gemfile
|
195
|
+
- gemfiles/rails_latest.gemfile
|
170
196
|
- gemfiles/sinatra2.x.gemfile
|
171
197
|
- lib/rapporteur.rb
|
172
198
|
- lib/rapporteur/check_list.rb
|
@@ -184,8 +210,10 @@ files:
|
|
184
210
|
homepage: https://github.com/envylabs/rapporteur
|
185
211
|
licenses:
|
186
212
|
- MIT
|
187
|
-
metadata:
|
188
|
-
|
213
|
+
metadata:
|
214
|
+
source_code_uri: https://github.com/envylabs/rapporteur
|
215
|
+
changelog_uri: https://github.com/envylabs/rapporteur/blob/master/CHANGELOG.md
|
216
|
+
post_install_message:
|
189
217
|
rdoc_options: []
|
190
218
|
require_paths:
|
191
219
|
- lib
|
@@ -193,16 +221,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
221
|
requirements:
|
194
222
|
- - ">="
|
195
223
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
224
|
+
version: 2.4.0
|
197
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
226
|
requirements:
|
199
227
|
- - ">="
|
200
228
|
- !ruby/object:Gem::Version
|
201
229
|
version: '0'
|
202
230
|
requirements: []
|
203
|
-
|
204
|
-
|
205
|
-
signing_key:
|
231
|
+
rubygems_version: 3.2.20
|
232
|
+
signing_key:
|
206
233
|
specification_version: 4
|
207
234
|
summary: An engine that provides common status polling endpoint.
|
208
235
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
before_install: gem install bundler -v 1.15.1
|
2
|
-
cache: bundler
|
3
|
-
gemfile:
|
4
|
-
- gemfiles/rails4.2.x.gemfile
|
5
|
-
- gemfiles/rails5.x.gemfile
|
6
|
-
- gemfiles/sinatra1.x.gemfile
|
7
|
-
- gemfiles/sinatra2.x.gemfile
|
8
|
-
language: ruby
|
9
|
-
matrix:
|
10
|
-
fast_finish: true
|
11
|
-
notifications:
|
12
|
-
email: false
|
13
|
-
rvm:
|
14
|
-
- 2.2.7
|
15
|
-
- 2.3.4
|
16
|
-
- 2.4.1
|
17
|
-
sudo: false
|