capistrano-itamae 0.1.0.beta2 → 0.1.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
2
  SHA1:
3
- metadata.gz: 4135186881d5a879ab199b38961b1295c813f871
4
- data.tar.gz: 895980b2cbc53f5e1b17897bee7521336780fbef
3
+ metadata.gz: ffd552581c7d265dc104b79be464e787bcdb1714
4
+ data.tar.gz: 3b0b4126665066b7126cef328c8664fa5c239c60
5
5
  SHA512:
6
- metadata.gz: 6f020cea4f4535a124f5125fa846e8f2cdc04a6b3073451899aa1eaec9b0df5d767f02828c1b9a32142c1bb387fe96915ca6ac5e2287c215bdb2a978be9b4143
7
- data.tar.gz: 5a1826650db3b06aea15b3ced1850799c0e4c6133099a5e8e8e283dc9f0073db8b84f600b879b19dab93d0bd8f47cf9ad3cffc6e1ac0e2484aac3349ec2eac7c
6
+ metadata.gz: af598ae50de65a57c7cfddd2397c132fcce52904de125cf1520905562812130561b18fa949d5793fc932dde0a3d35634c88aa4bd652c6b67865f85948118cca2
7
+ data.tar.gz: 28a88a81587e68f31e67fbcb517938fce78163a0cc1a2f15049bf43b54f4bf6ff5f6df5f3f30f47dfdf525dbac925dcdef12eb1d933bde148c6c06cddf0448b8
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## master
2
+ [full changelog](http://github.com/sue445/capistrano-itamae/compare/v0.1.0...master)
3
+
4
+ ## v0.1.0
5
+ * first release
data/Gemfile CHANGED
@@ -2,11 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in capistrano-itamae.gemspec
4
4
  gemspec
5
-
6
- group :development do
7
- gem 'vagrant', github: 'ryotarai/vagrant', branch: 'latest-bundler'
8
- end
9
-
10
- group :plugins do
11
- gem 'vagrant-digitalocean'
12
- end
data/README.md CHANGED
@@ -3,6 +3,7 @@
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
+ [![Code Climate](https://codeclimate.com/github/sue445/capistrano-itamae/badges/gpa.svg)](https://codeclimate.com/github/sue445/capistrano-itamae)
6
7
 
7
8
  [![wercker status](https://app.wercker.com/status/a2f734cda581d3d221e10b1ede83bb71/m/master "wercker status")](https://app.wercker.com/project/bykey/a2f734cda581d3d221e10b1ede83bb71)
8
9
 
@@ -37,7 +38,7 @@ config/deploy.rb
37
38
  ```ruby
38
39
  set :itamae_cookbooks_path, "cookbooks"
39
40
 
40
- set :itamae_ssh_default_options, ["--node-yaml=node.yml"]
41
+ set :itamae_ssh_default_options, "--node-yaml=node.yml"
41
42
 
42
43
  desc "Run itamae"
43
44
  task :itamae do
@@ -60,8 +61,7 @@ see [Capistrano::Itamae::DSL#itamae_ssh](lib/capistrano/itamae/dsl.rb)
60
61
  ## Variables
61
62
  * `itamae_cookbooks_path` : path to cookbooks dir (default: "cookbooks")
62
63
  * `itamae_bin_name` : itamae executable name (default: `itamae`)
63
- * `itamae_ssh_default_options` : `itamae ssh` default options (default: `[]`)
64
- * If `options` is not passed, use this
64
+ * `itamae_ssh_default_options` : `itamae ssh` default options (default: empty)
65
65
 
66
66
  ## Development
67
67
 
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency "capistrano", ">= 3"
24
24
  spec.add_dependency "itamae"
25
25
 
26
+ spec.add_development_dependency "pry-byebug"
26
27
  spec.add_development_dependency "rake", "~> 10.0"
27
28
  spec.add_development_dependency "serverspec"
28
29
  end
@@ -5,24 +5,18 @@ module Capistrano
5
5
 
6
6
  # Run `itamae ssh`
7
7
  # @param recipe_files [String, Array<String>]
8
- # @param options [Array] itamae ssh options (default is itamae_ssh_default_options)
9
- def itamae_ssh(recipe_files, *options)
10
- recipe_files = Array(recipe_files) unless recipe_files.is_a?(Array)
11
- recipe_paths = recipe_files.map { |file| itamae_cookbooks_path.join(file) }
12
-
13
- itamae_options =
14
- if options.empty?
15
- itamae_ssh_default_options
16
- else
17
- options
18
- end
8
+ # @param options [String] itamae ssh options
9
+ def itamae_ssh(recipe_files, options = nil)
10
+ recipe_paths = Array(recipe_files).map { |file| itamae_cookbooks_path.join(file) }
11
+
12
+ itamae_options = [options, itamae_ssh_default_options].compact
19
13
 
20
14
  # NOTE: store server (`host` is changed to localhost in `run_locally`)
21
15
  server = host
22
16
 
23
17
  run_locally do
24
18
  Bundler.with_clean_env do
25
- execute *generate_itamae_ssh_command(server, recipe_paths, itamae_options)
19
+ execute(*generate_itamae_ssh_command(server, recipe_paths, itamae_options))
26
20
  end
27
21
  end
28
22
  end
@@ -10,7 +10,7 @@ module Capistrano
10
10
  end
11
11
 
12
12
  def itamae_ssh_default_options
13
- fetch(:itamae_ssh_default_options, [])
13
+ fetch(:itamae_ssh_default_options)
14
14
  end
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Itamae
3
- VERSION = "0.1.0.beta2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/wercker.yml CHANGED
@@ -22,14 +22,19 @@ build:
22
22
  # http://devcenter.wercker.com/docs/steps/index.html
23
23
  steps:
24
24
  - script:
25
- name: Set variables
25
+ name: Install Vagrant
26
+ code: |
27
+ wget https://releases.hashicorp.com/vagrant/1.8.4/vagrant_1.8.4_x86_64.rpm
28
+ rpm -i vagrant_1.8.4_x86_64.rpm
29
+ vagrant plugin install vagrant-digitalocean
30
+
31
+ - script:
32
+ # NOTE: vagrant v1.8.4 depends on bundler v1.12.5
33
+ # https://github.com/mitchellh/vagrant/blob/v1.8.4/vagrant.gemspec#L23
34
+ name: Install bundler
26
35
  code: |
27
- # Quiet vagrant not_in_installer message
28
- # ref
29
- # * https://github.com/mitchellh/vagrant/blob/v1.8.4/templates/locales/en.yml#L339-L345
30
- # * https://github.com/mitchellh/vagrant/blob/v1.8.4/bin/vagrant#L167-L170
31
- # * https://github.com/mitchellh/vagrant/blob/v1.8.4/lib/vagrant/shared_helpers.rb#L48-L53
32
- export VAGRANT_I_KNOW_WHAT_IM_DOING_PLEASE_BE_QUIET=true
36
+ gem uninstall bundler --all --force
37
+ gem install bundler -v 1.12.5
33
38
 
34
39
  - bundle-install:
35
40
  jobs: 4
@@ -58,12 +63,12 @@ build:
58
63
 
59
64
  - script:
60
65
  name: start vm
61
- code: bundle exec vagrant up default --provider=digital_ocean
66
+ code: vagrant up default --provider=digital_ocean
62
67
  cwd: spec/integration
63
68
 
64
69
  - script:
65
70
  name: vagrant ssh-config
66
- code: bundle exec vagrant ssh-config
71
+ code: vagrant ssh-config
67
72
  cwd: spec/integration
68
73
 
69
74
  - script:
@@ -80,7 +85,7 @@ build:
80
85
 
81
86
  - script:
82
87
  name: shutdown all vms
83
- code: bundle exec vagrant destroy -f
88
+ code: vagrant destroy -f
84
89
  cwd: spec/integration
85
90
 
86
91
  - wantedly/pretty-slack-notify:
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.beta2
4
+ version: 0.1.0
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-14 00:00:00.000000000 Z
11
+ date: 2016-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +102,7 @@ extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
104
  - ".gitignore"
105
+ - CHANGELOG.md
91
106
  - Gemfile
92
107
  - LICENSE.txt
93
108
  - README.md
@@ -116,9 +131,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
131
  version: '0'
117
132
  required_rubygems_version: !ruby/object:Gem::Requirement
118
133
  requirements:
119
- - - ">"
134
+ - - ">="
120
135
  - !ruby/object:Gem::Version
121
- version: 1.3.1
136
+ version: '0'
122
137
  requirements: []
123
138
  rubyforge_project:
124
139
  rubygems_version: 2.5.1