active_model-better_errors 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gemrelease +2 -0
- data/Gemfile +2 -0
- data/Gemfile.devtools +7 -4
- data/README.md +4 -0
- data/Rakefile +1 -0
- data/lib/active_model/better_errors/human_message_formatter.rb +1 -1
- data/lib/active_model/better_errors/version.rb +1 -1
- data/spec/integration/integration_spec.rb +23 -0
- data/spec/support/active_record.rb +28 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/emulation_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/error_collection_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/error_message_set_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/error_message_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/errors_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/human_array_reporter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/human_hash_reporter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/human_message_formatter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/human_message_reporter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/machine_array_reporter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors/machine_hash_reporter_spec.rb +0 -0
- data/spec/unit/{lib/active_model → active_model}/better_errors_spec.rb +0 -0
- metadata +32 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eda02afda0d00f8f4863afd7b05a6d27a87389a
|
4
|
+
data.tar.gz: 183cb8e8cdc6e19963351449a43180b432d03207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09ecea7e26609e17d878e8bb97111ed6312e7163ddeb3bc9daa2ac033c719d74ceaeac33f178cb5a7eabaafe00d6f2bc604c6e9eba8238a6eba0e6ab8d17a452
|
7
|
+
data.tar.gz: 406871bb5e23427115d8293575585826b4f983996702addbaab6da0b4ac6ab7d8ff28a7b5beb44813e8955194e084f1505f71154877189a2dd92bde3d7b0163d
|
data/.gemrelease
ADDED
data/Gemfile
CHANGED
data/Gemfile.devtools
CHANGED
@@ -15,7 +15,7 @@ group :yard do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
group :guard do
|
18
|
-
gem 'guard', '~> 2.
|
18
|
+
gem 'guard', '~> 2.3.0'
|
19
19
|
gem 'guard-bundler', '~> 2.0.0'
|
20
20
|
gem 'guard-rspec', '~> 4.2.0'
|
21
21
|
gem 'guard-rubocop', '~> 1.0.0'
|
@@ -39,16 +39,19 @@ group :metrics do
|
|
39
39
|
gem 'reek', '~> 1.3.2'
|
40
40
|
gem 'rubocop', '~> 0.16.0'
|
41
41
|
gem 'simplecov', '~> 0.8.2'
|
42
|
-
gem 'yardstick', '~> 0.9.
|
42
|
+
gem 'yardstick', '~> 0.9.9'
|
43
|
+
|
44
|
+
platforms :mri do
|
45
|
+
gem 'mutant', '~> 0.3.4'
|
46
|
+
end
|
43
47
|
|
44
48
|
platforms :ruby_19, :ruby_20 do
|
45
|
-
gem 'mutant', '~> 0.3.4'
|
46
49
|
gem 'yard-spellcheck', '~> 0.1.5'
|
47
50
|
end
|
48
51
|
|
49
52
|
platform :rbx do
|
50
53
|
gem 'json', '~> 1.8.1'
|
51
|
-
gem 'racc', '~> 1.4
|
54
|
+
gem 'racc', '~> 1.4'
|
52
55
|
gem 'rubysl-logger', '~> 2.0.0'
|
53
56
|
gem 'rubysl-open-uri', '~> 2.0.0'
|
54
57
|
gem 'rubysl-prettyprint', '~> 2.0.2'
|
data/README.md
CHANGED
@@ -183,3 +183,7 @@ ActiveModel::BetterErrors.set_reporter :hash, MyHashReporter
|
|
183
183
|
Copyright (c) 2013 Aaron Qian. See LICENSE.txt for
|
184
184
|
further details.
|
185
185
|
|
186
|
+
|
187
|
+
|
188
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
189
|
+
|
data/Rakefile
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe ActiveModel::BetterErrors do
|
6
|
+
describe 'should work for ActiveRecord::AutosaveAssociation' do
|
7
|
+
let(:car) { Car.create(make: 'bmw', model: 'm3') }
|
8
|
+
|
9
|
+
before do
|
10
|
+
car.doors.create(position: 'left')
|
11
|
+
car.doors.create(position: 'right')
|
12
|
+
car.reload
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should create error object on save' do
|
16
|
+
car.doors[0].position = 'on the roof'
|
17
|
+
expect(car.changed_for_autosave?).to be_true
|
18
|
+
car.save
|
19
|
+
|
20
|
+
expect(car.errors).not_to be_nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'active_record'
|
2
|
+
|
3
|
+
ActiveRecord::Base.establish_connection(
|
4
|
+
adapter: 'sqlite3',
|
5
|
+
database: ':memory:'
|
6
|
+
)
|
7
|
+
|
8
|
+
ActiveRecord::Migration.create_table :cars do |t|
|
9
|
+
t.string :make
|
10
|
+
t.string :model
|
11
|
+
end
|
12
|
+
|
13
|
+
ActiveRecord::Migration.create_table :doors do |t|
|
14
|
+
t.references :car
|
15
|
+
t.string :position
|
16
|
+
end
|
17
|
+
|
18
|
+
# :nodoc:
|
19
|
+
class Car < ActiveRecord::Base
|
20
|
+
has_many :doors, autosave: true
|
21
|
+
end
|
22
|
+
|
23
|
+
# :nodoc:
|
24
|
+
class Door < ActiveRecord::Base
|
25
|
+
belongs_to :car
|
26
|
+
|
27
|
+
validates_inclusion_of :position, in: %w(left right)
|
28
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/unit/{lib/active_model → active_model}/better_errors/human_message_formatter_spec.rb
RENAMED
File without changes
|
data/spec/unit/{lib/active_model → active_model}/better_errors/human_message_reporter_spec.rb
RENAMED
File without changes
|
data/spec/unit/{lib/active_model → active_model}/better_errors/machine_array_reporter_spec.rb
RENAMED
File without changes
|
data/spec/unit/{lib/active_model → active_model}/better_errors/machine_hash_reporter_spec.rb
RENAMED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model-better_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Qian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -131,6 +131,7 @@ executables: []
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
+
- .gemrelease
|
134
135
|
- .gitignore
|
135
136
|
- .gitmodules
|
136
137
|
- .rspec
|
@@ -168,22 +169,24 @@ files:
|
|
168
169
|
- lib/active_model/better_errors/message_reporter.rb
|
169
170
|
- lib/active_model/better_errors/reporter.rb
|
170
171
|
- lib/active_model/better_errors/version.rb
|
172
|
+
- spec/integration/integration_spec.rb
|
171
173
|
- spec/spec_helper.rb
|
174
|
+
- spec/support/active_record.rb
|
172
175
|
- spec/support/i18n_deprecation_silence.rb
|
173
176
|
- spec/support/models.rb
|
174
177
|
- spec/support/string_ext.rb
|
175
|
-
- spec/unit/
|
176
|
-
- spec/unit/
|
177
|
-
- spec/unit/
|
178
|
-
- spec/unit/
|
179
|
-
- spec/unit/
|
180
|
-
- spec/unit/
|
181
|
-
- spec/unit/
|
182
|
-
- spec/unit/
|
183
|
-
- spec/unit/
|
184
|
-
- spec/unit/
|
185
|
-
- spec/unit/
|
186
|
-
- spec/unit/
|
178
|
+
- spec/unit/active_model/better_errors/emulation_spec.rb
|
179
|
+
- spec/unit/active_model/better_errors/error_collection_spec.rb
|
180
|
+
- spec/unit/active_model/better_errors/error_message_set_spec.rb
|
181
|
+
- spec/unit/active_model/better_errors/error_message_spec.rb
|
182
|
+
- spec/unit/active_model/better_errors/errors_spec.rb
|
183
|
+
- spec/unit/active_model/better_errors/human_array_reporter_spec.rb
|
184
|
+
- spec/unit/active_model/better_errors/human_hash_reporter_spec.rb
|
185
|
+
- spec/unit/active_model/better_errors/human_message_formatter_spec.rb
|
186
|
+
- spec/unit/active_model/better_errors/human_message_reporter_spec.rb
|
187
|
+
- spec/unit/active_model/better_errors/machine_array_reporter_spec.rb
|
188
|
+
- spec/unit/active_model/better_errors/machine_hash_reporter_spec.rb
|
189
|
+
- spec/unit/active_model/better_errors_spec.rb
|
187
190
|
homepage: http://github.com/aq1018/active_model-better_errors
|
188
191
|
licenses:
|
189
192
|
- MIT
|
@@ -204,26 +207,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
207
|
version: '0'
|
205
208
|
requirements: []
|
206
209
|
rubyforge_project:
|
207
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.0.14
|
208
211
|
signing_key:
|
209
212
|
specification_version: 4
|
210
213
|
summary: active_model-better_errors is a ActiveModel::Errors compatible library to
|
211
214
|
help you customize the presentation of your error messages.
|
212
215
|
test_files:
|
216
|
+
- spec/integration/integration_spec.rb
|
213
217
|
- spec/spec_helper.rb
|
218
|
+
- spec/support/active_record.rb
|
214
219
|
- spec/support/i18n_deprecation_silence.rb
|
215
220
|
- spec/support/models.rb
|
216
221
|
- spec/support/string_ext.rb
|
217
|
-
- spec/unit/
|
218
|
-
- spec/unit/
|
219
|
-
- spec/unit/
|
220
|
-
- spec/unit/
|
221
|
-
- spec/unit/
|
222
|
-
- spec/unit/
|
223
|
-
- spec/unit/
|
224
|
-
- spec/unit/
|
225
|
-
- spec/unit/
|
226
|
-
- spec/unit/
|
227
|
-
- spec/unit/
|
228
|
-
- spec/unit/
|
222
|
+
- spec/unit/active_model/better_errors/emulation_spec.rb
|
223
|
+
- spec/unit/active_model/better_errors/error_collection_spec.rb
|
224
|
+
- spec/unit/active_model/better_errors/error_message_set_spec.rb
|
225
|
+
- spec/unit/active_model/better_errors/error_message_spec.rb
|
226
|
+
- spec/unit/active_model/better_errors/errors_spec.rb
|
227
|
+
- spec/unit/active_model/better_errors/human_array_reporter_spec.rb
|
228
|
+
- spec/unit/active_model/better_errors/human_hash_reporter_spec.rb
|
229
|
+
- spec/unit/active_model/better_errors/human_message_formatter_spec.rb
|
230
|
+
- spec/unit/active_model/better_errors/human_message_reporter_spec.rb
|
231
|
+
- spec/unit/active_model/better_errors/machine_array_reporter_spec.rb
|
232
|
+
- spec/unit/active_model/better_errors/machine_hash_reporter_spec.rb
|
233
|
+
- spec/unit/active_model/better_errors_spec.rb
|
229
234
|
has_rdoc:
|