puppet-autostager 0.0.10 → 0.0.11
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 +5 -13
- data/.rubocop.yml +10 -1
- data/Gemfile +0 -1
- data/Rakefile +4 -5
- data/autostager.gemspec +2 -4
- data/bin/autostager +0 -1
- data/circle.yml +3 -1
- data/lib/autostager.rb +18 -11
- data/lib/autostager/cli.rb +0 -1
- data/lib/autostager/git_timeout.rb +0 -2
- data/lib/autostager/logger.rb +0 -1
- data/lib/autostager/pull_request.rb +0 -2
- data/lib/autostager/timeout.rb +2 -2
- data/lib/autostager/version.rb +1 -2
- data/script/push.sh +10 -4
- data/spec/functional/placeholder_spec.rb +0 -1
- data/spec/spec_helper.rb +1 -2
- data/spec/unit/autostager_spec.rb +0 -1
- data/src/publish +22 -0
- metadata +35 -50
- data/spec/unit/friction_spec.rb +0 -26
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
YTU4ZmI3YzI2MmFhMjFjNjczNGZmY2E3NzEzNWE2NThjNjUxMzNhOA==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 643d4cb70e4c30d630b1dc8f2afe4be71fb41a5a
|
|
4
|
+
data.tar.gz: 8d93af3590162886fa650cc2d29341c12533da9d
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
NmM5MTA4YzYyMzVmNmI0MmY3NTZmNjAxOTA3YWVjZjZjYWYyZWQxYzBlNjI3
|
|
11
|
-
NzFjNWQ1OTZlMjNiYjhhYmIxZjAzOTcyNTg4M2ZiZjI0YWE5Y2M=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MmMwMmZkZTRhNTYyNmRhMTk3MjU5MWZiZDZmMmNlN2NjZDc4YjBjYzJmMWE5
|
|
14
|
-
N2JhOTI4YmE2MzQ0NDUyODFhYjJlZjg3ODA5MjQ2NTA3YTQwYmFlYzkxMGQw
|
|
15
|
-
NzMzYjEzNDg4NDkyMzRhNWIxZGM2YTVhMGJiZjgyYTM2ZjJmNGY=
|
|
6
|
+
metadata.gz: 1c1f5d203d4c5eebbc4102ff5041bc0383d5dddfbc7cfa8ada9baf13e98851b5bf31f3eb23349123c9293589abd37a19517204886ccc60bb56619b8f419d739c
|
|
7
|
+
data.tar.gz: 9c7c3cba997137935eeffc3e1692aaf4df3878ecb215b7ade94a10f5d9d9a0794f281413c28d08a774c4de2eddb0a0969449605cc127bed3a73cc9c926b1a46a
|
data/.rubocop.yml
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
+
AllCops:
|
|
3
|
+
Exclude:
|
|
4
|
+
- 'Dockerfile*'
|
|
2
5
|
|
|
3
6
|
# Avoid diff-churn!
|
|
4
|
-
Style/
|
|
7
|
+
Style/TrailingCommaInArguments:
|
|
8
|
+
Description: 'Checks for trailing comma in argument lists.'
|
|
9
|
+
Enabled: true
|
|
10
|
+
EnforcedStyleForMultiline: comma
|
|
11
|
+
Style/TrailingCommaInLiteral:
|
|
12
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
|
13
|
+
Enabled: true
|
|
5
14
|
EnforcedStyleForMultiline: comma
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# vim: set ts=2 sw=2 ai et:
|
|
3
2
|
|
|
4
3
|
# Does the current user have root privileges?
|
|
@@ -32,10 +31,10 @@ end
|
|
|
32
31
|
|
|
33
32
|
# Run unit tests before functional tests.
|
|
34
33
|
desc 'Run rspec tests'
|
|
35
|
-
task test: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
task test: %i[
|
|
35
|
+
rubocop
|
|
36
|
+
unit
|
|
37
|
+
functional
|
|
39
38
|
]
|
|
40
39
|
|
|
41
40
|
RSpec::Core::RakeTask.new(:unit) do |t|
|
data/autostager.gemspec
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
3
|
require 'English'
|
|
@@ -15,12 +14,11 @@ Gem::Specification.new do |spec|
|
|
|
15
14
|
spec.license = 'MIT'
|
|
16
15
|
|
|
17
16
|
spec.files = `git ls-files`.split($RS)
|
|
18
|
-
spec.executables = spec.files.grep(
|
|
19
|
-
spec.test_files = spec.files.grep(
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
|
|
20
19
|
spec.require_paths = ['lib']
|
|
21
20
|
|
|
22
21
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
23
|
-
spec.add_development_dependency 'friction'
|
|
24
22
|
spec.add_development_dependency 'minitest'
|
|
25
23
|
spec.add_development_dependency 'mocha'
|
|
26
24
|
spec.add_development_dependency 'rake'
|
data/bin/autostager
CHANGED
data/circle.yml
CHANGED
data/lib/autostager.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
require 'English'
|
|
3
2
|
require 'fileutils'
|
|
4
3
|
require 'autostager/cli'
|
|
@@ -11,6 +10,7 @@ require 'octokit'
|
|
|
11
10
|
require 'pp'
|
|
12
11
|
|
|
13
12
|
# Top-level module namespace.
|
|
13
|
+
# rubocop:disable Metrics/ModuleLength
|
|
14
14
|
module Autostager
|
|
15
15
|
module_function
|
|
16
16
|
|
|
@@ -25,9 +25,15 @@ module Autostager
|
|
|
25
25
|
a_string.gsub(/[^a-z0-9_]/i, '_')
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
# Get the name of the default branch for the repo.
|
|
29
|
+
# This is usually master in git, but
|
|
30
|
+
# could also be "production" for a puppet repo.
|
|
31
|
+
def default_branch
|
|
32
|
+
@client.repo(repo_slug).default_branch
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# rubocop:disable MethodLength,Metrics/AbcSize
|
|
29
36
|
def stage_upstream
|
|
30
|
-
default_branch = @client.repo(repo_slug).default_branch
|
|
31
37
|
log "===> begin #{default_branch}"
|
|
32
38
|
p = Autostager::PullRequest.new(
|
|
33
39
|
default_branch,
|
|
@@ -47,9 +53,9 @@ module Autostager
|
|
|
47
53
|
':bangbang: This probably means somebody force-pushed to the branch.',
|
|
48
54
|
)
|
|
49
55
|
end
|
|
50
|
-
# rubocop:enable MethodLength
|
|
56
|
+
# rubocop:enable MethodLength,Metrics/AbcSize
|
|
51
57
|
|
|
52
|
-
# rubocop:disable MethodLength
|
|
58
|
+
# rubocop:disable MethodLength,Metrics/AbcSize
|
|
53
59
|
def process_pull(pr)
|
|
54
60
|
log "===> #{pr.number} #{clone_dir(pr)}"
|
|
55
61
|
p = Autostager::PullRequest.new(
|
|
@@ -74,9 +80,9 @@ module Autostager
|
|
|
74
80
|
comment_or_close(p, pr)
|
|
75
81
|
end
|
|
76
82
|
end
|
|
77
|
-
# rubocop:enable MethodLength
|
|
83
|
+
# rubocop:enable MethodLength,Metrics/AbcSize
|
|
78
84
|
|
|
79
|
-
# rubocop:disable MethodLength
|
|
85
|
+
# rubocop:disable MethodLength,Metrics/AbcSize
|
|
80
86
|
def comment_or_close(p, pr, add_comment = true)
|
|
81
87
|
if p.up2date?("upstream/#{pr.base.repo.default_branch}")
|
|
82
88
|
if add_comment
|
|
@@ -100,7 +106,7 @@ module Autostager
|
|
|
100
106
|
log comment
|
|
101
107
|
end
|
|
102
108
|
end
|
|
103
|
-
# rubocop:enable MethodLength
|
|
109
|
+
# rubocop:enable MethodLength,Metrics/AbcSize
|
|
104
110
|
|
|
105
111
|
def authenticated_url(s)
|
|
106
112
|
s.dup.sub!(%r{^(https://)(.*)}, '\1' + access_token + '@\2')
|
|
@@ -130,7 +136,7 @@ module Autostager
|
|
|
130
136
|
result = 120
|
|
131
137
|
if ENV.key?('timeout')
|
|
132
138
|
result = ENV['timeout'].to_i
|
|
133
|
-
|
|
139
|
+
raise 'timeout must be greater than zero seconds' if result <= 0
|
|
134
140
|
end
|
|
135
141
|
result
|
|
136
142
|
end
|
|
@@ -144,7 +150,7 @@ module Autostager
|
|
|
144
150
|
]
|
|
145
151
|
end
|
|
146
152
|
|
|
147
|
-
# rubocop:disable MethodLength
|
|
153
|
+
# rubocop:disable MethodLength,Metrics/AbcSize
|
|
148
154
|
def run
|
|
149
155
|
Octokit.auto_paginate = true
|
|
150
156
|
user = client.user
|
|
@@ -178,5 +184,6 @@ module Autostager
|
|
|
178
184
|
$stderr.puts 'Did you export "access_token" and "repo_slug"?'
|
|
179
185
|
exit(1)
|
|
180
186
|
end
|
|
181
|
-
# rubocop:enable MethodLength
|
|
187
|
+
# rubocop:enable MethodLength,Metrics/AbcSize
|
|
182
188
|
end
|
|
189
|
+
# rubocop:enable Metrics/ModuleLength
|
data/lib/autostager/cli.rb
CHANGED
data/lib/autostager/logger.rb
CHANGED
data/lib/autostager/timeout.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
1
|
module Autostager
|
|
4
2
|
# Meta-module to call the correct library method
|
|
5
3
|
# for the version of Ruby on which the autostager runs.
|
|
@@ -16,6 +14,7 @@ module Autostager
|
|
|
16
14
|
# @param block [Block] Code that is subject to expiration.
|
|
17
15
|
#
|
|
18
16
|
# @return [nil]
|
|
17
|
+
# rubocop:disable Performance/RedundantBlockCall
|
|
19
18
|
def timeout(seconds, err, &block)
|
|
20
19
|
if RUBY_VERSION =~ /1.8/
|
|
21
20
|
require 'system_timer'
|
|
@@ -25,5 +24,6 @@ module Autostager
|
|
|
25
24
|
::Timeout.timeout(seconds, err) { block.call }
|
|
26
25
|
end
|
|
27
26
|
end
|
|
27
|
+
# rubocop:enable Performance/RedundantBlockCall
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/autostager/version.rb
CHANGED
data/script/push.sh
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
#!/bin/
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
set -u
|
|
2
4
|
|
|
5
|
+
mkdir -p ~/.gem/ || :
|
|
3
6
|
cp -f templates/credentials ~/.gem/
|
|
4
7
|
chmod 0600 ~/.gem/credentials
|
|
5
8
|
sed -i "s/API_KEY/${API_KEY}/" ~/.gem/credentials
|
|
6
9
|
|
|
7
|
-
gem search --remote -a puppet-autostager
|
|
8
|
-
if
|
|
10
|
+
output="$(gem search --remote -a puppet-autostager)"
|
|
11
|
+
if echo ${output} | grep ${VERSION}; then
|
|
9
12
|
# Be informative, but don't fail.
|
|
10
13
|
# This enables to merge changes to non-gem files, such as README.
|
|
11
14
|
echo "puppet-autostager ${VERSION} has already been published."
|
|
12
15
|
else
|
|
13
|
-
gem push puppet-autostager-${VERSION}.gem
|
|
16
|
+
gem push puppet-autostager-${VERSION}.gem || {
|
|
17
|
+
echo ERR: failed to push gem
|
|
18
|
+
exit 1
|
|
19
|
+
} >&2
|
|
14
20
|
fi
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
require 'minitest'
|
|
3
2
|
require 'mocha/setup'
|
|
4
3
|
require 'English'
|
|
@@ -14,7 +13,7 @@ RSpec.configure do |c|
|
|
|
14
13
|
# Allow both "should" and "expect" syntax.
|
|
15
14
|
# https://www.relishapp.com/rspec/rspec-expectations/docs/syntax-configuration
|
|
16
15
|
c.expect_with :rspec do |e|
|
|
17
|
-
e.syntax = [
|
|
16
|
+
e.syntax = %i[should expect]
|
|
18
17
|
end
|
|
19
18
|
|
|
20
19
|
# Fail overall as soon as first test fails.
|
data/src/publish
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
set -u
|
|
4
|
+
|
|
5
|
+
. vars
|
|
6
|
+
|
|
7
|
+
mkdir -p ~/.gem/ || :
|
|
8
|
+
cp -f credentials ~/.gem/
|
|
9
|
+
chmod 0600 ~/.gem/credentials
|
|
10
|
+
sed -i "s/API_KEY/${API_KEY}/" ~/.gem/credentials
|
|
11
|
+
|
|
12
|
+
output="$(gem search --remote -a puppet-autostager)"
|
|
13
|
+
if echo ${output} | grep ${VERSION}; then
|
|
14
|
+
# Be informative, but don't fail.
|
|
15
|
+
# This enables to merge changes to non-gem files, such as README.
|
|
16
|
+
echo "puppet-autostager ${VERSION} has already been published."
|
|
17
|
+
else
|
|
18
|
+
gem push puppet-autostager-${VERSION}.gem || {
|
|
19
|
+
echo ERR: failed to push gem
|
|
20
|
+
exit 1
|
|
21
|
+
} >&2
|
|
22
|
+
fi
|
metadata
CHANGED
|
@@ -1,201 +1,187 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppet-autostager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Morgan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-07-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.3'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.3'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: friction
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ! '>='
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ! '>='
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
28
|
name: minitest
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
44
30
|
requirements:
|
|
45
|
-
- -
|
|
31
|
+
- - ">="
|
|
46
32
|
- !ruby/object:Gem::Version
|
|
47
33
|
version: '0'
|
|
48
34
|
type: :development
|
|
49
35
|
prerelease: false
|
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
37
|
requirements:
|
|
52
|
-
- -
|
|
38
|
+
- - ">="
|
|
53
39
|
- !ruby/object:Gem::Version
|
|
54
40
|
version: '0'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
42
|
name: mocha
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
|
58
44
|
requirements:
|
|
59
|
-
- -
|
|
45
|
+
- - ">="
|
|
60
46
|
- !ruby/object:Gem::Version
|
|
61
47
|
version: '0'
|
|
62
48
|
type: :development
|
|
63
49
|
prerelease: false
|
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
51
|
requirements:
|
|
66
|
-
- -
|
|
52
|
+
- - ">="
|
|
67
53
|
- !ruby/object:Gem::Version
|
|
68
54
|
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: rake
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
72
58
|
requirements:
|
|
73
|
-
- -
|
|
59
|
+
- - ">="
|
|
74
60
|
- !ruby/object:Gem::Version
|
|
75
61
|
version: '0'
|
|
76
62
|
type: :development
|
|
77
63
|
prerelease: false
|
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
65
|
requirements:
|
|
80
|
-
- -
|
|
66
|
+
- - ">="
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
68
|
version: '0'
|
|
83
69
|
- !ruby/object:Gem::Dependency
|
|
84
70
|
name: rspec-core
|
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
|
86
72
|
requirements:
|
|
87
|
-
- -
|
|
73
|
+
- - ">="
|
|
88
74
|
- !ruby/object:Gem::Version
|
|
89
75
|
version: '0'
|
|
90
76
|
type: :development
|
|
91
77
|
prerelease: false
|
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
79
|
requirements:
|
|
94
|
-
- -
|
|
80
|
+
- - ">="
|
|
95
81
|
- !ruby/object:Gem::Version
|
|
96
82
|
version: '0'
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
name: rspec
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
|
100
86
|
requirements:
|
|
101
|
-
- -
|
|
87
|
+
- - ">="
|
|
102
88
|
- !ruby/object:Gem::Version
|
|
103
89
|
version: '3.0'
|
|
104
|
-
- - <=
|
|
90
|
+
- - "<="
|
|
105
91
|
- !ruby/object:Gem::Version
|
|
106
92
|
version: '4.0'
|
|
107
93
|
type: :development
|
|
108
94
|
prerelease: false
|
|
109
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
110
96
|
requirements:
|
|
111
|
-
- -
|
|
97
|
+
- - ">="
|
|
112
98
|
- !ruby/object:Gem::Version
|
|
113
99
|
version: '3.0'
|
|
114
|
-
- - <=
|
|
100
|
+
- - "<="
|
|
115
101
|
- !ruby/object:Gem::Version
|
|
116
102
|
version: '4.0'
|
|
117
103
|
- !ruby/object:Gem::Dependency
|
|
118
104
|
name: rspec-expectations
|
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
|
120
106
|
requirements:
|
|
121
|
-
- -
|
|
107
|
+
- - ">="
|
|
122
108
|
- !ruby/object:Gem::Version
|
|
123
109
|
version: '0'
|
|
124
110
|
type: :development
|
|
125
111
|
prerelease: false
|
|
126
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
127
113
|
requirements:
|
|
128
|
-
- -
|
|
114
|
+
- - ">="
|
|
129
115
|
- !ruby/object:Gem::Version
|
|
130
116
|
version: '0'
|
|
131
117
|
- !ruby/object:Gem::Dependency
|
|
132
118
|
name: rspec-mocks
|
|
133
119
|
requirement: !ruby/object:Gem::Requirement
|
|
134
120
|
requirements:
|
|
135
|
-
- -
|
|
121
|
+
- - ">="
|
|
136
122
|
- !ruby/object:Gem::Version
|
|
137
123
|
version: '0'
|
|
138
124
|
type: :development
|
|
139
125
|
prerelease: false
|
|
140
126
|
version_requirements: !ruby/object:Gem::Requirement
|
|
141
127
|
requirements:
|
|
142
|
-
- -
|
|
128
|
+
- - ">="
|
|
143
129
|
- !ruby/object:Gem::Version
|
|
144
130
|
version: '0'
|
|
145
131
|
- !ruby/object:Gem::Dependency
|
|
146
132
|
name: rubocop
|
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
|
148
134
|
requirements:
|
|
149
|
-
- -
|
|
135
|
+
- - ">="
|
|
150
136
|
- !ruby/object:Gem::Version
|
|
151
137
|
version: '0'
|
|
152
138
|
type: :development
|
|
153
139
|
prerelease: false
|
|
154
140
|
version_requirements: !ruby/object:Gem::Requirement
|
|
155
141
|
requirements:
|
|
156
|
-
- -
|
|
142
|
+
- - ">="
|
|
157
143
|
- !ruby/object:Gem::Version
|
|
158
144
|
version: '0'
|
|
159
145
|
- !ruby/object:Gem::Dependency
|
|
160
146
|
name: thor
|
|
161
147
|
requirement: !ruby/object:Gem::Requirement
|
|
162
148
|
requirements:
|
|
163
|
-
- -
|
|
149
|
+
- - ">="
|
|
164
150
|
- !ruby/object:Gem::Version
|
|
165
151
|
version: '0'
|
|
166
152
|
type: :development
|
|
167
153
|
prerelease: false
|
|
168
154
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
155
|
requirements:
|
|
170
|
-
- -
|
|
156
|
+
- - ">="
|
|
171
157
|
- !ruby/object:Gem::Version
|
|
172
158
|
version: '0'
|
|
173
159
|
- !ruby/object:Gem::Dependency
|
|
174
160
|
name: json
|
|
175
161
|
requirement: !ruby/object:Gem::Requirement
|
|
176
162
|
requirements:
|
|
177
|
-
- -
|
|
163
|
+
- - ">="
|
|
178
164
|
- !ruby/object:Gem::Version
|
|
179
165
|
version: '0'
|
|
180
166
|
type: :runtime
|
|
181
167
|
prerelease: false
|
|
182
168
|
version_requirements: !ruby/object:Gem::Requirement
|
|
183
169
|
requirements:
|
|
184
|
-
- -
|
|
170
|
+
- - ">="
|
|
185
171
|
- !ruby/object:Gem::Version
|
|
186
172
|
version: '0'
|
|
187
173
|
- !ruby/object:Gem::Dependency
|
|
188
174
|
name: octokit
|
|
189
175
|
requirement: !ruby/object:Gem::Requirement
|
|
190
176
|
requirements:
|
|
191
|
-
- - ~>
|
|
177
|
+
- - "~>"
|
|
192
178
|
- !ruby/object:Gem::Version
|
|
193
179
|
version: '3.0'
|
|
194
180
|
type: :runtime
|
|
195
181
|
prerelease: false
|
|
196
182
|
version_requirements: !ruby/object:Gem::Requirement
|
|
197
183
|
requirements:
|
|
198
|
-
- - ~>
|
|
184
|
+
- - "~>"
|
|
199
185
|
- !ruby/object:Gem::Version
|
|
200
186
|
version: '3.0'
|
|
201
187
|
description: Create a puppet enviroment for each pull request
|
|
@@ -206,9 +192,9 @@ executables:
|
|
|
206
192
|
extensions: []
|
|
207
193
|
extra_rdoc_files: []
|
|
208
194
|
files:
|
|
209
|
-
- .editorconfig
|
|
210
|
-
- .gitignore
|
|
211
|
-
- .rubocop.yml
|
|
195
|
+
- ".editorconfig"
|
|
196
|
+
- ".gitignore"
|
|
197
|
+
- ".rubocop.yml"
|
|
212
198
|
- CONTRIBUTING.md
|
|
213
199
|
- Gemfile
|
|
214
200
|
- LICENSE.txt
|
|
@@ -232,7 +218,7 @@ files:
|
|
|
232
218
|
- spec/functional/placeholder_spec.rb
|
|
233
219
|
- spec/spec_helper.rb
|
|
234
220
|
- spec/unit/autostager_spec.rb
|
|
235
|
-
-
|
|
221
|
+
- src/publish
|
|
236
222
|
- templates/credentials
|
|
237
223
|
homepage: https://github.com/jumanjiman/autostager
|
|
238
224
|
licenses:
|
|
@@ -244,17 +230,17 @@ require_paths:
|
|
|
244
230
|
- lib
|
|
245
231
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
246
232
|
requirements:
|
|
247
|
-
- -
|
|
233
|
+
- - ">="
|
|
248
234
|
- !ruby/object:Gem::Version
|
|
249
235
|
version: '0'
|
|
250
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
237
|
requirements:
|
|
252
|
-
- -
|
|
238
|
+
- - ">="
|
|
253
239
|
- !ruby/object:Gem::Version
|
|
254
240
|
version: '0'
|
|
255
241
|
requirements: []
|
|
256
242
|
rubyforge_project:
|
|
257
|
-
rubygems_version: 2.
|
|
243
|
+
rubygems_version: 2.6.8
|
|
258
244
|
signing_key:
|
|
259
245
|
specification_version: 4
|
|
260
246
|
summary: Create a puppet enviroment for each pull request
|
|
@@ -262,4 +248,3 @@ test_files:
|
|
|
262
248
|
- spec/functional/placeholder_spec.rb
|
|
263
249
|
- spec/spec_helper.rb
|
|
264
250
|
- spec/unit/autostager_spec.rb
|
|
265
|
-
- spec/unit/friction_spec.rb
|
data/spec/unit/friction_spec.rb
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require 'spec_helper'
|
|
3
|
-
require 'friction'
|
|
4
|
-
require 'stringio'
|
|
5
|
-
|
|
6
|
-
# Monkey-patch kernel to capture stdout
|
|
7
|
-
# as workaround for friction gem. bleh.
|
|
8
|
-
#
|
|
9
|
-
# @todo submit PR against friction.
|
|
10
|
-
module Kernel
|
|
11
|
-
def capture_stdout
|
|
12
|
-
real_out, out = $stdout, StringIO.new
|
|
13
|
-
$stdout = out
|
|
14
|
-
yield
|
|
15
|
-
return out.string
|
|
16
|
-
ensure
|
|
17
|
-
$stdout = real_out
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
describe 'contributor friction' do
|
|
22
|
-
it 'there should not be any' do
|
|
23
|
-
out = capture_stdout { Friction.run! }
|
|
24
|
-
out.should =~ /Everything is in order/
|
|
25
|
-
end
|
|
26
|
-
end
|