capistrano-itamae 0.1.0 → 0.1.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: ffd552581c7d265dc104b79be464e787bcdb1714
4
- data.tar.gz: 3b0b4126665066b7126cef328c8664fa5c239c60
3
+ metadata.gz: 617064b1bc956ce9812df7eda388493c323dfbb1
4
+ data.tar.gz: 7317e1c7aa5681c974a84d62bdf3e0b1498115e2
5
5
  SHA512:
6
- metadata.gz: af598ae50de65a57c7cfddd2397c132fcce52904de125cf1520905562812130561b18fa949d5793fc932dde0a3d35634c88aa4bd652c6b67865f85948118cca2
7
- data.tar.gz: 28a88a81587e68f31e67fbcb517938fce78163a0cc1a2f15049bf43b54f4bf6ff5f6df5f3f30f47dfdf525dbac925dcdef12eb1d933bde148c6c06cddf0448b8
6
+ metadata.gz: 33f23c4f45342c271fef4ca74f247809355a17598a6562b5954fce34e7d3bc87fbf04e58d53a3b71bff1905c1ee92d9a41d4bbefe849a387461922fb8b8aabc2
7
+ data.tar.gz: 22ed2a4ebb2501d4718fff23f447530e4c9355c961a5bfc0dc49ba3e42c2a9941494ea4bce17bc3c7b1bc764a61ae2a9e5dd9f8ed8eb8b470bcf26a9945e9895
@@ -1,5 +1,11 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.0...master)
2
+ [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.1...master)
3
+
4
+ ## v0.1.1
5
+ [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.0...v0.1.1)
6
+
7
+ * Add default value to itamae_ssh 1st arg
8
+ * https://github.com/sue445/capistrano-itamae/pull/13
3
9
 
4
10
  ## v0.1.0
5
11
  * first release
data/README.md CHANGED
@@ -43,6 +43,9 @@ set :itamae_ssh_default_options, "--node-yaml=node.yml"
43
43
  desc "Run itamae"
44
44
  task :itamae do
45
45
  on roles(:all) do
46
+ # Run itamae ssh --node-yaml=node.yml cookbooks/default.rb
47
+ itamae_ssh
48
+
46
49
  # Run itamae ssh --node-yaml=node.yml cookbooks/recipe.rb
47
50
  itamae_ssh "recipe.rb"
48
51
 
@@ -59,8 +62,8 @@ end
59
62
  see [Capistrano::Itamae::DSL#itamae_ssh](lib/capistrano/itamae/dsl.rb)
60
63
 
61
64
  ## Variables
62
- * `itamae_cookbooks_path` : path to cookbooks dir (default: "cookbooks")
63
- * `itamae_bin_name` : itamae executable name (default: `itamae`)
65
+ * `itamae_cookbooks_path` : path to cookbooks dir (default: `"cookbooks"`)
66
+ * `itamae_bin_name` : itamae executable name (default: `"itamae"`)
64
67
  * `itamae_ssh_default_options` : `itamae ssh` default options (default: empty)
65
68
 
66
69
  ## Development
@@ -3,10 +3,12 @@ module Capistrano
3
3
  module DSL
4
4
  require "bundler"
5
5
 
6
+ DEFAULT_RECIPE = "default.rb"
7
+
6
8
  # Run `itamae ssh`
7
9
  # @param recipe_files [String, Array<String>]
8
10
  # @param options [String] itamae ssh options
9
- def itamae_ssh(recipe_files, options = nil)
11
+ def itamae_ssh(recipe_files = DEFAULT_RECIPE, options = nil)
10
12
  recipe_paths = Array(recipe_files).map { |file| itamae_cookbooks_path.join(file) }
11
13
 
12
14
  itamae_options = [options, itamae_ssh_default_options].compact
@@ -33,6 +35,7 @@ module Capistrano
33
35
  command
34
36
  end
35
37
 
38
+ # via. https://github.com/unosk/capistano-with-terraform-and-itamae/blob/feb0d7d90f5c88412af9728586e598742dd36761/lib/capistrano/tasks/itamae.rake#L38-L51
36
39
  def ssh_options(server)
37
40
  ssh_options = fetch(:ssh_options, {}).dup
38
41
  ssh_options.merge!(server.ssh_options) if server.ssh_options
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Itamae
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-17 00:00:00.000000000 Z
11
+ date: 2016-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler