bootlace 0.1.6 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -7
- data/lib/bootlace/rake.rb +1 -1
- data/lib/bootlace/version.rb +1 -1
- data/lib/bootlace.rb +15 -5
- data/test/bootlace/rake_test.rb +6 -0
- data/test/bootlace_test.rb +3 -15
- metadata +10 -16
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bootlace
|
2
2
|
|
3
|
-
A simple gem for
|
3
|
+
A simple gem for getting your development (or other) environments setup quickly! Efficiently bootstrap Ruby applications based upon the GitHub script/bootstrap model, but with a clean DSL on top.
|
4
4
|
|
5
5
|
Right now it's very lightweight, and the DSL is expected to change as we use it on more projects and find we need to revise
|
6
6
|
how we're doing things.
|
@@ -29,13 +29,12 @@ Create a `script/bootstrap` file in your app that looks like so:
|
|
29
29
|
#!/bin/env ruby
|
30
30
|
|
31
31
|
require 'bootlace'
|
32
|
-
include Bootlace
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
bundler
|
37
|
-
|
38
|
-
|
33
|
+
Bootlace.strap_up do |b|
|
34
|
+
b.package mac: "redis", ubuntu: "redis-server"
|
35
|
+
b.bundler
|
36
|
+
b.rake 'db:create', environment: { RAILS_ENV: "test" }
|
37
|
+
end
|
39
38
|
```
|
40
39
|
|
41
40
|
## Contributing
|
data/lib/bootlace/rake.rb
CHANGED
data/lib/bootlace/version.rb
CHANGED
data/lib/bootlace.rb
CHANGED
@@ -6,9 +6,19 @@ require "bootlace/rake"
|
|
6
6
|
require "bootlace/bundler"
|
7
7
|
|
8
8
|
module Bootlace
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
class Base
|
10
|
+
include Bootlace::OS
|
11
|
+
include Bootlace::Logger
|
12
|
+
include Bootlace::Package
|
13
|
+
include Bootlace::Rake
|
14
|
+
include Bootlace::Bundler
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.base
|
18
|
+
@base ||= Bootlace::Base.new
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.strap_up
|
22
|
+
yield base if block_given?
|
23
|
+
end
|
14
24
|
end
|
data/test/bootlace/rake_test.rb
CHANGED
@@ -33,4 +33,10 @@ class RakeTest < Test::Unit::TestCase
|
|
33
33
|
bootstrap.rake "foo:bar:baz", environment: { "SOMEOPT" => "SET" }
|
34
34
|
assert_equal "SET", ENV['SOMEOPT']
|
35
35
|
end
|
36
|
+
|
37
|
+
def test_sets_symbolized_env_variables
|
38
|
+
bootstrap.stubs(:system).returns(0)
|
39
|
+
bootstrap.rake "foo:bar:baz", environment: { SOMEOPT: "SET" }
|
40
|
+
assert_equal "SET", ENV['SOMEOPT']
|
41
|
+
end
|
36
42
|
end
|
data/test/bootlace_test.rb
CHANGED
@@ -1,24 +1,12 @@
|
|
1
1
|
require File.expand_path("../../lib/bootlace", __FILE__)
|
2
2
|
require_relative 'test_helper.rb'
|
3
3
|
|
4
|
-
class Bootstrap
|
5
|
-
include Bootlace
|
6
|
-
end
|
7
|
-
|
8
4
|
class BootlaceTest < Test::Unit::TestCase
|
9
5
|
include TestHelpers
|
10
6
|
|
11
|
-
attr_accessor :bootstrap
|
12
|
-
|
13
|
-
def setup
|
14
|
-
@bootstrap = Bootstrap.new
|
15
|
-
end
|
16
|
-
|
17
7
|
def test_reality
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
bootstrap.package 'bar'
|
22
|
-
true
|
8
|
+
Bootlace.strap_up do |b|
|
9
|
+
assert_equal b, Bootlace.base
|
10
|
+
end
|
23
11
|
end
|
24
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootlace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
16
|
-
requirement: &
|
16
|
+
requirement: &70254552220420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70254552220420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activesupport
|
27
|
-
requirement: &
|
27
|
+
requirement: &70254552219760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70254552219760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: turn
|
38
|
-
requirement: &
|
38
|
+
requirement: &70254552219140 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70254552219140
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: pry
|
49
|
-
requirement: &
|
49
|
+
requirement: &70254552218520 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70254552218520
|
58
58
|
description: Simple gem for bootstrapping Ruby applications
|
59
59
|
email:
|
60
60
|
- will@highgroove.com
|
@@ -93,18 +93,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- - ! '>='
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
|
-
segments:
|
97
|
-
- 0
|
98
|
-
hash: -1560755192255842632
|
99
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
97
|
none: false
|
101
98
|
requirements:
|
102
99
|
- - ! '>='
|
103
100
|
- !ruby/object:Gem::Version
|
104
101
|
version: '0'
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
hash: -1560755192255842632
|
108
102
|
requirements: []
|
109
103
|
rubyforge_project:
|
110
104
|
rubygems_version: 1.8.16
|