class2 0.2.4 → 0.3.0

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: d28278c666d335e00c402bfe8a9fee27401b5a53
4
- data.tar.gz: 3a9b9f915aef1ec7c1e667683e13d38012260014
3
+ metadata.gz: 9de74e43eb48f696e8284882f70046f2e824f1bf
4
+ data.tar.gz: 4de24fa14eb525838acb447c0d4bb79d3f7eff04
5
5
  SHA512:
6
- metadata.gz: ea280987e3fdf000a2c2e649170a9d83843e79628e3ed5b6ac8544176698c618d8f5c99cb64c23e51af4efe44a756194d292990aefc8b48caf2b552d7f4543b3
7
- data.tar.gz: 6750ec3c675d3389b2e0be76e5d5891e587bed45fe97677a12b1c6fa4eadcfb0b81f0ccd08f104eebc92740775dedb3d48d91a441fa869ee2bdddc67e9c3c5cc
6
+ metadata.gz: f6ebc7cf450ae0324f32f96bf8e6fe4349e10c8d65a32bc37f341cf872d38b508475a41bf198a8af93cdec6bf5628489206c6dc7ed44ac5dac7e01b06be4ef5e
7
+ data.tar.gz: f7b3b93aa9b066835095184cb2265f5faddd4c857bb60494e6dd0775bb4822868039bfcec6673498bd5c9a064f0dcb3270f86083a340378e98eb61546f5c4117
data/Changes CHANGED
@@ -1,3 +1,7 @@
1
+ 2017-12-04 v0.3.0
2
+ --------------------
3
+ * For attributes with a type of String don't convert nil to an empty string
4
+
1
5
  2017-10-22 v0.2.4
2
6
  --------------------
3
7
  * Add class2 filename and linenum to generated classes
data/lib/class2.rb CHANGED
@@ -30,7 +30,7 @@ class Class2
30
30
  Float => lambda { |v| "#{v} && Float(#{v})" },
31
31
  Hash => lambda { |v| sprintf "%s.respond_to?(:to_h) ? %s.to_h : %s", v, v, v },
32
32
  Integer => lambda { |v| "#{v} && Integer(#{v})" },
33
- String => lambda { |v| "String(#{v})" },
33
+ String => lambda { |v| "#{v} && String(#{v})" },
34
34
  TrueClass => lambda do |v|
35
35
  sprintf '["1", 1, 1.0, true].freeze.include?(%s.is_a?(String) ? %s.strip : %s)', v, v, v
36
36
  end
@@ -1,3 +1,3 @@
1
1
  class Class2
2
- VERSION = "0.2.4"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: class2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skye Shaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-22 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.4.5.1
106
+ rubygems_version: 2.6.14
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Easily create hierarchies of classes that support nested attributes, type