beet 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.5
1
+ 0.4.6
data/beet.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beet}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Dempsey"]
12
- s.date = %q{2010-01-09}
12
+ s.date = %q{2010-03-14}
13
13
  s.default_executable = %q{beet}
14
14
  s.email = %q{jack.dempsey@gmail.com}
15
15
  s.executables = ["beet"]
@@ -76,7 +76,7 @@ Gem::Specification.new do |s|
76
76
  s.homepage = %q{http://github.com/jackdempsey/beet}
77
77
  s.rdoc_options = ["--charset=UTF-8"]
78
78
  s.require_paths = ["lib"]
79
- s.rubygems_version = %q{1.3.5}
79
+ s.rubygems_version = %q{1.3.6}
80
80
  s.summary = %q{A gem to help with easily generating projects}
81
81
  s.test_files = [
82
82
  "test/executor_test.rb",
data/bin/beet CHANGED
@@ -26,9 +26,9 @@ class BeetRunner < Thor
26
26
  map "--display" => :display
27
27
 
28
28
  desc 'generate [app_name]', "the main app generate method"
29
- method_options %w(recipes -r) => :string, %w(gems) => :string, %w(template -t) => :string, %w(save -s) => :string, %w(use -u) => :string
30
- def generate(app_name, project_type=:rails)
31
- executor = Beet::Executor.new(app_name, options.merge('project_type' => project_type))
29
+ method_options %w(recipes -r) => :string, %w(project_type -p) => :project_type, %w(gems) => :string, %w(template -t) => :string, %w(save -s) => :string, %w(use -u) => :string
30
+ def generate(app_name)
31
+ executor = Beet::Executor.new(app_name, options)
32
32
  executor.start
33
33
  end
34
34
 
@@ -43,7 +43,7 @@ class BeetRunner < Thor
43
43
  def list
44
44
  paths = []
45
45
  paths << File.dirname(__FILE__) + '/../lib/beet/recipes/**/*.rb'
46
- paths << ENV['BEET_RECIPES_DIR'] if ENV['BEET_RECIPES_DIR']
46
+ paths << ENV['BEET_RECIPES_DIR'] + '/**/*.rb' if ENV['BEET_RECIPES_DIR']
47
47
  recipes = paths.map do |path|
48
48
  Dir.glob(path)
49
49
  end.flatten.compact
@@ -51,6 +51,8 @@ class BeetRunner < Thor
51
51
  pp recipes
52
52
  puts "\nTemplates: (e.g. beet -g app -t bort)"
53
53
  pp TEMPLATE_LOCATIONS.sort.map {|array| array[0] + " => " + array[1]}
54
+ puts "\nSaved Configurations:"
55
+ print `cat #{ENV['HOME']}/.beet.yml`
54
56
  end
55
57
 
56
58
  desc 'display', "Display the code for the recipes/templates"
data/lib/beet/executor.rb CHANGED
@@ -24,7 +24,7 @@ module Beet
24
24
  @options = options
25
25
  @todo_items = ''
26
26
  @recipes = []
27
- @project_type = options[:project_type]
27
+ @project_type = options[:project_type].to_sym || :rails
28
28
  @generate = true unless options[:generate] == false
29
29
  @display = options[:display]
30
30
  extract_commands_from_options
@@ -45,6 +45,21 @@ module Beet
45
45
  puts open(TEMPLATE_LOCATIONS[@template]).read
46
46
  else
47
47
  case @project_type
48
+ when :rails3
49
+ # TODO win compatibility
50
+ unless `which rails3`.blank?
51
+ if @generate
52
+ puts "Generating rails 3 project #{project_name}..."
53
+ if @template
54
+ system("rails3 #{project_name} -m #{TEMPLATE_LOCATIONS[@template]}")
55
+ else
56
+ system("rails3 #{project_name}")
57
+ end
58
+ end
59
+ else
60
+ puts "Beet relies on you defining a rails3 command to build rails 3 projects. Please make sure one is available in your PATH."
61
+ exit
62
+ end
48
63
  when :rails
49
64
  if @generate
50
65
  puts "Generating rails project #{project_name}..."
@@ -1,5 +1,5 @@
1
- gem 'warden', :version => '~> 0.6.5'
2
- gem 'devise', :version => '~> 0.7.1'
1
+ gem 'warden', :version => '0.9.3'
2
+ gem 'devise', :version => '1.0.2'
3
3
 
4
4
  rake 'gems:install'
5
5
  generate "devise_install"
@@ -7,7 +7,6 @@ generate "devise User"
7
7
  generate "devise_views"
8
8
 
9
9
  append_file 'config/environments/development.rb', "\nconfig.action_mailer.default_url_options = { :host => 'localhost:3000' }\n"
10
- append_file 'config/environment.rb', "\nDeviseMailer.sender = 'test@example.com'\n"
11
10
  add_after 'config/routes.rb', '# map.root :controller => "welcome"', "\n map.root :controller => 'home'\n"
12
11
 
13
12
  rake "db:migrate"
@@ -15,7 +14,7 @@ rake "db:migrate"
15
14
  file 'app/controllers/home_controller.rb' do
16
15
  %{class HomeController < ApplicationController
17
16
  def index
18
- render :text => "Welcome!"
17
+ render :text => "Welcome from your HomeController!"
19
18
  end
20
19
  end
21
20
  }
@@ -11,7 +11,7 @@ log/*.*
11
11
  db/*.db
12
12
  db/*.sqlite3
13
13
  db/schema.rb
14
- tmp/*.*
14
+ tmp/*
15
15
  .DS_Store
16
16
  doc/api
17
17
  doc/app
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 4
8
+ - 6
9
+ version: 0.4.6
5
10
  platform: ruby
6
11
  authors:
7
12
  - Jack Dempsey
@@ -9,19 +14,23 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-09 00:00:00 -05:00
17
+ date: 2010-03-14 00:00:00 -05:00
13
18
  default_executable: beet
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: thor
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ~>
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 11
30
+ - 6
23
31
  version: 0.11.6
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  description:
26
35
  email: jack.dempsey@gmail.com
27
36
  executables:
@@ -99,18 +108,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
108
  requirements:
100
109
  - - ">="
101
110
  - !ruby/object:Gem::Version
111
+ segments:
112
+ - 0
102
113
  version: "0"
103
- version:
104
114
  required_rubygems_version: !ruby/object:Gem::Requirement
105
115
  requirements:
106
116
  - - ">="
107
117
  - !ruby/object:Gem::Version
118
+ segments:
119
+ - 0
108
120
  version: "0"
109
- version:
110
121
  requirements: []
111
122
 
112
123
  rubyforge_project:
113
- rubygems_version: 1.3.5
124
+ rubygems_version: 1.3.6
114
125
  signing_key:
115
126
  specification_version: 3
116
127
  summary: A gem to help with easily generating projects