rundock-plugin-hook-serverspec 0.1.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27b9d875602ceb256142cf34d9d906c09bf89362
4
- data.tar.gz: 6cf85b353465c3114bdf5ec955d95a8d0cc9dff9
3
+ metadata.gz: c3f633135dec8d5f5a11dd9204e8ebe8128d60ef
4
+ data.tar.gz: d782af52cf9f77d30d4769ff20286b344737fa30
5
5
  SHA512:
6
- metadata.gz: 97b2665988ddf5bd997572bc18f7fe9cc8d6531709730eb1dae178c201c917778e377af89d190b9c55194a2d84512d08e4d065189b1165b9d921e0d3a721b043
7
- data.tar.gz: c6b51da4c66c26e8d9c990dfd6e5d901181b90ec4a739a688edc19ac0431f0587c20ca666ae1984a7f3fdccbf1d355e040ef08f61452718044d8e5efa2d14b44
6
+ metadata.gz: 550c10bc5842bba18ce97bbeabbcb2340c1d910de282eee088dc01afe2ae33b39a44a866329375b407c876f7da0121aa56068408dfa5b82459944968169cf49d
7
+ data.tar.gz: 55d6e536bd49285e18977f8318adcb2e9ec2473adaa054f76acca9616d41d36f2f3748c09bb9976214ec7dc0062e277009af6c29ff5ca3455c021bfffd782963
data/README.md CHANGED
@@ -1,39 +1,64 @@
1
1
  # Rundock::Plugin::Hook::Serverspec
2
+ [![Gem Version](https://badge.fury.io/rb/rundock-plugin-hook-serverspec.svg)](http://badge.fury.io/rb/rundock-plugin-hook-serverspec) [![Circle CI](https://circleci.com/gh/hiracy/rundock-plugin-hook-serverspec/tree/master.png?style=shield)](https://circleci.com/gh/hiracy/rundock-plugin-hook-serverspec/tree/master)
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rundock/plugin/hook/serverspec`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
4
+ [Rundock](https://github.com/hiracy/rundock) plugin for [serverspec](http://serverspec.org) hook.
6
5
 
7
6
  ## Installation
8
7
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'rundock-plugin-hook-serverspec'
8
+ ```
9
+ $ gem install rundock
13
10
  ```
14
11
 
15
- And then execute:
16
-
17
- $ bundle
12
+ ```
13
+ $ gem install rundock-plugin-hook-serverspec
14
+ ```
18
15
 
19
- Or install it yourself as:
16
+ ## Usage
20
17
 
21
- $ gem install rundock-plugin-hook-serverspec
18
+ Edit your operation scenario to hooks.yml like this sample.
22
19
 
23
- ## Usage
20
+ ```
21
+ serverspec_test_1: # hook name
22
+ hook_type: serverspec # hook_type(always specify 'serverspec')
23
+ pattern: /path/to/serverspec_test_1_spec.rb # serverspec codes file pattern
24
+ host_properties: /path/to/properties.yml # host specific properties(http://serverspec.org/advanced_tips.html
25
+ serverspec_test_2:
26
+ hook_type: serverspec
27
+ pattern: /path/to/serverspec_test_2_spec.rb
28
+ ```
24
29
 
25
- TODO: Write usage instructions here
30
+ And edit your operation scenario to "[scenario.yml](https://github.com/hiracy/rundock/blob/master/scenario_sample.yml)" like this sample.
26
31
 
27
- ## Development
32
+ ```
33
+ - node: anyhost-01
34
+ deploy:
35
+ - src: /path/to/great/middleware/conf_src.rb # deploy source file from localhost
36
+ dst: /path/to/great/middleware/conf_dst.rb # deploy destination file to remotehost
37
+ command:
38
+ - /etc/init.d/great_middleware start
39
+ hook:
40
+ - serverspec_test-1 # enable hook(hooks.yml/serverspec_test_1)
41
+ - serverspec_test-2
42
+ ---
43
+ anyhost-01: # see rundock options(https://github.com/hiracy/rundock/blob/master/README.md)
44
+ host: 192.168.10.11
45
+ ssh_opts:
46
+ port: 22
47
+ user: anyuser
48
+ key: ~/.ssh/id_rsa
49
+ ```
28
50
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
51
+ and execute rundock.
30
52
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
53
+ $ rundock do /path/to/your-dir/scenario.yml -k /path/to/your-dir/hooks.yml
32
54
 
33
55
  ## Contributing
34
56
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rundock-plugin-hook-serverspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
-
57
+ 1. Fork it ( https://github.com/[my-github-username]/rundock-plugin-operation-itamae/fork )
58
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
59
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
60
+ 4. Push to the branch (`git push origin my-new-feature`)
61
+ 5. Create a new Pull Request
37
62
 
38
63
  ## License
39
64
 
@@ -47,7 +47,8 @@ module Rundock
47
47
  # anykey2: value2
48
48
 
49
49
  class Serverspec < Base
50
- def hook(log_buffer, node_info)
50
+ def hook(node_attributes, log_buffer)
51
+ node_info = node_attributes[0][:nodeinfo]
51
52
  setenv(node_info, @contents)
52
53
  load "#{::File.expand_path(::File.dirname(__FILE__))}/../../../../Rakefile"
53
54
  Logger.info("serverspec started: #{node_info[:nodename]}(#{node_info[:host]})")
@@ -2,7 +2,7 @@ module Rundock
2
2
  module Plugin
3
3
  module Hook
4
4
  module Serverspec
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rundock-plugin-hook-serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiracy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler