capistrano-itamae 0.2.0 → 1.0.0

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
- SHA1:
3
- metadata.gz: c69d64f985187ee512be27edea89623658ae832f
4
- data.tar.gz: a4f041eed2a507f5d164bd36d7da8561986c5e27
2
+ SHA256:
3
+ metadata.gz: ff014760ac71c576ffe1439c54c417d9a95891126184212d35b52371fbad6ecc
4
+ data.tar.gz: 939e3cc89764f17944e2ef2e4708730fb6f386287f236dd31f7c567e4279a45d
5
5
  SHA512:
6
- metadata.gz: ecdf2f50d981a817ac10f2f049584eca369d0a9b022ab78bf30dd09705b3a3f6179284080a3742e6a696e66372c36954d8d6d8bf743bbf49d0efa990613681c4
7
- data.tar.gz: bea0af94a1343211cc63447585f6e0e608186b399960a75dbb609aef80b86acf57c7ee1346539da9ce92afd11f0351aabdb7b5f1517dc26bda37b3161d66dac7
6
+ metadata.gz: 934a85067c45717c45eea23a0205046a5836bee6e3162729a5d6cd32eb7610a6674460f98e87a7bce40ef290a93455d592f73f93dc2b083fd65770557e2968ff
7
+ data.tar.gz: 1a31ab8e44e5d630107c6c220c20c25b0b137b0c7a55a004bfe71e319313f28f63bc68df509655d2f4f4928b363781d5ef81a29355a9dae5d204768770586340
@@ -1,5 +1,18 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.2.0...master)
2
+ [full changelog](http://github.com/sue445/capistrano-itamae/compare/v1.0.0...master)
3
+
4
+ ## v1.0.0
5
+ [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.2.0...v1.0.0)
6
+
7
+ ### Breaking changes :bomb:
8
+ * `options` arg of `itamae_ssh` is changed to keyword arg.
9
+ * Before (v0.x): `itamae_ssh "recipe.rb", "xxxxx"`
10
+ * After (v1.0.0+): `itamae_ssh "recipe.rb", options: "xxxxx"`
11
+ * https://github.com/sue445/capistrano-itamae/pull/21
12
+
13
+ ### Features
14
+ * Add `environment` arg to `itamae_ssh`
15
+ * https://github.com/sue445/capistrano-itamae/pull/22
3
16
 
4
17
  ## v0.2.0
5
18
  [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.1...v0.2.0)
data/README.md CHANGED
@@ -3,11 +3,9 @@
3
3
  Run [itamae](https://github.com/itamae-kitchen/itamae) in capistrano task
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/capistrano-itamae.svg)](https://badge.fury.io/rb/capistrano-itamae)
6
- [![Dependency Status](https://gemnasium.com/badges/github.com/sue445/capistrano-itamae.svg)](https://gemnasium.com/github.com/sue445/capistrano-itamae)
6
+ [![wercker status](https://app.wercker.com/status/a2f734cda581d3d221e10b1ede83bb71/s/master "wercker status")](https://app.wercker.com/project/byKey/a2f734cda581d3d221e10b1ede83bb71)
7
7
  [![Code Climate](https://codeclimate.com/github/sue445/capistrano-itamae/badges/gpa.svg)](https://codeclimate.com/github/sue445/capistrano-itamae)
8
8
 
9
- [![wercker status](https://app.wercker.com/status/a2f734cda581d3d221e10b1ede83bb71/m/master "wercker status")](https://app.wercker.com/project/bykey/a2f734cda581d3d221e10b1ede83bb71)
10
-
11
9
  ## Installation
12
10
 
13
11
  Add this line to your application's Gemfile:
@@ -53,13 +51,24 @@ desc "Run itamae"
53
51
  # Run itamae ssh --node-yaml=node.yml cookbooks/recipe1.rb cookbooks/recipe2.rb
54
52
  itamae_ssh ["recipe1.rb", "recipe2.rb"]
55
53
 
56
- # Run itamae ssh --node-yaml=node.yml cookbooks/recipe.rb --dry-run
57
- itamae_ssh "recipe.rb", "--dry-run"
54
+ # Run itamae ssh --node-yaml=node.yml cookbooks/recipe.rb --no-sudo --log-level=debug
55
+ itamae_ssh "recipe.rb", options: "--no-sudo --log-level=debug"
56
+
57
+ # Pass $PATH to `itamae ssh`
58
+ itamae_ssh "recipe.rb", environment: { path: ENV["PATH"] }
58
59
  end
59
60
  end
60
61
  end
61
62
  ```
62
63
 
64
+ ```bash
65
+ # Run itamae ssh --dry-run 〜
66
+ $ bundle exec cap --dry-run 〜
67
+
68
+ # Run itamae ssh 〜
69
+ $ bundle exec cap 〜
70
+ ```
71
+
63
72
  see [Capistrano::Itamae::DSL#itamae_ssh](lib/capistrano/itamae/dsl.rb)
64
73
 
65
74
  ## Variables
@@ -8,7 +8,8 @@ module Capistrano
8
8
  # Run `itamae ssh`
9
9
  # @param recipe_files [String, Array<String>]
10
10
  # @param options [String] itamae ssh options
11
- def itamae_ssh(recipe_files = DEFAULT_RECIPE, options = nil)
11
+ # @param environment [Hash] environment variables. (passed to `with`)
12
+ def itamae_ssh(recipe_files = DEFAULT_RECIPE, options: nil, environment: {})
12
13
  recipe_paths = Array(recipe_files).map { |file| itamae_cookbooks_path.join(file) }
13
14
 
14
15
  itamae_options = [options, itamae_ssh_default_options].compact
@@ -18,7 +19,9 @@ module Capistrano
18
19
 
19
20
  run_locally do
20
21
  Bundler.with_clean_env do
21
- execute(*generate_itamae_ssh_command(server, recipe_paths, itamae_options))
22
+ with environment do
23
+ execute(*generate_itamae_ssh_command(server, recipe_paths, itamae_options))
24
+ end
22
25
  end
23
26
  end
24
27
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Itamae
3
- VERSION = "0.2.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -77,17 +77,11 @@ build:
77
77
  cwd: spec/integration
78
78
 
79
79
  after-steps:
80
- - script:
81
- name: Set variables
82
- code: |
83
- # NOTE: override .ruby-version in pretty-slack-notify
84
- export RBENV_VERSION=2.3.1
85
-
86
80
  - script:
87
81
  name: shutdown all vms
88
82
  code: vagrant destroy -f
89
83
  cwd: spec/integration
90
84
 
91
- - wantedly/pretty-slack-notify:
92
- webhook_url: $SLACK_WEBHOOK_URL
85
+ - slack-notifier:
86
+ url: $SLACK_WEBHOOK_URL
93
87
  username: wercker_build
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.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-04 00:00:00.000000000 Z
11
+ date: 2019-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.6.11
138
+ rubygems_version: 3.0.1
140
139
  signing_key:
141
140
  specification_version: 4
142
141
  summary: Run itamae in capistrano task