vx-builder 0.5.16 → 0.5.17

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: 9ba37c5a2d8c7a7adfffd046b94b2ab44a46729c
4
- data.tar.gz: 9409c682c87c19126e6bc0cc77bc93c8a3b9b96d
3
+ metadata.gz: 8136b579816b72f35a6830f449cb21510df4066e
4
+ data.tar.gz: 3ad1702af5b246d3dc7b19653fbaae218c56d205
5
5
  SHA512:
6
- metadata.gz: af7d18ba9cdee91192b8a5958f9fa9fd0bda24e95c4ff9a302b8cfc7f8d759720f029490d1c2e2bc010f0ad68349ff4e69105535b2700c126c345090b8f4579f
7
- data.tar.gz: e7b6443d23fd0677bfb2b897e1677831cec116b20e758e1bb1b3024e39724b7fffa8343ef9901ab2159b05979aa81e4d18d59368604e57ec03ad892872e46ed9
6
+ metadata.gz: 4c7194a2bd55ff86c35e7cce44ba5c011334b0c8cbce4f30957177734868643ea3da25aaebd4f66fbc6a48ff5c2c76e80372219938264401462a248957ffb77e
7
+ data.tar.gz: 6277e86a3b67cc5e870d4890d54215675bef9fff130f36aac756ad01fbe5010c12c979facb67e4c50cd02558e82693cc60ad85cc505b023f775722202ebac38d
@@ -132,14 +132,18 @@ module Vx
132
132
  end
133
133
 
134
134
  def to_hash
135
- attributes.merge(
136
- "env" => env.attributes,
137
- "cache" => cache.attributes,
138
- "vexor" => vexor.attributes,
139
- "matrix" => matrix.attributes,
140
- "deploy" => deploy.attributes,
141
- "deploy_modules" => deploy_modules.map(&:to_hash)
142
- )
135
+ if empty?
136
+ {}
137
+ else
138
+ attributes.merge(
139
+ "env" => env.attributes,
140
+ "cache" => cache.attributes,
141
+ "vexor" => vexor.attributes,
142
+ "matrix" => matrix.attributes,
143
+ "deploy" => deploy.attributes,
144
+ "deploy_modules" => deploy_modules.map(&:to_hash)
145
+ )
146
+ end
143
147
  end
144
148
 
145
149
  def to_yaml
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module Builder
3
- VERSION = "0.5.16"
3
+ VERSION = "0.5.17"
4
4
  end
5
5
  end
@@ -113,5 +113,10 @@ describe Vx::Builder::BuildConfiguration do
113
113
  it "should be false if not empty hash" do
114
114
  expect(described_class.new({"script" => "value"})).to_not be_empty
115
115
  end
116
+
117
+ it "should to_hash to be empty" do
118
+ expect(described_class.new(nil).to_hash).to eq({})
119
+ end
120
+
116
121
  end
117
122
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky