mason 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +34 -15
- data/lib/mason/cli.rb +8 -6
- data/lib/mason/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -2,34 +2,34 @@
|
|
2
2
|
|
3
3
|
Build things
|
4
4
|
|
5
|
-
|
5
|
+
$ gem install mason
|
6
6
|
|
7
7
|
### Install buildpacks locally
|
8
8
|
|
9
9
|
$ mason buildpacks
|
10
10
|
* buildpacks (~/.mason/buildpacks)
|
11
|
-
=
|
12
|
-
=
|
11
|
+
= nodejs: https://github.com/heroku/heroku-buildpack-nodejs.git
|
12
|
+
= ruby: https://github.com/ddollar/heroku-buildpack-ruby.git
|
13
13
|
|
14
|
-
$ mason buildpacks:install https://github.com/
|
15
|
-
*
|
14
|
+
$ mason buildpacks:install https://github.com/heroku/heroku-buildpack-python.git
|
15
|
+
* installing buildpack https://github.com/heroku/heroku-buildpack-python.git
|
16
16
|
|
17
17
|
### Use buildpacks to build things
|
18
18
|
|
19
19
|
$ mason build /tmp/app
|
20
20
|
* detecting buildpack... done
|
21
|
-
= name:
|
22
|
-
= url: https://github.com/
|
21
|
+
= name: Ruby
|
22
|
+
= url: https://github.com/heroku/heroku-buildpack-ruby.git
|
23
23
|
* compiling:
|
24
24
|
... COMPILE OUTPUT
|
25
25
|
* packaging... done
|
26
|
-
= type:
|
27
|
-
= file: /tmp/
|
26
|
+
= type: dir
|
27
|
+
= file: /tmp/mason.out
|
28
28
|
|
29
29
|
$ mason build /tmp/app -t dir -o /tmp/compiledapp
|
30
30
|
* detecting buildpack... done
|
31
|
-
= name:
|
32
|
-
= url: https://github.com/
|
31
|
+
= name: Ruby
|
32
|
+
= url: https://github.com/heroku/heroku-buildpack-ruby.git
|
33
33
|
* compiling...
|
34
34
|
... COMPILE OUTPUT
|
35
35
|
* packaging... done
|
@@ -46,8 +46,27 @@ Build things
|
|
46
46
|
= type: tgz
|
47
47
|
= file: /tmp/app.tgz
|
48
48
|
|
49
|
-
###
|
49
|
+
### Build things for other platforms using Vagrant
|
50
|
+
|
51
|
+
You will need [VirtualBox](https://www.virtualbox.org/wiki/Downloads) for Vagrant to function.
|
52
|
+
|
53
|
+
$ gem install vagrant
|
54
|
+
|
55
|
+
$ vagrant box add cedar http://path/to/cedar.box
|
50
56
|
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
$ mason stacks:create cedar
|
58
|
+
* creating stack cedar... done
|
59
|
+
|
60
|
+
$ mason stacks:up VAGRANT_BOX_NAME
|
61
|
+
* booting stack cedar (this may take a while)... done
|
62
|
+
|
63
|
+
$ mason:build /tmp/app -t tgz -o /tmp/compiled.tgz
|
64
|
+
* booting stack cedar (this may take a while)... done
|
65
|
+
* detecting buildpack... done
|
66
|
+
= name: Baz
|
67
|
+
= url: https://github.com/ddollar/buildpack-baz.git
|
68
|
+
* compiling...
|
69
|
+
... COMPILE OUTPUT
|
70
|
+
* packaging... done
|
71
|
+
= type: tgz
|
72
|
+
= dir: /tmp/compiled.tgz
|
data/lib/mason/cli.rb
CHANGED
@@ -33,7 +33,9 @@ class Mason::CLI < Thor
|
|
33
33
|
|
34
34
|
type = File.extname(output)[1..-1] if !type && output
|
35
35
|
output = "#{app}.#{type}" if !output && type
|
36
|
-
|
36
|
+
|
37
|
+
type ||= "dir"
|
38
|
+
output ||= "/tmp/mason.out"
|
37
39
|
|
38
40
|
raise "no such output format: #{type}" unless %w( dir img tgz ).include?(type)
|
39
41
|
|
@@ -88,7 +90,7 @@ class Mason::CLI < Thor
|
|
88
90
|
system %{ tar czf "#{output}" . }
|
89
91
|
end
|
90
92
|
when :img then
|
91
|
-
|
93
|
+
raise "img not supported yet"
|
92
94
|
when :dir then
|
93
95
|
FileUtils.rm_rf output
|
94
96
|
FileUtils.cp_r compile_dir, output
|
@@ -129,14 +131,14 @@ class Mason::CLI < Thor
|
|
129
131
|
desc "buildpacks:install URL", "install a buildpack"
|
130
132
|
|
131
133
|
def install(url)
|
132
|
-
puts "*
|
134
|
+
puts "* installing buildpack #{url}"
|
133
135
|
Mason::Buildpacks.install url
|
134
136
|
end
|
135
137
|
|
136
138
|
desc "buildpacks:uninstall NAME", "uninstall a buildpack"
|
137
139
|
|
138
140
|
def uninstall(name)
|
139
|
-
puts "*
|
141
|
+
puts "* uninstalling buildpack #{name}"
|
140
142
|
Mason::Buildpacks.uninstall name
|
141
143
|
end
|
142
144
|
|
@@ -226,8 +228,8 @@ class Mason::CLI < Thor
|
|
226
228
|
end
|
227
229
|
|
228
230
|
klass.start(args)
|
229
|
-
|
230
|
-
|
231
|
+
rescue StandardError => ex
|
232
|
+
raise Mason::CommandFailed, ex.message
|
231
233
|
end
|
232
234
|
|
233
235
|
private
|
data/lib/mason/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mason
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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-03-
|
12
|
+
date: 2012-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70215443015460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70215443015460
|
25
25
|
description: Build things
|
26
26
|
email: ddollar@gmail.com
|
27
27
|
executables:
|