reagan 0.7.0 → 0.8.0

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
  SHA1:
3
- metadata.gz: 15ec9f842a5eb1a06dd654d4f461da338026c746
4
- data.tar.gz: 45f46483cf968a1df4fc629c0243a785860fe4fd
3
+ metadata.gz: fa82dc3e27d070c5d66ca40b4088d68b21a9ca3d
4
+ data.tar.gz: d2c7fb3484aff6e8ab84f25a3271d061c75e1d25
5
5
  SHA512:
6
- metadata.gz: 8a8ff757808d472928da7a48c2dd08acffad84bfc4515bb0067db1d4018947253e5248cf2dd2aadf50b4492c8e5cde4cb28ad90f6adede0caa8025dd17d4550f
7
- data.tar.gz: 0b6c0efd5e6f93a94075130c75705a6c5ce2cb4ea18d9fb6f41f56b8bfc168c53f12302a3fcb2448348509ae048b59485141e476a32632f01f92a9493fe8da00
6
+ metadata.gz: dc48ac3f3659ae8d49a87f3dec1293d67bc183d9658ea6119a3b40eebab5456ffdbc79b73ecd44a00be10c8a283c825a71b130db1dc50db767f3f62c27362ad3
7
+ data.tar.gz: 033de188750db73a5881192a6b52bd9cc4fc386c0af37f168f0d58794d8c3391894bd8ac3dc0327a674e86cbf816f7e610968ddabd2d25d9bc9193ec32b5d360
data/lib/change.rb CHANGED
@@ -77,6 +77,8 @@ module Reagan
77
77
 
78
78
  # queries github for the files that have changed
79
79
  def query_gh(pull_num)
80
+ Octokit.auto_paginate = true # avoids issues with large commits
81
+ Octokit.api_endpoint = @config['github']['api_endpoint'] || 'https://api.github.com'
80
82
  gh = Octokit::Client.new(:access_token => @config['github']['auth_token'])
81
83
  files_from_pull(gh.pull_request_files(@config ['github']['repo'], pull_num))
82
84
  end
@@ -92,7 +94,7 @@ module Reagan
92
94
 
93
95
  # check to see if the file exists in the workspace so we don't test deleted objects
94
96
  def object_still_exists(file)
95
- ::File.exist?(::File.join(@config['jenkins']['workspace_dir'],file))
97
+ ::File.exist?(::File.join(@config['jenkins']['workspace_dir'], file))
96
98
  end
97
99
 
98
100
  # builds a hash of files / cookbooks that changed based on the pull data from GH
@@ -105,7 +107,7 @@ module Reagan
105
107
  files['environments'] << file && next if file.match('^environments') && object_still_exists(file)
106
108
  files['roles'] << file && next if file.match('^roles') && object_still_exists(file)
107
109
  files['data_bags'] << file && next if file.match('^data_bags') && object_still_exists(file)
108
- cookbooks << file.split('/')[1] if file.match('^cookbooks') && object_still_exists(::File.join('cookbooks/', file.split('/')[1]))
110
+ cookbooks << file.split('/')[1] if file.match('^cookbooks') && object_still_exists(::File.join('cookbooks/', file.split('/')[1]))
109
111
  end
110
112
  # set cookbooks array to set to dedupe list of cookbooks
111
113
  files['cookbooks'] = cookbooks.to_set
data/reagan.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'reagan'
3
- s.version = '0.7.0'
3
+ s.version = '0.8.0'
4
4
  s.date = Date.today.to_s
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.extra_rdoc_files = ['README.md', 'LICENSE']
data/reagan.yml.EXAMPLE CHANGED
@@ -1,6 +1,7 @@
1
1
  github:
2
2
  auth_token: 1234abcde1234abcde
3
3
  repo: MyCo/chef-repo
4
+ api_endpoint: http://github.mycorp.dmz/api/v3 (This is optional for GH enterprise users)
4
5
  jenkins:
5
6
  workspace_dir: '/home/jenkins/workspace/chef-repo/'
6
7
  chef:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reagan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Smith