id 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +16 -8
- data/id.gemspec +1 -1
- data/lib/id/form/active_model_form.rb +4 -0
- data/lib/id/model/field.rb +1 -1
- data/spec/lib/id/model_spec.rb +4 -1
- metadata +95 -115
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4a4830e44c543e20bfbd0a69894f31e33f255d60
|
4
|
+
data.tar.gz: 910da24aa9829a4dbea10c6c77e64773fdf188bd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 69f2da5ba66e623889de506206115604a152536f97dbfbcb75dbf00967d16fbf843d9aaae12c3d8f970d5ce4726aae2ee1691362330fc0b0d5faf6541c32915a
|
7
|
+
data.tar.gz: 3ea228e5c3c75256a77029b523236ae9e6be7cc264ae9db92b3b53d86b33456c4dfe2ad188f86e7fe4fa5e2c69687c53172a2a3d796c12a4b91fdb24b25fc5c5
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0-p247
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
id (0.0.
|
4
|
+
id (0.0.11)
|
5
5
|
activemodel
|
6
6
|
activesupport
|
7
7
|
money
|
@@ -10,16 +10,21 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (
|
14
|
-
activesupport (=
|
15
|
-
builder (~> 3.
|
16
|
-
activesupport (
|
17
|
-
i18n (~> 0.6)
|
18
|
-
|
19
|
-
|
13
|
+
activemodel (4.0.0)
|
14
|
+
activesupport (= 4.0.0)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
activesupport (4.0.0)
|
17
|
+
i18n (~> 0.6, >= 0.6.4)
|
18
|
+
minitest (~> 4.2)
|
19
|
+
multi_json (~> 1.3)
|
20
|
+
thread_safe (~> 0.1)
|
21
|
+
tzinfo (~> 0.3.37)
|
22
|
+
atomic (1.1.12)
|
23
|
+
builder (3.1.4)
|
20
24
|
diff-lcs (1.2.1)
|
21
25
|
i18n (0.6.4)
|
22
26
|
json (1.7.7)
|
27
|
+
minitest (4.7.5)
|
23
28
|
money (3.7.1)
|
24
29
|
i18n (~> 0.4)
|
25
30
|
multi_json (1.7.3)
|
@@ -37,6 +42,9 @@ GEM
|
|
37
42
|
simplecov-html (~> 0.7.1)
|
38
43
|
simplecov-html (0.7.1)
|
39
44
|
test-unit (2.5.5)
|
45
|
+
thread_safe (0.1.2)
|
46
|
+
atomic
|
47
|
+
tzinfo (0.3.37)
|
40
48
|
|
41
49
|
PLATFORMS
|
42
50
|
ruby
|
data/id.gemspec
CHANGED
data/lib/id/model/field.rb
CHANGED
data/spec/lib/id/model_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'date'
|
2
3
|
|
3
4
|
class OptionalModel
|
4
5
|
include Id::Model
|
@@ -15,6 +16,7 @@ class TestModel
|
|
15
16
|
|
16
17
|
field :foo
|
17
18
|
field :bar, :key => 'baz'
|
19
|
+
field :baz
|
18
20
|
field :qux, :optional => true
|
19
21
|
field :quux, :default => false
|
20
22
|
field :date_of_birth, :optional => true, :type => Date
|
@@ -148,9 +150,10 @@ describe Id::Model do
|
|
148
150
|
|
149
151
|
describe "#fields are present methods" do
|
150
152
|
it 'allows you to check if fields are present' do
|
151
|
-
model = TestModel.new(:foo => 1)
|
153
|
+
model = TestModel.new(:foo => 1, :baz => false)
|
152
154
|
model.foo?.should be_true
|
153
155
|
model.bar?.should be_false
|
156
|
+
model.baz?.should be_false
|
154
157
|
end
|
155
158
|
end
|
156
159
|
|
metadata
CHANGED
@@ -1,118 +1,108 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: id
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 11
|
10
|
-
version: 0.0.11
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.12
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Russell Dunphy
|
14
8
|
- Radek Molenda
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-03-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: optional
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
33
21
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: money
|
37
22
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: money
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
47
35
|
type: :runtime
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: activesupport
|
51
36
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: activesupport
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
61
49
|
type: :runtime
|
62
|
-
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: activemodel
|
65
50
|
prerelease: false
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: activemodel
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
75
63
|
type: :runtime
|
76
|
-
version_requirements: *id004
|
77
|
-
- !ruby/object:Gem::Dependency
|
78
|
-
name: rspec
|
79
64
|
prerelease: false
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rspec
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
89
77
|
type: :development
|
90
|
-
version_requirements: *id005
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: simplecov
|
93
78
|
prerelease: false
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: simplecov
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
103
91
|
type: :development
|
104
|
-
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
105
98
|
description: Developed at On The Beach Ltd. Contact russell.dunphy@onthebeach.co.uk
|
106
|
-
email:
|
99
|
+
email:
|
107
100
|
- rssll@rsslldnphy.com
|
108
101
|
- radek.molenda@gmail.com
|
109
102
|
executables: []
|
110
|
-
|
111
103
|
extensions: []
|
112
|
-
|
113
104
|
extra_rdoc_files: []
|
114
|
-
|
115
|
-
files:
|
105
|
+
files:
|
116
106
|
- .gitignore
|
117
107
|
- .rspec
|
118
108
|
- .ruby-version
|
@@ -149,38 +139,28 @@ files:
|
|
149
139
|
- spec/support/active_model_lint.rb
|
150
140
|
homepage: http://github.com/onthebeach/id
|
151
141
|
licenses: []
|
152
|
-
|
142
|
+
metadata: {}
|
153
143
|
post_install_message:
|
154
144
|
rdoc_options: []
|
155
|
-
|
156
|
-
require_paths:
|
145
|
+
require_paths:
|
157
146
|
- lib
|
158
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
none: false
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
hash: 3
|
173
|
-
segments:
|
174
|
-
- 0
|
175
|
-
version: "0"
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
176
157
|
requirements: []
|
177
|
-
|
178
158
|
rubyforge_project:
|
179
|
-
rubygems_version:
|
159
|
+
rubygems_version: 2.0.3
|
180
160
|
signing_key:
|
181
|
-
specification_version:
|
161
|
+
specification_version: 4
|
182
162
|
summary: Simple models based on hashes
|
183
|
-
test_files:
|
163
|
+
test_files:
|
184
164
|
- spec/lib/id/model/association_spec.rb
|
185
165
|
- spec/lib/id/model/field_spec.rb
|
186
166
|
- spec/lib/id/model/form_spec.rb
|