jackdempsey-beet 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/beet.gemspec +4 -2
- data/bin/beet +6 -2
- data/lib/beet/executor.rb +6 -10
- data/lib/beet/recipes/rails/css/blueprint.rb +5 -0
- data/lib/beet/template_location_map.rb +12 -0
- data/lib/beet.rb +1 -0
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/beet.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{beet}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jack Dempsey"]
|
9
|
-
s.date = %q{2009-06-
|
9
|
+
s.date = %q{2009-06-03}
|
10
10
|
s.default_executable = %q{beet}
|
11
11
|
s.email = %q{jack.dempsey@gmail.com}
|
12
12
|
s.executables = ["beet"]
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/beet/recipes/rack/middleware.rb",
|
36
36
|
"lib/beet/recipes/rails/authlogic.rb",
|
37
37
|
"lib/beet/recipes/rails/clean_files.rb",
|
38
|
+
"lib/beet/recipes/rails/css/blueprint.rb",
|
38
39
|
"lib/beet/recipes/rails/css/reset.rb",
|
39
40
|
"lib/beet/recipes/rails/db/mysql.rb",
|
40
41
|
"lib/beet/recipes/rails/git.rb",
|
@@ -44,6 +45,7 @@ Gem::Specification.new do |s|
|
|
44
45
|
"lib/beet/scm.rb",
|
45
46
|
"lib/beet/scm/git.rb",
|
46
47
|
"lib/beet/scm/svn.rb",
|
48
|
+
"lib/beet/template_location_map.rb",
|
47
49
|
"test/executor_test.rb",
|
48
50
|
"test/file_system_shoulda_test.rb",
|
49
51
|
"test/test_helper.rb"
|
data/bin/beet
CHANGED
@@ -15,12 +15,16 @@ class BeetRunner < Thor
|
|
15
15
|
map "--list" => :list
|
16
16
|
|
17
17
|
desc 'generate [app_name]', "the main app generate method"
|
18
|
-
method_options :recipes => :optional, :gems => :optional
|
18
|
+
method_options :recipes => :optional, :gems => :optional, :template => :optional
|
19
19
|
def generate(app_name, type=:rails)
|
20
20
|
case type
|
21
21
|
when :rails
|
22
22
|
puts "Generating rails project #{app_name}..."
|
23
|
-
|
23
|
+
if options[:template]
|
24
|
+
system("rails #{app_name} -m #{::TEMPLATE_LOCATIONS[options[:template]]}")
|
25
|
+
else
|
26
|
+
system("rails #{app_name}")
|
27
|
+
end
|
24
28
|
executor = Beet::Executor.new(app_name, options)
|
25
29
|
executor.start
|
26
30
|
else
|
data/lib/beet/executor.rb
CHANGED
@@ -50,16 +50,12 @@ module Beet
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def run_recipes
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
in_root { self.instance_eval(code) }
|
60
|
-
rescue LoadError, Errno::ENOENT => e
|
61
|
-
raise "The recipe [#{recipe}] could not be loaded. Error: #{e}"
|
62
|
-
end
|
53
|
+
@recipes.each do |recipe|
|
54
|
+
begin
|
55
|
+
code = open(recipe).read
|
56
|
+
in_root { self.instance_eval(code) }
|
57
|
+
rescue LoadError, Errno::ENOENT => e
|
58
|
+
raise "The recipe [#{recipe}] could not be loaded. Error: #{e}"
|
63
59
|
end
|
64
60
|
end
|
65
61
|
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
FileUtils.mkdir_p("public/stylesheets/blueprint")
|
2
|
+
%w(forms.css grid.css grid.png ie.css print.css reset.css typography.css).each do |file|
|
3
|
+
run "curl -L http://github.com/joshuaclayton/blueprint-css/blob/master/blueprint/src/#{file} \
|
4
|
+
> public/stylesheets/blueprint/#{file}"
|
5
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
TEMPLATE_LOCATIONS = {
|
2
|
+
'browsercms' => 'http://github.com/browsermedia/browsercms/raw/master/templates/blank.rb',
|
3
|
+
'bort' => 'http://github.com/jeremymcanally/rails-templates/raw/master/bort.rb',
|
4
|
+
'daring' => 'http://github.com/jeremymcanally/rails-templates/raw/master/daring.rb',
|
5
|
+
'datamapper' => 'http://github.com/jeremymcanally/rails-templates/raw/master/datamapper.rb',
|
6
|
+
'entp' => 'http://github.com/jeremymcanally/rails-templates/raw/master/entp.rb',
|
7
|
+
'facebook' => 'http://github.com/jeremymcanally/rails-templates/raw/master/facebook.rb',
|
8
|
+
'google_app_engine' => 'http://github.com/jeremymcanally/rails-templates/raw/master/google_app_engine.rb',
|
9
|
+
'newgit' => 'http://github.com/jeremymcanally/rails-templates/raw/master/newgit.rb',
|
10
|
+
'sethbc' => 'http://github.com/jeremymcanally/rails-templates/raw/master/sethbc.rb',
|
11
|
+
'suspenders' => 'http://github.com/jeremymcanally/rails-templates/raw/master/suspenders.rb'
|
12
|
+
}
|
data/lib/beet.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jackdempsey-beet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Dempsey
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-03 00:00:00 -07:00
|
13
13
|
default_executable: beet
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/beet/recipes/rack/middleware.rb
|
53
53
|
- lib/beet/recipes/rails/authlogic.rb
|
54
54
|
- lib/beet/recipes/rails/clean_files.rb
|
55
|
+
- lib/beet/recipes/rails/css/blueprint.rb
|
55
56
|
- lib/beet/recipes/rails/css/reset.rb
|
56
57
|
- lib/beet/recipes/rails/db/mysql.rb
|
57
58
|
- lib/beet/recipes/rails/git.rb
|
@@ -61,6 +62,7 @@ files:
|
|
61
62
|
- lib/beet/scm.rb
|
62
63
|
- lib/beet/scm/git.rb
|
63
64
|
- lib/beet/scm/svn.rb
|
65
|
+
- lib/beet/template_location_map.rb
|
64
66
|
- test/executor_test.rb
|
65
67
|
- test/file_system_shoulda_test.rb
|
66
68
|
- test/test_helper.rb
|