frodo 0.12.1 → 0.12.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
  SHA256:
3
- metadata.gz: ebfa132eb09423a980b903f11c6897713bbaf212e103577c6041640d1a3909ff
4
- data.tar.gz: b12643acd6769b116ee9663b8c8e749f2fc60f5cad9e3eadc86913a88bb32053
3
+ metadata.gz: 026c6e3af2cf841015fe7b99ab24b6025c989c39f4ecfdc34b7e2f6335be0d54
4
+ data.tar.gz: cff43f6fd873888c0525a032410f2e0955e40e758d4ad23b28764e6b22c19d68
5
5
  SHA512:
6
- metadata.gz: d40f314df3223fa8c4a6e4ac625df1e8606b50399725d7bb40bfc878cf75326700c68c9b1359bc37c357b51c81aa15b9376d77d015454e7ee462913e4f4c9fb7
7
- data.tar.gz: f42c27e3b393abe585e7fa835f262087d5397f29f8c7158a5a46406cda7830f51e0448602da41b4b5a8c14d404cbcafb5c9abb3b3618d82821e818e27df71a19
6
+ metadata.gz: 6660e988e7f76473c5e8eed25498cf4dd5fc7186da8017ae9ef7aa84a628f0f7378976c894fd292eb535a63e22d027986a4ea32858d87e6de757fc0e1ad55531
7
+ data.tar.gz: 46db130f68dc67d7bb74418e535a7b2cb923fbbf3126d17ec0c2fd797949f254a73c31e47ca3b09b122a5f4c51ebd015bb5ac59469966e3319c6d94316e4add0
data/frodo.gemspec CHANGED
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'faraday_middleware', ['>= 0.8.8', '<= 1.0']
26
26
  spec.add_dependency 'andand', '~> 1.3'
27
27
 
28
- spec.add_development_dependency 'bundler', '~> 1.6'
29
28
  spec.add_development_dependency 'rake', '~> 0'
30
29
  spec.add_development_dependency 'simplecov', '~> 0.15'
31
30
  spec.add_development_dependency 'rspec', '~> 3.7'
@@ -18,7 +18,11 @@ module Frodo
18
18
  # @params new_value [to_i]
19
19
  def value=(new_value)
20
20
  validate(new_value.to_i)
21
- @value = new_value.to_i.to_s
21
+ @value = if new_value.nil? && allows_nil?
22
+ nil
23
+ else
24
+ new_value.to_i.to_s
25
+ end
22
26
  end
23
27
 
24
28
  # The Frodo type name
data/lib/frodo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Frodo
2
- VERSION = '0.12.1'
2
+ VERSION = '0.12.2'
3
3
  end
@@ -7,12 +7,15 @@ describe Frodo::Properties::Integer do
7
7
  let(:subject64) { Frodo::Properties::Int64.new('Int64', '32') }
8
8
  let(:subjectbyte) { Frodo::Properties::Byte.new('Byte', '32') }
9
9
  let(:subjectsbyte) { Frodo::Properties::SByte.new('SByte', '32') }
10
+ let(:subjectnullable) { Frodo::Properties::Integer.new('Integer', '32', 'allows_nil'=>true) }
10
11
 
11
12
  it { expect(subject.type).to eq('Edm.Int64') }
12
13
  it { expect(subject.value).to eq(32) }
13
14
  it { expect {subject.value = (2**63)}.to raise_error(ArgumentError) }
14
15
  it { expect {subject.value = (-(2**63) - 1)}.to raise_error(ArgumentError) }
15
16
 
17
+
18
+
16
19
  it { expect(subject16.type).to eq('Edm.Int16') }
17
20
  it { expect(subject16.value).to eq(32) }
18
21
  it { expect {subject16.value = (2**15)}.to raise_error(ArgumentError) }
@@ -46,6 +49,7 @@ describe Frodo::Properties::Integer do
46
49
  subject64.value = 128
47
50
  subjectbyte.value = 12
48
51
  subjectsbyte.value = 12
52
+ subjectnullable.value = nil
49
53
  end
50
54
 
51
55
  it { expect(subject.value).to eq(128) }
@@ -54,5 +58,6 @@ describe Frodo::Properties::Integer do
54
58
  it { expect(subject64.value).to eq(128) }
55
59
  it { expect(subjectbyte.value).to eq(12) }
56
60
  it { expect(subjectsbyte.value).to eq(12) }
61
+ it { expect(subjectnullable.value).to eq(nil) }
57
62
  end
58
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frodo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Pinault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -72,20 +72,6 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '1.3'
75
- - !ruby/object:Gem::Dependency
76
- name: bundler
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.6'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '1.6'
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: rake
91
77
  requirement: !ruby/object:Gem::Requirement