vagrant-hmurca 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,6 @@
1
+ require "minitest/autorun"
2
+ require "vagrant/hmurca"
3
+
4
+ $test_tmp_dir = File.expand_path("../../tmp", __FILE__)
5
+ FileUtils.rm_rf($test_tmp_dir)
6
+ FileUtils.mkdir_p($test_tmp_dir)
@@ -0,0 +1,69 @@
1
+ require File.expand_path("../helper.rb", __FILE__)
2
+ require "vagrant/hmurca/command"
3
+ require "stringio"
4
+
5
+ OK_STDOUT_1 = <<END
6
+ exist
7
+ create hmurca.conf.sample
8
+ create .gitignore
9
+ create Vagrantfile
10
+ END
11
+
12
+ OK_STDOUT_2 = <<END
13
+ create foo/bar
14
+ create foo/bar/hmurca.conf.sample
15
+ create foo/bar/.gitignore
16
+ create foo/bar/Vagrantfile
17
+ END
18
+
19
+ class TestVagrantCommand < Minitest::Test
20
+ def setup
21
+ @env = Vagrant::Environment.new
22
+ @pwd = Dir.pwd
23
+ @root = File.join($test_tmp_dir, "testroot")
24
+
25
+ FileUtils.mkdir_p(@root)
26
+ Dir.chdir(@root)
27
+ end
28
+
29
+ def teardown
30
+ Dir.chdir(@pwd)
31
+ end
32
+
33
+ def test_hmurca_generator_too_many_arguments
34
+ assert_raises SystemExit do
35
+ c = Vagrant::Hmurca::Command.new(["example.com", @root, "foo"], @env)
36
+ c.execute
37
+ end
38
+ end
39
+
40
+ def test_hmurca_generator_too_few_arguments
41
+ assert_raises SystemExit do
42
+ c = Vagrant::Hmurca::Command.new([], @env)
43
+ c.execute
44
+ end
45
+ end
46
+
47
+ def test_hmurca_generator_in_current_directory
48
+ assert_output OK_STDOUT_1 do
49
+ c = Vagrant::Hmurca::Command.new(["example.com"], @env)
50
+ c.execute
51
+ end
52
+
53
+ assert_equal true, File.exists?(File.join(@root, "hmurca.conf.sample"))
54
+ assert_equal true, File.exists?(File.join(@root, "Vagrantfile"))
55
+ assert_equal true, File.exists?(File.join(@root, ".gitignore"))
56
+ end
57
+
58
+ def test_hmurca_generator_in_given_root_directory
59
+ dir = File.join(@root, "foo/bar")
60
+ assert_output OK_STDOUT_2 do
61
+ c = Vagrant::Hmurca::Command.new(["example.com", dir], @env)
62
+ c.execute
63
+ end
64
+
65
+ assert_equal true, File.exists?(File.join(dir, "hmurca.conf.sample"))
66
+ assert_equal true, File.exists?(File.join(dir, "Vagrantfile"))
67
+ assert_equal true, File.exists?(File.join(dir, ".gitignore"))
68
+ end
69
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path("../helper.rb", __FILE__)
2
+
3
+ class TestVersion < Minitest::Test
4
+ def test_version_number
5
+ assert_equal Vagrant::Hmurca::VERSION, "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,26 @@
1
+ # -*- mode: ruby -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant/hmurca/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vagrant-hmurca"
8
+ spec.version = Vagrant::Hmurca::VERSION
9
+ spec.authors = ["Hmurca Team"]
10
+ spec.email = ["dev@hmurca.com"]
11
+ spec.description = %q{Hmurca's formation Vagrant plugin.}
12
+ spec.summary = %q{A plugin for Vagrant that manages dev formation powered by Hmurca.}
13
+ spec.homepage = "http://docs.hmurca.com/en/latest/vagrant-hmurca.html"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "booby", "~> 0.1.0"
22
+ spec.add_dependency "thor", "~> 0.19.0"
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "minitest"
25
+ spec.add_development_dependency "rake"
26
+ end
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-hmurca
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Hmurca Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: booby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.19.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.19.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Hmurca's formation Vagrant plugin.
84
+ email:
85
+ - dev@hmurca.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - .gitignore
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
94
+ - Rakefile
95
+ - Vagrantfile
96
+ - dot_gitignore
97
+ - hmurca.conf
98
+ - hmurca.conf.sample
99
+ - lib/vagrant-hmurca.rb
100
+ - lib/vagrant/hmurca.rb
101
+ - lib/vagrant/hmurca/command.rb
102
+ - lib/vagrant/hmurca/config_parser.rb
103
+ - lib/vagrant/hmurca/errors.rb
104
+ - lib/vagrant/hmurca/templates/Vagrantfile
105
+ - lib/vagrant/hmurca/templates/dot_gitignore
106
+ - lib/vagrant/hmurca/templates/hmurca.conf.sample.tt
107
+ - lib/vagrant/hmurca/vagrantfile.rb
108
+ - lib/vagrant/hmurca/version.rb
109
+ - test/config_parser_test.rb
110
+ - test/helper.rb
111
+ - test/vagrant_command_test.rb
112
+ - test/version_test.rb
113
+ - vagrant-hmurca.gemspec
114
+ homepage: http://docs.hmurca.com/en/latest/vagrant-hmurca.html
115
+ licenses:
116
+ - MIT
117
+ metadata: {}
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ requirements: []
133
+ rubyforge_project:
134
+ rubygems_version: 2.0.6
135
+ signing_key:
136
+ specification_version: 4
137
+ summary: A plugin for Vagrant that manages dev formation powered by Hmurca.
138
+ test_files:
139
+ - test/config_parser_test.rb
140
+ - test/helper.rb
141
+ - test/vagrant_command_test.rb
142
+ - test/version_test.rb