rest_model 0.1.23 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ class RestModel
27
27
  private
28
28
 
29
29
  def validates?(value)
30
- (self.options[:validate_if_present] and !value.nil?) or self.options[:validate]
30
+ (self.options[:validate_if_present] and value.present?) or self.options[:validate]
31
31
  end
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  class RestModel
2
- VERSION = "0.1.23"
2
+ VERSION = "0.1.24"
3
3
  end
data/lib/rest_model.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "date"
2
2
  require "active_support/inflector"
3
3
  require "active_support/concern"
4
+ require "active_support/core_ext/object"
4
5
  require "active_support/core_ext/class/attribute_accessors"
5
6
  require "active_support/core_ext/object/try"
6
7
  require "active_support/core_ext/array/wrap"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-12-21 00:00:00.000000000Z
14
+ date: 2011-12-26 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
- requirement: &70269236026780 !ruby/object:Gem::Requirement
18
+ requirement: &70242342022220 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '3.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70269236026780
26
+ version_requirements: *70242342022220
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: i18n
29
- requirement: &70269236026280 !ruby/object:Gem::Requirement
29
+ requirement: &70242342021620 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0.5'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70269236026280
37
+ version_requirements: *70242342021620
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rspec
40
- requirement: &70269236025820 !ruby/object:Gem::Requirement
40
+ requirement: &70242342020960 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '2.6'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *70269236025820
48
+ version_requirements: *70242342020960
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: guard
51
- requirement: &70269236025360 !ruby/object:Gem::Requirement
51
+ requirement: &70242342020440 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0.5'
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *70269236025360
59
+ version_requirements: *70242342020440
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: guard-rspec
62
- requirement: &70269227073320 !ruby/object:Gem::Requirement
62
+ requirement: &70242342019720 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ~>
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0.4'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *70269227073320
70
+ version_requirements: *70242342019720
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: growl
73
- requirement: &70269227072860 !ruby/object:Gem::Requirement
73
+ requirement: &70242342019220 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,7 +78,7 @@ dependencies:
78
78
  version: '1.0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *70269227072860
81
+ version_requirements: *70242342019220
82
82
  description: ''
83
83
  email:
84
84
  - victorcrodrigues@gmail.com
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 1.8.6
248
+ rubygems_version: 1.8.10
249
249
  signing_key:
250
250
  specification_version: 3
251
251
  summary: ''
@@ -288,4 +288,3 @@ test_files:
288
288
  - spec/unit/serialization/string_spec.rb
289
289
  - spec/unit/source/path_spec.rb
290
290
  - spec/unit/source/retriever_spec.rb
291
- has_rdoc: