human_attributes 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +104 -0
  3. data/.circleci/setup-rubygems.sh +3 -0
  4. data/.rubocop.yml +65 -594
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +6 -0
  7. data/Gemfile.lock +216 -144
  8. data/Guardfile +4 -4
  9. data/README.md +37 -17
  10. data/Rakefile +1 -1
  11. data/human_attributes.gemspec +11 -7
  12. data/lib/human_attributes/extension.rb +5 -3
  13. data/lib/human_attributes/formatters/base.rb +1 -0
  14. data/lib/human_attributes/formatters/enumerize.rb +1 -0
  15. data/lib/human_attributes/formatters_builder.rb +1 -0
  16. data/lib/human_attributes/version.rb +1 -1
  17. data/spec/dummy/Rakefile +1 -1
  18. data/spec/dummy/app/assets/config/manifest.js +3 -0
  19. data/spec/dummy/app/assets/stylesheets/application.css +3 -3
  20. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  21. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  22. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  23. data/spec/dummy/app/{assets/javascripts → javascript/packs}/application.js +3 -1
  24. data/spec/dummy/app/jobs/application_job.rb +7 -0
  25. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  26. data/spec/dummy/app/models/application_record.rb +3 -0
  27. data/spec/dummy/app/models/purchase.rb +1 -1
  28. data/spec/dummy/app/views/layouts/application.html.erb +10 -9
  29. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  30. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  31. data/spec/dummy/bin/rails +3 -3
  32. data/spec/dummy/bin/rake +2 -2
  33. data/spec/dummy/bin/setup +18 -14
  34. data/spec/dummy/config.ru +3 -1
  35. data/spec/dummy/config/application.rb +12 -22
  36. data/spec/dummy/config/boot.rb +3 -3
  37. data/spec/dummy/config/cable.yml +10 -0
  38. data/spec/dummy/config/database.yml +4 -18
  39. data/spec/dummy/config/environment.rb +1 -1
  40. data/spec/dummy/config/environments/development.rb +49 -14
  41. data/spec/dummy/config/environments/production.rb +63 -22
  42. data/spec/dummy/config/environments/test.rb +29 -12
  43. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  44. data/spec/dummy/config/initializers/assets.rb +4 -3
  45. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
  46. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  47. data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
  48. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
  49. data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
  50. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  51. data/spec/dummy/config/locales/en.yml +11 -1
  52. data/spec/dummy/config/puma.rb +43 -0
  53. data/spec/dummy/config/routes.rb +1 -54
  54. data/spec/dummy/config/storage.yml +34 -0
  55. data/spec/dummy/db/migrate/20161113032308_create_purchases.rb +1 -1
  56. data/spec/dummy/db/schema.rb +14 -15
  57. data/spec/dummy/public/404.html +6 -6
  58. data/spec/dummy/public/422.html +6 -6
  59. data/spec/dummy/public/500.html +6 -6
  60. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  61. data/spec/dummy/public/apple-touch-icon.png +0 -0
  62. data/spec/dummy/spec/factories/purchases.rb +6 -22
  63. data/spec/dummy/spec/lib/active_record_extension_spec.rb +34 -32
  64. metadata +97 -36
  65. data/spec/dummy/README.rdoc +0 -28
  66. data/spec/dummy/bin/bundle +0 -3
  67. data/spec/dummy/config/initializers/session_store.rb +0 -3
  68. data/spec/dummy/config/secrets.yml +0 -22
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3
1
+ 2.7
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ # 0.7.0
6
+ ##### Changed
7
+
8
+ * Replace travis with circleci.
9
+ * Use Rails 6 on Dummy app.
10
+
5
11
  ### 0.6.0
6
12
 
7
13
  ##### Changed
data/Gemfile.lock CHANGED
@@ -1,77 +1,109 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- human_attributes (0.6.0)
4
+ human_attributes (0.7.0)
5
5
  factory_bot
6
6
  rails (>= 4.2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.2.8)
12
- actionpack (= 4.2.8)
13
- actionview (= 4.2.8)
14
- activejob (= 4.2.8)
11
+ actioncable (6.1.3.2)
12
+ actionpack (= 6.1.3.2)
13
+ activesupport (= 6.1.3.2)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailbox (6.1.3.2)
17
+ actionpack (= 6.1.3.2)
18
+ activejob (= 6.1.3.2)
19
+ activerecord (= 6.1.3.2)
20
+ activestorage (= 6.1.3.2)
21
+ activesupport (= 6.1.3.2)
22
+ mail (>= 2.7.1)
23
+ actionmailer (6.1.3.2)
24
+ actionpack (= 6.1.3.2)
25
+ actionview (= 6.1.3.2)
26
+ activejob (= 6.1.3.2)
27
+ activesupport (= 6.1.3.2)
15
28
  mail (~> 2.5, >= 2.5.4)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.8)
18
- actionview (= 4.2.8)
19
- activesupport (= 4.2.8)
20
- rack (~> 1.6)
21
- rack-test (~> 0.6.2)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.8)
25
- activesupport (= 4.2.8)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (6.1.3.2)
31
+ actionview (= 6.1.3.2)
32
+ activesupport (= 6.1.3.2)
33
+ rack (~> 2.0, >= 2.0.9)
34
+ rack-test (>= 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
+ actiontext (6.1.3.2)
38
+ actionpack (= 6.1.3.2)
39
+ activerecord (= 6.1.3.2)
40
+ activestorage (= 6.1.3.2)
41
+ activesupport (= 6.1.3.2)
42
+ nokogiri (>= 1.8.5)
43
+ actionview (6.1.3.2)
44
+ activesupport (= 6.1.3.2)
26
45
  builder (~> 3.1)
27
- erubis (~> 2.7.0)
28
- rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
30
- activejob (4.2.8)
31
- activesupport (= 4.2.8)
32
- globalid (>= 0.3.0)
33
- activemodel (4.2.8)
34
- activesupport (= 4.2.8)
46
+ erubi (~> 1.4)
47
+ rails-dom-testing (~> 2.0)
48
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
+ activejob (6.1.3.2)
50
+ activesupport (= 6.1.3.2)
51
+ globalid (>= 0.3.6)
52
+ activemodel (6.1.3.2)
53
+ activesupport (= 6.1.3.2)
54
+ activemodel-serializers-xml (1.0.2)
55
+ activemodel (> 5.x)
56
+ activesupport (> 5.x)
35
57
  builder (~> 3.1)
36
- activerecord (4.2.8)
37
- activemodel (= 4.2.8)
38
- activesupport (= 4.2.8)
39
- arel (~> 6.0)
40
- activesupport (4.2.8)
41
- i18n (~> 0.7)
42
- minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
- tzinfo (~> 1.1)
45
- arel (6.0.4)
46
- builder (3.2.3)
47
- coderay (1.1.1)
48
- concurrent-ruby (1.0.5)
49
- coveralls (0.8.19)
58
+ activerecord (6.1.3.2)
59
+ activemodel (= 6.1.3.2)
60
+ activesupport (= 6.1.3.2)
61
+ activestorage (6.1.3.2)
62
+ actionpack (= 6.1.3.2)
63
+ activejob (= 6.1.3.2)
64
+ activerecord (= 6.1.3.2)
65
+ activesupport (= 6.1.3.2)
66
+ marcel (~> 1.0.0)
67
+ mini_mime (~> 1.0.2)
68
+ activesupport (6.1.3.2)
69
+ concurrent-ruby (~> 1.0, >= 1.0.2)
70
+ i18n (>= 1.6, < 2)
71
+ minitest (>= 5.1)
72
+ tzinfo (~> 2.0)
73
+ zeitwerk (~> 2.3)
74
+ ast (2.4.2)
75
+ builder (3.2.4)
76
+ coderay (1.1.3)
77
+ concurrent-ruby (1.1.9)
78
+ coveralls (0.8.23)
50
79
  json (>= 1.8, < 3)
51
- simplecov (~> 0.12.0)
80
+ simplecov (~> 0.16.1)
52
81
  term-ansicolor (~> 1.3)
53
- thor (~> 0.19.1)
82
+ thor (>= 0.19.4, < 2.0)
54
83
  tins (~> 1.6)
55
- diff-lcs (1.3)
56
- docile (1.1.5)
57
- draper (2.1.0)
58
- actionpack (>= 3.0)
59
- activemodel (>= 3.0)
60
- activesupport (>= 3.0)
61
- request_store (~> 1.0)
62
- enumerize (1.1.1)
84
+ crass (1.0.6)
85
+ diff-lcs (1.4.4)
86
+ docile (1.4.0)
87
+ draper (4.0.2)
88
+ actionpack (>= 5.0)
89
+ activemodel (>= 5.0)
90
+ activemodel-serializers-xml (>= 1.0)
91
+ activesupport (>= 5.0)
92
+ request_store (>= 1.0)
93
+ ruby2_keywords
94
+ enumerize (2.4.0)
63
95
  activesupport (>= 3.2)
64
- erubis (2.7.0)
65
- factory_bot (4.8.2)
66
- activesupport (>= 3.0.0)
67
- ffi (1.9.18)
96
+ erubi (1.10.0)
97
+ factory_bot (6.2.0)
98
+ activesupport (>= 5.0.0)
99
+ ffi (1.15.1)
68
100
  formatador (0.2.5)
69
- globalid (0.4.1)
101
+ globalid (0.4.2)
70
102
  activesupport (>= 4.2.0)
71
- guard (2.14.1)
103
+ guard (2.17.0)
72
104
  formatador (>= 0.2.4)
73
105
  listen (>= 2.7, < 4.0)
74
- lumberjack (~> 1.0)
106
+ lumberjack (>= 1.0.12, < 2.0)
75
107
  nenv (~> 0.1)
76
108
  notiffany (~> 0.0)
77
109
  pry (>= 0.9.12)
@@ -82,123 +114,163 @@ GEM
82
114
  guard (~> 2.1)
83
115
  guard-compat (~> 1.1)
84
116
  rspec (>= 2.99.0, < 4.0)
85
- i18n (0.8.1)
86
- json (2.0.3)
87
- listen (3.1.5)
88
- rb-fsevent (~> 0.9, >= 0.9.4)
89
- rb-inotify (~> 0.9, >= 0.9.7)
90
- ruby_dep (~> 1.2)
91
- loofah (2.0.3)
117
+ i18n (1.8.10)
118
+ concurrent-ruby (~> 1.0)
119
+ json (2.5.1)
120
+ listen (3.5.1)
121
+ rb-fsevent (~> 0.10, >= 0.10.3)
122
+ rb-inotify (~> 0.9, >= 0.9.10)
123
+ loofah (2.10.0)
124
+ crass (~> 1.0.2)
92
125
  nokogiri (>= 1.5.9)
93
- lumberjack (1.0.11)
94
- mail (2.7.0)
126
+ lumberjack (1.2.8)
127
+ mail (2.7.1)
95
128
  mini_mime (>= 0.1.1)
96
- method_source (0.8.2)
97
- mini_mime (1.0.0)
98
- mini_portile2 (2.1.0)
99
- minitest (5.10.1)
129
+ marcel (1.0.1)
130
+ method_source (1.0.0)
131
+ mini_mime (1.0.3)
132
+ minitest (5.14.4)
100
133
  nenv (0.3.0)
101
- nokogiri (1.7.1)
102
- mini_portile2 (~> 2.1.0)
103
- notiffany (0.1.1)
134
+ nio4r (2.5.7)
135
+ nokogiri (1.11.7-x86_64-darwin)
136
+ racc (~> 1.4)
137
+ nokogiri (1.11.7-x86_64-linux)
138
+ racc (~> 1.4)
139
+ notiffany (0.1.3)
104
140
  nenv (~> 0.1)
105
141
  shellany (~> 0.0)
106
- pry (0.10.4)
107
- coderay (~> 1.1.0)
108
- method_source (~> 0.8.1)
109
- slop (~> 3.4)
110
- pry-rails (0.3.6)
142
+ parallel (1.20.1)
143
+ parser (3.0.1.1)
144
+ ast (~> 2.4.1)
145
+ pry (0.14.1)
146
+ coderay (~> 1.1)
147
+ method_source (~> 1.0)
148
+ pry-rails (0.3.9)
111
149
  pry (>= 0.10.4)
112
- rack (1.6.5)
113
- rack-test (0.6.3)
114
- rack (>= 1.0)
115
- rails (4.2.8)
116
- actionmailer (= 4.2.8)
117
- actionpack (= 4.2.8)
118
- actionview (= 4.2.8)
119
- activejob (= 4.2.8)
120
- activemodel (= 4.2.8)
121
- activerecord (= 4.2.8)
122
- activesupport (= 4.2.8)
123
- bundler (>= 1.3.0, < 2.0)
124
- railties (= 4.2.8)
125
- sprockets-rails
126
- rails-deprecated_sanitizer (1.0.3)
127
- activesupport (>= 4.2.0.alpha)
128
- rails-dom-testing (1.0.8)
129
- activesupport (>= 4.2.0.beta, < 5.0)
130
- nokogiri (~> 1.6)
131
- rails-deprecated_sanitizer (>= 1.0.1)
132
- rails-html-sanitizer (1.0.3)
133
- loofah (~> 2.0)
134
- railties (4.2.8)
135
- actionpack (= 4.2.8)
136
- activesupport (= 4.2.8)
150
+ racc (1.5.2)
151
+ rack (2.2.3)
152
+ rack-test (1.1.0)
153
+ rack (>= 1.0, < 3)
154
+ rails (6.1.3.2)
155
+ actioncable (= 6.1.3.2)
156
+ actionmailbox (= 6.1.3.2)
157
+ actionmailer (= 6.1.3.2)
158
+ actionpack (= 6.1.3.2)
159
+ actiontext (= 6.1.3.2)
160
+ actionview (= 6.1.3.2)
161
+ activejob (= 6.1.3.2)
162
+ activemodel (= 6.1.3.2)
163
+ activerecord (= 6.1.3.2)
164
+ activestorage (= 6.1.3.2)
165
+ activesupport (= 6.1.3.2)
166
+ bundler (>= 1.15.0)
167
+ railties (= 6.1.3.2)
168
+ sprockets-rails (>= 2.0.0)
169
+ rails-dom-testing (2.0.3)
170
+ activesupport (>= 4.2.0)
171
+ nokogiri (>= 1.6)
172
+ rails-html-sanitizer (1.3.0)
173
+ loofah (~> 2.3)
174
+ railties (6.1.3.2)
175
+ actionpack (= 6.1.3.2)
176
+ activesupport (= 6.1.3.2)
177
+ method_source
137
178
  rake (>= 0.8.7)
138
- thor (>= 0.18.1, < 2.0)
139
- rake (12.0.0)
140
- rb-fsevent (0.9.8)
141
- rb-inotify (0.9.8)
142
- ffi (>= 0.5.0)
143
- request_store (1.3.2)
144
- rspec (3.5.0)
145
- rspec-core (~> 3.5.0)
146
- rspec-expectations (~> 3.5.0)
147
- rspec-mocks (~> 3.5.0)
148
- rspec-core (3.5.4)
149
- rspec-support (~> 3.5.0)
150
- rspec-expectations (3.5.0)
179
+ thor (~> 1.0)
180
+ rainbow (3.0.0)
181
+ rake (13.0.3)
182
+ rb-fsevent (0.11.0)
183
+ rb-inotify (0.10.1)
184
+ ffi (~> 1.0)
185
+ regexp_parser (2.1.1)
186
+ request_store (1.5.0)
187
+ rack (>= 1.4)
188
+ rexml (3.2.5)
189
+ rspec (3.10.0)
190
+ rspec-core (~> 3.10.0)
191
+ rspec-expectations (~> 3.10.0)
192
+ rspec-mocks (~> 3.10.0)
193
+ rspec-core (3.10.1)
194
+ rspec-support (~> 3.10.0)
195
+ rspec-expectations (3.10.1)
151
196
  diff-lcs (>= 1.2.0, < 2.0)
152
- rspec-support (~> 3.5.0)
153
- rspec-mocks (3.5.0)
197
+ rspec-support (~> 3.10.0)
198
+ rspec-mocks (3.10.2)
154
199
  diff-lcs (>= 1.2.0, < 2.0)
155
- rspec-support (~> 3.5.0)
156
- rspec-rails (3.5.2)
157
- actionpack (>= 3.0)
158
- activesupport (>= 3.0)
159
- railties (>= 3.0)
160
- rspec-core (~> 3.5.0)
161
- rspec-expectations (~> 3.5.0)
162
- rspec-mocks (~> 3.5.0)
163
- rspec-support (~> 3.5.0)
164
- rspec-support (3.5.0)
165
- ruby_dep (1.5.0)
200
+ rspec-support (~> 3.10.0)
201
+ rspec-rails (5.0.1)
202
+ actionpack (>= 5.2)
203
+ activesupport (>= 5.2)
204
+ railties (>= 5.2)
205
+ rspec-core (~> 3.10)
206
+ rspec-expectations (~> 3.10)
207
+ rspec-mocks (~> 3.10)
208
+ rspec-support (~> 3.10)
209
+ rspec-support (3.10.2)
210
+ rspec_junit_formatter (0.4.1)
211
+ rspec-core (>= 2, < 4, != 2.12.0)
212
+ rubocop (1.16.0)
213
+ parallel (~> 1.10)
214
+ parser (>= 3.0.0.0)
215
+ rainbow (>= 2.2.2, < 4.0)
216
+ regexp_parser (>= 1.8, < 3.0)
217
+ rexml
218
+ rubocop-ast (>= 1.7.0, < 2.0)
219
+ ruby-progressbar (~> 1.7)
220
+ unicode-display_width (>= 1.4.0, < 3.0)
221
+ rubocop-ast (1.7.0)
222
+ parser (>= 3.0.1.1)
223
+ rubocop-rails (2.6.0)
224
+ activesupport (>= 4.2.0)
225
+ rack (>= 1.1)
226
+ rubocop (>= 0.82.0)
227
+ ruby-progressbar (1.11.0)
228
+ ruby2_keywords (0.0.4)
166
229
  shellany (0.0.1)
167
- simplecov (0.12.0)
168
- docile (~> 1.1.0)
230
+ simplecov (0.16.1)
231
+ docile (~> 1.1)
169
232
  json (>= 1.8, < 3)
170
233
  simplecov-html (~> 0.10.0)
171
- simplecov-html (0.10.0)
172
- slop (3.6.0)
173
- sprockets (3.7.1)
234
+ simplecov-html (0.10.2)
235
+ sprockets (4.0.2)
174
236
  concurrent-ruby (~> 1.0)
175
237
  rack (> 1, < 3)
176
- sprockets-rails (3.2.1)
238
+ sprockets-rails (3.2.2)
177
239
  actionpack (>= 4.0)
178
240
  activesupport (>= 4.0)
179
241
  sprockets (>= 3.0.0)
180
- sqlite3 (1.3.13)
181
- term-ansicolor (1.4.1)
242
+ sqlite3 (1.4.2)
243
+ sync (0.5.0)
244
+ term-ansicolor (1.7.1)
182
245
  tins (~> 1.0)
183
- thor (0.19.4)
184
- thread_safe (0.3.6)
185
- tins (1.13.2)
186
- tzinfo (1.2.3)
187
- thread_safe (~> 0.1)
246
+ thor (1.1.0)
247
+ tins (1.29.1)
248
+ sync
249
+ tzinfo (2.0.4)
250
+ concurrent-ruby (~> 1.0)
251
+ unicode-display_width (2.0.0)
252
+ websocket-driver (0.7.4)
253
+ websocket-extensions (>= 0.1.0)
254
+ websocket-extensions (0.1.5)
255
+ zeitwerk (2.4.2)
188
256
 
189
257
  PLATFORMS
190
- ruby
258
+ x86_64-darwin-20
259
+ x86_64-linux
191
260
 
192
261
  DEPENDENCIES
193
262
  coveralls
194
- draper (~> 2.1.0)
195
- enumerize (~> 1, >= 1.1.1)
263
+ draper
264
+ enumerize (~> 2.1)
196
265
  guard-rspec (~> 4.7)
197
266
  human_attributes!
198
267
  pry
199
268
  pry-rails
200
- rspec-rails (~> 3.4)
269
+ rspec-rails
270
+ rspec_junit_formatter
271
+ rubocop (~> 1.9)
272
+ rubocop-rails
201
273
  sqlite3
202
274
 
203
275
  BUNDLED WITH
204
- 1.16.1
276
+ 2.2.15
data/Guardfile CHANGED
@@ -3,13 +3,13 @@ guard :rspec, cmd: "bundle exec rspec" do
3
3
  # RSpec files
4
4
  watch("spec/spec_helper.rb") { spec_dic }
5
5
  watch("spec/rails_helper.rb") { spec_dic }
6
- watch(%r{^spec\/dummy\/spec\/support\/(.+)\.rb$}) { spec_dic }
7
- watch(%r{^spec\/dummy\/spec\/.+_spec\.rb$})
6
+ watch(%r{^spec/dummy/spec/support/(.+)\.rb$}) { spec_dic }
7
+ watch(%r{^spec/dummy/spec/.+_spec\.rb$})
8
8
  # Engine files
9
9
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/dummy/spec/lib/#{m[1]}_spec.rb" }
10
10
  watch(%r{^app/(.+)\.rb$}) { |m| "spec/dummy/spec/#{m[1]}_spec.rb" }
11
11
  watch(%r{^app/(.*)(\.erb)$}) { |m| "spec/dummy/spec/#{m[1]}#{m[2]}_spec.rb" }
12
12
  # Dummy app files
13
- watch(%r{^spec\/dummy\/app/(.+)\.rb$}) { |m| "spec/dummy/spec/#{m[1]}_spec.rb" }
14
- watch(%r{^spec\/dummy\/app/(.*)(\.erb)$}) { |m| "spec/dummy/spec/#{m[1]}#{m[2]}_spec.rb" }
13
+ watch(%r{^spec/dummy/app/(.+)\.rb$}) { |m| "spec/dummy/spec/#{m[1]}_spec.rb" }
14
+ watch(%r{^spec/dummy/app/(.*)(\.erb)$}) { |m| "spec/dummy/spec/#{m[1]}#{m[2]}_spec.rb" }
15
15
  end