appbundle-updater 0.6.0 → 0.6.2

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
  SHA256:
3
- metadata.gz: 0033e56c1360f863151178f2906594c55a3c750e4aa3dbb8c5f22d9924044c20
4
- data.tar.gz: 8e683ff3d05500361594ccd50d4cfa425a314149f58d70c7989733dcfbb61fc9
3
+ metadata.gz: 83350fc791859666a80b456a37c170eadb17bd65f3b8b2ed1cea6693c59c310d
4
+ data.tar.gz: 44ac86efaae18679694865a099427530aa3b8b3e5019c2ad8752b90c574bf3b7
5
5
  SHA512:
6
- metadata.gz: 9b1aa258555cb0e516214315aaf48a16d441fe8253fc3cc414d8cd3222ca71081f664fa99180edd367f769bb04c5baf11b5171e5912db28ab2b5c9781abb5ada
7
- data.tar.gz: 2df403deb090909e8a04826cd894f9af5f4a42317ef99db849fe1033bc67b3fe12ab925df1cee09a8f015a6463de64d8e5f502f8d981e6e32c81659432b3d02f
6
+ metadata.gz: 920752b237611bb3cc0b7a02130939ca97a0cb7b5c9b2ef91c2b275cc3598bfe89e0c98f226d677a525ef5cdd21fd3d6748ce4c447a308f632f1445eb3943b48
7
+ data.tar.gz: 8c5123743c1fb8a0c8d4d7f67070a8ee71770a227e9202e53226258b4435f10799fb1721b843ff99b7a20eb2935d5301ea91b1c1e4e7fdd51963460af2473a9e
@@ -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 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
2
3
  gemspec
3
4
 
4
- group :development do
5
+ group :test do
5
6
  gem "rake"
6
- gem "github_changelog_generator"
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")
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 "github_changelog_generator/task"
6
-
7
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
8
- config.issues = false
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 "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs"
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('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'appbundle_updater/version'
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.homepage = ""
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"]
@@ -43,24 +43,24 @@ def bin_dir
43
43
  chefdk.join("embedded/bin")
44
44
  end
45
45
 
46
- ENV['PATH'] = ( [ bin_dir ] + ENV['PATH'].split(File::PATH_SEPARATOR) ).join(File::PATH_SEPARATOR)
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
- ].freeze
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['PATH'] = bin_dir.to_s + File::PATH_SEPARATOR + ENV['_YOLO_PATH']
54
+ ENV["PATH"] = bin_dir.to_s + File::PATH_SEPARATOR + ENV["_YOLO_PATH"]
55
55
  puts " running: #{cmd}"
56
- output = `#{cmd} 2>&1` #FIXME: bash/zsh-ism, will not work on csh
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 = '././@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 == '' && entry.full_name.end_with?('/'))
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 == '' && !entry.full_name.end_with?('/'))
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 == '2' #Symlink!
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
- "Nordstrom/chef-vault",
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
- 'cookstyle',
159
- 'chef/cookstyle',
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
- "acrmp/foodcritic",
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 ( tarball )
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('appbundle-updater') do |tempfile|
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 { |opts|
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
@@ -1,3 +1,3 @@
1
1
  module AppbundleUpdater
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.2"
3
3
  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.0
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-03-29 00:00:00.000000000 Z
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.txt
23
+ - LICENSE
26
24
  - README.md
27
25
  - Rakefile
28
- - appbundler.gemspec
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
- - Apache2
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.5
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
@@ -1,11 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- Gemfile.lock
5
- tmp
6
- .rvmrc
7
- .rbenv-version
8
- .ruby-version
9
- .DS_Store
10
- .kitchen/
11
- .kitchen.local.yml
@@ -1,14 +0,0 @@
1
- ---
2
- driver:
3
- name: vagrant
4
-
5
- provisioner:
6
- name: shell
7
- data_path: bin
8
-
9
- platforms:
10
- - name: ubuntu-14.04
11
- - name: windows-2012r2-core
12
-
13
- suites:
14
- - name: default