vagrant-syllabus-provisioner 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/lib/vagrant_syllabus_provisioner/config.rb +8 -0
- data/lib/vagrant_syllabus_provisioner/provisioner.rb +0 -4
- data/lib/vagrant_syllabus_provisioner/version.rb +1 -1
- data/spec/lib/vagrant_syllabus_provisioner/config_spec.rb +42 -0
- data/spec/spec_helper.rb +19 -0
- data/vagrant-syllabus-provisioner.gemspec +1 -0
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 182fece9164353fd620ac93b5f55ba5b2b4873fd
|
4
|
+
data.tar.gz: 2b7a6e5a29f7d60716ec989a4bea0f9bdeab7977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32c6522a847ceb9c49e982a85d252ebd6f394f1bd6f5b22fc70abd7bd2d06770f25d8e772e9d112aa9845bc766282ec20bc9937c8848d4c7f0e33d1c03f76fc0
|
7
|
+
data.tar.gz: 15db86c06ccf5386b41003e6885d8a59b6bf070bd6968d1ab76dff6be8750cf57307761c0b7997339ff1f0aa263081917341e530fa6618d7647bbc59b038d695
|
data/.rspec
ADDED
@@ -11,6 +11,14 @@ module VagrantSyllabusProvisioner
|
|
11
11
|
def finalize!
|
12
12
|
@files = nil if @files == UNSET_VALUE
|
13
13
|
end
|
14
|
+
|
15
|
+
def validate(machine)
|
16
|
+
if @files && !@files.is_a?(Array)
|
17
|
+
return {"syllabus" => ["files must be an array"]}
|
18
|
+
end
|
19
|
+
|
20
|
+
{}
|
21
|
+
end
|
14
22
|
end
|
15
23
|
end
|
16
24
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module VagrantSyllabusProvisioner
|
4
|
+
describe VagrantSyllabusProvisioner::Config do
|
5
|
+
subject(:config) { described_class.new }
|
6
|
+
|
7
|
+
context "default" do
|
8
|
+
before { config.finalize! }
|
9
|
+
its(:files) { should be_nil }
|
10
|
+
end
|
11
|
+
|
12
|
+
context "set" do
|
13
|
+
before do
|
14
|
+
config.files = %w! a b !
|
15
|
+
config.finalize!
|
16
|
+
end
|
17
|
+
its(:files) { should eq %w! a b ! }
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#validate" do
|
21
|
+
context "with non-array files" do
|
22
|
+
before do
|
23
|
+
config.files = "non-array"
|
24
|
+
config.finalize!
|
25
|
+
end
|
26
|
+
it "returns a hash containing error messages" do
|
27
|
+
expect(config.validate(nil)).to eq({"syllabus" => ["files must be an array"]})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
context "with array files" do
|
31
|
+
before do
|
32
|
+
config.files = %w! this is array !
|
33
|
+
config.finalize!
|
34
|
+
end
|
35
|
+
it "returns a hash containing no error messages" do
|
36
|
+
expect(config.validate(nil)).to eq({})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'vagrant-syllabus-provisioner'
|
2
|
+
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
6
|
+
# loaded once.
|
7
|
+
#
|
8
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
11
|
+
config.run_all_when_everything_filtered = true
|
12
|
+
config.filter_run :focus
|
13
|
+
|
14
|
+
# Run specs in random order to surface order dependencies. If you find an
|
15
|
+
# order dependency and want to debug it, you can fix the order by providing
|
16
|
+
# the seed, which is printed after each run.
|
17
|
+
# --seed 1234
|
18
|
+
config.order = 'random'
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-syllabus-provisioner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syllabus
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
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
|
description: This plugin installs a provisioner that allows Syllabus to provision
|
56
70
|
machines.
|
57
71
|
email:
|
@@ -61,6 +75,7 @@ extensions: []
|
|
61
75
|
extra_rdoc_files: []
|
62
76
|
files:
|
63
77
|
- .gitignore
|
78
|
+
- .rspec
|
64
79
|
- Gemfile
|
65
80
|
- LICENSE.txt
|
66
81
|
- README.md
|
@@ -71,6 +86,8 @@ files:
|
|
71
86
|
- lib/vagrant_syllabus_provisioner/provisioner.rb
|
72
87
|
- lib/vagrant_syllabus_provisioner/spec_infra_backend.rb
|
73
88
|
- lib/vagrant_syllabus_provisioner/version.rb
|
89
|
+
- spec/lib/vagrant_syllabus_provisioner/config_spec.rb
|
90
|
+
- spec/spec_helper.rb
|
74
91
|
- vagrant-syllabus-provisioner.gemspec
|
75
92
|
homepage: https://github.com/ryotarai/vagrant-syllabus-provisioner
|
76
93
|
licenses:
|
@@ -96,4 +113,6 @@ rubygems_version: 2.0.3
|
|
96
113
|
signing_key:
|
97
114
|
specification_version: 4
|
98
115
|
summary: Syllabus Provisioner for Vagrant
|
99
|
-
test_files:
|
116
|
+
test_files:
|
117
|
+
- spec/lib/vagrant_syllabus_provisioner/config_spec.rb
|
118
|
+
- spec/spec_helper.rb
|