notify_if_invalid 0.1.2 → 0.2.0
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/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/VERSION.yml +2 -2
- data/lib/notify_if_invalid.rb +1 -1
- data/notify_if_invalid.gemspec +9 -9
- metadata +14 -16
- data/LICENSE +0 -20
- data/README.rdoc +0 -26
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011 Socialcast, Inc
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# notify_if_invalid
|
2
|
+
|
3
|
+
Record an exception in HopToad if your model object is invalid.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
class User < ActiveRecord::Base
|
9
|
+
notify_if_invalid
|
10
|
+
|
11
|
+
# validations for the object
|
12
|
+
validates_precense_of :name
|
13
|
+
end
|
14
|
+
```
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
# Bundler Gemfile
|
20
|
+
gem 'notify_if_invalid'
|
21
|
+
```
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
* Fork the project
|
26
|
+
* Fix the issue
|
27
|
+
* Add tests
|
28
|
+
* Send a pull request
|
29
|
+
|
30
|
+
see CONTRIBUTORS.txt for complete list of contributors.
|
31
|
+
|
32
|
+
## Copyright
|
33
|
+
|
34
|
+
Copyright (c) 2011 Socialcast Inc.
|
35
|
+
See LICENSE.txt for details.
|
data/VERSION.yml
CHANGED
data/lib/notify_if_invalid.rb
CHANGED
@@ -23,7 +23,7 @@ module NotifyIfInvalid
|
|
23
23
|
return if self.errors.empty?
|
24
24
|
message = "#{self.class.to_s} #{self.errors.full_messages.to_sentence}: #{self.inspect}"
|
25
25
|
error = ValidationError.new message
|
26
|
-
|
26
|
+
Airbrake.notify_or_ignore error
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/notify_if_invalid.gemspec
CHANGED
@@ -5,20 +5,20 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{notify_if_invalid}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Sonnek"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-11-24}
|
13
13
|
s.email = %q{ryan@socialcast.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
|
-
"LICENSE",
|
16
|
-
"README.
|
15
|
+
"LICENSE.txt",
|
16
|
+
"README.md"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
".gitignore",
|
20
|
-
"LICENSE",
|
21
|
-
"README.
|
20
|
+
"LICENSE.txt",
|
21
|
+
"README.md",
|
22
22
|
"Rakefile",
|
23
23
|
"VERSION.yml",
|
24
24
|
"lib/notify_if_invalid.rb",
|
@@ -41,14 +41,14 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.specification_version = 3
|
42
42
|
|
43
43
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
-
s.add_runtime_dependency(%q<
|
44
|
+
s.add_runtime_dependency(%q<airbrake>, [">= 3.0"])
|
45
45
|
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
46
46
|
else
|
47
|
-
s.add_dependency(%q<
|
47
|
+
s.add_dependency(%q<airbrake>, [">= 3.0"])
|
48
48
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
49
49
|
end
|
50
50
|
else
|
51
|
-
s.add_dependency(%q<
|
51
|
+
s.add_dependency(%q<airbrake>, [">= 3.0"])
|
52
52
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
53
53
|
end
|
54
54
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notify_if_invalid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,22 +15,21 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-11-24 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
21
|
+
name: airbrake
|
23
22
|
prerelease: false
|
24
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
28
|
+
hash: 7
|
30
29
|
segments:
|
31
|
-
- 2
|
32
30
|
- 3
|
33
|
-
|
31
|
+
- 0
|
32
|
+
version: "3.0"
|
34
33
|
type: :runtime
|
35
34
|
version_requirements: *id001
|
36
35
|
- !ruby/object:Gem::Dependency
|
@@ -54,19 +53,18 @@ executables: []
|
|
54
53
|
extensions: []
|
55
54
|
|
56
55
|
extra_rdoc_files:
|
57
|
-
- LICENSE
|
58
|
-
- README.
|
56
|
+
- LICENSE.txt
|
57
|
+
- README.md
|
59
58
|
files:
|
60
59
|
- .gitignore
|
61
|
-
- LICENSE
|
62
|
-
- README.
|
60
|
+
- LICENSE.txt
|
61
|
+
- README.md
|
63
62
|
- Rakefile
|
64
63
|
- VERSION.yml
|
65
64
|
- lib/notify_if_invalid.rb
|
66
65
|
- notify_if_invalid.gemspec
|
67
66
|
- test/notify_if_invalid_test.rb
|
68
67
|
- test/test_helper.rb
|
69
|
-
has_rdoc: true
|
70
68
|
homepage: http://github.com/wireframe/notify_if_invalid
|
71
69
|
licenses: []
|
72
70
|
|
@@ -96,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
94
|
requirements: []
|
97
95
|
|
98
96
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.
|
97
|
+
rubygems_version: 1.8.10
|
100
98
|
signing_key:
|
101
99
|
specification_version: 3
|
102
100
|
summary: notify exception monitoring system when model object is invalid
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009 Ryan Sonnek
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
= notify_if_invalid
|
2
|
-
|
3
|
-
Record an exception in HopToad if your model object is invalid.
|
4
|
-
|
5
|
-
== Usage
|
6
|
-
|
7
|
-
class User < ActiveRecord::Base
|
8
|
-
notify_if_invalid
|
9
|
-
|
10
|
-
#validations for the object
|
11
|
-
validates_precense_of :name
|
12
|
-
end
|
13
|
-
|
14
|
-
= Installation
|
15
|
-
|
16
|
-
Command line installation
|
17
|
-
|
18
|
-
sudo gem install wireframe-notify_if_invalid
|
19
|
-
|
20
|
-
Rails environment.rb configuration
|
21
|
-
|
22
|
-
config.gem 'wireframe-notify_if_invalid', :source => 'http://gems.github.com', :lib => 'notify_if_invalid'
|
23
|
-
|
24
|
-
== Copyright
|
25
|
-
|
26
|
-
Copyright (c) 2009 Ryan Sonnek. See LICENSE for details.
|