berkshelf 0.1.3 → 0.1.4

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.
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.required_ruby_version = ">= 1.9.1"
18
18
 
19
19
  s.add_runtime_dependency 'dep_selector'
20
- s.add_runtime_dependency 'chef', '~> 0.10.0'
20
+ s.add_runtime_dependency 'chef', '~> 10.12.0'
21
21
  s.add_runtime_dependency 'minitar'
22
22
  s.add_runtime_dependency 'thor', '~> 0.15.2'
23
23
 
@@ -0,0 +1,37 @@
1
+ require 'berkshelf'
2
+
3
+ module Berkshelf
4
+ class ThorTasks < Thor
5
+ namespace "berkshelf"
6
+
7
+ method_option :config,
8
+ type: :string,
9
+ aliases: "-c",
10
+ desc: "Knife configuration file to use.",
11
+ required: true
12
+ method_option :without,
13
+ type: :array,
14
+ aliases: "-w",
15
+ desc: "Exclude cookbooks that are in these groups",
16
+ default: Array.new
17
+ method_option :force,
18
+ type: :array,
19
+ desc: "Fail the build if any of the specified tags are matched.",
20
+ default: false
21
+ method_option :freeze,
22
+ type: :array,
23
+ desc: "Freeze the uploaded cookbooks so that they cannot be overwritten.",
24
+ default: false
25
+ desc "upload", "shit"
26
+ def upload
27
+ ::Berkshelf.ui = Chef::Knife::UI.new(STDOUT, STDERR, STDIN, {})
28
+ Chef::Config.from_file(File.expand_path(options[:config]))
29
+ cookbook_file = ::Berkshelf::Berksfile.from_file(File.join(Dir.pwd, "Berksfile"))
30
+ cookbook_file.upload(Chef::Config[:chef_server_url],
31
+ without: options[:without],
32
+ freeze: options[:freeze],
33
+ force: options[:force]
34
+ )
35
+ end
36
+ end
37
+ end
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkshelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -37,7 +37,7 @@ dependencies:
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 0.10.0
40
+ version: 10.12.0
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
@@ -45,7 +45,7 @@ dependencies:
45
45
  requirements:
46
46
  - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: 0.10.0
48
+ version: 10.12.0
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: minitar
51
51
  requirement: !ruby/object:Gem::Requirement
@@ -369,6 +369,7 @@ files:
369
369
  - lib/berkshelf/init_generator.rb
370
370
  - lib/berkshelf/lockfile.rb
371
371
  - lib/berkshelf/resolver.rb
372
+ - lib/berkshelf/thor.rb
372
373
  - lib/berkshelf/tx_result.rb
373
374
  - lib/berkshelf/tx_result_set.rb
374
375
  - lib/berkshelf/uploader.rb
@@ -441,7 +442,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
441
442
  version: '0'
442
443
  segments:
443
444
  - 0
444
- hash: 2051689970099247932
445
+ hash: -1596652001977554727
445
446
  requirements: []
446
447
  rubyforge_project:
447
448
  rubygems_version: 1.8.23