puppet-autostager 0.0.8 → 0.0.9
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 +8 -8
- data/README.md +3 -0
- data/circle.yml +2 -5
- data/lib/autostager.rb +7 -1
- data/lib/autostager/version.rb +1 -1
- data/script/push.sh +14 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzU0ZTkxMjMwYzUyNDRiNjg3ZTdiNmY1YTc3MjUyYjkwZGYwMjczMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGU1ZjkzYTAzZTU4NDY5YWYyY2VmMThkMTYxMjQ5YjhhODQxOTY0ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWI5MWIxOWZmMDhhYjU5OWUyNTkwYzM4ZGRlY2Y0ZjM0YmQ4N2RmMDU3M2Uy
|
10
|
+
ZDUxODNiNmNiYzQ2ZTg1Nzk1Yzk3NmFhMzkxNWFhYjFkYzE3OGFlNjBmMzcy
|
11
|
+
NjEyMjFmMjk2ZWZjYmRiNzcxZTIzOWI3NjcwMGI1MWUzMzE2YjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjEyOTg3ZjdjM2ViNzUzMWE0NzI2ODE2ZjliZjhkNTgxZWIyZDY0MzA2ZjE2
|
14
|
+
NzE3YjNlYzMxYzgwZTkzYjIxNDJhMWJjZDFhYWQyNzUxODA5NjE2NmY1YjVl
|
15
|
+
YWUzNmFjZDhlZTk2M2FhZWRiNzY0YTI1NWI4ZTkzZmM2ZmJmY2Y=
|
data/README.md
CHANGED
@@ -35,6 +35,9 @@ export access_token=<your 40-char token>
|
|
35
35
|
export base_dir=/tmp/puppet/environments
|
36
36
|
export debug=anything
|
37
37
|
|
38
|
+
# Set a timeout for git operations (default 120 seconds).
|
39
|
+
export timeout=180
|
40
|
+
|
38
41
|
# Override the default 30 second interval.
|
39
42
|
export sleep_interval=60
|
40
43
|
|
data/circle.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
machine:
|
2
2
|
environment:
|
3
3
|
# If you change this, you need to change lib/autostager/version.rb
|
4
|
-
VERSION: 0.0.
|
4
|
+
VERSION: 0.0.9
|
5
5
|
|
6
6
|
test:
|
7
7
|
post:
|
@@ -14,7 +14,4 @@ deployment:
|
|
14
14
|
branch: master
|
15
15
|
owner: jumanjihouse
|
16
16
|
commands:
|
17
|
-
-
|
18
|
-
- chmod 0600 ~/.gem/credentials
|
19
|
-
- sed -i "s/API_KEY/${API_KEY}/" ~/.gem/credentials
|
20
|
-
- gem push puppet-autostager-${VERSION}.gem
|
17
|
+
- script/push.sh
|
data/lib/autostager.rb
CHANGED
@@ -126,6 +126,12 @@ module Autostager
|
|
126
126
|
@client ||= Octokit::Client.new(access_token: access_token)
|
127
127
|
end
|
128
128
|
|
129
|
+
def timeout_seconds
|
130
|
+
ENV['timeout'].to_i || 120
|
131
|
+
rescue
|
132
|
+
120
|
133
|
+
end
|
134
|
+
|
129
135
|
# A list of directories we never discard.
|
130
136
|
def safe_dirs
|
131
137
|
[
|
@@ -161,7 +167,7 @@ module Autostager
|
|
161
167
|
end
|
162
168
|
|
163
169
|
# Process current PRs.
|
164
|
-
Autostager::Timeout.timeout(
|
170
|
+
Autostager::Timeout.timeout(timeout_seconds, GitTimeout) do
|
165
171
|
prs.each { |pr| process_pull pr }
|
166
172
|
end
|
167
173
|
rescue Octokit::Unauthorized => e
|
data/lib/autostager/version.rb
CHANGED
data/script/push.sh
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
cp -f templates/credentials ~/.gem/
|
4
|
+
chmod 0600 ~/.gem/credentials
|
5
|
+
sed -i "s/API_KEY/${API_KEY}/" ~/.gem/credentials
|
6
|
+
|
7
|
+
gem search --remote -a puppet-autostager | grep ${VERSION}
|
8
|
+
if [[ $? -eq 0 ]]; then
|
9
|
+
# Be informative, but don't fail.
|
10
|
+
# This enables to merge changes to non-gem files, such as README.
|
11
|
+
echo "puppet-autostager ${VERSION} has already been published."
|
12
|
+
else
|
13
|
+
gem push puppet-autostager-${VERSION}.gem
|
14
|
+
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -227,6 +227,7 @@ files:
|
|
227
227
|
- lib/autostager/version.rb
|
228
228
|
- script/bootstrap
|
229
229
|
- script/functions
|
230
|
+
- script/push.sh
|
230
231
|
- script/test
|
231
232
|
- spec/functional/placeholder_spec.rb
|
232
233
|
- spec/spec_helper.rb
|