zeta 2.1.3 → 2.1.4

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: a45703583ed25aabb358d77cf687f55cf62738e9
4
- data.tar.gz: cd89ce25611082878a20d2ec3db6e5c7690fc80f
3
+ metadata.gz: dc2dd8560cfec3eed3ac150ff716d6ca3ce2a74b
4
+ data.tar.gz: df8073d2b873299ca2dc6e981b2f2b09936a4703
5
5
  SHA512:
6
- metadata.gz: 2028a0ef10dfe1663ba47981c403433114abf2cdb296dbcac222ca5d2946041a8ae4aed48a048324b15691ba84242c76fc6e043052ec1346a160ef21f080de25
7
- data.tar.gz: bc7d9454ad2a01a71ac70a8a08b5288558eb557e3eab5806416e1a96fc4cea20e05aaaada0a2dec1902b1fd3b21f1d5a38473a135a808afcfea5469cc949e7e2
6
+ metadata.gz: b3c4b415f844190d65c010e2baf0421397c581ff8f048087f35db63a727d3f54411ff76f10dd9c10feb59ffa2cf1af3e6ef5c46f0efc53ca09223d7e1be30d33
7
+ data.tar.gz: d1a42af1f30460e0a425e88141fb1c8ab22619c0de21c4b2a72ac1e2ae17d18360ffd20e11c5e2e23179c395d113d873975513a1eeb65e3bdee9e29f72d1d29d
@@ -1,3 +1,7 @@
1
+ # [2.1.4] - 2017-09-15
2
+ ### Fixed
3
+ - Fix `Zeta::RSpec.run`: Ensure that proper error messages are displayed if the RSpec infrastructure validation fails.
4
+
1
5
  # 2.1.3
2
6
  - ...Remove contexts, because that doesn't work either.
3
7
 
@@ -1,27 +1,22 @@
1
1
  require 'lacerda/reporters/rspec'
2
2
  require 'zeta'
3
3
 
4
- # Include this file in your spec/spec_helper.rb
5
4
  class Zeta::RSpec
6
5
  def self.run
7
- RSpec.describe "Update Zeta infrastructure once", order: :defined do
8
- it "download infrastructure (requires network connection)" do
9
- expect{
10
- Zeta.config
11
- Zeta.infrastructure
12
- }.to_not raise_error
13
- end
6
+ # Download Infrastructure
7
+ Zeta.config
8
+ Zeta.infrastructure
14
9
 
15
- it "download specifications (requires network connection)" do
16
- expect{
17
- Zeta.verbose = false
18
- Zeta.update_contracts
19
- }.to_not raise_error
20
- end
10
+ # Update Contracts
11
+ Zeta.verbose = false
12
+ Zeta.update_contracts
21
13
 
22
- it "validate infrastructure" do
23
- expect(Zeta.contracts_fulfilled?(Lacerda::Reporters::RSpec.new)).to eq true
24
- end
25
- end
14
+ # Validate Infrastructure
15
+ # NOTE: Expectations are defined by .contracts_fulfilled?
16
+ #
17
+ # Whats the structure of this expectations?
18
+ # https://github.com/moviepilot/lacerda/blob/master/lib/lacerda/reporters/rspec.rb
19
+ #
20
+ Zeta.contracts_fulfilled?(Lacerda::Reporters::RSpec.new)
26
21
  end
27
22
  end
@@ -1,33 +1,8 @@
1
- require 'lacerda/reporters/rspec'
2
- require 'zeta'
3
-
4
- if defined?(Rails) && ENV['ZETA_HTTP_USER'].blank? && ENV['ZETA_HTTP_PASSWORD'].blank?
5
- ENV['ZETA_HTTP_USER'] = Rails.application.config_for(:zeta)['user']
6
- ENV['ZETA_HTTP_PASSWORD'] = Rails.application.config_for(:zeta)['api_key']
1
+ if defined?(Rails) && Rails.application.config_for(:zeta).present?
2
+ ENV['ZETA_HTTP_USER'] ||= Rails.application.config_for(:zeta)['user']
3
+ ENV['ZETA_HTTP_PASSWORD'] ||= Rails.application.config_for(:zeta)['api_key']
7
4
  end
8
5
 
9
- RSpec.describe 'Zeta infrastructure', order: :defined do
10
- it 'is correctly configured' do
11
- expect do
12
- Zeta.config
13
- Zeta.infrastructure
14
- end.to_not raise_error
15
- end
16
-
17
- it 'can download the infrastructure contracts (requires network connection)' do
18
- expect do
19
- Zeta.verbose = false
20
- Zeta.update_contracts
21
- end.to_not raise_error
22
- end
6
+ require 'zeta/rspec'
23
7
 
24
- # This is a bit odd. The RSpec reporter declares new describes inside. That
25
- # fails usually in RSpec, but not in the way we're doing it.
26
- # We need it because if this `it` would be a `context`, `contracts_fulfilled?`
27
- # would be already evaluated before the previous examples run. This would
28
- # make that this example fails, because the contracts have not been
29
- # downloaded yet
30
- it 'has a valid infrastructure' do
31
- expect(Zeta.contracts_fulfilled?(Lacerda::Reporters::RSpec.new)).to eq true
32
- end
33
- end
8
+ Zeta::RSpec.run
@@ -1,3 +1,3 @@
1
1
  class Zeta
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.4"
3
3
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'rake'
22
- spec.add_runtime_dependency 'lacerda', '>= 2.1.2'
22
+ spec.add_runtime_dependency 'lacerda', '>= 2.1.3'
23
23
  spec.add_runtime_dependency 'activesupport'
24
24
  spec.add_runtime_dependency 'httparty'
25
25
  spec.add_runtime_dependency 'colorize'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.2
33
+ version: 2.1.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.1.2
40
+ version: 2.1.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  requirements: []
197
197
  rubyforge_project:
198
- rubygems_version: 2.6.12
198
+ rubygems_version: 2.6.13
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Collects and validates the publish/consume contracts of your infrastructure