arfor 0.4.0 → 0.5.1

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: 37e69a377781896f58d64cf952d3d3adb5354ba9
4
- data.tar.gz: 5ad856f55141de3e2aac963903fcb5910e9bf491
3
+ metadata.gz: 1525985237362f2ec30862ff0195a173e5fee94c
4
+ data.tar.gz: a4f89b20bf4f61ca08d7ee52cc270e20c6a122c3
5
5
  SHA512:
6
- metadata.gz: 768207f612154e3a9e06171f7ee78fe92e0c599596b5ef3754a4d06debc0d2bd05b60f42b0ed5e3692963178b29db867d3c1010649b58921fef6105bb6c4fe68
7
- data.tar.gz: 300175aa21e004da8fa7f38dd3719cf844ee7e8367be9762fe99e3ae2d19cddaee0ce50c3651489425febc2a615ccb8050059e8de9e209f267626b9f4da63e39
6
+ metadata.gz: 329a98aecc4ab5db21c99b6d4e9249002827be8f69f6708b26b98b3191888a3a9d3b36dd2a3642e695712b00fd0864f25409a22b69bfbb73931ecf2934b66cba
7
+ data.tar.gz: 9cf4cd422594bf4744f76343d19bb3f15d18a4bd6d68160707263e0d0775158b58fdbc1567e9e180aebfe0ebaac198f6e3e617d0c1a05c335feb4ec621950ac1
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /pkg/
9
9
  /spec/reports/
10
10
  /tmp/
11
+ /.idea
data/README.md CHANGED
@@ -22,6 +22,18 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
+ ### Making puppet forge modules
26
+ ```
27
+ arfor github_module
28
+ ```
29
+
30
+ #### Features
31
+ * Metadata and github descriptions written
32
+ * PDQTest installed
33
+ * README.md re-written with link to reference docs
34
+ * Enable travis-ci testing
35
+
36
+
25
37
  ### Making control repositories
26
38
  ```
27
39
  arfor control_repo
@@ -6,12 +6,12 @@ require 'arfor/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "arfor"
8
8
  spec.version = Arfor::VERSION
9
- spec.authors = ["Geoff Williams"]
10
- spec.email = ["geoff.williams@puppet.com"]
9
+ spec.authors = ["Declarative Systems"]
10
+ spec.email = ["sales@declarativesystems.com"]
11
11
 
12
12
  spec.summary = %q{a cool tool to download bits n pieces for puppet}
13
13
  spec.description = %q{make puppet installers quicker and more reliable}
14
- spec.homepage = "https://github.com/GeoffWilliams/arfor/"
14
+ spec.homepage = "https://github.com/declarativesystems/arfor/"
15
15
  spec.license = "Apache-2.0"
16
16
 
17
17
 
@@ -22,18 +22,18 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.13"
26
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "bundler", "~> 1.15"
26
+ spec.add_development_dependency "rake", "~> 12.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.0"
28
28
  spec.add_development_dependency "fakefs", "0.10.2"
29
29
  spec.add_development_dependency "sinatra", "1.4.8"
30
30
 
31
31
  spec.add_runtime_dependency "escort", "0.4.0"
32
- spec.add_runtime_dependency "pe_info", "0.1.4"
33
- spec.add_runtime_dependency 'ruby-progressbar', '1.8.1'
32
+ spec.add_runtime_dependency "pe_info", "0.2.1"
33
+ spec.add_runtime_dependency 'ruby-progressbar', '1.9.0'
34
34
  spec.add_runtime_dependency "octokit", "~> 4.0"
35
35
  spec.add_runtime_dependency "highline", "1.7.8"
36
36
  spec.add_runtime_dependency "puppet"
37
- spec.add_runtime_dependency "pdqtest", "0.4.3"
37
+ spec.add_runtime_dependency "pdqtest", "0.10.0"
38
38
  spec.add_runtime_dependency "travis"
39
39
  end
data/exe/arfor CHANGED
@@ -15,6 +15,21 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
+
19
+ # Inline bundler makes us always use bundler to bundle our bundles because
20
+ # there is a conflict for faraday version between puppet_forge and one of
21
+ # the other gems in use. Bundler will automatically resolve this as long
22
+ # as its used at _any_ level. This is equivalent to making a tempdir with
23
+ # a Gemfile and running from there, eg this restores functionality with the
24
+ # native ruby running outside of bundler (by forcing bundler to load)
25
+ require 'bundler/inline'
26
+
27
+ gemfile do
28
+ source 'https://rubygems.org'
29
+ gem 'arfor'
30
+ end
31
+
32
+
18
33
  require 'escort'
19
34
  require 'arfor'
20
35
  require 'arfor/agent_installers'
@@ -36,17 +51,10 @@ Escort::App.create do |app|
36
51
  command.summary "Download agents"
37
52
  command.description "Download agent installers locally for faster deployments"
38
53
  command.options do |opts|
39
- opts.opt(:pe_version,
40
- 'PE version to download agents for (not needed if tarball specified)',
41
- :long => '--pe-version',
42
- :type => :string,
43
- :default => '2016.4.2'
44
- )
45
- opts.opt(:agent_version,
46
- 'Agent version to download (not needed if tarball specified)',
47
- :long => '--agent-version',
48
- :type => :string,
49
- :default => '1.7.1'
54
+ opts.opt(:print_urls,
55
+ 'Just print the URLS we would use, dont download anything',
56
+ :long => '--print-urls',
57
+ :type => :boolean,
50
58
  )
51
59
  opts.opt(:pe_tarball,
52
60
  'Point Arfor at a PE Master tarball to automatically obtain the correct installers',
@@ -55,14 +63,13 @@ Escort::App.create do |app|
55
63
  )
56
64
  end
57
65
  command.action do |options, arguments|
58
- cmd = :agent_installers # FIXME obtain this automatically
59
- pe_version = options[:global][:commands][cmd][:options][:pe_version]
60
- agent_version = options[:global][:commands][cmd][:options][:agent_version]
61
- pe_tarball = options[:global][:commands][cmd][:options][:pe_tarball]
66
+ cmd = :agent_installers # FIXME obtain this automatically
67
+ print_urls = options[:global][:commands][cmd][:options][:print_urls]
68
+ pe_tarball = options[:global][:commands][cmd][:options][:pe_tarball]
62
69
  if pe_tarball
63
- pe_version, agent_version = PeInfo::Tarball::inspect(pe_tarball)
70
+ pe_version, agent_version, supported_platforms = PeInfo::Tarball::inspect(pe_tarball)
64
71
  end
65
- Arfor::AgentInstallers::download(pe_version, agent_version)
72
+ Arfor::AgentInstallers::download(pe_version, agent_version, supported_platforms, print_urls)
66
73
  end
67
74
 
68
75
  app.command :gems do |command|
@@ -18,51 +18,6 @@ require 'fileutils'
18
18
  module Arfor
19
19
  module AgentInstallers
20
20
 
21
- # platforms list obtained by running
22
- # cd /opt/puppetlabs/puppet/modules/pe_repo/manifests
23
- # cat platform/*.pp | grep pe_repo::
24
- # on a puppet enterprise master - you will have to clean up the output...
25
-
26
- PLATFORMS = [
27
- 'aix-5.3-power',
28
- 'aix-6.1-power',
29
- 'aix-7.1-power',
30
- 'debian-7-amd64',
31
- 'debian-7-i386',
32
- 'debian-8-amd64',
33
- 'debian-8-i386',
34
- 'el-4-i386',
35
- 'el-4-x86_64',
36
- 'el-5-i386',
37
- 'el-5-x86_64',
38
- 'el-6-i386',
39
- 'el-6-s390x',
40
- 'el-6-x86_64',
41
- 'el-7-s390x',
42
- 'el-7-x86_64',
43
- 'fedora-23-i386',
44
- 'fedora-23-x86_64',
45
- 'fedora-24-i386',
46
- 'fedora-24-x86_64',
47
- 'fedora-25-i386',
48
- 'fedora-25-x86_64',
49
- 'sles-11-i386',
50
- 'sles-11-x86_64',
51
- 'sles-12-x86_64',
52
- 'solaris-10-i386',
53
- 'solaris-10-sparc',
54
- 'solaris-11-i386',
55
- 'solaris-11-sparc',
56
- 'ubuntu-12.04-amd64',
57
- 'ubuntu-12.04-i386',
58
- 'ubuntu-14.04-amd64',
59
- 'ubuntu-14.04-i386',
60
- 'ubuntu-16.04-amd64',
61
- 'ubuntu-16.04-i386',
62
- 'ubuntu-16.10-amd64',
63
- 'ubuntu-16.10-i386',
64
- ]
65
-
66
21
  WINDOWS = [
67
22
  'x86',
68
23
  'x64',
@@ -80,7 +35,7 @@ module Arfor
80
35
  @@base_url
81
36
  end
82
37
 
83
- def self.download(pe_version, agent_version)
38
+ def self.download(pe_version, agent_version, supported_platforms, print_urls)
84
39
 
85
40
  base_url_agent = "#{@@base_url}/#{pe_version}/#{agent_version}/repos"
86
41
  base_url_normal = "#{base_url_agent}/puppet-agent-"
@@ -93,14 +48,22 @@ module Arfor
93
48
  FileUtils.mkdir_p(download_dir)
94
49
  end
95
50
  Dir.chdir(download_dir) do
96
- PLATFORMS.each { |platform|
51
+ supported_platforms.each { |platform|
97
52
  url = "#{base_url_normal}#{platform}#{suffix}"
98
- Arfor::Download::get(url)
53
+ if print_urls
54
+ puts url
55
+ else
56
+ Arfor::Download::get(url)
57
+ end
99
58
  }
100
59
 
101
60
  WINDOWS.each { |platform|
102
61
  url = "#{base_url_windows}#{platform}#{suffix_windows}"
103
- Arfor::Download::get(url)
62
+ if print_urls
63
+ puts url
64
+ else
65
+ Arfor::Download::get(url)
66
+ end
104
67
  }
105
68
  end
106
69
  end
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Arfor
18
- VERSION = "0.4.0"
18
+ VERSION = "0.5.1"
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arfor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
- - Geoff Williams
7
+ - Declarative Systems
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2018-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '1.15'
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
- version: '1.13'
26
+ version: '1.15'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '12.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '12.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.4
103
+ version: 0.2.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.4
110
+ version: 0.2.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: ruby-progressbar
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 1.8.1
117
+ version: 1.9.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 1.8.1
124
+ version: 1.9.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: octokit
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.4.3
173
+ version: 0.10.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 0.4.3
180
+ version: 0.10.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: travis
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  version: '0'
195
195
  description: make puppet installers quicker and more reliable
196
196
  email:
197
- - geoff.williams@puppet.com
197
+ - sales@declarativesystems.com
198
198
  executables:
199
199
  - arfor
200
200
  extensions: []
@@ -225,7 +225,7 @@ files:
225
225
  - res/control_repo/Puppetfile.mock
226
226
  - res/control_repo/README.md
227
227
  - res/puppet_module/README.md.erb
228
- homepage: https://github.com/GeoffWilliams/arfor/
228
+ homepage: https://github.com/declarativesystems/arfor/
229
229
  licenses:
230
230
  - Apache-2.0
231
231
  metadata: {}
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 2.5.2
248
+ rubygems_version: 2.6.14
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: a cool tool to download bits n pieces for puppet