activemodel-warnings 1.0.2 → 1.0.3
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/.gitignore +2 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +20 -2
- data/LICENSE +20 -0
- data/lib/activemodel-warnings/version.rb +1 -1
- data/test/instrument/example.yml +20 -0
- data/test/test_helper.rb +10 -1
- data/test/warnings_test.rb +3 -2
- metadata +6 -23
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activemodel-warnings (1.0.
|
4
|
+
activemodel-warnings (1.0.2)
|
5
5
|
activemodel (~> 3.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -11,16 +11,34 @@ GEM
|
|
11
11
|
activesupport (= 3.0.4)
|
12
12
|
builder (~> 2.1.2)
|
13
13
|
i18n (~> 0.4)
|
14
|
+
activerecord (3.0.4)
|
15
|
+
activemodel (= 3.0.4)
|
16
|
+
activesupport (= 3.0.4)
|
17
|
+
arel (~> 2.0.2)
|
18
|
+
tzinfo (~> 0.3.23)
|
14
19
|
activesupport (3.0.4)
|
20
|
+
arel (2.0.8)
|
15
21
|
builder (2.1.2)
|
16
22
|
i18n (0.5.0)
|
23
|
+
minitest-instrument (0.0.1)
|
24
|
+
activesupport (~> 3.0)
|
25
|
+
minitest-instrument-db (0.0.1)
|
26
|
+
activerecord (~> 3.0)
|
17
27
|
mocha (0.9.12)
|
28
|
+
mysql (2.8.1)
|
29
|
+
pg (0.9.0)
|
30
|
+
sqlite3 (1.3.3)
|
31
|
+
tzinfo (0.3.24)
|
18
32
|
|
19
33
|
PLATFORMS
|
20
34
|
ruby
|
21
35
|
|
22
36
|
DEPENDENCIES
|
23
|
-
activemodel (~> 3.0)
|
24
37
|
activemodel-warnings!
|
25
38
|
bundler (~> 1.0.7)
|
39
|
+
minitest-instrument
|
40
|
+
minitest-instrument-db
|
26
41
|
mocha
|
42
|
+
mysql
|
43
|
+
pg
|
44
|
+
sqlite3
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010-2011 Robert Pankowecki
|
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.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
minitest-instrument-db:
|
2
|
+
adapter: sqlite3
|
3
|
+
dbfile: minitest-instrument-db.sqlite3
|
4
|
+
database: minitest-instrument-db.sqlite3
|
5
|
+
#minitest-instrument-db:
|
6
|
+
# adapter: sqlite3
|
7
|
+
# dbfile: ":memory:"
|
8
|
+
# database: minitest-instrument-db.sqlite3
|
9
|
+
#minitest-instrument-db:
|
10
|
+
# adapter: postgresql
|
11
|
+
# username: postgres
|
12
|
+
# password: postgres
|
13
|
+
# database: minitest-instrument-db
|
14
|
+
# min_messages: ERROR
|
15
|
+
#minitest-instrument-db:
|
16
|
+
# adapter: mysql
|
17
|
+
# host: localhost
|
18
|
+
# username: root
|
19
|
+
# password:
|
20
|
+
# database: minitest-instrument-db
|
data/test/test_helper.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
|
1
5
|
require 'activemodel-warnings'
|
2
6
|
|
3
7
|
require 'test/unit'
|
4
8
|
require 'active_support/test_case'
|
5
|
-
require 'mocha'
|
9
|
+
require 'mocha'
|
10
|
+
|
11
|
+
require 'minitest-instrument'
|
12
|
+
require 'minitest-instrument-db'
|
13
|
+
|
14
|
+
Minitest::Instrument::Db.try_configuration_at( File.join( File.dirname(__FILE__), 'instrument', 'database.yml' ) , :project => 'activemodel-warnings')
|
data/test/warnings_test.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
load File.join(File.dirname(__FILE__), 'test_helper.rb')
|
2
2
|
|
3
|
-
|
4
3
|
class WarningsTest < ActiveSupport::TestCase
|
5
4
|
|
5
|
+
include ::Minitest::Instrument::Notifications
|
6
|
+
|
6
7
|
class TestMe < Struct.new(:one, :two, :three)
|
7
8
|
include ActiveModel::Validations
|
8
9
|
include ActiveModel::Warnings
|
@@ -47,4 +48,4 @@ class WarningsTest < ActiveSupport::TestCase
|
|
47
48
|
end
|
48
49
|
|
49
50
|
|
50
|
-
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel-warnings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 1.0.2
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.3
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Robert Pankowecki (Gavdi Polska)
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-
|
13
|
+
date: 2011-03-28 00:00:00 +02:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -25,9 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ~>
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 3
|
30
|
-
- 0
|
31
24
|
version: "3.0"
|
32
25
|
type: :runtime
|
33
26
|
version_requirements: *id001
|
@@ -39,10 +32,6 @@ dependencies:
|
|
39
32
|
requirements:
|
40
33
|
- - ~>
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 1
|
44
|
-
- 0
|
45
|
-
- 7
|
46
35
|
version: 1.0.7
|
47
36
|
type: :development
|
48
37
|
version_requirements: *id002
|
@@ -54,8 +43,6 @@ dependencies:
|
|
54
43
|
requirements:
|
55
44
|
- - ">="
|
56
45
|
- !ruby/object:Gem::Version
|
57
|
-
segments:
|
58
|
-
- 0
|
59
46
|
version: "0"
|
60
47
|
type: :development
|
61
48
|
version_requirements: *id003
|
@@ -72,6 +59,7 @@ files:
|
|
72
59
|
- .gitignore
|
73
60
|
- Gemfile
|
74
61
|
- Gemfile.lock
|
62
|
+
- LICENSE
|
75
63
|
- README
|
76
64
|
- Rakefile
|
77
65
|
- TODO
|
@@ -80,6 +68,7 @@ files:
|
|
80
68
|
- lib/activemodel-warnings/boolean.rb
|
81
69
|
- lib/activemodel-warnings/global_boolean.rb
|
82
70
|
- lib/activemodel-warnings/version.rb
|
71
|
+
- test/instrument/example.yml
|
83
72
|
- test/test_helper.rb
|
84
73
|
- test/warnings_test.rb
|
85
74
|
has_rdoc: true
|
@@ -96,23 +85,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
85
|
requirements:
|
97
86
|
- - ">="
|
98
87
|
- !ruby/object:Gem::Version
|
99
|
-
segments:
|
100
|
-
- 0
|
101
88
|
version: "0"
|
102
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
90
|
none: false
|
104
91
|
requirements:
|
105
92
|
- - ">="
|
106
93
|
- !ruby/object:Gem::Version
|
107
|
-
segments:
|
108
|
-
- 1
|
109
|
-
- 3
|
110
|
-
- 6
|
111
94
|
version: 1.3.6
|
112
95
|
requirements: []
|
113
96
|
|
114
97
|
rubyforge_project: global_boolean
|
115
|
-
rubygems_version: 1.
|
98
|
+
rubygems_version: 1.5.2
|
116
99
|
signing_key:
|
117
100
|
specification_version: 3
|
118
101
|
summary: Mark some validations as warnings and let them be easily skipped
|