varia_model 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a83bb871a6d6cee4e4cbd013d6eeb02c15663f34
4
- data.tar.gz: 431c21877ad5f3ab117f26c3469843fd95d3cd71
3
+ metadata.gz: c273516cb99dd923b82af860367b95f5a3251e7e
4
+ data.tar.gz: 616e1576fe92a5a79341fe1f024b6d78b2dcfc64
5
5
  SHA512:
6
- metadata.gz: 4ba436e3e097057c1efc71ef404eecf34aacafbed5d048126fb345078993f31053524fef79eb0043fca9ba77e2200bd31a5e2185c613bb4e10ceb2bc9af6c3ee
7
- data.tar.gz: 738fc44474a0ba3c792cfda0ee9006cd2d5e9616c317606ceebe059ac5483ac534c6d8f6b77d044bd59360663ada70c2a910905f1a6cdf558a797a6972747e6c
6
+ metadata.gz: 917b770137fd2e5cf2acdc1eb7038512ba9c7793f7b144457d8a3d55a10aeb89c0e5bbcd3f17ffe6b62ec3bb18dae23496a4de93f52ef3f4b11fc4564aea68e8
7
+ data.tar.gz: 6b69b51de56258d0bdf4bf68d835e8be8cf808d3f4b6ea1fd25c7f1b646578fb45c69974f8d10ed9c63f7e7f7440bfa1466d755bed2831557d69e7b3187fbdc9
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .ruby-version
6
7
  Gemfile.lock
7
8
  InstalledFiles
8
9
  _yardoc
@@ -1,5 +1,4 @@
1
1
  require 'hashie'
2
- require 'hashie/hash_extensions'
3
2
  require 'hashie/mash'
4
3
 
5
4
  module VariaModel
@@ -1,3 +1,3 @@
1
1
  module VariaModel
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -12,7 +12,6 @@ def setup_rspec
12
12
  end
13
13
 
14
14
  config.mock_with :rspec
15
- config.treat_symbols_as_metadata_keys_with_true_values = true
16
15
  config.filter_run focus: true
17
16
  config.run_all_when_everything_filtered = true
18
17
  end
@@ -6,7 +6,7 @@ RSpec::Matchers.define :each do |check|
6
6
  end
7
7
  end
8
8
 
9
- failure_message_for_should do |actual|
10
- "at[#{@object}] #{check.failure_message_for_should}"
9
+ failure_message do |actual|
10
+ "at[#{@object}] #{check.failure_message}"
11
11
  end
12
12
  end
@@ -23,19 +23,19 @@ describe VariaModel do
23
23
  subject.attribute 'jamie.winsor'
24
24
  subject.attribute 'brooke.winsor'
25
25
 
26
- expect(subject.attributes).to have(2).items
26
+ expect(subject.attributes.size).to eq(2)
27
27
  end
28
28
 
29
29
  it "adds a validation if :required option is true" do
30
30
  subject.attribute 'brooke.winsor', required: true
31
31
 
32
- expect(subject.validations).to have(1).item
32
+ expect(subject.validations.size).to eq(1)
33
33
  end
34
34
 
35
35
  it "adds a validation if the :type option is provided" do
36
36
  subject.attribute 'brooke.winsor', type: :string
37
37
 
38
- expect(subject.validations).to have(1).item
38
+ expect(subject.validations.size).to eq(1)
39
39
  end
40
40
 
41
41
  it "sets a default value if :default option is provided" do
@@ -399,13 +399,13 @@ describe VariaModel do
399
399
  it "adds an error for each attribute that fails validations" do
400
400
  subject.validate
401
401
 
402
- expect(subject.errors).to have(1).item
402
+ expect(subject.errors.size).to eq(1)
403
403
  end
404
404
 
405
405
  it "adds a message for each failed validation" do
406
406
  subject.validate
407
407
 
408
- expect(subject.errors['brooke.winsor']).to have(1).item
408
+ expect(subject.errors['brooke.winsor'].size).to eq(1)
409
409
  expect(subject.errors['brooke.winsor'][0]).to eql("A value is required for attribute: 'brooke.winsor'")
410
410
  end
411
411
  end
@@ -428,8 +428,8 @@ describe VariaModel do
428
428
  it "adds an error if it fails validation" do
429
429
  subject.validate
430
430
 
431
- expect(subject.errors).to have(1).item
432
- expect(subject.errors['brooke.winsor']).to have(1).item
431
+ expect(subject.errors.size).to eq(1)
432
+ expect(subject.errors['brooke.winsor'].size).to eq(1)
433
433
  expect(subject.errors['brooke.winsor'][0]).to eql("Expected attribute: 'brooke.winsor' to be a type of: 'String', 'NilClass'")
434
434
  end
435
435
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.version = VariaModel::VERSION
18
18
  spec.required_ruby_version = ">= 1.9.1"
19
19
 
20
- spec.add_dependency "hashie", ">= 2.0.2", "< 3.0.0"
20
+ spec.add_dependency "hashie", ">= 2.0.2", "< 4.0.0"
21
21
  spec.add_dependency "buff-extensions", "~> 1.0"
22
22
 
23
23
  spec.add_development_dependency "buff-ruby_engine", "~> 0.1"
metadata CHANGED
@@ -1,187 +1,187 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: varia_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-03 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.0.2
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 3.0.0
22
+ version: 4.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 2.0.2
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 3.0.0
32
+ version: 4.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: buff-extensions
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '1.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: buff-ruby_engine
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0.1'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: thor
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: 0.18.0
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: 0.18.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: bundler
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.3'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.3'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rake
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '>='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: fuubar
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - '>='
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - '>='
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: guard
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - '>='
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: guard-rspec
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - '>='
149
+ - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - '>='
156
+ - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: guard-spork
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - '>='
170
+ - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: spork
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - '>='
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - '>='
184
+ - - ">="
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  description: A mixin to provide objects with magic attribute reading and writing
@@ -191,9 +191,8 @@ executables: []
191
191
  extensions: []
192
192
  extra_rdoc_files: []
193
193
  files:
194
- - .gitignore
195
- - .ruby-version
196
- - .travis.yml
194
+ - ".gitignore"
195
+ - ".travis.yml"
197
196
  - Gemfile
198
197
  - Guardfile
199
198
  - LICENSE
@@ -216,17 +215,17 @@ require_paths:
216
215
  - lib
217
216
  required_ruby_version: !ruby/object:Gem::Requirement
218
217
  requirements:
219
- - - '>='
218
+ - - ">="
220
219
  - !ruby/object:Gem::Version
221
220
  version: 1.9.1
222
221
  required_rubygems_version: !ruby/object:Gem::Requirement
223
222
  requirements:
224
- - - '>='
223
+ - - ">="
225
224
  - !ruby/object:Gem::Version
226
225
  version: '0'
227
226
  requirements: []
228
227
  rubyforge_project:
229
- rubygems_version: 2.0.3
228
+ rubygems_version: 2.2.2
230
229
  signing_key:
231
230
  specification_version: 4
232
231
  summary: A mixin to provide objects with magic attribute reading and writing
@@ -1 +0,0 @@
1
- 2.0.0-p247