acfs 0.46.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ba49d6dd8c50e454b8f3840420655bb3c4ce682
4
- data.tar.gz: 643a02f5bf2bee3a9dc58fc2bd1eacc4bbac4b03
3
+ metadata.gz: decb9d3e9d395a8be85fbe1121af69d5d14760dc
4
+ data.tar.gz: a9a4ec3bfd5181238ff1075c1f2c201193e4c6c7
5
5
  SHA512:
6
- metadata.gz: 72c52711056563f03ab5ccd497ea81470934c899e0c3e0f0bc5c66ad3e05e60194066281f2545afd37365876d7c7910c26bcad2efd6c60d10ff295e7dd9ac0f5
7
- data.tar.gz: a72dc58cc2f8934aba2d57d69a1171c316bbbb98b5ae912727833afbb0e66d7b3a981b7b6332ad8ab0fd74f70f1d51e0616dc741a4df5d9d911cb2792c31817a
6
+ metadata.gz: 9e32e66070e87b77c91d6046b378896aaaf76a45bdaae3a08b9fd00264b5e5bef80003b04de602abffba08fcf3e8892673025659636ff753679c9ee3104e5ded
7
+ data.tar.gz: a2c3cf04e5f8edc101c9af0d5c8afc6c24d5990ccbc8c36025c99fea69a13e6bc426269c8b2de7b95f57644563ded48b1446d18e721afbd36da786515b7b1fda
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.47.0
4
+
5
+ * Change blank value handling of dict and list type (0a12ef1)
6
+
3
7
  ## 0.46.0
4
8
 
5
9
  * Rework types system (#39)
@@ -19,7 +19,7 @@ module Acfs::Resource::Attributes
19
19
  # @raise [TypeError] If object cannot be casted to a hash.
20
20
  #
21
21
  def cast_value(value)
22
- return nil if value.blank?
22
+ return {} if value.blank?
23
23
 
24
24
  if value.is_a?(Hash)
25
25
  value
@@ -18,7 +18,7 @@ module Acfs::Resource::Attributes
18
18
  # @raise [TypeError] If object cannot be casted to a list.
19
19
  #
20
20
  def cast_value(value)
21
- return nil if value.blank?
21
+ return [] if value.blank?
22
22
 
23
23
  if value.is_a?(::Array)
24
24
  value
data/lib/acfs/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Acfs
2
2
  module VERSION
3
3
  MAJOR = 0
4
- MINOR = 46
4
+ MINOR = 47
5
5
  PATCH = 0
6
6
  STAGE = nil
7
7
 
@@ -13,12 +13,12 @@ describe Acfs::Resource::Attributes::Dict do
13
13
 
14
14
  context 'with blank string (I)' do
15
15
  let(:value) { '' }
16
- it { expect(subject.call).to eq nil }
16
+ it { expect(subject.call).to eq Hash.new }
17
17
  end
18
18
 
19
19
  context 'with blank string (II)' do
20
20
  let(:value) { " \t" }
21
- it { expect(subject.call).to eq nil }
21
+ it { expect(subject.call).to eq Hash.new }
22
22
  end
23
23
 
24
24
  context 'with hash' do
@@ -13,12 +13,12 @@ describe Acfs::Resource::Attributes::List do
13
13
 
14
14
  context 'with blank string (I)' do
15
15
  let(:value) { '' }
16
- it { expect(subject.call).to eq nil }
16
+ it { expect(subject.call).to eq Array.new }
17
17
  end
18
18
 
19
19
  context 'with blank string (II)' do
20
20
  let(:value) { " \t" }
21
- it { expect(subject.call).to eq nil }
21
+ it { expect(subject.call).to eq Array.new }
22
22
  end
23
23
 
24
24
  context 'with array' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.46.0
4
+ version: 0.47.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen