human_attribute_values 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +18 -0
- data/README.md +5 -5
- data/lib/human_attribute_values/human_attribute_value.rb +14 -12
- data/lib/human_attribute_values/version.rb +3 -1
- data/lib/human_attribute_values.rb +2 -0
- data/test/active_model_test.rb +62 -0
- data/test/{human_attribute_values_test.rb → active_record_test.rb} +14 -14
- data/test/dummy/Rakefile +3 -1
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/active_model_child.rb +4 -0
- data/test/dummy/app/models/active_model_grand_child.rb +4 -0
- data/test/dummy/app/models/active_model_model.rb +7 -0
- data/test/dummy/app/models/active_model_parent.rb +7 -0
- data/test/dummy/app/models/active_model_sibling.rb +4 -0
- data/test/dummy/app/models/boolean_model.rb +2 -0
- data/test/dummy/app/models/child.rb +2 -0
- data/test/dummy/app/models/enum_model.rb +2 -0
- data/test/dummy/app/models/grand_child.rb +2 -0
- data/test/dummy/app/models/lexicon.rb +3 -1
- data/test/dummy/app/models/numeric_model.rb +2 -0
- data/test/dummy/app/models/parent.rb +2 -0
- data/test/dummy/app/models/sibling.rb +2 -0
- data/test/dummy/app/models/the_answer.rb +3 -0
- data/test/dummy/config/application.rb +5 -3
- data/test/dummy/config/boot.rb +4 -2
- data/test/dummy/config/environment.rb +3 -1
- data/test/dummy/config/environments/development.rb +2 -0
- data/test/dummy/config/environments/production.rb +2 -0
- data/test/dummy/config/environments/test.rb +4 -2
- data/test/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +2 -0
- data/test/dummy/config/initializers/inflections.rb +2 -0
- data/test/dummy/config/initializers/mime_types.rb +2 -0
- data/test/dummy/config/initializers/secret_token.rb +2 -0
- data/test/dummy/config/initializers/session_store.rb +2 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/test/dummy/config/locales/en.yml +32 -1
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/config.ru +3 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150127220502_create_the_answers.rb +5 -1
- data/test/dummy/db/migrate/20150131153819_create_parents.rb +4 -1
- data/test/dummy/db/migrate/20150131161322_create_boolean_models.rb +4 -1
- data/test/dummy/db/migrate/20150131162551_create_numeric_models.rb +4 -1
- data/test/dummy/db/migrate/20150131164609_create_lexicons.rb +4 -3
- data/test/dummy/db/migrate/20150131170613_create_enum_models.rb +4 -1
- data/test/dummy/db/schema.rb +28 -30
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +364 -0
- data/test/dummy/log/test.log +4861 -200
- data/test/dummy/test/models/boolean_model_test.rb +2 -0
- data/test/dummy/test/models/child_test.rb +2 -0
- data/test/dummy/test/models/enum_model_test.rb +2 -0
- data/test/dummy/test/models/grand_child_test.rb +2 -0
- data/test/dummy/test/models/lexicon_test.rb +2 -0
- data/test/dummy/test/models/numeric_model_test.rb +2 -0
- data/test/dummy/test/models/sibling_test.rb +2 -0
- data/test/dummy/test/models/the_answer_test.rb +2 -0
- data/test/test_helper.rb +6 -4
- metadata +99 -67
- data/Rakefile +0 -32
- data/lib/tasks/human_attribute_value_tasks.rake +0 -4
data/test/test_helper.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Configure Rails Environment
|
2
|
-
ENV[
|
4
|
+
ENV['RAILS_ENV'] = 'test'
|
3
5
|
|
4
|
-
require File.expand_path(
|
5
|
-
require
|
6
|
+
require File.expand_path('dummy/config/environment.rb', __dir__)
|
7
|
+
require 'rails/test_help'
|
6
8
|
|
7
9
|
Rails.backtrace_cleaner.remove_silencers!
|
8
10
|
|
@@ -11,5 +13,5 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
11
13
|
|
12
14
|
# Load fixtures from the engine
|
13
15
|
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
14
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path(
|
16
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path('fixtures', __dir__)
|
15
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: human_attribute_values
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Peschla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.2.10
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '6.0'
|
@@ -26,59 +26,82 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.
|
29
|
+
version: 4.2.10
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '6.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: appraisal
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: '2.0'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: byebug
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: sqlite3
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
50
64
|
requirements:
|
51
65
|
- - "~>"
|
52
66
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
67
|
+
version: 1.3.10
|
54
68
|
type: :development
|
55
69
|
prerelease: false
|
56
70
|
version_requirements: !ruby/object:Gem::Requirement
|
57
71
|
requirements:
|
58
72
|
- - "~>"
|
59
73
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
74
|
+
version: 1.3.10
|
61
75
|
description: Easy translation of attribute values for models through locale files
|
62
76
|
in a similar way as for attribute names.
|
63
77
|
email:
|
64
78
|
- github@peschla.net
|
65
79
|
executables: []
|
66
80
|
extensions: []
|
67
|
-
extra_rdoc_files:
|
81
|
+
extra_rdoc_files:
|
82
|
+
- README.md
|
83
|
+
- MIT-LICENSE
|
84
|
+
- CHANGELOG.md
|
68
85
|
files:
|
86
|
+
- CHANGELOG.md
|
69
87
|
- MIT-LICENSE
|
70
88
|
- README.md
|
71
|
-
- Rakefile
|
72
89
|
- lib/human_attribute_values.rb
|
73
90
|
- lib/human_attribute_values/human_attribute_value.rb
|
74
91
|
- lib/human_attribute_values/version.rb
|
75
|
-
-
|
92
|
+
- test/active_model_test.rb
|
93
|
+
- test/active_record_test.rb
|
76
94
|
- test/dummy/README.rdoc
|
77
95
|
- test/dummy/Rakefile
|
78
96
|
- test/dummy/app/assets/javascripts/application.js
|
79
97
|
- test/dummy/app/assets/stylesheets/application.css
|
80
98
|
- test/dummy/app/controllers/application_controller.rb
|
81
99
|
- test/dummy/app/helpers/application_helper.rb
|
100
|
+
- test/dummy/app/models/active_model_child.rb
|
101
|
+
- test/dummy/app/models/active_model_grand_child.rb
|
102
|
+
- test/dummy/app/models/active_model_model.rb
|
103
|
+
- test/dummy/app/models/active_model_parent.rb
|
104
|
+
- test/dummy/app/models/active_model_sibling.rb
|
82
105
|
- test/dummy/app/models/boolean_model.rb
|
83
106
|
- test/dummy/app/models/child.rb
|
84
107
|
- test/dummy/app/models/enum_model.rb
|
@@ -109,6 +132,7 @@ files:
|
|
109
132
|
- test/dummy/config/initializers/wrap_parameters.rb
|
110
133
|
- test/dummy/config/locales/en.yml
|
111
134
|
- test/dummy/config/routes.rb
|
135
|
+
- test/dummy/db/development.sqlite3
|
112
136
|
- test/dummy/db/migrate/20150127220502_create_the_answers.rb
|
113
137
|
- test/dummy/db/migrate/20150131153819_create_parents.rb
|
114
138
|
- test/dummy/db/migrate/20150131161322_create_boolean_models.rb
|
@@ -117,6 +141,7 @@ files:
|
|
117
141
|
- test/dummy/db/migrate/20150131170613_create_enum_models.rb
|
118
142
|
- test/dummy/db/schema.rb
|
119
143
|
- test/dummy/db/test.sqlite3
|
144
|
+
- test/dummy/log/development.log
|
120
145
|
- test/dummy/log/test.log
|
121
146
|
- test/dummy/public/404.html
|
122
147
|
- test/dummy/public/422.html
|
@@ -138,7 +163,6 @@ files:
|
|
138
163
|
- test/dummy/test/models/numeric_model_test.rb
|
139
164
|
- test/dummy/test/models/sibling_test.rb
|
140
165
|
- test/dummy/test/models/the_answer_test.rb
|
141
|
-
- test/human_attribute_values_test.rb
|
142
166
|
- test/test_helper.rb
|
143
167
|
homepage: https://github.com/RST-J/human_attribute_values
|
144
168
|
licenses:
|
@@ -160,75 +184,83 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
184
|
version: '0'
|
161
185
|
requirements: []
|
162
186
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
187
|
+
rubygems_version: 2.7.6
|
164
188
|
signing_key:
|
165
189
|
specification_version: 4
|
166
190
|
summary: Translate attribute values using Rails I18n API.
|
167
191
|
test_files:
|
168
|
-
- test/
|
192
|
+
- test/active_model_test.rb
|
193
|
+
- test/active_record_test.rb
|
169
194
|
- test/test_helper.rb
|
170
|
-
- test/dummy/
|
195
|
+
- test/dummy/Rakefile
|
196
|
+
- test/dummy/db/test.sqlite3
|
197
|
+
- test/dummy/db/migrate/20150127220502_create_the_answers.rb
|
198
|
+
- test/dummy/db/migrate/20150131161322_create_boolean_models.rb
|
199
|
+
- test/dummy/db/migrate/20150131164609_create_lexicons.rb
|
200
|
+
- test/dummy/db/migrate/20150131162551_create_numeric_models.rb
|
201
|
+
- test/dummy/db/migrate/20150131153819_create_parents.rb
|
202
|
+
- test/dummy/db/migrate/20150131170613_create_enum_models.rb
|
203
|
+
- test/dummy/db/schema.rb
|
204
|
+
- test/dummy/db/development.sqlite3
|
205
|
+
- test/dummy/test/models/enum_model_test.rb
|
206
|
+
- test/dummy/test/models/numeric_model_test.rb
|
207
|
+
- test/dummy/test/models/grand_child_test.rb
|
208
|
+
- test/dummy/test/models/the_answer_test.rb
|
209
|
+
- test/dummy/test/models/child_test.rb
|
210
|
+
- test/dummy/test/models/lexicon_test.rb
|
211
|
+
- test/dummy/test/models/boolean_model_test.rb
|
212
|
+
- test/dummy/test/models/sibling_test.rb
|
213
|
+
- test/dummy/test/fixtures/enum_models.yml
|
214
|
+
- test/dummy/test/fixtures/lexicons.yml
|
215
|
+
- test/dummy/test/fixtures/grandchildren.yml
|
216
|
+
- test/dummy/test/fixtures/boolean_models.yml
|
217
|
+
- test/dummy/test/fixtures/children.yml
|
218
|
+
- test/dummy/test/fixtures/siblings.yml
|
219
|
+
- test/dummy/test/fixtures/the_answers.yml
|
220
|
+
- test/dummy/test/fixtures/numeric_models.yml
|
221
|
+
- test/dummy/log/test.log
|
222
|
+
- test/dummy/log/development.log
|
223
|
+
- test/dummy/bin/rails
|
224
|
+
- test/dummy/bin/bundle
|
225
|
+
- test/dummy/bin/rake
|
226
|
+
- test/dummy/README.rdoc
|
227
|
+
- test/dummy/public/500.html
|
171
228
|
- test/dummy/public/favicon.ico
|
229
|
+
- test/dummy/public/404.html
|
172
230
|
- test/dummy/public/422.html
|
173
|
-
- test/dummy/
|
174
|
-
- test/dummy/
|
175
|
-
- test/dummy/app/
|
231
|
+
- test/dummy/app/controllers/application_controller.rb
|
232
|
+
- test/dummy/app/assets/stylesheets/application.css
|
233
|
+
- test/dummy/app/assets/javascripts/application.js
|
234
|
+
- test/dummy/app/helpers/application_helper.rb
|
235
|
+
- test/dummy/app/models/the_answer.rb
|
236
|
+
- test/dummy/app/models/active_model_sibling.rb
|
237
|
+
- test/dummy/app/models/numeric_model.rb
|
176
238
|
- test/dummy/app/models/child.rb
|
239
|
+
- test/dummy/app/models/enum_model.rb
|
240
|
+
- test/dummy/app/models/active_model_child.rb
|
241
|
+
- test/dummy/app/models/active_model_grand_child.rb
|
242
|
+
- test/dummy/app/models/lexicon.rb
|
177
243
|
- test/dummy/app/models/boolean_model.rb
|
244
|
+
- test/dummy/app/models/active_model_parent.rb
|
245
|
+
- test/dummy/app/models/active_model_model.rb
|
178
246
|
- test/dummy/app/models/parent.rb
|
179
|
-
- test/dummy/app/models/lexicon.rb
|
180
|
-
- test/dummy/app/models/the_answer.rb
|
181
|
-
- test/dummy/app/models/numeric_model.rb
|
182
247
|
- test/dummy/app/models/sibling.rb
|
183
248
|
- test/dummy/app/models/grand_child.rb
|
184
|
-
- test/dummy/app/controllers/application_controller.rb
|
185
|
-
- test/dummy/app/helpers/application_helper.rb
|
186
|
-
- test/dummy/app/assets/stylesheets/application.css
|
187
|
-
- test/dummy/app/assets/javascripts/application.js
|
188
249
|
- test/dummy/app/views/layouts/application.html.erb
|
189
|
-
- test/dummy/
|
190
|
-
- test/dummy/
|
191
|
-
- test/dummy/
|
192
|
-
- test/dummy/
|
193
|
-
- test/dummy/
|
194
|
-
- test/dummy/
|
195
|
-
- test/dummy/
|
196
|
-
- test/dummy/db/schema.rb
|
197
|
-
- test/dummy/Rakefile
|
198
|
-
- test/dummy/config.ru
|
199
|
-
- test/dummy/bin/bundle
|
200
|
-
- test/dummy/bin/rake
|
201
|
-
- test/dummy/bin/rails
|
250
|
+
- test/dummy/config/locales/en.yml
|
251
|
+
- test/dummy/config/routes.rb
|
252
|
+
- test/dummy/config/environments/test.rb
|
253
|
+
- test/dummy/config/environments/production.rb
|
254
|
+
- test/dummy/config/environments/development.rb
|
255
|
+
- test/dummy/config/environment.rb
|
256
|
+
- test/dummy/config/boot.rb
|
202
257
|
- test/dummy/config/initializers/inflections.rb
|
258
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
259
|
+
- test/dummy/config/initializers/secret_token.rb
|
203
260
|
- test/dummy/config/initializers/session_store.rb
|
204
261
|
- test/dummy/config/initializers/mime_types.rb
|
205
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
206
262
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
207
|
-
- test/dummy/config/initializers/
|
208
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
263
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
209
264
|
- test/dummy/config/application.rb
|
210
|
-
- test/dummy/config/routes.rb
|
211
265
|
- test/dummy/config/database.yml
|
212
|
-
- test/dummy/config
|
213
|
-
- test/dummy/config/locales/en.yml
|
214
|
-
- test/dummy/config/boot.rb
|
215
|
-
- test/dummy/config/environments/production.rb
|
216
|
-
- test/dummy/config/environments/test.rb
|
217
|
-
- test/dummy/config/environments/development.rb
|
218
|
-
- test/dummy/test/models/child_test.rb
|
219
|
-
- test/dummy/test/models/boolean_model_test.rb
|
220
|
-
- test/dummy/test/models/the_answer_test.rb
|
221
|
-
- test/dummy/test/models/sibling_test.rb
|
222
|
-
- test/dummy/test/models/enum_model_test.rb
|
223
|
-
- test/dummy/test/models/lexicon_test.rb
|
224
|
-
- test/dummy/test/models/numeric_model_test.rb
|
225
|
-
- test/dummy/test/models/grand_child_test.rb
|
226
|
-
- test/dummy/test/fixtures/siblings.yml
|
227
|
-
- test/dummy/test/fixtures/grandchildren.yml
|
228
|
-
- test/dummy/test/fixtures/boolean_models.yml
|
229
|
-
- test/dummy/test/fixtures/the_answers.yml
|
230
|
-
- test/dummy/test/fixtures/numeric_models.yml
|
231
|
-
- test/dummy/test/fixtures/enum_models.yml
|
232
|
-
- test/dummy/test/fixtures/lexicons.yml
|
233
|
-
- test/dummy/test/fixtures/children.yml
|
234
|
-
- test/dummy/log/test.log
|
266
|
+
- test/dummy/config.ru
|
data/Rakefile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'bundler/setup'
|
3
|
-
rescue LoadError
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = 'HumanAttributeValue'
|
12
|
-
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.rdoc')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
Bundler::GemHelper.install_tasks
|
21
|
-
|
22
|
-
require 'rake/testtask'
|
23
|
-
|
24
|
-
Rake::TestTask.new(:test) do |t|
|
25
|
-
t.libs << 'lib'
|
26
|
-
t.libs << 'test'
|
27
|
-
t.pattern = 'test/**/*_test.rb'
|
28
|
-
t.verbose = false
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
task default: :test
|