active_model-better_errors 1.6.1 → 1.6.2

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.
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # ActiveModel Better Errors
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/activemodel-better-errors.png)](http://badge.fury.io/rb/activemodel-better-errors)
4
- [![Build Status](https://travis-ci.org/aq1018/activemodel-better-errors.png?branch=master)](https://travis-ci.org/aq1018/activemodel-better-errors)
5
- [![Dependency Status](https://gemnasium.com/aq1018/activemodel-better-errors.png)](https://gemnasium.com/aq1018/activemodel-better-errors)
6
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/aq1018/activemodel-better-errors)
3
+ [![Gem Version](https://badge.fury.io/rb/active_model-better_errors.png)](http://badge.fury.io/rb/active_model-better_errors)
4
+ [![Build Status](https://travis-ci.org/aq1018/active_model-better_errors.png?branch=master)](https://travis-ci.org/aq1018/active_model-better_errors)
5
+ [![Dependency Status](https://gemnasium.com/aq1018/active_model-better_errors.png)](https://gemnasium.com/aq1018/active_model-better_errors)
6
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/aq1018/active_model-better_errors)
7
7
 
8
- `activemodel-better-errors` is a `ActiveModel::Errors` compatible library to help you
8
+ `active_model-better_errors` is a `ActiveModel::Errors` compatible library to help you
9
9
  customize the presentation of your error messages.
10
10
 
11
11
  ## Why Better Errors
@@ -18,7 +18,7 @@ API.
18
18
 
19
19
  ## How Better Errors Work
20
20
 
21
- `activemodel-better-errors` works by sperating the concerns of error message storage and presentation.
21
+ `active_model-better_errors` works by sperating the concerns of error message storage and presentation.
22
22
  `ActiveModel::Errors` really handles four tasks in a single class:
23
23
 
24
24
  * error data storage
@@ -34,7 +34,7 @@ This gem seperates these concerns and allows users to plugin various reporters f
34
34
 
35
35
  ```ruby
36
36
  # in Gemfile
37
- gem 'activemodel-better-errors', '>= 1.4.0'
37
+ gem 'active_model-better_errors', '>= 1.4.0'
38
38
  ```
39
39
 
40
40
  ```
@@ -45,12 +45,12 @@ bundle install
45
45
  ### With RubyGems
46
46
 
47
47
  ```
48
- gem install activemodel-better-errors
48
+ gem install active_model-better_errors
49
49
  ```
50
50
 
51
51
  ## Configure
52
52
 
53
- By default, `activemodel-better-errors` is a drop-in replacement for `ActiveModel::Errors`
53
+ By default, `active_model-better_errors` is a drop-in replacement for `ActiveModel::Errors`
54
54
  and will mostly function without modifications. This is because the default reporters are set like the following:
55
55
 
56
56
  ```ruby
@@ -166,7 +166,7 @@ end
166
166
  ActiveModel::ErrorCollecting.set_reporter :hash, MyHashReporter
167
167
  ```
168
168
 
169
- ## Contributing to activemodel-better-errors
169
+ ## Contributing to active_model-better_errors
170
170
 
171
171
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
172
172
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.1
1
+ 1.6.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "active_model-better_errors"
8
- s.version = "1.6.1"
8
+ s.version = "1.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron Qian", "Byron Anderson"]
12
- s.date = "2013-01-22"
12
+ s.date = "2013-01-23"
13
13
  s.description = "ActiveModel::Errors class is not designed for API consumption. This gem allows for that while keeping compatibility with existing rails API."
14
14
  s.email = ["aq1018@gmail.com", "byronanderson32@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -44,7 +44,7 @@ module ActiveModel
44
44
  end
45
45
  end
46
46
 
47
- def add(attribute, message, options = {})
47
+ def add(attribute, message=nil, options = {})
48
48
  if options[:strict]
49
49
  error = ErrorMessage.build(attribute, message, options)
50
50
  message = HumanMessageFormatter.new(@base, error).format_message
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.1
4
+ version: 1.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-22 00:00:00.000000000 Z
13
+ date: 2013-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -258,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
258
  version: '0'
259
259
  segments:
260
260
  - 0
261
- hash: 3044174115255951792
261
+ hash: 3942682571469291504
262
262
  required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  none: false
264
264
  requirements: