beet 0.6.3 → 0.6.4

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/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  tmp
2
2
  *output
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ platforms :ruby do
4
+ if RUBY_VERSION < '1.9'
5
+ gem "ruby-debug", ">= 0.10.3"
6
+ else
7
+ gem "ruby-debug19", "~> 0.11.6"
8
+ end
9
+ end
10
+
11
+ gem "thor", "~> 0.14.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,25 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ archive-tar-minitar (0.5.2)
5
+ columnize (0.3.1)
6
+ linecache19 (0.5.11)
7
+ ruby_core_source (>= 0.1.4)
8
+ ruby-debug-base19 (0.11.24)
9
+ columnize (>= 0.3.1)
10
+ linecache19 (>= 0.5.11)
11
+ ruby_core_source (>= 0.1.4)
12
+ ruby-debug19 (0.11.6)
13
+ columnize (>= 0.3.1)
14
+ linecache19 (>= 0.5.11)
15
+ ruby-debug-base19 (>= 0.11.19)
16
+ ruby_core_source (0.1.4)
17
+ archive-tar-minitar (>= 0.5.2)
18
+ thor (0.14.0)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ ruby-debug19 (~> 0.11.6)
25
+ thor (~> 0.14.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
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.6.3"
8
+ s.version = "0.6.4"
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-09-03}
12
+ s.date = %q{2010-09-06}
13
13
  s.default_executable = %q{beet}
14
14
  s.email = %q{jack.dempsey@gmail.com}
15
15
  s.executables = ["beet"]
@@ -20,6 +20,8 @@ Gem::Specification.new do |s|
20
20
  ]
21
21
  s.files = [
22
22
  ".gitignore",
23
+ "Gemfile",
24
+ "Gemfile.lock",
23
25
  "LICENSE",
24
26
  "README.rdoc",
25
27
  "Rakefile",
@@ -65,6 +67,7 @@ Gem::Specification.new do |s|
65
67
  "lib/beet/recipes/rails/swfupload.rb",
66
68
  "lib/beet/recipes/rails/testing/rspec.rb",
67
69
  "lib/beet/recipes/rails/testing/shoulda.rb",
70
+ "lib/beet/recipes/rails3/admin_interface/active_scaffold.rb",
68
71
  "lib/beet/recipes/rails3/auth/devise.rb",
69
72
  "lib/beet/recipes/rails3/clean_files.rb",
70
73
  "lib/beet/recipes/rails3/css/reset.rb",
data/bin/beet CHANGED
@@ -40,17 +40,25 @@ class BeetRunner < Thor
40
40
  end
41
41
 
42
42
  desc 'list', "list what recipes and templates beet knows about"
43
- def list
43
+ method_options %w(templates -t) => :string
44
+ def list(pattern=nil)
44
45
  paths = []
45
46
  paths << File.dirname(__FILE__) + '/../lib/beet/recipes/**/*.rb'
46
47
  paths << ENV['BEET_RECIPES_DIR'] + '/**/*.rb' if ENV['BEET_RECIPES_DIR']
47
48
  recipes = paths.map do |path|
48
49
  Dir.glob(path)
49
50
  end.flatten.compact
51
+
52
+ recipes = recipes.grep(Regexp.new(pattern)) if pattern
53
+
50
54
  puts "\nRecipes: (e.g. beet -g app -r rails/git)"
51
55
  pp recipes
52
- puts "\nTemplates: (e.g. beet -g app -t bort)"
53
- pp TEMPLATE_LOCATIONS.sort.map {|array| array[0] + " => " + array[1]}
56
+
57
+ if options[:templates]
58
+ puts "\nTemplates: (e.g. beet -g app -t bort)"
59
+ pp TEMPLATE_LOCATIONS.sort.map {|array| array[0] + " => " + array[1]}
60
+ end
61
+
54
62
  puts "\nSaved Configurations:"
55
63
  print `cat #{ENV['HOME']}/.beet.yml`
56
64
  end
@@ -73,7 +81,7 @@ class BeetRunner < Thor
73
81
  desc 'help', 'help output'
74
82
  def help
75
83
  puts %{
76
- Usage: #{$0} /path/to/your/app [options]
84
+ Usage: beet /path/to/your/app [options]
77
85
 
78
86
  Options:
79
87
  -g, --generate Run the generate command to build a project
@@ -86,7 +94,7 @@ class BeetRunner < Thor
86
94
 
87
95
  Beet Info:
88
96
  -v, --version Show the Beet version number and quit.
89
- -l, --list Show the various recipes known to Beet and quit.
97
+ -l, --list [text] Show the various recipes known to Beet and quit. Pass in [text] to limit output to recipes that include [text]
90
98
  -h, --help Show this help message and quit.
91
99
 
92
100
  General Options:
data/lib/beet/executor.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'open-uri'
2
2
  require 'beet/logger'
3
3
  require 'yaml'
4
+ require 'ruby-debug'
4
5
 
5
6
  module Beet
6
7
  class Executor
@@ -32,7 +33,7 @@ module Beet
32
33
  end
33
34
 
34
35
  def start
35
- if @options[:use]
36
+ if options[:use]
36
37
  puts "Loading saved configuration: #{@options[:use]}"
37
38
  data = load_saved_recipe_file
38
39
  if config = data[@options[:use]]
@@ -68,7 +69,7 @@ module Beet
68
69
 
69
70
  print_todo
70
71
 
71
- if @options[:save]
72
+ if options[:save]
72
73
  save_run
73
74
  end
74
75
  end
@@ -135,8 +136,8 @@ module Beet
135
136
  end
136
137
 
137
138
  def extract_commands_from_options
138
- if @options[:gems]
139
- @options[:gems].split(/[\s,]+/).each do |gem|
139
+ if options[:gems]
140
+ options[:gems].split(/[\s,]+/).each do |gem|
140
141
  if gem_info = gem_location(gem)
141
142
  if gem_info.is_a?(Hash)
142
143
  @gems << {:name => gem}.merge(gem_info)
@@ -148,8 +149,8 @@ module Beet
148
149
  end
149
150
  end
150
151
  end
151
- if @options[:recipes]
152
- @options[:recipes].split(/[\s,]+/).each do |recipe|
152
+ if options[:recipes]
153
+ options[:recipes].split(/[\s,]+/).each do |recipe|
153
154
  if file = recipe_location(recipe)
154
155
  @recipes << file
155
156
  else
@@ -176,7 +177,7 @@ module Beet
176
177
 
177
178
  def load_saved_recipe_file
178
179
  if File.exists?(beet_data_file)
179
- ::YAML.load_file(beet_data_file)
180
+ ::YAML.load_file(beet_data_file) || {} # if for some reason is nil, give back an empty hash
180
181
  else
181
182
  {}
182
183
  end
data/lib/beet/rails.rb CHANGED
@@ -46,7 +46,7 @@ module Beet
46
46
  end
47
47
  elsif options[:git] || options[:svn]
48
48
  in_root do
49
- run_ruby_script("script/plugin install #{options[:svn] || options[:git]}", false)
49
+ run_ruby_script("script/rails plugin install #{options[:svn] || options[:git]}", false)
50
50
  end
51
51
  else
52
52
  log "! no git or svn provided for #{name}. skipping..."
@@ -0,0 +1,13 @@
1
+ # install plugins
2
+ #
3
+ plugin 'active_scaffold', :git => 'git://github.com/vhochstein/active_scaffold.git'
4
+ plugin 'verification', :git => 'git://github.com/rails/verification.git'
5
+ plugin 'render_component', :git => 'git://github.com/vhochstein/render_component.git'
6
+
7
+ # configure as much as we can automatically
8
+ add_after 'app/views/layouts/application.html.erb',' <%= csrf_meta_tag %>', ' <%= active_scaffold_includes %>'
9
+
10
+ if yes?("Use jquery? (y/n):")
11
+ gsub_file 'vendor/plugins/active_scaffold/environment.rb', /#ActiveScaffold.js_framework = :jquery/, 'ActiveScaffold.js_framework = :jquery'
12
+ end
13
+
@@ -1,5 +1,5 @@
1
1
  # this is designed for rails 3
2
- gem 'devise', :version => '1.1.rc2'
2
+ gem 'devise', :version => '1.1.2'
3
3
 
4
4
  generate "devise:install"
5
5
  generate "devise User"
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 6
9
- - 3
10
- version: 0.6.3
8
+ - 4
9
+ version: 0.6.4
11
10
  platform: ruby
12
11
  authors:
13
12
  - Jack Dempsey
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-03 00:00:00 -04:00
17
+ date: 2010-09-06 00:00:00 -04:00
19
18
  default_executable: beet
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
- hash: 39
30
28
  segments:
31
29
  - 0
32
30
  - 14
@@ -46,6 +44,8 @@ extra_rdoc_files:
46
44
  - TODO
47
45
  files:
48
46
  - .gitignore
47
+ - Gemfile
48
+ - Gemfile.lock
49
49
  - LICENSE
50
50
  - README.rdoc
51
51
  - Rakefile
@@ -91,6 +91,7 @@ files:
91
91
  - lib/beet/recipes/rails/swfupload.rb
92
92
  - lib/beet/recipes/rails/testing/rspec.rb
93
93
  - lib/beet/recipes/rails/testing/shoulda.rb
94
+ - lib/beet/recipes/rails3/admin_interface/active_scaffold.rb
94
95
  - lib/beet/recipes/rails3/auth/devise.rb
95
96
  - lib/beet/recipes/rails3/clean_files.rb
96
97
  - lib/beet/recipes/rails3/css/reset.rb
@@ -120,7 +121,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
121
  requirements:
121
122
  - - ">="
122
123
  - !ruby/object:Gem::Version
123
- hash: 3
124
124
  segments:
125
125
  - 0
126
126
  version: "0"
@@ -129,7 +129,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
- hash: 3
133
132
  segments:
134
133
  - 0
135
134
  version: "0"