prospectus_travis 0.0.1
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 +7 -0
- data/.circle-ruby +3 -0
- data/.gitignore +5 -0
- data/.prospectus +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +13 -0
- data/circle.yml +6 -0
- data/lib/prospectus_travis.rb +60 -0
- data/prospectus_travis.gemspec +25 -0
- data/spec/prospectus_travis_spec.rb +1 -0
- data/spec/spec_helper.rb +11 -0
- metadata +172 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: da003a8e1590aa4da58af4e2564d1d6d11e6abc4a59168ef7ed6bfa5253f9411
|
4
|
+
data.tar.gz: ac06c96514fae66c5f9031be8460dc396e4970f17ac84e29e7c3d11c6beda617
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dd45040ee42083d1a4c0887bbafb9c91864040afeee996ef10d64cf879b3b8ffa8840a28eda01b3f065dce6fafcf745f900f70a10aebceefd82d45a4f5d6dbc9
|
7
|
+
data.tar.gz: 73053a998da5f67a05abc4c6d0711f7d24cc12a3a3b973a3906c21d3a69182bb1927dfa81e1fd829e291943419a9b7365281ca62bad6269c41a17c4925556986
|
data/.circle-ruby
ADDED
data/.gitignore
ADDED
data/.prospectus
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
dist: trusty
|
2
|
+
install:
|
3
|
+
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done
|
4
|
+
script:
|
5
|
+
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done
|
6
|
+
notifications:
|
7
|
+
slack:
|
8
|
+
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=
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Les Aker
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
prospectus_travis
|
2
|
+
=========
|
3
|
+
|
4
|
+
[](https://rubygems.org/gems/prospectus_travis)
|
5
|
+
[](https://travis-ci.com/akerl/prospectus_travis)
|
6
|
+
[](https://codecov.io/github/akerl/prospectus_travis)
|
7
|
+
[](https://www.codacy.com/app/akerl/prospectus_travis)
|
8
|
+
[](https://tldrlegal.com/license/mit-license)
|
9
|
+
|
10
|
+
[Prospectus](https://github.com/akerl/prospectus) helpers for checking travis build status
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
Add the following 2 lines to the .prospectus:
|
15
|
+
|
16
|
+
```
|
17
|
+
## Add this at the top
|
18
|
+
Prospectus.extra_dep('file', 'prospectus_travis')
|
19
|
+
|
20
|
+
## Add this inside your item that has a build
|
21
|
+
extend ProspectusTravis.build('ORG/REPO')
|
22
|
+
```
|
23
|
+
|
24
|
+
## Installation
|
25
|
+
|
26
|
+
gem install prospectus_travis
|
27
|
+
|
28
|
+
## License
|
29
|
+
|
30
|
+
prospectus_travis is released under the MIT License. See the bundled LICENSE file for details.
|
31
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
|
5
|
+
desc 'Run tests'
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
desc 'Run Rubocop on the gem'
|
9
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
10
|
+
task.fail_on_error = true
|
11
|
+
end
|
12
|
+
|
13
|
+
task default: %i[spec rubocop build install]
|
data/circle.yml
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'keylime'
|
2
|
+
require 'travis'
|
3
|
+
|
4
|
+
module ProspectusTravis
|
5
|
+
GOOD_STATUSES = %w[created received started passed].freeze
|
6
|
+
|
7
|
+
##
|
8
|
+
# Helper for automatically adding build status check
|
9
|
+
class Build < Module
|
10
|
+
def initialize(repo_slug)
|
11
|
+
@repo_slug = repo_slug || raise('No repo specified')
|
12
|
+
end
|
13
|
+
|
14
|
+
def extended(other) # rubocop:disable Metrics/MethodLength
|
15
|
+
actual_val, expected_val = parse_status
|
16
|
+
|
17
|
+
other.deps do
|
18
|
+
item do
|
19
|
+
name 'circleci'
|
20
|
+
|
21
|
+
expected do
|
22
|
+
static
|
23
|
+
set expected_val
|
24
|
+
end
|
25
|
+
|
26
|
+
actual do
|
27
|
+
static
|
28
|
+
set actual_val
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def client
|
37
|
+
@client ||= Travis::Client.new(uri: uri, access_token: token)
|
38
|
+
end
|
39
|
+
|
40
|
+
def parse_status
|
41
|
+
return [status, status] if GOOD_STATUSES.include?(status)
|
42
|
+
[status, 'passed']
|
43
|
+
end
|
44
|
+
|
45
|
+
def status
|
46
|
+
@status ||= client.repo(@repo_slug).last_build.state
|
47
|
+
end
|
48
|
+
|
49
|
+
def uri
|
50
|
+
@uri ||= Travis::Client::COM_URI
|
51
|
+
end
|
52
|
+
|
53
|
+
def token
|
54
|
+
return @token if @token
|
55
|
+
credential = Keylime.new(server: uri)
|
56
|
+
msg = 'TravisCI Token (run `travis token --com` to generate)'
|
57
|
+
@token = credential.get!(msg).password
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'prospectus_travis'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
5
|
+
|
6
|
+
s.summary = 'Prospectus helpers for TravisCI'
|
7
|
+
s.description = 'Prospectus helpers for TravisCI'
|
8
|
+
s.authors = ['Les Aker']
|
9
|
+
s.email = 'me@lesaker.org'
|
10
|
+
s.homepage = 'https://github.com/amylum/prospectus_travis'
|
11
|
+
s.license = 'MIT'
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split
|
14
|
+
s.test_files = `git ls-files spec/*`.split
|
15
|
+
|
16
|
+
s.add_dependency 'keylime', '~> 0.2.1'
|
17
|
+
s.add_dependency 'prospectus', '~> 0.6.0'
|
18
|
+
|
19
|
+
s.add_development_dependency 'codecov', '~> 0.1.1'
|
20
|
+
s.add_development_dependency 'fuubar', '~> 2.3.0'
|
21
|
+
s.add_development_dependency 'goodcop', '~> 0.5.0'
|
22
|
+
s.add_development_dependency 'rake', '~> 12.3.0'
|
23
|
+
s.add_development_dependency 'rspec', '~> 3.8.0'
|
24
|
+
s.add_development_dependency 'rubocop', '~> 0.58.0'
|
25
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'spec_helper'
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prospectus_travis
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Les Aker
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: keylime
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: prospectus
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.6.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.6.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: codecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.1
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: fuubar
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.3.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.3.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: goodcop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 12.3.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 12.3.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.8.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.8.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.58.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.58.0
|
125
|
+
description: Prospectus helpers for TravisCI
|
126
|
+
email: me@lesaker.org
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files: []
|
130
|
+
files:
|
131
|
+
- ".circle-ruby"
|
132
|
+
- ".gitignore"
|
133
|
+
- ".prospectus"
|
134
|
+
- ".rspec"
|
135
|
+
- ".rubocop.yml"
|
136
|
+
- ".travis.yml"
|
137
|
+
- Gemfile
|
138
|
+
- LICENSE
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- circle.yml
|
142
|
+
- lib/prospectus_travis.rb
|
143
|
+
- prospectus_travis.gemspec
|
144
|
+
- spec/prospectus_travis_spec.rb
|
145
|
+
- spec/spec_helper.rb
|
146
|
+
homepage: https://github.com/amylum/prospectus_travis
|
147
|
+
licenses:
|
148
|
+
- MIT
|
149
|
+
metadata: {}
|
150
|
+
post_install_message:
|
151
|
+
rdoc_options: []
|
152
|
+
require_paths:
|
153
|
+
- lib
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
requirements: []
|
165
|
+
rubyforge_project:
|
166
|
+
rubygems_version: 2.7.6
|
167
|
+
signing_key:
|
168
|
+
specification_version: 4
|
169
|
+
summary: Prospectus helpers for TravisCI
|
170
|
+
test_files:
|
171
|
+
- spec/prospectus_travis_spec.rb
|
172
|
+
- spec/spec_helper.rb
|