Permalink
Browse files

Asset copy during the migration process (will work for both plugin an…

…d gem installation)
  • Loading branch information...
1 parent 4d89896 commit 9d37a82384044b5cecf22cc11c842e6e1776cce4 @bbenezech committed Aug 30, 2009
Showing with 16 additions and 14 deletions.
  1. +1 −1 MIT-LICENSE
  2. +7 −4 README.rdoc
  3. +1 −1 VERSION
  4. +6 −0 generators/papermill/papermill_generator.rb
  5. +0 −7 install.rb
  6. +1 −1 papermill.gemspec
View
@@ -1,4 +1,4 @@
-Copyright (c) 2009 [name of plugin creator]
+Copyright (c) 2009 [Benoit Bénézech]
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -19,17 +19,20 @@ Then install the whole thing:
sudo gem install ryanb-acts-as-list -s http://gems.github.com
sudo gem install paperclip
- sudo rake gems:install # will install the others gem. You need to install paperclip/acts_as_list first, because of a dependency requirement.
-
-In your model:
+ sudo rake gems:install # will install the others gem. You need to install paperclip & acts_as_list first, because of a dependency mayhem.
+ ./script/generate papermill PapermillMigration # will also copy a couple of static assets
+ rake db:migrate
+
+In your assetable model:
papermill :assets
In your layout:
<%= papermill_stylesheet_tag %>
<%= papermill_javascript_tag :with_jquery => true %>
-
+ # you don't need :with_jquery if it is already loaded, obviously.
+
In your edit form:
f.images_upload(:my_image_gallery)
View
@@ -1 +1 @@
-0.1.4
+0.2.0
@@ -8,6 +8,12 @@ def initialize(args, options = {})
def manifest
@migration_name = file_name.camelize
+ FileUtils.cp_r(
+ Dir[File.join(File.dirname(__FILE__), '../../public')],
+ File.join(RAILS_ROOT),
+ :verbose => true
+ )
+
record do |m|
# Migration creation
m.migration_template "migrate/papermill_migration.rb.erb", "db/migrate", :migration_file_name => migration_name.underscore
View
@@ -1,7 +0,0 @@
-require "fileutils"
-
-FileUtils.cp_r(
- Dir[File.join(File.dirname(__FILE__), 'public')],
- File.join(RAILS_ROOT),
- :verbose => true
-)
View
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{papermill}
- s.version = "0.1.4"
+ s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Benoit B\303\251n\303\251zech"]

0 comments on commit 9d37a82

Please sign in to comment.