prospectus_travis 0.0.1 → 0.0.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: da003a8e1590aa4da58af4e2564d1d6d11e6abc4a59168ef7ed6bfa5253f9411
4
- data.tar.gz: ac06c96514fae66c5f9031be8460dc396e4970f17ac84e29e7c3d11c6beda617
3
+ metadata.gz: dd4ca6deff8f559dac66adc76b51f8972fc6fd09df5e96d66835d1f7da0a7e49
4
+ data.tar.gz: 13612edd463b623389398026d125f3f40e3a8b632380ee9f28859c9ec278bfc4
5
5
  SHA512:
6
- metadata.gz: dd45040ee42083d1a4c0887bbafb9c91864040afeee996ef10d64cf879b3b8ffa8840a28eda01b3f065dce6fafcf745f900f70a10aebceefd82d45a4f5d6dbc9
7
- data.tar.gz: 73053a998da5f67a05abc4c6d0711f7d24cc12a3a3b973a3906c21d3a69182bb1927dfa81e1fd829e291943419a9b7365281ca62bad6269c41a17c4925556986
6
+ metadata.gz: 9f71893a07058f8405cfa26b9f9d6323f1ba567f5e14a34b422760c7d806bd7f063b0248d80eb8f664ecbd013da6d673b568d227e3ccbf10d8c85e57d5016023
7
+ data.tar.gz: bc17a591b0bc2ba28cc64ee0dc2133819661e6795f213dae367171298b30fe91a5fa257e046f9cbc5eb8db5d5a692ef276a407e27379ea8275440c273055a19e
@@ -1,8 +1,10 @@
1
1
  dist: trusty
2
2
  install:
3
+ - for i in $(cat .circle-ruby) ; do rvm install $i || exit 1 ; done
3
4
  - for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done
4
5
  script:
5
6
  - for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done
6
7
  notifications:
8
+ email: false
7
9
  slack:
8
10
  secure: CSsMOp3FQxF5tdnIvp0FtYXJRIF1wywcL+IeG0xCx+uP2sidsLYJBQVAqTknazmETb+HKFz23nKVSHROfxp5z54BmKKFDbc7yq2nKeHQ6w+F7RVv8fLoLyQReZu6YJgRsuzkZ6vfQi8DovNx1gHVocgcfF6KJy4tkOBVVK+48MlP+FVQRlzV5PUy2i6M59I9NAEGhCpyiiIbzlAKgsu6wOWky9vO+gj6I8LUfvErF/PEFNR/+4/Ung/dKa+t9gALgpE/s5R90g5JTbcqnLTiYToT34zYDct18fz3bmILz+EolY3aD3JBb/qbazQDlzVb5iCZyPoThpGOEOpcNPJPWmWYaX/n6W8UaTNZe42ssNohnlBpYAcJ+0UWZodirFsBFgVYLM8pwQ50YMmQ7OfXsHTcVUGV14NmHCGvBYPedwj1Ji/h7KYlR7gD5x4hX+0Y1bDjv76M4F0D/Q7RXKg9AOc5fLGwW1gxgmb6PM21r4hv8cD+m+X7W8SdKsGQYdKT8fWyz3BdBX3vH4ofE3tyWN1CgAL0UrrEcNAbBy3bd+ECwdKcg9+aLlAU0kcctTH/n5fSVpHdcIv6STb0S7RBVHWgwutfnyLGwZv5kzECXZQT8ZPk2tdc9Zw1mCLxH8wbe0vkYeRfT9dvmqtFy3sokMncMcBTHZhg3GkzYktrEiQ=
@@ -4,6 +4,8 @@ require 'travis'
4
4
  module ProspectusTravis
5
5
  GOOD_STATUSES = %w[created received started passed].freeze
6
6
 
7
+ FAKE_BUILD = Struct.new(:state)
8
+
7
9
  ##
8
10
  # Helper for automatically adding build status check
9
11
  class Build < Module
@@ -43,7 +45,15 @@ module ProspectusTravis
43
45
  end
44
46
 
45
47
  def status
46
- @status ||= client.repo(@repo_slug).last_build.state
48
+ @status ||= last_build.state
49
+ end
50
+
51
+ def last_build
52
+ @last_build ||= repo.last_build || FAKE_BUILD.new('no_results')
53
+ end
54
+
55
+ def repo
56
+ @repo ||= client.repo(@repo_slug)
47
57
  end
48
58
 
49
59
  def uri
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'prospectus_travis'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
 
6
6
  s.summary = 'Prospectus helpers for TravisCI'
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.add_dependency 'keylime', '~> 0.2.1'
17
17
  s.add_dependency 'prospectus', '~> 0.6.0'
18
+ s.add_dependency 'travis', '~> 1.8.9'
18
19
 
19
20
  s.add_development_dependency 'codecov', '~> 0.1.1'
20
21
  s.add_development_dependency 'fuubar', '~> 2.3.0'
@@ -8,4 +8,4 @@ if ENV['CI'] == 'true'
8
8
  end
9
9
 
10
10
  require 'rspec'
11
- require 'prospectus_circleci'
11
+ require 'prospectus_travis'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prospectus_travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-28 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: keylime
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: travis
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.8.9
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.8.9
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: codecov
43
57
  requirement: !ruby/object:Gem::Requirement