vagrant-librarian 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in vagrant-librarian.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Felix Schäfer
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # Vagrant::Librarian
2
+
3
+ This gem is a [Vagrant](http://vagrantup.com) plugin that takes care of
4
+ installing and updating librarian-managed cookbooks as part of your normal
5
+ Vagrant workflow. This version currently only supports Chef cookbooks.
6
+
7
+ ## Installation
8
+
9
+ Add the gem to your Gemfile:
10
+
11
+ gem "vagrant-librarian"
12
+
13
+ ## Usage
14
+
15
+ This gem automatically hooks into `vagrant up`. All you need is a suitably
16
+ formatted Cheffile and to provision your Vagrant VM with Chef solo.
17
+
18
+ ## Contributing
19
+
20
+ Please submit issues and pull requests to the [GitHub page of the
21
+ project](https://github.com/thegcat/vagrant-librarian)
@@ -0,0 +1,26 @@
1
+ require "librarian/chef"
2
+ require "librarian/action"
3
+
4
+ module Vagrant
5
+ module Librarian
6
+
7
+ # Vagrant middleware to install librarian-managed cookbooks in the current
8
+ # Vagrant environment
9
+ class Install
10
+ def initialize(app, env)
11
+ @app = app
12
+ end
13
+
14
+ def call(env)
15
+ env[:ui].info "Installing CookBooks, this can take a few minutes..."
16
+
17
+ lce = ::Librarian::Chef::Environment.new
18
+ ::Librarian::Action::Ensure.new(lce).run
19
+ ::Librarian::Action::Resolve.new(lce).run
20
+ ::Librarian::Action::Install.new(lce).run
21
+
22
+ @app.call(env)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ module Vagrant
2
+ module Librarian
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ require "vagrant-librarian/version"
2
+ require "vagrant-librarian/install"
3
+
4
+ Vagrant.actions[:up].insert_before Vagrant::Action::VM::Provision, Vagrant::Librarian::Install
@@ -0,0 +1 @@
1
+ require "vagrant-librarian"
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant-librarian/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "vagrant-librarian"
8
+ gem.version = Vagrant::Librarian::VERSION
9
+ gem.authors = ["Felix Schäfer"]
10
+ gem.email = ["felix@launchco.com"]
11
+ gem.description = %q{vagrant-librarian is a vagrant plugin that takes care of installing and updating librarian-managed cookbooks as part of your normal vagrant workflow.}
12
+ gem.summary = %q{vagrant-librarian integrates librarian to vagrant}
13
+ gem.homepage = "https://github.com/thegcat/vagrant-librarian"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency "vagrant"
21
+ gem.add_dependency "librarian"
22
+ end
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-librarian
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - "Felix Sch\xC3\xA4fer"
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-12-15 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: vagrant
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: librarian
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ description: vagrant-librarian is a vagrant plugin that takes care of installing and updating librarian-managed cookbooks as part of your normal vagrant workflow.
49
+ email:
50
+ - felix@launchco.com
51
+ executables: []
52
+
53
+ extensions: []
54
+
55
+ extra_rdoc_files: []
56
+
57
+ files:
58
+ - .gitignore
59
+ - Gemfile
60
+ - LICENSE
61
+ - README.md
62
+ - lib/vagrant-librarian.rb
63
+ - lib/vagrant-librarian/install.rb
64
+ - lib/vagrant-librarian/version.rb
65
+ - lib/vagrant_init.rb
66
+ - vagrant-librarian.gemspec
67
+ homepage: https://github.com/thegcat/vagrant-librarian
68
+ licenses: []
69
+
70
+ post_install_message:
71
+ rdoc_options: []
72
+
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ hash: 3
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ requirements: []
94
+
95
+ rubyforge_project:
96
+ rubygems_version: 1.8.24
97
+ signing_key:
98
+ specification_version: 3
99
+ summary: vagrant-librarian integrates librarian to vagrant
100
+ test_files: []
101
+