merrycms 0.1.4 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ = Merrycms
2
+
3
+ == Install
4
+
5
+ gem 'merrycms'
6
+
7
+ $ bundle install
8
+
9
+ == Usage
10
+
11
+ rake merrycms:setup
12
+ rake db:migrate
13
+ rake merrycms:bootstrap
14
+
15
+ start the server and go to '/admin'
16
+
@@ -40,26 +40,7 @@ module Merrycms
40
40
  sleep 1
41
41
  migration_template 'roles_users_migration.rb', 'db/migrate/roles_users.rb'
42
42
  sleep 1
43
- end
44
-
45
- def create_page_and_category_migration_files
46
- migration_template 'create_pages_and_categories_migration.rb', 'db/migrate/create_pages_and_categories.rb'
47
- sleep 1
48
- end
49
-
50
- # pages and categories
51
- def generate_slugs_table
52
- invoke 'friendly_id'
53
- end
54
-
55
- def create_translations_migration_files
56
- migration_template 'create_translations_migration.rb', 'db/migrate/create_translations.rb'
57
- sleep 1
58
- end
59
-
60
- def copy_locale_initializer
61
- copy_file 'locale_initializer.rb', 'config/initializers/locale.rb'
62
- end
43
+ end
63
44
 
64
45
  end
65
46
  end
@@ -2,7 +2,7 @@ require 'rails/generators'
2
2
  require 'rails/generators/migration'
3
3
 
4
4
  module Merrycms
5
- class InstallImagesGenerator < Rails::Generators::Base
5
+ class InstallMediaGenerator < Rails::Generators::Base
6
6
  include Rails::Generators::Migration
7
7
 
8
8
  def self.source_root
@@ -17,7 +17,7 @@ module Merrycms
17
17
  end
18
18
  end
19
19
 
20
- def create_translations_migration_files
20
+ def create_images_migration_files
21
21
  migration_template 'create_images_migration.rb', 'db/migrate/create_images.rb'
22
22
  sleep 1
23
23
  end
@@ -25,6 +25,16 @@ module Merrycms
25
25
  def copy_locale_initializer
26
26
  copy_file 'paperclip_initializer.rb', 'config/initializers/paperclip.rb'
27
27
  end
28
+
29
+ def create_documents_migration_files
30
+ migration_template 'create_documents_migration.rb', 'db/migrate/create_documents.rb'
31
+ sleep 1
32
+ end
33
+
34
+ def create_videos_migration_files
35
+ migration_template 'create_videos_migration.rb', 'db/migrate/create_videos.rb'
36
+ sleep 1
37
+ end
28
38
 
29
39
  end
30
40
  end
@@ -25,16 +25,8 @@ module Merrycms
25
25
  # pages and categories
26
26
  def generate_slugs_table
27
27
  invoke 'friendly_id'
28
- end
29
-
30
- def create_translations_migration_files
31
- migration_template 'create_translations_migration.rb', 'db/migrate/create_translations.rb'
32
28
  sleep 1
33
29
  end
34
-
35
- def copy_locale_initializer
36
- copy_file 'locale_initializer.rb', 'config/initializers/locale.rb'
37
- end
38
30
 
39
31
  end
40
32
  end
@@ -5,9 +5,7 @@ namespace :merrycms do
5
5
  system("rails generate merrycms:install_auth")
6
6
  system("rails generate merrycms:install_pages")
7
7
  system("rails generate merrycms:install_translations")
8
- system("rails generate merrycms:install_images")
9
- system("rails generate merrycms:install_documents")
10
- system("rails generate merrycms:install_videos")
8
+ system("rails generate merrycms:install_media")
11
9
  system("rails generate jquery:install")
12
10
 
13
11
  Rake::Task['merrycms:import_assets'].invoke
@@ -24,7 +22,7 @@ namespace :merrycms do
24
22
  system(command)
25
23
  end
26
24
 
27
- desc "bootstrap app"
25
+ desc "bootstrap app : create admin user and root category"
28
26
  task :bootstrap => :environment do
29
27
  create_admins
30
28
  create_root_cat
@@ -47,7 +45,7 @@ namespace :merrycms do
47
45
  Category.find_or_create_by_name("root")
48
46
  end
49
47
 
50
- desc "cleanup current app"
48
+ desc "CAUTIOUS : cleanup current app by dropping the DB and removing all migration files"
51
49
  task :cleanapp => :environment do
52
50
  Rake::Task['db:drop'].invoke
53
51
  command = "rm -rf #{Rails.root}/db/migrate/*"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Franck D'agostini
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-31 00:00:00 +02:00
17
+ date: 2011-05-04 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -197,7 +197,7 @@ executables: []
197
197
  extensions: []
198
198
 
199
199
  extra_rdoc_files:
200
- - README
200
+ - README.rdoc
201
201
  files:
202
202
  - app/controllers/admin/base_controller.rb
203
203
  - app/controllers/admin/categories_controller.rb
@@ -301,11 +301,9 @@ files:
301
301
  - config/locales/fr/admin/videos.fr.yml
302
302
  - config/locales/fr/fr.yml
303
303
  - lib/generators/merrycms/install_auth_generator.rb
304
- - lib/generators/merrycms/install_documents_generator.rb
305
- - lib/generators/merrycms/install_images_generator.rb
304
+ - lib/generators/merrycms/install_media_generator.rb
306
305
  - lib/generators/merrycms/install_pages_generator.rb
307
306
  - lib/generators/merrycms/install_translations_generator.rb
308
- - lib/generators/merrycms/install_videos_generator.rb
309
307
  - lib/generators/merrycms/templates/create_documents_migration.rb
310
308
  - lib/generators/merrycms/templates/create_images_migration.rb
311
309
  - lib/generators/merrycms/templates/create_pages_and_categories_migration.rb
@@ -325,7 +323,7 @@ files:
325
323
  - lib/merrycms/validates_as_image.rb
326
324
  - lib/paperclip_processors/poster.rb
327
325
  - lib/paperclip_processors/video_thumbnail.rb
328
- - README
326
+ - README.rdoc
329
327
  has_rdoc: true
330
328
  homepage: https://github.com/franck/merrycms
331
329
  licenses: []
data/README DELETED
@@ -1,15 +0,0 @@
1
- Install
2
- gem 'merrycms'
3
-
4
- $ bundle install
5
-
6
- Usage
7
- r g merrycms:install
8
- rake db:migrate
9
- rake merrycms:bootstrap
10
-
11
- start the server
12
- go to '/admin'
13
-
14
- How to add a new resource in the admin panel
15
-
@@ -1,26 +0,0 @@
1
- require 'rails/generators'
2
- require 'rails/generators/migration'
3
-
4
- module Merrycms
5
- class InstallDocumentsGenerator < Rails::Generators::Base
6
- include Rails::Generators::Migration
7
-
8
- def self.source_root
9
- @source_root ||= File.join(File.dirname(__FILE__), 'templates')
10
- end
11
-
12
- def self.next_migration_number(dirname)
13
- if ActiveRecord::Base.timestamped_migrations
14
- Time.now.utc.strftime("%Y%m%d%H%M%S")
15
- else
16
- "%.3d" % (current_migration_number(dirname) + 1)
17
- end
18
- end
19
-
20
- def create_translations_migration_files
21
- migration_template 'create_documents_migration.rb', 'db/migrate/create_documents.rb'
22
- sleep 1
23
- end
24
-
25
- end
26
- end
@@ -1,26 +0,0 @@
1
- require 'rails/generators'
2
- require 'rails/generators/migration'
3
-
4
- module Merrycms
5
- class InstallVideosGenerator < Rails::Generators::Base
6
- include Rails::Generators::Migration
7
-
8
- def self.source_root
9
- @source_root ||= File.join(File.dirname(__FILE__), 'templates')
10
- end
11
-
12
- def self.next_migration_number(dirname)
13
- if ActiveRecord::Base.timestamped_migrations
14
- Time.now.utc.strftime("%Y%m%d%H%M%S")
15
- else
16
- "%.3d" % (current_migration_number(dirname) + 1)
17
- end
18
- end
19
-
20
- def create_translations_migration_files
21
- migration_template 'create_videos_migration.rb', 'db/migrate/create_videos.rb'
22
- sleep 1
23
- end
24
-
25
- end
26
- end