beet 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/TODO +6 -0
- data/VERSION +1 -1
- data/beet.gemspec +3 -2
- data/lib/beet.rb +3 -0
- data/lib/beet/recipes/rails3/admin_interface/active_scaffold.rb +3 -6
- data/lib/beet/recipes/rails3/file_uploads/paperclip.rb +29 -0
- metadata +4 -3
data/Gemfile
CHANGED
data/TODO
CHANGED
@@ -17,3 +17,9 @@ and want to verify things worked correctly
|
|
17
17
|
* in fact, maybe make a .beetrc file where you can set a prefix permanently.
|
18
18
|
|
19
19
|
* use aruba to test beet - http://github.com/aslakhellesoy/aruba
|
20
|
+
|
21
|
+
* write recipes for
|
22
|
+
* multiple file uploads
|
23
|
+
* facebook connect with devise - http://stackoverflow.com/questions/3580557/rails-3-using-devise-how-to-allow-someone-to-log-in-using-their-facebook-account
|
24
|
+
|
25
|
+
* add in a "recipe not found: #{recipe}" so when things don't run it doesn't silently fail
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.7
|
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.
|
8
|
+
s.version = "0.6.7"
|
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-
|
12
|
+
s.date = %q{2010-09-09}
|
13
13
|
s.default_executable = %q{beet}
|
14
14
|
s.email = %q{jack.dempsey@gmail.com}
|
15
15
|
s.executables = ["beet"]
|
@@ -72,6 +72,7 @@ Gem::Specification.new do |s|
|
|
72
72
|
"lib/beet/recipes/rails3/clean_files.rb",
|
73
73
|
"lib/beet/recipes/rails3/css/reset.rb",
|
74
74
|
"lib/beet/recipes/rails3/db/mysql.rb",
|
75
|
+
"lib/beet/recipes/rails3/file_uploads/paperclip.rb",
|
75
76
|
"lib/beet/recipes/rails3/git.rb",
|
76
77
|
"lib/beet/recipes/rails3/js/jquery.rb",
|
77
78
|
"lib/beet/recipes/rails3/testing/cucumber.rb",
|
data/lib/beet.rb
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
# install plugins
|
2
2
|
#
|
3
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
4
|
|
10
5
|
if yes?("Use jquery? (y/n):")
|
11
|
-
|
6
|
+
generate "active_scaffold_setup jquery"
|
7
|
+
else
|
8
|
+
generate "active_scaffold_setup"
|
12
9
|
end
|
13
10
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
gem 'paperclip'
|
2
|
+
|
3
|
+
model_name = ask "Name of the model to add an attachment to, e.g. user_profile"
|
4
|
+
attachment_name = ask "Name for the attached file, e.g. has_attached_file :avatar"
|
5
|
+
underscored_model_name = model_name.underscore
|
6
|
+
|
7
|
+
in_root do
|
8
|
+
if File.exists?("app/models/#{model_name}.rb")
|
9
|
+
table_name = underscored_model_name.pluralize
|
10
|
+
|
11
|
+
generate "migration add_#{attachment_name}_to_#{table_name}"
|
12
|
+
migration_file = Dir["db/migrate/*add_#{attachment_name}_to_#{table_name}*"].first
|
13
|
+
add_after "db/migrate/#{migration_file}.rb", 'def self.up', do
|
14
|
+
%{
|
15
|
+
add_column :#{table_name}, #{attachment_name}_file_name:string
|
16
|
+
add_column :#{table_name}, #{attachment_name}_content_type:string
|
17
|
+
add_column :#{table_name}, #{attachment_name}_file_size:integer
|
18
|
+
add_column :#{table_name}, #{attachment_name}_updated_at:datetime
|
19
|
+
}
|
20
|
+
end
|
21
|
+
else
|
22
|
+
generate "model #{model_name} #{attachment_name}_file_name:string #{attachment_name}_content_type:string #{attachment_name}_file_size:integer #{attachment_name}_updated_at:datetime"
|
23
|
+
end
|
24
|
+
|
25
|
+
add_after "app/models/#{underscored_model_name}.rb", "class #{model_name.camelize} < ActiveRecord::Base", "has_attached_file :#{attachment_name}, :styles => { :thumb => '50x' }"
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
rake "db:migrate"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 7
|
9
|
+
version: 0.6.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jack Dempsey
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-09 00:00:00 -04:00
|
18
18
|
default_executable: beet
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/beet/recipes/rails3/clean_files.rb
|
97
97
|
- lib/beet/recipes/rails3/css/reset.rb
|
98
98
|
- lib/beet/recipes/rails3/db/mysql.rb
|
99
|
+
- lib/beet/recipes/rails3/file_uploads/paperclip.rb
|
99
100
|
- lib/beet/recipes/rails3/git.rb
|
100
101
|
- lib/beet/recipes/rails3/js/jquery.rb
|
101
102
|
- lib/beet/recipes/rails3/testing/cucumber.rb
|