active_model-better_errors 1.6.3 → 1.6.5
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 +7 -0
- data/.gitignore +37 -0
- data/.rspec +4 -1
- data/.ruby-gemset +1 -0
- data/.travis.yml +5 -1
- data/Gemfile +9 -13
- data/Gemfile.devtools +66 -0
- data/Guardfile +32 -0
- data/LICENSE.txt +2 -0
- data/README.md +12 -10
- data/Rakefile +20 -49
- data/active_model-better_errors.gemspec +27 -107
- data/config/devtools.yml +4 -0
- data/config/flay.yml +3 -0
- data/config/flog.yml +2 -0
- data/config/mutant.yml +3 -0
- data/config/reek.yml +103 -0
- data/config/rubocop.yml +62 -0
- data/config/yardstick.yml +2 -0
- data/lib/active_model/better_errors.rb +64 -4
- data/lib/active_model/better_errors/array_reporter.rb +14 -0
- data/lib/active_model/{error_collecting → better_errors}/emulation.rb +15 -8
- data/lib/active_model/{error_collecting → better_errors}/error_collection.rb +14 -6
- data/lib/active_model/{error_collecting → better_errors}/error_message.rb +16 -5
- data/lib/active_model/{error_collecting → better_errors}/error_message_set.rb +7 -2
- data/lib/active_model/{error_collecting → better_errors}/errors.rb +10 -3
- data/lib/active_model/better_errors/formatter.rb +26 -0
- data/lib/active_model/better_errors/hash_reporter.rb +14 -0
- data/lib/active_model/{error_collecting → better_errors}/human_array_reporter.rb +6 -1
- data/lib/active_model/{error_collecting → better_errors}/human_hash_reporter.rb +8 -3
- data/lib/active_model/better_errors/human_message_formatter.rb +66 -0
- data/lib/active_model/{error_collecting → better_errors}/human_message_reporter.rb +19 -12
- data/lib/active_model/{error_collecting → better_errors}/machine_array_reporter.rb +10 -2
- data/lib/active_model/{error_collecting → better_errors}/machine_hash_reporter.rb +10 -3
- data/lib/active_model/{error_collecting → better_errors}/message_reporter.rb +10 -5
- data/lib/active_model/{error_collecting → better_errors}/reporter.rb +7 -2
- data/lib/active_model/better_errors/version.rb +10 -0
- data/spec/spec_helper.rb +19 -10
- data/spec/support/i18n_deprecation_silence.rb +4 -0
- data/spec/support/models.rb +11 -4
- data/spec/support/string_ext.rb +14 -0
- data/spec/{lib/active_model/error_collecting → unit/lib/active_model/better_errors}/emulation_spec.rb +8 -6
- data/spec/{lib/active_model/error_collecting → unit/lib/active_model/better_errors}/error_collection_spec.rb +66 -62
- data/spec/{lib/active_model/error_collecting → unit/lib/active_model/better_errors}/error_message_set_spec.rb +27 -25
- data/spec/unit/lib/active_model/better_errors/error_message_spec.rb +315 -0
- data/spec/unit/lib/active_model/better_errors/errors_spec.rb +98 -0
- data/spec/unit/lib/active_model/better_errors/human_array_reporter_spec.rb +39 -0
- data/spec/unit/lib/active_model/better_errors/human_hash_reporter_spec.rb +37 -0
- data/spec/{lib/active_model/error_collecting → unit/lib/active_model/better_errors}/human_message_formatter_spec.rb +13 -7
- data/spec/unit/lib/active_model/better_errors/human_message_reporter_spec.rb +65 -0
- data/spec/unit/lib/active_model/better_errors/machine_array_reporter_spec.rb +45 -0
- data/spec/unit/lib/active_model/better_errors/machine_hash_reporter_spec.rb +45 -0
- data/spec/unit/lib/active_model/better_errors_spec.rb +37 -0
- metadata +98 -143
- data/.document +0 -5
- data/VERSION +0 -1
- data/lib/active_model/error_collecting.rb +0 -49
- data/lib/active_model/error_collecting/array_reporter.rb +0 -9
- data/lib/active_model/error_collecting/core_ext.rb +0 -6
- data/lib/active_model/error_collecting/hash_reporter.rb +0 -9
- data/lib/active_model/error_collecting/human_message_formatter.rb +0 -58
- data/spec/lib/active_model/better_errors_spec.rb +0 -7
- data/spec/lib/active_model/error_collecting/error_message_spec.rb +0 -293
- data/spec/lib/active_model/error_collecting/errors_spec.rb +0 -95
- data/spec/lib/active_model/error_collecting/human_array_reporter_spec.rb +0 -33
- data/spec/lib/active_model/error_collecting/human_hash_reporter_spec.rb +0 -32
- data/spec/lib/active_model/error_collecting/human_message_reporter_spec.rb +0 -61
- data/spec/lib/active_model/error_collecting/machine_array_reporter_spec.rb +0 -40
- data/spec/lib/active_model/error_collecting/machine_hash_reporter_spec.rb +0 -40
- data/spec/lib/active_model/error_collecting_spec.rb +0 -22
- data/test/integration.rb +0 -10
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bc0ae92c62128a09b3ee6b99d4a499b5d8032278
|
4
|
+
data.tar.gz: 862976ec72f2889be16d8728e94a41f687e3b405
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 09feb3000c86545ccd60408559c3817e5d3134b49975b3a2190d6f51486d4ae24b7a43f0a44caabcfc820bf9b50f989d64cc76f5395707730d5de3b0fdd905f1
|
7
|
+
data.tar.gz: 52be60470b25c0ebf7b87312057873c2ecc0e10a5a4f269ae97f63d47f61ef0d107a4488a5c29743b1e66dc908cacd86aaf8fca564b4bb3ec425b777bf60c7a5
|
data/.gitignore
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.sw[op]
|
15
|
+
|
16
|
+
## Rubinius
|
17
|
+
*.rbc
|
18
|
+
.rbx
|
19
|
+
|
20
|
+
## PROJECT::GENERAL
|
21
|
+
*.gem
|
22
|
+
coverage
|
23
|
+
profiling
|
24
|
+
turbulence
|
25
|
+
rdoc
|
26
|
+
pkg
|
27
|
+
tmp
|
28
|
+
doc
|
29
|
+
log
|
30
|
+
.yardoc
|
31
|
+
measurements
|
32
|
+
|
33
|
+
## BUNDLER
|
34
|
+
.bundle
|
35
|
+
Gemfile.lock
|
36
|
+
|
37
|
+
## PROJECT::SPECIFIC
|
data/.rspec
CHANGED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
active_model-better_errors
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,17 +1,13 @@
|
|
1
|
-
|
1
|
+
# coding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
gemspec
|
5
6
|
|
6
|
-
group :development
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem "pry"
|
10
|
-
gem "yard"
|
11
|
-
gem "rdoc"
|
12
|
-
gem "bundler"
|
13
|
-
gem "jeweler"
|
14
|
-
gem "simplecov"
|
15
|
-
gem 'bcrypt-ruby', '~> 3.0.0'
|
16
|
-
gem 'mocha', '>= 0.12.1'
|
7
|
+
group :development do
|
8
|
+
gem 'devtools', git: 'https://github.com/rom-rb/devtools.git'
|
9
|
+
gem 'gem-release'
|
17
10
|
end
|
11
|
+
|
12
|
+
# Added by devtools
|
13
|
+
eval_gemfile 'Gemfile.devtools'
|
data/Gemfile.devtools
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
gem 'rake', '~> 10.1.0'
|
5
|
+
gem 'rspec', '~> 2.14.1'
|
6
|
+
gem 'yard', '~> 0.8.7'
|
7
|
+
|
8
|
+
platform :rbx do
|
9
|
+
gem 'rubysl-singleton', '~> 2.0.0'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
group :yard do
|
14
|
+
gem 'kramdown', '~> 1.3.0'
|
15
|
+
end
|
16
|
+
|
17
|
+
group :guard do
|
18
|
+
gem 'guard', '~> 2.2.4'
|
19
|
+
gem 'guard-bundler', '~> 2.0.0'
|
20
|
+
gem 'guard-rspec', '~> 4.2.0'
|
21
|
+
gem 'guard-rubocop', '~> 1.0.0'
|
22
|
+
|
23
|
+
# file system change event handling
|
24
|
+
gem 'listen', '~> 2.4.0'
|
25
|
+
gem 'rb-fchange', '~> 0.0.6', require: false
|
26
|
+
gem 'rb-fsevent', '~> 0.9.3', require: false
|
27
|
+
gem 'rb-inotify', '~> 0.9.0', require: false
|
28
|
+
|
29
|
+
# notification handling
|
30
|
+
gem 'libnotify', '~> 0.8.0', require: false
|
31
|
+
gem 'rb-notifu', '~> 0.0.4', require: false
|
32
|
+
gem 'terminal-notifier-guard', '~> 1.5.3', require: false
|
33
|
+
end
|
34
|
+
|
35
|
+
group :metrics do
|
36
|
+
gem 'coveralls', '~> 0.7.0'
|
37
|
+
gem 'flay', '~> 2.4.0'
|
38
|
+
gem 'flog', '~> 4.2.0'
|
39
|
+
gem 'reek', '~> 1.3.2'
|
40
|
+
gem 'rubocop', '~> 0.16.0'
|
41
|
+
gem 'simplecov', '~> 0.8.2'
|
42
|
+
gem 'yardstick', '~> 0.9.7', git: 'https://github.com/dkubb/yardstick.git'
|
43
|
+
|
44
|
+
platforms :ruby_19, :ruby_20 do
|
45
|
+
gem 'mutant', '~> 0.3.4'
|
46
|
+
gem 'yard-spellcheck', '~> 0.1.5'
|
47
|
+
end
|
48
|
+
|
49
|
+
platform :rbx do
|
50
|
+
gem 'json', '~> 1.8.1'
|
51
|
+
gem 'racc', '~> 1.4.10'
|
52
|
+
gem 'rubysl-logger', '~> 2.0.0'
|
53
|
+
gem 'rubysl-open-uri', '~> 2.0.0'
|
54
|
+
gem 'rubysl-prettyprint', '~> 2.0.2'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
group :benchmarks do
|
59
|
+
gem 'rbench', '~> 0.2.3'
|
60
|
+
end
|
61
|
+
|
62
|
+
platform :jruby do
|
63
|
+
group :jruby do
|
64
|
+
gem 'jruby-openssl', '~> 0.8.5'
|
65
|
+
end
|
66
|
+
end
|
data/Guardfile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
guard :bundler do
|
4
|
+
watch('Gemfile')
|
5
|
+
watch('Gemfile.lock')
|
6
|
+
watch(%w{.+.gemspec\z})
|
7
|
+
end
|
8
|
+
|
9
|
+
guard :rspec, cli: File.read('.rspec').split.push('--fail-fast').join(' '), keep_failed: false do
|
10
|
+
# Run all specs if configuration is modified
|
11
|
+
watch('.rspec') { 'spec' }
|
12
|
+
watch('Guardfile') { 'spec' }
|
13
|
+
watch('Gemfile.lock') { 'spec' }
|
14
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
15
|
+
|
16
|
+
# Run all specs if supporting files are modified
|
17
|
+
watch(%r{\Aspec/(?:fixtures|lib|support|shared)/.+\.rb\z}) { 'spec' }
|
18
|
+
|
19
|
+
# Run unit specs if associated lib code is modified
|
20
|
+
watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}*"] }
|
21
|
+
watch(%r{\Alib/(.+)/support/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}/#{m[2]}*"] }
|
22
|
+
watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec' }
|
23
|
+
|
24
|
+
# Run a spec if it is modified
|
25
|
+
watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
|
26
|
+
end
|
27
|
+
|
28
|
+
guard :rubocop, cli: %w[--config config/rubocop.yml] do
|
29
|
+
watch(%r{.+\.(?:rb|rake)\z})
|
30
|
+
watch(%r{\Aconfig/rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
31
|
+
watch(%r{(?:.+/)?\.rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
32
|
+
end
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
[](http://badge.fury.io/rb/active_model-better_errors)
|
4
4
|
[](https://travis-ci.org/aq1018/active_model-better_errors)
|
5
5
|
[](https://gemnasium.com/aq1018/active_model-better_errors)
|
6
|
-
[](https://coveralls.io/r/aq1018/active_model-better_errors?branch=master)
|
7
|
+
[](https://codeclimate.com/github/aq1018/active_model-better_errors)
|
8
|
+
[](http://opensource.org/licenses/MIT)
|
7
9
|
|
8
10
|
`active_model-better_errors` is a `ActiveModel::Errors` compatible library to help you
|
9
11
|
customize the presentation of your error messages.
|
@@ -54,17 +56,17 @@ By default, `active_model-better_errors` is a drop-in replacement for `ActiveMod
|
|
54
56
|
and will mostly function without modifications. This is because the default reporters are set like the following:
|
55
57
|
|
56
58
|
```ruby
|
57
|
-
ActiveModel::
|
58
|
-
ActiveModel::
|
59
|
-
ActiveModel::
|
59
|
+
ActiveModel::BetterErrors.set_reporter :message, :human
|
60
|
+
ActiveModel::BetterErrors.set_reporter :array, :human
|
61
|
+
ActiveModel::BetterErrors.set_reporter :hash, :human
|
60
62
|
```
|
61
63
|
|
62
64
|
If you want to output API friendly JSON / XML by default, you can use the following config.
|
63
65
|
|
64
66
|
```ruby
|
65
|
-
ActiveModel::
|
66
|
-
ActiveModel::
|
67
|
-
ActiveModel::
|
67
|
+
ActiveModel::BetterErrors.set_reporter :message, :human
|
68
|
+
ActiveModel::BetterErrors.set_reporter :array, :machine
|
69
|
+
ActiveModel::BetterErrors.set_reporter :hash, :machine
|
68
70
|
```
|
69
71
|
|
70
72
|
Note: The configurations above determines *default* reporters to use, you can always switch to
|
@@ -73,7 +75,7 @@ any reporters you want during runtime by invoking `errors.set_reporter`
|
|
73
75
|
## Usage
|
74
76
|
|
75
77
|
```ruby
|
76
|
-
user.errors # returns an instance of ActiveModel::
|
78
|
+
user.errors # returns an instance of ActiveModel::BetterErrors::Errors
|
77
79
|
|
78
80
|
# Use MachineArrayReporter to output API friendly error messages
|
79
81
|
user.errors.set_reporter(:array, :machine)
|
@@ -156,14 +158,14 @@ This library implements the following reporters of this type:
|
|
156
158
|
Creating a custom reporter is easy. Here is an example to create a hash reporter
|
157
159
|
|
158
160
|
```ruby
|
159
|
-
class MyHashReporter < ActiveModel::
|
161
|
+
class MyHashReporter < ActiveModel::BetterErrors::HashReporter
|
160
162
|
def to_hash
|
161
163
|
# you have access to #collection and #base
|
162
164
|
end
|
163
165
|
end
|
164
166
|
|
165
167
|
# set it to use it.
|
166
|
-
ActiveModel::
|
168
|
+
ActiveModel::BetterErrors.set_reporter :hash, MyHashReporter
|
167
169
|
```
|
168
170
|
|
169
171
|
## Contributing to active_model-better_errors
|
data/Rakefile
CHANGED
@@ -1,57 +1,28 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
4
|
-
require 'bundler'
|
5
|
-
begin
|
6
|
-
Bundler.setup(:default, :development)
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
11
|
-
end
|
12
|
-
require 'rake'
|
3
|
+
require "bundler/gem_tasks"
|
13
4
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
gem.name = "active_model-better_errors"
|
18
|
-
gem.homepage = "http://github.com/aq1018/active_model-better_errors"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{API consumable error messages with ActiveModel::Errors drop-in compatibility.}
|
21
|
-
gem.description = %Q{ActiveModel::Errors class is not designed for API consumption. This gem allows for that while keeping compatibility with existing rails API.}
|
22
|
-
gem.email = ["aq1018@gmail.com", "byronanderson32@gmail.com"]
|
23
|
-
gem.authors = ["Aaron Qian", "Byron Anderson"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
5
|
+
# Added by devtools
|
6
|
+
require 'devtools'
|
7
|
+
Devtools.init_rake_tasks
|
27
8
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
-
end
|
9
|
+
task :default => [
|
10
|
+
# Make sure ruby style is good
|
11
|
+
'metrics:rubocop',
|
33
12
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
13
|
+
# Duplicate code detection.
|
14
|
+
# Currently a lot of dups that need to be worked on.
|
15
|
+
# Disabled so travis can pass test.
|
16
|
+
# 'metrics:flay',
|
38
17
|
|
39
|
-
|
18
|
+
# Check for code smells
|
19
|
+
# Currently very smelly
|
20
|
+
# Disabled so travis can pass test.
|
21
|
+
# 'metrics:reek',
|
40
22
|
|
41
|
-
|
23
|
+
# run spec and generate coverage
|
24
|
+
'metrics:coverage',
|
42
25
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
Rake::TestTask.new("test:integration") do |t|
|
48
|
-
t.libs << "vendor/rails/activemodel/test"
|
49
|
-
t.test_files = test_files
|
50
|
-
t.warning = true
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
task :default => [ :spec ]
|
55
|
-
|
56
|
-
require 'yard'
|
57
|
-
YARD::Rake::YardocTask.new
|
26
|
+
# We need to kill all mutants before enabling this for ci
|
27
|
+
# 'metrics:mutant'
|
28
|
+
]
|
@@ -1,113 +1,33 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
# coding: utf-8
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'active_model/better_errors/version'
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitmodules",
|
22
|
-
".rspec",
|
23
|
-
".travis.yml",
|
24
|
-
"Gemfile",
|
25
|
-
"LICENSE.txt",
|
26
|
-
"README.md",
|
27
|
-
"Rakefile",
|
28
|
-
"VERSION",
|
29
|
-
"active_model-better_errors.gemspec",
|
30
|
-
"lib/active_model/better_errors.rb",
|
31
|
-
"lib/active_model/error_collecting.rb",
|
32
|
-
"lib/active_model/error_collecting/array_reporter.rb",
|
33
|
-
"lib/active_model/error_collecting/core_ext.rb",
|
34
|
-
"lib/active_model/error_collecting/emulation.rb",
|
35
|
-
"lib/active_model/error_collecting/error_collection.rb",
|
36
|
-
"lib/active_model/error_collecting/error_message.rb",
|
37
|
-
"lib/active_model/error_collecting/error_message_set.rb",
|
38
|
-
"lib/active_model/error_collecting/errors.rb",
|
39
|
-
"lib/active_model/error_collecting/hash_reporter.rb",
|
40
|
-
"lib/active_model/error_collecting/human_array_reporter.rb",
|
41
|
-
"lib/active_model/error_collecting/human_hash_reporter.rb",
|
42
|
-
"lib/active_model/error_collecting/human_message_formatter.rb",
|
43
|
-
"lib/active_model/error_collecting/human_message_reporter.rb",
|
44
|
-
"lib/active_model/error_collecting/machine_array_reporter.rb",
|
45
|
-
"lib/active_model/error_collecting/machine_hash_reporter.rb",
|
46
|
-
"lib/active_model/error_collecting/message_reporter.rb",
|
47
|
-
"lib/active_model/error_collecting/reporter.rb",
|
48
|
-
"spec/lib/active_model/better_errors_spec.rb",
|
49
|
-
"spec/lib/active_model/error_collecting/emulation_spec.rb",
|
50
|
-
"spec/lib/active_model/error_collecting/error_collection_spec.rb",
|
51
|
-
"spec/lib/active_model/error_collecting/error_message_set_spec.rb",
|
52
|
-
"spec/lib/active_model/error_collecting/error_message_spec.rb",
|
53
|
-
"spec/lib/active_model/error_collecting/errors_spec.rb",
|
54
|
-
"spec/lib/active_model/error_collecting/human_array_reporter_spec.rb",
|
55
|
-
"spec/lib/active_model/error_collecting/human_hash_reporter_spec.rb",
|
56
|
-
"spec/lib/active_model/error_collecting/human_message_formatter_spec.rb",
|
57
|
-
"spec/lib/active_model/error_collecting/human_message_reporter_spec.rb",
|
58
|
-
"spec/lib/active_model/error_collecting/machine_array_reporter_spec.rb",
|
59
|
-
"spec/lib/active_model/error_collecting/machine_hash_reporter_spec.rb",
|
60
|
-
"spec/lib/active_model/error_collecting_spec.rb",
|
61
|
-
"spec/spec_helper.rb",
|
62
|
-
"spec/support/models.rb",
|
63
|
-
"test/integration.rb"
|
64
|
-
]
|
65
|
-
s.homepage = "http://github.com/aq1018/active_model-better_errors"
|
66
|
-
s.licenses = ["MIT"]
|
67
|
-
s.require_paths = ["lib"]
|
68
|
-
s.rubygems_version = "1.8.24"
|
69
|
-
s.summary = "API consumable error messages with ActiveModel::Errors drop-in compatibility."
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "active_model-better_errors"
|
9
|
+
spec.version = ActiveModel::BetterErrors::VERSION
|
10
|
+
spec.authors = ["Aaron Qian", "Byron Anderson"]
|
11
|
+
spec.email = ["aq1018@gmail.com", "byronanderson32@gmail.com"]
|
12
|
+
spec.description = "API consumable error messages with ActiveModel::Errors drop-in compatibility."
|
13
|
+
spec.summary = "active_model-better_errors is a ActiveModel::Errors compatible library to help you customize the presentation of your error messages."
|
14
|
+
spec.homepage = "http://github.com/aq1018/active_model-better_errors"
|
15
|
+
spec.license = "MIT"
|
70
16
|
|
71
|
-
|
72
|
-
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
73
21
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
84
|
-
s.add_development_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
|
85
|
-
s.add_development_dependency(%q<mocha>, [">= 0.12.1"])
|
86
|
-
else
|
87
|
-
s.add_dependency(%q<activemodel>, ["~> 3.0"])
|
88
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
89
|
-
s.add_dependency(%q<rspec>, ["~> 2.12.0"])
|
90
|
-
s.add_dependency(%q<pry>, [">= 0"])
|
91
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
92
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
93
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
94
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
95
|
-
s.add_dependency(%q<simplecov>, [">= 0"])
|
96
|
-
s.add_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
|
97
|
-
s.add_dependency(%q<mocha>, [">= 0.12.1"])
|
98
|
-
end
|
99
|
-
else
|
100
|
-
s.add_dependency(%q<activemodel>, ["~> 3.0"])
|
101
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
102
|
-
s.add_dependency(%q<rspec>, ["~> 2.12.0"])
|
103
|
-
s.add_dependency(%q<pry>, [">= 0"])
|
104
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
105
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
106
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
107
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
108
|
-
s.add_dependency(%q<simplecov>, [">= 0"])
|
109
|
-
s.add_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
|
110
|
-
s.add_dependency(%q<mocha>, [">= 0.12.1"])
|
111
|
-
end
|
22
|
+
spec.add_runtime_dependency "activemodel", ">= 3.0"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec", "~> 2.12.0"
|
27
|
+
spec.add_development_dependency "mocha", '>= 0.12.1'
|
28
|
+
spec.add_development_dependency "simplecov"
|
29
|
+
spec.add_development_dependency "yard"
|
30
|
+
spec.add_development_dependency "rdoc"
|
112
31
|
end
|
113
32
|
|
33
|
+
|