rapporteur 3.6.1 → 3.7.1

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
  SHA256:
3
- metadata.gz: fc0ef74bb8c678f77be9dbad7aa078ab01e363d0588edd10d310dd7faebd4a14
4
- data.tar.gz: cf5d2636d5922c5ca0d9afe2fa23508b1a0866d96890daa069dd1c88919e5bf3
3
+ metadata.gz: 13df72850687b6ffa72963ce159ff997d179474286830ad88310b2b07814d6dd
4
+ data.tar.gz: ae411b54da99569ee45f64ae7bf2dc93fa3c8a7e9a2716d3f164bec0eb9f60b3
5
5
  SHA512:
6
- metadata.gz: 4592348f579f226daac44efc57c5be1351481ee743494531fa7c4dde78db1354b584651e926879c7e275462567f8d77f2c995ec53c5fad7dbc3a91f31063410e
7
- data.tar.gz: 06e560141febd75c535f6f61b318b8b4d6e606799809f02a5b91997c69989154156a0e4238bbef31c60269194e8e3b2ecbb3ff8cfa87f37e62e68eea0e888be0
6
+ metadata.gz: 72f94494414402a9ef91a9951d8d9b7107e0123c0fcb65acfa72ad053ad1f5fce83f2d3874a7853e4d106ca38b91a2c9b90d05eea1372c364e2fdcdbeff29585
7
+ data.tar.gz: bb4e61342c23fa507f7900aeefd9be487c2257979ea48a31d556ebe299b32df2c9e87e3c623e9e0fd72de9b843e4d9e457c7093f7352f0ed58d8efe72389fbb1
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /gemfiles/*.lock
5
4
  /gemfiles/.bundle/
6
5
  /_yardoc/
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
1
  --color
2
2
  --format progress
3
+ --require spec_helper
3
4
  --warnings
@@ -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"
@@ -1,17 +1,54 @@
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
1
+ ---
2
+
3
+ before_install:
4
+ - "gem install bundler -v 2.1.3"
5
+ branches:
6
+ only:
7
+ - "master"
8
+ - '/^v\d+\.\d+\.\d+/'
9
+ cache:
10
+ bundler: true
11
+ dist: "bionic"
12
+ install:
13
+ - "bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}"
14
+ jobs:
15
+ fail_fast: true
16
+ include:
17
+ - rvm: "2.7.1"
18
+ stage: "Test"
19
+
20
+ - gemfile: "gemfiles/rails_latest.gemfile"
21
+ rvm: "2.7.1"
22
+ stage: "Latest Rails Release"
23
+ - gemfile: "gemfiles/rails_latest.gemfile"
24
+ rvm: "2.6.6"
25
+ - gemfile: "gemfiles/rails_latest.gemfile"
26
+ rvm: "2.5.8"
27
+
28
+ - gemfile: "gemfiles/rails6.0.gemfile"
29
+ rvm: "2.7.1"
30
+ stage: "Additinal Rails Tests"
31
+ - gemfile: "gemfiles/rails6.0.gemfile"
32
+ rvm: "2.6.6"
33
+ - gemfile: "gemfiles/rails6.0.gemfile"
34
+ rvm: "2.5.8"
35
+ - gemfile: "gemfiles/rails5.2.gemfile"
36
+ rvm: "2.7.1"
37
+ - gemfile: "gemfiles/rails5.2.gemfile"
38
+ rvm: "2.6.6"
39
+ - gemfile: "gemfiles/rails5.2.gemfile"
40
+ rvm: "2.5.8"
41
+
42
+ - gemfile: "gemfiles/sinatra2.x.gemfile"
43
+ rvm: "2.7.1"
44
+ stage: "Sinatra 2.x Release"
45
+ - gemfile: "gemfiles/sinatra2.x.gemfile"
46
+ rvm: "2.6.6"
47
+ - gemfile: "gemfiles/sinatra2.x.gemfile"
48
+ rvm: "2.5.8"
49
+ language: "ruby"
11
50
  notifications:
12
51
  email: false
13
- rvm:
14
- - 2.2.7
15
- - 2.3.4
16
- - 2.4.1
17
- sudo: false
52
+ script:
53
+ - "bundle exec rubocop -fs"
54
+ - "bundle exec rake"
@@ -0,0 +1,7 @@
1
+ ---
2
+
3
+ extends: default
4
+
5
+ rules:
6
+ key-ordering: "enable"
7
+ quoted-strings: "enable"
data/Appraisals CHANGED
@@ -1,15 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails4.2.x' do
4
- gem 'railties', '~> 4.2.0'
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 'rails5.x' do
8
- gem 'railties', '~> 5.0'
8
+ appraise 'rails6.0' do
9
+ gem 'rails', '~> 6.0.0'
9
10
  end
10
11
 
11
- appraise 'sinatra1.x' do
12
- gem 'sinatra', '~> 1.4'
12
+ appraise 'rails-latest' do
13
+ gem 'rails'
13
14
  end
14
15
 
15
16
  appraise 'sinatra2.x' do
@@ -2,14 +2,34 @@
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/rapporteur.svg?style=flat)](http://rubygems.org/gems/rapporteur)
4
4
  [![Build Status](http://img.shields.io/travis/envylabs/rapporteur/master.svg?style=flat)](https://travis-ci.org/envylabs/rapporteur)
5
- [![Code Climate](http://img.shields.io/codeclimate/github/envylabs/rapporteur.svg?style=flat)](https://codeclimate.com/github/envylabs/rapporteur)
6
- [![Dependency Status](https://gemnasium.com/envylabs/rapporteur.svg)](https://gemnasium.com/envylabs/rapporteur)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8c498efff627b93db4b9/maintainability)](https://codeclimate.com/github/envylabs/rapporteur/maintainability)
7
6
  [![Inline docs](http://inch-ci.org/github/envylabs/rapporteur.svg?branch=master)](http://inch-ci.org/github/envylabs/rapporteur)
8
7
 
9
8
  ## [HEAD][] / unreleased
10
9
 
11
10
  * No significant changes.
12
11
 
12
+ ## [3.7.1][] / 2020-09-25
13
+
14
+ * Fix a Ruby 2.7 keyword argument deprecation warning in MessageList.
15
+
16
+ ## [3.7.0][] / 2020-01-02
17
+
18
+ * Add and test support for Rails 6.0. This also drops explicit testing of Rails
19
+ 5.0 and 5.1 as they are no longer officially maintained.
20
+
21
+ ## [3.6.4][] / 2019-04-04
22
+
23
+ * Maintenance release, no functional changes.
24
+
25
+ ## [3.6.3][] / 2018-10-03
26
+
27
+ * Ensure the `Rapporteur::ApplicationController` is loaded and utilized.
28
+
29
+ ## [3.6.2][] / 2018-09-11
30
+
31
+ * Allow i18n 1.x versions as a dependency.
32
+
13
33
  ## [3.6.1][] / 2018-05-20
14
34
 
15
35
  * Convert Checker#messages and #errors into Thread-local variables. See
@@ -173,4 +193,9 @@
173
193
  [3.5.1]: https://github.com/envylabs/rapporteur/compare/v3.5.0...v3.5.1
174
194
  [3.6.0]: https://github.com/envylabs/rapporteur/compare/v3.5.1...v3.6.0
175
195
  [3.6.1]: https://github.com/envylabs/rapporteur/compare/v3.6.0...v3.6.1
176
- [HEAD]: https://github.com/envylabs/rapporteur/compare/v3.6.1...master
196
+ [3.6.2]: https://github.com/envylabs/rapporteur/compare/v3.6.1...v3.6.2
197
+ [3.6.3]: https://github.com/envylabs/rapporteur/compare/v3.6.2...v3.6.3
198
+ [3.6.4]: https://github.com/envylabs/rapporteur/compare/v3.6.3...v3.6.4
199
+ [3.7.0]: https://github.com/envylabs/rapporteur/compare/v3.6.4...v3.7.0
200
+ [3.7.1]: https://github.com/envylabs/rapporteur/compare/v3.7.0...v3.7.1
201
+ [HEAD]: https://github.com/envylabs/rapporteur/compare/v3.7.1...master
@@ -0,0 +1,225 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rapporteur (3.7.1)
5
+ i18n (>= 0.6, < 2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (6.0.3.3)
11
+ actionpack (= 6.0.3.3)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.0.3.3)
15
+ actionpack (= 6.0.3.3)
16
+ activejob (= 6.0.3.3)
17
+ activerecord (= 6.0.3.3)
18
+ activestorage (= 6.0.3.3)
19
+ activesupport (= 6.0.3.3)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.0.3.3)
22
+ actionpack (= 6.0.3.3)
23
+ actionview (= 6.0.3.3)
24
+ activejob (= 6.0.3.3)
25
+ mail (~> 2.5, >= 2.5.4)
26
+ rails-dom-testing (~> 2.0)
27
+ actionpack (6.0.3.3)
28
+ actionview (= 6.0.3.3)
29
+ activesupport (= 6.0.3.3)
30
+ rack (~> 2.0, >= 2.0.8)
31
+ rack-test (>= 0.6.3)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
+ actiontext (6.0.3.3)
35
+ actionpack (= 6.0.3.3)
36
+ activerecord (= 6.0.3.3)
37
+ activestorage (= 6.0.3.3)
38
+ activesupport (= 6.0.3.3)
39
+ nokogiri (>= 1.8.5)
40
+ actionview (6.0.3.3)
41
+ activesupport (= 6.0.3.3)
42
+ builder (~> 3.1)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.3.3)
47
+ activesupport (= 6.0.3.3)
48
+ globalid (>= 0.3.6)
49
+ activemodel (6.0.3.3)
50
+ activesupport (= 6.0.3.3)
51
+ activerecord (6.0.3.3)
52
+ activemodel (= 6.0.3.3)
53
+ activesupport (= 6.0.3.3)
54
+ activerecord-jdbc-adapter (60.2-java)
55
+ activerecord (~> 6.0.0)
56
+ activerecord-jdbcsqlite3-adapter (60.2-java)
57
+ activerecord-jdbc-adapter (= 60.2)
58
+ jdbc-sqlite3 (~> 3.8, < 3.30)
59
+ activestorage (6.0.3.3)
60
+ actionpack (= 6.0.3.3)
61
+ activejob (= 6.0.3.3)
62
+ activerecord (= 6.0.3.3)
63
+ marcel (~> 0.3.1)
64
+ activesupport (6.0.3.3)
65
+ concurrent-ruby (~> 1.0, >= 1.0.2)
66
+ i18n (>= 0.7, < 2)
67
+ minitest (~> 5.1)
68
+ tzinfo (~> 1.1)
69
+ zeitwerk (~> 2.2, >= 2.2.2)
70
+ appraisal (2.3.0)
71
+ bundler
72
+ rake
73
+ thor (>= 0.14.0)
74
+ ast (2.4.1)
75
+ builder (3.2.4)
76
+ combustion (1.3.0)
77
+ activesupport (>= 3.0.0)
78
+ railties (>= 3.0.0)
79
+ thor (>= 0.14.6)
80
+ concurrent-ruby (1.1.7)
81
+ crass (1.0.6)
82
+ diff-lcs (1.4.4)
83
+ erubi (1.9.0)
84
+ globalid (0.4.2)
85
+ activesupport (>= 4.2.0)
86
+ i18n (1.8.5)
87
+ concurrent-ruby (~> 1.0)
88
+ jdbc-sqlite3 (3.28.0)
89
+ loofah (2.7.0)
90
+ crass (~> 1.0.2)
91
+ nokogiri (>= 1.5.9)
92
+ mail (2.7.1)
93
+ mini_mime (>= 0.1.1)
94
+ marcel (0.3.3)
95
+ mimemagic (~> 0.3.2)
96
+ method_source (1.0.0)
97
+ mimemagic (0.3.5)
98
+ mini_mime (1.0.2)
99
+ mini_portile2 (2.4.0)
100
+ minitest (5.14.2)
101
+ nio4r (2.5.4)
102
+ nio4r (2.5.4-java)
103
+ nokogiri (1.10.10)
104
+ mini_portile2 (~> 2.4.0)
105
+ nokogiri (1.10.10-java)
106
+ parallel (1.19.2)
107
+ parser (2.7.1.5)
108
+ ast (~> 2.4.1)
109
+ rack (2.2.3)
110
+ rack-test (1.1.0)
111
+ rack (>= 1.0, < 3)
112
+ rails (6.0.3.3)
113
+ actioncable (= 6.0.3.3)
114
+ actionmailbox (= 6.0.3.3)
115
+ actionmailer (= 6.0.3.3)
116
+ actionpack (= 6.0.3.3)
117
+ actiontext (= 6.0.3.3)
118
+ actionview (= 6.0.3.3)
119
+ activejob (= 6.0.3.3)
120
+ activemodel (= 6.0.3.3)
121
+ activerecord (= 6.0.3.3)
122
+ activestorage (= 6.0.3.3)
123
+ activesupport (= 6.0.3.3)
124
+ bundler (>= 1.3.0)
125
+ railties (= 6.0.3.3)
126
+ sprockets-rails (>= 2.0.0)
127
+ rails-dom-testing (2.0.3)
128
+ activesupport (>= 4.2.0)
129
+ nokogiri (>= 1.6)
130
+ rails-html-sanitizer (1.3.0)
131
+ loofah (~> 2.3)
132
+ railties (6.0.3.3)
133
+ actionpack (= 6.0.3.3)
134
+ activesupport (= 6.0.3.3)
135
+ method_source
136
+ rake (>= 0.8.7)
137
+ thor (>= 0.20.3, < 2.0)
138
+ rainbow (3.0.0)
139
+ rake (13.0.1)
140
+ regexp_parser (1.8.0)
141
+ rexml (3.2.4)
142
+ rspec-collection_matchers (1.2.0)
143
+ rspec-expectations (>= 2.99.0.beta1)
144
+ rspec-core (3.9.2)
145
+ rspec-support (~> 3.9.3)
146
+ rspec-expectations (3.9.2)
147
+ diff-lcs (>= 1.2.0, < 2.0)
148
+ rspec-support (~> 3.9.0)
149
+ rspec-mocks (3.9.1)
150
+ diff-lcs (>= 1.2.0, < 2.0)
151
+ rspec-support (~> 3.9.0)
152
+ rspec-rails (4.0.1)
153
+ actionpack (>= 4.2)
154
+ activesupport (>= 4.2)
155
+ railties (>= 4.2)
156
+ rspec-core (~> 3.9)
157
+ rspec-expectations (~> 3.9)
158
+ rspec-mocks (~> 3.9)
159
+ rspec-support (~> 3.9)
160
+ rspec-support (3.9.3)
161
+ rubocop (0.92.0)
162
+ parallel (~> 1.10)
163
+ parser (>= 2.7.1.5)
164
+ rainbow (>= 2.2.2, < 4.0)
165
+ regexp_parser (>= 1.7)
166
+ rexml
167
+ rubocop-ast (>= 0.5.0)
168
+ ruby-progressbar (~> 1.7)
169
+ unicode-display_width (>= 1.4.0, < 2.0)
170
+ rubocop-ast (0.5.0)
171
+ parser (>= 2.7.1.5)
172
+ rubocop-performance (1.8.1)
173
+ rubocop (>= 0.87.0)
174
+ rubocop-ast (>= 0.4.0)
175
+ rubocop-rails (2.8.1)
176
+ activesupport (>= 4.2.0)
177
+ rack (>= 1.1)
178
+ rubocop (>= 0.87.0)
179
+ rubocop-rails_config (0.12.6)
180
+ railties (>= 5.0)
181
+ rubocop (~> 0.82)
182
+ rubocop-performance (~> 1.3)
183
+ rubocop-rails (~> 2.0)
184
+ ruby-progressbar (1.10.1)
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.0.1)
194
+ thread_safe (0.3.6)
195
+ thread_safe (0.3.6-java)
196
+ tzinfo (1.2.7)
197
+ thread_safe (~> 0.1)
198
+ unicode-display_width (1.7.0)
199
+ websocket-driver (0.7.3)
200
+ websocket-extensions (>= 0.1.0)
201
+ websocket-driver (0.7.3-java)
202
+ websocket-extensions (>= 0.1.0)
203
+ websocket-extensions (0.1.5)
204
+ zeitwerk (2.4.0)
205
+
206
+ PLATFORMS
207
+ java
208
+ ruby
209
+
210
+ DEPENDENCIES
211
+ activerecord-jdbcsqlite3-adapter
212
+ appraisal (~> 2.1)
213
+ bundler (~> 2.0)
214
+ combustion (~> 1.0)
215
+ rails (>= 3.1, < 7)
216
+ rake (~> 13.0)
217
+ rapporteur!
218
+ rspec-collection_matchers (~> 1.0)
219
+ rspec-rails (~> 4.0)
220
+ rubocop (~> 0.92.0)
221
+ rubocop-rails_config (~> 0.12.0)
222
+ sqlite3
223
+
224
+ BUNDLED WITH
225
+ 2.1.4
data/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/rapporteur.svg?style=flat)](http://rubygems.org/gems/rapporteur)
4
4
  [![Build Status](http://img.shields.io/travis/envylabs/rapporteur/master.svg?style=flat)](https://travis-ci.org/envylabs/rapporteur)
5
- [![Code Climate](http://img.shields.io/codeclimate/github/envylabs/rapporteur.svg?style=flat)](https://codeclimate.com/github/envylabs/rapporteur)
6
- [![Dependency Status](https://gemnasium.com/envylabs/rapporteur.svg)](https://gemnasium.com/envylabs/rapporteur)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8c498efff627b93db4b9/maintainability)](https://codeclimate.com/github/envylabs/rapporteur/maintainability)
7
6
  [![Inline docs](http://inch-ci.org/github/envylabs/rapporteur.svg?branch=master)](http://inch-ci.org/github/envylabs/rapporteur)
8
7
 
9
8
 
@@ -49,21 +48,14 @@ $ bundle install
49
48
 
50
49
  ### Supported environments
51
50
 
52
- Supported Ruby versions:
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.
53
56
 
54
- * MRI 2.4
55
- * MRI 2.3
56
- * MRI 2.2
57
-
58
- Supported frameworks:
59
-
60
- * Rails 5.x.
61
- * Rails 4.2+.
62
- * Sinatra 2.x.
63
- * Sinatra 1.x.
64
-
65
- Older versions of Ruby and frameworks may also work with this library, however
66
- 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.
67
59
 
68
60
  ## Usage
69
61
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'application_controller'
4
+
3
5
  module Rapporteur
4
6
  class StatusesController < ApplicationController
5
7
  def show
@@ -1,3 +1,5 @@
1
+ ---
2
+
1
3
  en:
2
4
  rapporteur:
3
5
  errors:
@@ -4,8 +4,12 @@ Rapporteur::Engine.routes.draw do
4
4
  get '/(.:format)', to: 'statuses#show', as: :status
5
5
  end
6
6
 
7
- unless Rails.application.routes.routes.any? { |r| (Rapporteur::Engine == r.app) || (r.app.respond_to?(:app) && Rapporteur::Engine == r.app.app) }
8
- 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.')
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
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
- gem "sqlite3", platforms: :ruby
7
- gem "railties", "~> 4.2.0"
6
+ gem "sqlite3", "< 1.4", platforms: :ruby
7
+ gem "rails", "~> 5.2.0"
8
8
 
9
9
  gemspec path: "../"
@@ -4,6 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
6
  gem "sqlite3", platforms: :ruby
7
- gem "sinatra", "~> 1.4"
7
+ gem "rails", "~> 6.0.0"
8
8
 
9
9
  gemspec path: "../"
@@ -4,6 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
6
6
  gem "sqlite3", platforms: :ruby
7
- gem "railties", "~> 5.0"
7
+ gem "rails"
8
8
 
9
9
  gemspec path: "../"
@@ -5,7 +5,7 @@ module Rapporteur
5
5
  class ActiveRecordCheck
6
6
  def self.call(checker)
7
7
  ActiveRecord::Base.connection.select_value('SELECT current_time AS time')
8
- rescue
8
+ rescue StandardError
9
9
  checker.add_error(:database, :unavailable)
10
10
  end
11
11
  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 do |attribute, attribute_messages|
79
- attribute_messages.collect { |message| "#{attribute} #{message}" }
80
- end.flatten
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
- value.first
102
- else
103
- value.to_a
104
- end
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)
@@ -36,7 +36,7 @@ module Rapporteur
36
36
  #
37
37
  def self.default_revision_source
38
38
  `git rev-parse HEAD 2>/dev/null`.strip
39
- rescue
39
+ rescue StandardError
40
40
  end
41
41
 
42
42
  # Internal: Calculates the current revision from the configured revision
@@ -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.content_type).to(eq(Mime[:json]))
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 eq('no-cache')
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.content_type).to(eq(Mime[:json]))
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 eq('no-cache')
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.key?(name) && @body.fetch(name).match(message)
72
+ @body.has_key?(name) && @body.fetch(name).match(message)
81
73
  end
82
74
 
83
75
  failure_message_for_should do |_actual|
@@ -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.content_type).to(eq(Mime[:json]))
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 eq('no-cache')
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.content_type).to(eq(Mime[:json]))
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 eq('no-cache')
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.key?(name) && @body.fetch(name).match(message)
69
+ @body.has_key?(name) && @body.fetch(name).match(message)
78
70
  end
79
71
 
80
72
  failure_message do |_actual|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rapporteur
4
- VERSION = '3.6.1'
4
+ VERSION = '3.7.1'
5
5
  end
@@ -1,34 +1,37 @@
1
- # coding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
- lib = File.expand_path('../lib', __FILE__)
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', 'Code School']
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 = Gem::Requirement.new('>= 2.3.0')
17
15
 
18
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
- f.match(%r{^(test|spec|features)/})
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) }
23
24
  spec.require_paths = ['lib']
24
25
 
25
- spec.add_dependency 'i18n', '~> 0.6'
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', '~> 1.15'
29
- spec.add_development_dependency 'combustion', '~> 0.5', '>= 0.5.1'
30
- spec.add_development_dependency 'rails', '>= 3.1', '< 6'
31
- spec.add_development_dependency 'rake', '~> 12.0'
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', '~> 3.2'
34
+ spec.add_development_dependency 'rspec-rails', '~> 4.0'
35
+ spec.add_development_dependency 'rubocop', '~> 0.92.0'
36
+ spec.add_development_dependency 'rubocop-rails_config', '~> 0.12.0'
34
37
  end
metadata CHANGED
@@ -1,30 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapporteur
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Envy Labs
8
- - Code School
9
- autorequire:
8
+ autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2018-05-21 00:00:00.000000000 Z
11
+ date: 2020-09-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: i18n
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - "~>"
17
+ - - ">="
19
18
  - !ruby/object:Gem::Version
20
19
  version: '0.6'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
24
26
  requirements:
25
- - - "~>"
27
+ - - ">="
26
28
  - !ruby/object:Gem::Version
27
29
  version: '0.6'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
28
33
  - !ruby/object:Gem::Dependency
29
34
  name: appraisal
30
35
  requirement: !ruby/object:Gem::Requirement
@@ -45,34 +50,28 @@ dependencies:
45
50
  requirements:
46
51
  - - "~>"
47
52
  - !ruby/object:Gem::Version
48
- version: '1.15'
53
+ version: '2.0'
49
54
  type: :development
50
55
  prerelease: false
51
56
  version_requirements: !ruby/object:Gem::Requirement
52
57
  requirements:
53
58
  - - "~>"
54
59
  - !ruby/object:Gem::Version
55
- version: '1.15'
60
+ version: '2.0'
56
61
  - !ruby/object:Gem::Dependency
57
62
  name: combustion
58
63
  requirement: !ruby/object:Gem::Requirement
59
64
  requirements:
60
65
  - - "~>"
61
66
  - !ruby/object:Gem::Version
62
- version: '0.5'
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: 0.5.1
67
+ version: '1.0'
66
68
  type: :development
67
69
  prerelease: false
68
70
  version_requirements: !ruby/object:Gem::Requirement
69
71
  requirements:
70
72
  - - "~>"
71
73
  - !ruby/object:Gem::Version
72
- version: '0.5'
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: 0.5.1
74
+ version: '1.0'
76
75
  - !ruby/object:Gem::Dependency
77
76
  name: rails
78
77
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +81,7 @@ dependencies:
82
81
  version: '3.1'
83
82
  - - "<"
84
83
  - !ruby/object:Gem::Version
85
- version: '6'
84
+ version: '7'
86
85
  type: :development
87
86
  prerelease: false
88
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -92,21 +91,21 @@ dependencies:
92
91
  version: '3.1'
93
92
  - - "<"
94
93
  - !ruby/object:Gem::Version
95
- version: '6'
94
+ version: '7'
96
95
  - !ruby/object:Gem::Dependency
97
96
  name: rake
98
97
  requirement: !ruby/object:Gem::Requirement
99
98
  requirements:
100
99
  - - "~>"
101
100
  - !ruby/object:Gem::Version
102
- version: '12.0'
101
+ version: '13.0'
103
102
  type: :development
104
103
  prerelease: false
105
104
  version_requirements: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - "~>"
108
107
  - !ruby/object:Gem::Version
109
- version: '12.0'
108
+ version: '13.0'
110
109
  - !ruby/object:Gem::Dependency
111
110
  name: rspec-collection_matchers
112
111
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +126,42 @@ dependencies:
127
126
  requirements:
128
127
  - - "~>"
129
128
  - !ruby/object:Gem::Version
130
- version: '3.2'
129
+ version: '4.0'
131
130
  type: :development
132
131
  prerelease: false
133
132
  version_requirements: !ruby/object:Gem::Requirement
134
133
  requirements:
135
134
  - - "~>"
136
135
  - !ruby/object:Gem::Version
137
- version: '3.2'
136
+ version: '4.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: 0.92.0
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: 0.92.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: 0.12.0
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: 0.12.0
138
165
  description: An engine that provides common status polling endpoint.
139
166
  email:
140
167
  - ''
@@ -144,10 +171,13 @@ extra_rdoc_files: []
144
171
  files:
145
172
  - ".gitignore"
146
173
  - ".rspec"
174
+ - ".rubocop.yml"
147
175
  - ".travis.yml"
176
+ - ".yamllint"
148
177
  - Appraisals
149
178
  - CHANGELOG.md
150
179
  - Gemfile
180
+ - Gemfile.lock
151
181
  - LICENSE.txt
152
182
  - README.md
153
183
  - Rakefile
@@ -158,9 +188,9 @@ files:
158
188
  - config.ru
159
189
  - config/locales/en.yml
160
190
  - config/routes.rb
161
- - gemfiles/rails4.2.x.gemfile
162
- - gemfiles/rails5.x.gemfile
163
- - gemfiles/sinatra1.x.gemfile
191
+ - gemfiles/rails5.2.gemfile
192
+ - gemfiles/rails6.0.gemfile
193
+ - gemfiles/rails_latest.gemfile
164
194
  - gemfiles/sinatra2.x.gemfile
165
195
  - lib/rapporteur.rb
166
196
  - lib/rapporteur/check_list.rb
@@ -178,8 +208,10 @@ files:
178
208
  homepage: https://github.com/envylabs/rapporteur
179
209
  licenses:
180
210
  - MIT
181
- metadata: {}
182
- post_install_message:
211
+ metadata:
212
+ source_code_uri: https://github.com/envylabs/rapporteur
213
+ changelog_uri: https://github.com/envylabs/rapporteur/blob/master/CHANGELOG.md
214
+ post_install_message:
183
215
  rdoc_options: []
184
216
  require_paths:
185
217
  - lib
@@ -187,16 +219,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
219
  requirements:
188
220
  - - ">="
189
221
  - !ruby/object:Gem::Version
190
- version: '0'
222
+ version: 2.3.0
191
223
  required_rubygems_version: !ruby/object:Gem::Requirement
192
224
  requirements:
193
225
  - - ">="
194
226
  - !ruby/object:Gem::Version
195
227
  version: '0'
196
228
  requirements: []
197
- rubyforge_project:
198
- rubygems_version: 2.7.3
199
- signing_key:
229
+ rubygems_version: 3.1.4
230
+ signing_key:
200
231
  specification_version: 4
201
232
  summary: An engine that provides common status polling endpoint.
202
233
  test_files: []