appbundle-updater 0.6.0 → 0.6.2
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 +4 -4
- data/CHANGELOG.md +25 -2
- data/Gemfile +16 -3
- data/{LICENSE.txt → LICENSE} +0 -0
- data/Rakefile +20 -10
- data/VERSION +1 -0
- data/{appbundler.gemspec → appbundle-updater.gemspec} +4 -5
- data/bin/appbundle-updater +26 -26
- data/lib/appbundle_updater/version.rb +1 -1
- metadata +7 -8
- data/.gitignore +0 -11
- data/.kitchen.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83350fc791859666a80b456a37c170eadb17bd65f3b8b2ed1cea6693c59c310d
|
4
|
+
data.tar.gz: 44ac86efaae18679694865a099427530aa3b8b3e5019c2ad8752b90c574bf3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920752b237611bb3cc0b7a02130939ca97a0cb7b5c9b2ef91c2b275cc3598bfe89e0c98f226d677a525ef5cdd21fd3d6748ce4c447a308f632f1445eb3943b48
|
7
|
+
data.tar.gz: 8c5123743c1fb8a0c8d4d7f67070a8ee71770a227e9202e53226258b4435f10799fb1721b843ff99b7a20eb2935d5301ea91b1c1e4e7fdd51963460af2473a9e
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,27 @@
|
|
1
|
-
# Change Log
|
1
|
+
# appbundle-updater Change Log
|
2
|
+
|
3
|
+
<!-- latest_release 0.6.2 -->
|
4
|
+
## [v0.6.2](https://github.com/chef/appbundle-updater/tree/v0.6.2) (2018-10-10)
|
5
|
+
|
6
|
+
#### Merged Pull Requests
|
7
|
+
- Rename the gemspec to match the gem name [#31](https://github.com/chef/appbundle-updater/pull/31) ([tas50](https://github.com/tas50))
|
8
|
+
<!-- latest_release -->
|
9
|
+
|
10
|
+
<!-- release_rollup since=0.6.0 -->
|
11
|
+
### Changes not yet released to rubygems.org
|
12
|
+
|
13
|
+
#### Merged Pull Requests
|
14
|
+
- Rename the gemspec to match the gem name [#31](https://github.com/chef/appbundle-updater/pull/31) ([tas50](https://github.com/tas50)) <!-- 0.6.2 -->
|
15
|
+
<!-- release_rollup -->
|
16
|
+
|
17
|
+
<!-- latest_stable_release -->
|
18
|
+
## [v0.6.1](https://github.com/chef/appbundle-updater/tree/v0.6.1) (2018-10-09)
|
19
|
+
|
20
|
+
#### Merged Pull Requests
|
21
|
+
- Fix the license string and limit the files we ship in the gem [#30](https://github.com/chef/appbundle-updater/pull/30) ([tas50](https://github.com/tas50))
|
22
|
+
<!-- latest_stable_release -->
|
23
|
+
|
24
|
+
|
2
25
|
|
3
26
|
## [0.6.0](https://github.com/chef/appbundle-updater/tree/HEAD)
|
4
27
|
|
@@ -164,4 +187,4 @@
|
|
164
187
|
|
165
188
|
## [v0.0.1](https://github.com/chef/appbundle-updater/tree/v0.0.1) (2015-09-23)
|
166
189
|
|
167
|
-
- _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
|
190
|
+
- _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
|
data/Gemfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
2
3
|
gemspec
|
3
4
|
|
4
|
-
group :
|
5
|
+
group :test do
|
5
6
|
gem "rake"
|
6
|
-
gem "
|
7
|
+
gem "chefstyle"
|
8
|
+
end
|
9
|
+
|
10
|
+
group :debug do
|
11
|
+
gem "pry"
|
12
|
+
gem "pry-byebug"
|
13
|
+
gem "pry-stack_explorer"
|
7
14
|
end
|
15
|
+
|
16
|
+
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
17
|
+
|
18
|
+
# If you want to load debugging tools into the bundle exec sandbox,
|
19
|
+
# add these additional dependencies into Gemfile.local
|
20
|
+
eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/Rakefile
CHANGED
@@ -1,16 +1,26 @@
|
|
1
|
-
require "appbundle_updater/version"
|
2
1
|
require "bundler/gem_tasks"
|
2
|
+
task default: [:style]
|
3
3
|
|
4
4
|
begin
|
5
|
-
require "
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
config.future_release = AppbundleUpdater::VERSION
|
10
|
-
config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature".split(",")
|
11
|
-
config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
|
12
|
-
config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion".split(",")
|
5
|
+
require "chefstyle"
|
6
|
+
require "rubocop/rake_task"
|
7
|
+
RuboCop::RakeTask.new(:style) do |task|
|
8
|
+
task.options += ["--display-cop-names", "--no-color"]
|
13
9
|
end
|
14
10
|
rescue LoadError
|
15
|
-
puts "
|
11
|
+
puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
|
12
|
+
end
|
13
|
+
|
14
|
+
begin
|
15
|
+
require "yard"
|
16
|
+
YARD::Rake::YardocTask.new(:docs)
|
17
|
+
rescue LoadError
|
18
|
+
puts "yard is not available. bundle install first to make sure all dependencies are installed."
|
19
|
+
end
|
20
|
+
|
21
|
+
task :console do
|
22
|
+
require "irb"
|
23
|
+
require "irb/completion"
|
24
|
+
ARGV.clear
|
25
|
+
IRB.start
|
16
26
|
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.6.2
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "appbundle_updater/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "appbundle-updater"
|
@@ -10,11 +10,10 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["lamont@chef.io"]
|
11
11
|
spec.description = %q{Updates appbundled apps in Chef's omnibus packages}
|
12
12
|
spec.summary = spec.description
|
13
|
-
spec.
|
14
|
-
spec.license = "Apache2"
|
13
|
+
spec.license = "Apache-2.0"
|
15
14
|
spec.homepage = "https://github.com/chef/appbundle-updater"
|
16
15
|
|
17
|
-
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.files = `git ls-files`.split($/).select { |x| !/^\./.match(x) }
|
18
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
19
|
spec.require_paths = ["lib"]
|
data/bin/appbundle-updater
CHANGED
@@ -43,24 +43,24 @@ def bin_dir
|
|
43
43
|
chefdk.join("embedded/bin")
|
44
44
|
end
|
45
45
|
|
46
|
-
ENV[
|
46
|
+
ENV["PATH"] = ( [ bin_dir ] + ENV["PATH"].split(File::PATH_SEPARATOR) ).join(File::PATH_SEPARATOR)
|
47
47
|
|
48
|
-
ENV_KEYS = %w
|
48
|
+
ENV_KEYS = %w{
|
49
49
|
BUNDLE_BIN_PATH BUNDLE_GEMFILE GEM_HOME GEM_PATH GEM_ROOT IRBRC MY_RUBY_HOME RUBYLIB RUBYOPT RUBY_ENGINE RUBY_ROOT RUBY_VERSION _ORIGINAL_GEM_PATH PATH
|
50
|
-
|
50
|
+
}.freeze
|
51
51
|
|
52
52
|
def run(cmd)
|
53
53
|
ENV_KEYS.each { |key| ENV["_YOLO_#{key}"] = ENV[key]; ENV.delete(key) }
|
54
|
-
ENV[
|
54
|
+
ENV["PATH"] = bin_dir.to_s + File::PATH_SEPARATOR + ENV["_YOLO_PATH"]
|
55
55
|
puts " running: #{cmd}"
|
56
|
-
output = `#{cmd} 2>&1`
|
56
|
+
output = `#{cmd} 2>&1` #FIXME: bash/zsh-ism, will not work on csh
|
57
57
|
unless $?.exited? && $?.exitstatus == 0
|
58
58
|
raise("Command [#{cmd}] failed!\n\n---BEGIN OUTPUT--\n#{output}\n---END OUTPUT--\n")
|
59
59
|
end
|
60
60
|
ENV_KEYS.each { |key| ENV[key] = ENV.delete("_YOLO_#{key}") }
|
61
61
|
end
|
62
62
|
|
63
|
-
TAR_LONGLINK =
|
63
|
+
TAR_LONGLINK = "././@LongLink"
|
64
64
|
|
65
65
|
def install_package_dependencies
|
66
66
|
banner("Installing Packages")
|
@@ -84,7 +84,7 @@ end
|
|
84
84
|
|
85
85
|
# pure ruby `tar xzf`, handles longlinks and directories ending in '/'
|
86
86
|
# (http://stackoverflow.com/a/31310593/506908)
|
87
|
-
def extract_tgz(file, destination =
|
87
|
+
def extract_tgz(file, destination = ".")
|
88
88
|
# NOTE: THIS IS DELIBERATELY PURE RUBY USING NO NATIVE GEMS AND ONLY
|
89
89
|
# THE RUBY STDLIB BY DESIGN
|
90
90
|
Gem::Package::TarReader.new( Zlib::GzipReader.open file ) do |tar|
|
@@ -95,16 +95,16 @@ def extract_tgz(file, destination = '.')
|
|
95
95
|
next
|
96
96
|
end
|
97
97
|
dest ||= File.join destination, entry.full_name
|
98
|
-
if entry.directory? || (entry.header.typeflag ==
|
98
|
+
if entry.directory? || (entry.header.typeflag == "" && entry.full_name.end_with?("/"))
|
99
99
|
File.delete dest if File.file? dest
|
100
100
|
FileUtils.mkdir_p dest, :mode => entry.header.mode, :verbose => false
|
101
|
-
elsif entry.file? || (entry.header.typeflag ==
|
101
|
+
elsif entry.file? || (entry.header.typeflag == "" && !entry.full_name.end_with?("/"))
|
102
102
|
FileUtils.rm_rf dest if File.directory? dest
|
103
103
|
File.open dest, "wb" do |f|
|
104
104
|
f.print entry.read
|
105
105
|
end
|
106
106
|
FileUtils.chmod entry.header.mode, dest, :verbose => false
|
107
|
-
elsif entry.header.typeflag ==
|
107
|
+
elsif entry.header.typeflag == "2" #Symlink!
|
108
108
|
File.symlink entry.header.linkname, dest
|
109
109
|
else
|
110
110
|
puts "Unkown tar entry: #{entry.full_name} type: #{entry.header.typeflag}."
|
@@ -132,39 +132,39 @@ CHEFDK_APPS = [
|
|
132
132
|
"berkshelf",
|
133
133
|
"berkshelf/berkshelf",
|
134
134
|
"guard test",
|
135
|
-
"#{bin_dir.join("rake")} install"
|
135
|
+
"#{bin_dir.join("rake")} install"
|
136
136
|
),
|
137
137
|
App.new(
|
138
138
|
"chef",
|
139
139
|
"chef/chef",
|
140
140
|
# from chef/version_policy.rb INSTALL_WITHOUT_GROUPS
|
141
141
|
"changelog development docgen guard integration maintenance tools travis style",
|
142
|
-
chef_install_command
|
142
|
+
chef_install_command
|
143
143
|
),
|
144
144
|
App.new(
|
145
145
|
"chef-dk",
|
146
146
|
"chef/chef-dk",
|
147
147
|
# from chef-dk/version_policy.rb INSTALL_WITHOUT_GROUPS
|
148
148
|
"changelog compat_testing development docgen guard integration maintenance test tools travis style",
|
149
|
-
"#{bin_dir.join("rake")} install"
|
149
|
+
"#{bin_dir.join("rake")} install"
|
150
150
|
),
|
151
151
|
App.new(
|
152
152
|
"chef-vault",
|
153
|
-
"
|
153
|
+
"chef/chef-vault",
|
154
154
|
"test",
|
155
|
-
"#{bin_dir.join("rake")} install"
|
155
|
+
"#{bin_dir.join("rake")} install"
|
156
156
|
),
|
157
157
|
App.new(
|
158
|
-
|
159
|
-
|
158
|
+
"cookstyle",
|
159
|
+
"chef/cookstyle",
|
160
160
|
nil,
|
161
|
-
"#{bin_dir.join("rake")} install"
|
161
|
+
"#{bin_dir.join("rake")} install"
|
162
162
|
),
|
163
163
|
App.new(
|
164
164
|
"foodcritic",
|
165
|
-
"
|
165
|
+
"foodcritic/foodcritic",
|
166
166
|
nil,
|
167
|
-
"#{bin_dir.join("rake")} install"
|
167
|
+
"#{bin_dir.join("rake")} install"
|
168
168
|
),
|
169
169
|
App.new(
|
170
170
|
"inspec",
|
@@ -175,13 +175,13 @@ CHEFDK_APPS = [
|
|
175
175
|
"ohai",
|
176
176
|
"chef/ohai",
|
177
177
|
"test",
|
178
|
-
"#{bin_dir.join("rake")} install"
|
178
|
+
"#{bin_dir.join("rake")} install"
|
179
179
|
),
|
180
180
|
App.new(
|
181
181
|
"test-kitchen",
|
182
182
|
"test-kitchen/test-kitchen",
|
183
183
|
"guard test",
|
184
|
-
"#{bin_dir.join("rake")} install"
|
184
|
+
"#{bin_dir.join("rake")} install"
|
185
185
|
)
|
186
186
|
].freeze
|
187
187
|
|
@@ -211,13 +211,13 @@ class Updater
|
|
211
211
|
|
212
212
|
install_package_dependencies
|
213
213
|
|
214
|
-
if
|
214
|
+
if tarball
|
215
215
|
# NOTE: THIS IS DELIBERATELY PURE RUBY USING NO NATIVE GEMS AND ONLY
|
216
216
|
# THE RUBY STDLIB BY DESIGN
|
217
217
|
git_url = "https://github.com/#{repo}/archive/#{ref}.tar.gz"
|
218
218
|
banner("Extracting #{app} from #{git_url}")
|
219
219
|
Dir.chdir(chefdk.join("embedded/apps")) do
|
220
|
-
Tempfile.open(
|
220
|
+
Tempfile.open("appbundle-updater") do |tempfile|
|
221
221
|
tempfile.binmode
|
222
222
|
open(git_url) do |uri|
|
223
223
|
tempfile.write(uri.read)
|
@@ -286,7 +286,7 @@ class CLI
|
|
286
286
|
|
287
287
|
def initialize
|
288
288
|
@options = Hash.new
|
289
|
-
@parser = OptionParser.new
|
289
|
+
@parser = OptionParser.new do |opts|
|
290
290
|
opts.banner = "Usage: #{$0} PROJECT APP_NAME GIT_REF"
|
291
291
|
opts.on("-t", "--[no-]tarball", "Do a tarball download instead of git clone") do |t|
|
292
292
|
options[:tarball] = t
|
@@ -301,7 +301,7 @@ class CLI
|
|
301
301
|
opts.separator("")
|
302
302
|
opts.separator("App names:")
|
303
303
|
CHEFDK_APPS.each { |a| opts.separator(" * #{a.name}") }
|
304
|
-
|
304
|
+
end
|
305
305
|
@parser.parse!
|
306
306
|
validate!
|
307
307
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appbundle-updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lamont-granquist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Updates appbundled apps in Chef's omnibus packages
|
14
14
|
email:
|
@@ -18,21 +18,20 @@ executables:
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- ".gitignore"
|
22
|
-
- ".kitchen.yml"
|
23
21
|
- CHANGELOG.md
|
24
22
|
- Gemfile
|
25
|
-
- LICENSE
|
23
|
+
- LICENSE
|
26
24
|
- README.md
|
27
25
|
- Rakefile
|
28
|
-
-
|
26
|
+
- VERSION
|
27
|
+
- appbundle-updater.gemspec
|
29
28
|
- bin/appbundle-updater
|
30
29
|
- lib/appbundle_updater/version.rb
|
31
30
|
- test/integration/bootstrap.ps1
|
32
31
|
- test/integration/bootstrap.sh
|
33
32
|
homepage: https://github.com/chef/appbundle-updater
|
34
33
|
licenses:
|
35
|
-
-
|
34
|
+
- Apache-2.0
|
36
35
|
metadata: {}
|
37
36
|
post_install_message:
|
38
37
|
rdoc_options: []
|
@@ -50,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
49
|
version: '0'
|
51
50
|
requirements: []
|
52
51
|
rubyforge_project:
|
53
|
-
rubygems_version: 2.7.
|
52
|
+
rubygems_version: 2.7.6
|
54
53
|
signing_key:
|
55
54
|
specification_version: 4
|
56
55
|
summary: Updates appbundled apps in Chef's omnibus packages
|
data/.gitignore
DELETED