ansible_spec 0.0.1.3 → 0.0.1.4

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: b3141f82d184b4f7dfaff006e07d4561aaa3ae7a
4
- data.tar.gz: cb258abd59ebd2746d7d95e55464d1d308b267d0
3
+ metadata.gz: 72fba25ed4abe4c3996c35f674c6296a5b71ac74
4
+ data.tar.gz: 6f0a5120c52fd85162bf721022009382d9cd9f23
5
5
  SHA512:
6
- metadata.gz: 1cca18c66cb0becf5a8fd20de194527e807ec6e3bcd7031c4fadf9f41164f20ca92810c078b434e585362e3fb55621018177ea7fa8587f51eaa1c3c26780bf31
7
- data.tar.gz: ae8b524a3b18033856f073c0fc25b3a1a72ff0de68953d3a2c7660f2f14c2897906720bc5f33565ad0a763b4626edbc4fda69cca2971ef11b4fa36dc8d9d79b4
6
+ metadata.gz: f6f845d822b12278605e8ca7479b368ac6cf30c25826b23a17c7b079758db17a13e6419e3d04ff2f53ab82265d2841991343a3e77d8057760576ae3f23ad2a31
7
+ data.tar.gz: 22ca53f5baf32f1311ccfb9fb6ee69e3080f12a2b5e8b94fa885af96f3c674dfccb0bc8d994a2057b1c1f270de29f3ec19a01a39bc5c0e4756792bbbf5117c70
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.1.1
7
+ script:
8
+ - rspec spec
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # AnsibleSpec
2
2
  [![Gem Version](https://badge.fury.io/rb/ansible_spec.svg)](http://badge.fury.io/rb/ansible_spec)
3
+ [![Build Status](https://travis-ci.org/volanja/ansible_spec.svg?branch=master)](https://travis-ci.org/volanja/ansible_spec)
3
4
 
4
5
  This is Severspec template for Run test Multi Role and Multi Host with Ansible
5
6
  Create template (Rakefile and spec/spec_hepler.rb)
@@ -41,7 +42,7 @@ sample is [here](https://github.com/volanja/ansible-sample-tdd)
41
42
 
42
43
  ```
43
44
  .
44
- ├── .ansiblespec #Create file (use Serverspec). read [Change .ansiblespec(v0.0.1.3)](https://github.com/volanja/ansible_spec#change_ansiblespec_v0013)
45
+ ├── .ansiblespec #Create file (use Serverspec). read above section.
45
46
  ├── README.md
46
47
  ├── hosts #use Ansible and Serverspec if .ansiblespec is not exist.
47
48
  ├── site.yml #use Ansible and Serverspec if .ansiblespec is not exist.
@@ -20,7 +20,6 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_development_dependency "bundler", "~> 1.3"
22
22
  gem.add_development_dependency "rake"
23
- gem.add_development_dependency "serverspec", ">= 0.13.5"
24
23
 
25
24
  gem.add_runtime_dependency "serverspec", ">= 0.13.5"
26
25
 
@@ -1,3 +1,3 @@
1
1
  module AnsibleSpec
2
- VERSION = "0.0.1.3"
2
+ VERSION = "0.0.1.4"
3
3
  end
@@ -0,0 +1,42 @@
1
+ # coding: utf-8
2
+ require 'ansible_spec'
3
+
4
+ created_file = [
5
+ "spec/spec_helper.rb",
6
+ "Rakefile",
7
+ ".ansiblespec"
8
+ ]
9
+ created_dir = [
10
+ "spec",
11
+ ]
12
+ test_dir = "tmp"
13
+
14
+ describe "テスト" do
15
+ # テスト実行前
16
+ before(:all) do
17
+ FileUtils.mkdir_p(test_dir) unless FileTest.exist?(test_dir)
18
+ Dir.chdir(test_dir) #tmp/に移動
19
+ AnsibleSpec.main
20
+ end
21
+
22
+ # テスト実行後
23
+ after(:all) do
24
+ created_file.each{|f| File.delete(f) }
25
+ created_dir.each{|d| Dir.delete(d) }
26
+ Dir.chdir("../")
27
+ Dir.delete(test_dir)
28
+ end
29
+
30
+ it "/tmpにディレクトリが作成されること" do
31
+ created_dir.each{|d|
32
+ expect(File.directory?(d)).to be_truthy
33
+ }
34
+ end
35
+
36
+ it "/tmpにファイルが作成されること" do
37
+ created_file.each{|f|
38
+ expect(FileTest.exist?(f)).to be_truthy
39
+ }
40
+ end
41
+
42
+ end
@@ -0,0 +1,89 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # rspec-expectations config goes here. You can use an alternate
19
+ # assertion/expectation library such as wrong or the stdlib/minitest
20
+ # assertions if you prefer.
21
+ config.expect_with :rspec do |expectations|
22
+ # This option will default to `true` in RSpec 4. It makes the `description`
23
+ # and `failure_message` of custom matchers include text for helper methods
24
+ # defined using `chain`, e.g.:
25
+ # be_bigger_than(2).and_smaller_than(4).description
26
+ # # => "be bigger than 2 and smaller than 4"
27
+ # ...rather than:
28
+ # # => "be bigger than 2"
29
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
+ end
31
+
32
+ # rspec-mocks config goes here. You can use an alternate test double
33
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
34
+ config.mock_with :rspec do |mocks|
35
+ # Prevents you from mocking or stubbing a method that does not exist on
36
+ # a real object. This is generally recommended, and will default to
37
+ # `true` in RSpec 4.
38
+ mocks.verify_partial_doubles = true
39
+ end
40
+
41
+ # The settings below are suggested to provide a good initial experience
42
+ # with RSpec, but feel free to customize to your heart's content.
43
+ =begin
44
+ # These two settings work together to allow you to limit a spec run
45
+ # to individual examples or groups you care about by tagging them with
46
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
47
+ # get run.
48
+ config.filter_run :focus
49
+ config.run_all_when_everything_filtered = true
50
+
51
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
+ # For more details, see:
53
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
56
+ config.disable_monkey_patching!
57
+
58
+ # This setting enables warnings. It's recommended, but in some cases may
59
+ # be too noisy due to issues in dependencies.
60
+ config.warnings = true
61
+
62
+ # Many RSpec users commonly either run the entire suite or an individual
63
+ # file, and it's useful to allow more verbose output when running an
64
+ # individual spec file.
65
+ if config.files_to_run.one?
66
+ # Use the documentation formatter for detailed output,
67
+ # unless a formatter has already been configured
68
+ # (e.g. via a command-line flag).
69
+ config.default_formatter = 'doc'
70
+ end
71
+
72
+ # Print the 10 slowest examples and example groups at the
73
+ # end of the spec run, to help surface which specs are running
74
+ # particularly slow.
75
+ config.profile_examples = 10
76
+
77
+ # Run specs in random order to surface order dependencies. If you find an
78
+ # order dependency and want to debug it, you can fix the order by providing
79
+ # the seed, which is printed after each run.
80
+ # --seed 1234
81
+ config.order = :random
82
+
83
+ # Seed global randomization in this process using the `--seed` CLI option.
84
+ # Setting this allows you to use `--seed` to deterministically reproduce
85
+ # test failures related to randomization by passing the same `--seed` value
86
+ # as the one that triggered the failure.
87
+ Kernel.srand config.seed
88
+ =end
89
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.3
4
+ version: 0.0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - volanja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-21 00:00:00.000000000 Z
11
+ date: 2014-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: serverspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: 0.13.5
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: 0.13.5
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: serverspec
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -76,6 +62,8 @@ extensions: []
76
62
  extra_rdoc_files: []
77
63
  files:
78
64
  - .gitignore
65
+ - .rspec
66
+ - .travis.yml
79
67
  - Gemfile
80
68
  - LICENSE.txt
81
69
  - README.md
@@ -84,6 +72,8 @@ files:
84
72
  - bin/ansiblespec-init
85
73
  - lib/ansible_spec.rb
86
74
  - lib/ansible_spec/version.rb
75
+ - spec/commands_spec.rb
76
+ - spec/spec_helper.rb
87
77
  homepage: https://github.com/volanja
88
78
  licenses:
89
79
  - MIT
@@ -108,5 +98,6 @@ rubygems_version: 2.1.11
108
98
  signing_key:
109
99
  specification_version: 4
110
100
  summary: This is Severspec template for Run test Multi Role and Multi Host with Ansbile
111
- test_files: []
112
- has_rdoc:
101
+ test_files:
102
+ - spec/commands_spec.rb
103
+ - spec/spec_helper.rb