valor 0.0.1 → 0.0.2

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: e9e0afe17feb8e5f438c6f28d4809b3f21a3f380
4
- data.tar.gz: f6f6dc2757bee433b931fbceab72bc12f9e91b3f
3
+ metadata.gz: a070cbd24e4d9bd1cea0bc8c25b81f6a9e6bf067
4
+ data.tar.gz: 0317944417c8aba37e865ef42c4e3300e7bacf4d
5
5
  SHA512:
6
- metadata.gz: 6bb392bf6e1cafec72738df234509178eeebdfedf23105e0440683c8afbc1f16060808b096f791ab36ad60fa47c7a4625695734e2078a974168238f75a5ba952
7
- data.tar.gz: 14da2eddc33660d1348650b6b2054bab2a506db2a180d1cbe5cf90dcfb2e55f11fbea62e7e144c2b1bafef1ec21001f0b639079c14de6dfd059041c9346d48a2
6
+ metadata.gz: cbe18f44edd2d14ea24d1350ae1c0144f0cab738b51ad82a4af6f75995950afc3a35fea72279d0ed99418a4bd26dcea6c6e5f742af0e86df60d8978c5af4426a
7
+ data.tar.gz: 1c2765a1d2bec148483320daee4ec633bfb6a7416b58451c7c6565722b03bd083b6a31dcb0d8f019cdb507af3dcd2fab52a63318437d228ca221fb909e8b950d
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Valor
2
2
 
3
- Take a Ruby Hash and transform it into the makings of a Virtus Model class.
3
+ Take a Ruby Hash and transform it into the makings of a Virtus Model class.
4
+
5
+ Check out Virtus if you haven't yet: https://github.com/solnic/virtus
4
6
 
5
7
  ## How to
6
8
 
data/lib/valor.rb CHANGED
@@ -65,9 +65,12 @@ module Valor
65
65
  reduce_hash(value)
66
66
  when value.is_a?(Array)
67
67
  reduce_array(value)
68
+ when value.is_a?(Fixnum)
69
+ 'Integer'
70
+ when value.is_a?(TrueClass) || value.is_a?(FalseClass)
71
+ 'Boolean'
68
72
  else
69
- klass = value.class.to_s
70
- klass == 'Fixnum' ? 'Integer' : klass # Compensating for the difference of types
73
+ value.class.to_s
71
74
  end
72
75
  end
73
76
  end
data/lib/valor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Valor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/valor.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
23
24
 
24
25
  spec.add_runtime_dependency 'json'
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Weaver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-14 00:00:00.000000000 Z
11
+ date: 2014-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: json
43
57
  requirement: !ruby/object:Gem::Requirement