beet 0.3.1 → 0.4.0

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/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gem.email = "jack.dempsey@gmail.com"
10
10
  gem.homepage = "http://github.com/jackdempsey/beet"
11
11
  gem.authors = ["Jack Dempsey"]
12
- gem.add_dependency "wycats-thor", "= 0.11.5"
12
+ gem.add_dependency "thor", "~> 0.11.6"
13
13
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
14
  end
15
15
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beet}
8
- s.version = "0.3.1"
8
+ s.version = "0.4.0"
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{2009-10-24}
12
+ s.date = %q{2009-11-03}
13
13
  s.default_executable = %q{beet}
14
14
  s.email = %q{jack.dempsey@gmail.com}
15
15
  s.executables = ["beet"]
@@ -79,11 +79,11 @@ Gem::Specification.new do |s|
79
79
  s.specification_version = 3
80
80
 
81
81
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
82
- s.add_runtime_dependency(%q<wycats-thor>, ["= 0.11.5"])
82
+ s.add_runtime_dependency(%q<thor>, ["~> 0.11.6"])
83
83
  else
84
- s.add_dependency(%q<wycats-thor>, ["= 0.11.5"])
84
+ s.add_dependency(%q<thor>, ["~> 0.11.6"])
85
85
  end
86
86
  else
87
- s.add_dependency(%q<wycats-thor>, ["= 0.11.5"])
87
+ s.add_dependency(%q<thor>, ["~> 0.11.6"])
88
88
  end
89
89
  end
data/bin/beet CHANGED
@@ -26,14 +26,14 @@ 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 -g) => :string, %w(template -t) => :string, %w(save -s) => :string, %w(use -u) => :string
29
+ method_options %w(recipes -r) => :string, %w(gems) => :string, %w(template -t) => :string, %w(save -s) => :string, %w(use -u) => :string
30
30
  def generate(app_name, project_type=:rails)
31
31
  executor = Beet::Executor.new(app_name, options.merge('project_type' => project_type))
32
32
  executor.start
33
33
  end
34
34
 
35
35
  desc 'just_recipe', "when you just need a recipe"
36
- method_options %w(recipes -r) => :string, %w(gems -g) => :string, %w(save -s) => :string, %w(use -u) => :string
36
+ method_options %w(recipes -r) => :string, %w(gems) => :string, %w(save -s) => :string, %w(use -u) => :string
37
37
  def just_recipe(app_name='.')
38
38
  executor = Beet::Executor.new(app_name, options.merge('generate' => false))
39
39
  executor.start
@@ -77,6 +77,10 @@ class BeetRunner < Thor
77
77
  -g, --generate Run the generate command to build a project
78
78
  -j, --just_recipe Run the just_recipe command to only run specified recipes, templates, etc.
79
79
  -d, --display Instead of running, show the template or recipe body
80
+ -r, --recipes Recipes to use
81
+ -s, --save Save current set of options
82
+ -u, --use Use a saved set of options
83
+ --gems Gems to include
80
84
 
81
85
  Beet Info:
82
86
  -v, --version Show the Beet version number and quit.
@@ -119,7 +119,9 @@ module Beet
119
119
  def add_gems
120
120
  if @gems
121
121
  @gems.each do |gem_data|
122
- gem(gem_data[:name], :source => gem_data[:source])
122
+ duped_data = gem_data.clone # to avoid removing :name from @gems
123
+ name = duped_data.delete(:name)
124
+ gem(name, duped_data)
123
125
  end
124
126
  end
125
127
  end
@@ -127,10 +129,14 @@ module Beet
127
129
  def extract_commands_from_options
128
130
  if @options[:gems]
129
131
  @options[:gems].split(/[\s,]+/).each do |gem|
130
- if location = gem_location(gem)
131
- @gems << {:name => gem, :source => location}
132
+ if gem_info = gem_location(gem)
133
+ if gem_info.is_a?(Hash)
134
+ @gems << {:name => gem}.merge(gem_info)
135
+ else
136
+ @gems << {:name => gem, :source => gem_info}
137
+ end
132
138
  else
133
- puts "gem: #{gem} not found. Did you spell it correctly? If so, submit a patch with its location!"
139
+ @gems << {:name => gem}
134
140
  end
135
141
  end
136
142
  end
@@ -61,4 +61,5 @@ GEM_LOCATIONS = {
61
61
  'passenger' => 'git://github.com/FooBarWidget/passenger.git',
62
62
  'thin' => 'git://github.com/macournoyer/thin.git',
63
63
  'happymapper' => 'git://github.com/jnunemaker/happymapper.git',
64
+ 'simple-navigation' => {:source => 'git://github.com/andi/simple-navigation.git', :lib => 'simple_navigation'}
64
65
  }
@@ -12,6 +12,6 @@ RackEnv development
12
12
  }.strip
13
13
  end
14
14
  default_to = "/etc/apache2/passenger_pane_vhosts"
15
- answer = ask "Write file to: [#{default_to} default]"
15
+ answer = ask "Where should we write out vhost config: [#{default_to} is default]"
16
16
  filename = answer.empty? ? default_to : answer
17
17
  sudo "mv ./#{project_name}.local.vhost.conf #{filename}"
@@ -291,7 +291,12 @@ end
291
291
 
292
292
  gem 'authlogic', :version => '~> 2.0.0'
293
293
 
294
- rake "gems:install", :sudo => true
294
+ if yes?("Install using sudo?")
295
+ rake "gems:install", :sudo => true
296
+ else
297
+ rake "gems:install"
298
+ end
299
+
295
300
  rake "db:create:all"
296
301
  rake "db:migrate"
297
302
 
@@ -2,6 +2,8 @@ TEMPLATE_LOCATIONS = {
2
2
  'browsercms' => 'http://github.com/browsermedia/browsercms/raw/master/templates/blank.rb',
3
3
  'browsercms_demo' => 'http://github.com/browsermedia/browsercms/raw/master/templates/demo.rb',
4
4
  'bort' => 'http://github.com/jeremymcanally/rails-templates/raw/master/bort.rb',
5
+ 'bundler' => 'http://github.com/tomafro/dotfiles/raw/master/resources/rails/bundler.rb',
6
+ 'compass' => 'http://github.com/chriseppstein/compass/raw/master/lib/compass/app_integration/rails/templates/compass-install-rails.rb',
5
7
  'daring' => 'http://github.com/jeremymcanally/rails-templates/raw/master/daring.rb',
6
8
  'datamapper' => 'http://github.com/jeremymcanally/rails-templates/raw/master/datamapper.rb',
7
9
  'entp' => 'http://github.com/jeremymcanally/rails-templates/raw/master/entp.rb',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Dempsey
@@ -9,18 +9,18 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-24 00:00:00 -04:00
12
+ date: 2009-11-03 00:00:00 -05:00
13
13
  default_executable: beet
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: wycats-thor
16
+ name: thor
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - "="
21
+ - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.11.5
23
+ version: 0.11.6
24
24
  version:
25
25
  description:
26
26
  email: jack.dempsey@gmail.com