tiny_cms 0.2.2 → 0.2.3

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/README.rdoc CHANGED
@@ -22,25 +22,27 @@ and authentication/authorization for page creation, deletion and editing for the
22
22
 
23
23
  - Run the tiny_cms_assets generator, this will copy jquery-1.4.1, jquery-tree, a minimal version of jquery-ui
24
24
  and tiny_cms.js and some stylesheets to your app's public folder and a locale file to config/locales:
25
-
25
+
26
26
  $ script/generate tiny_cms_assets
27
-
27
+
28
28
  - Run tiny_cms generator passing a resource name to generate model, controller and migration files and write the routes:
29
-
29
+
30
30
  $ script/generate tiny_cms page
31
-
31
+
32
32
  - Run the migrations
33
33
 
34
34
  - If you wan't to customize the views or use a templating language you can copy the views to your app:
35
-
35
+
36
36
  $ script/generate tiny_cms_views
37
-
37
+
38
38
  - In your application layout or the layout for the resource you created include jquery and the tiny_cms.js file:
39
39
 
40
40
  <%= javascript_include_tag 'jquery-1.4.2.min' %>
41
41
  <%= javascript_include_tag 'tiny_cms' %>
42
-
43
- - visit /pages of your app
42
+
43
+ - Visit /pages of your app
44
+
45
+ - Use right mouse button for functions related to nodes
44
46
 
45
47
 
46
48
  == Copyright
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "tiny_cms"
8
8
  gem.summary = %Q{Minimal CMS Rails Engine or more likelly a "static" pages manager}
9
- gem.description = %Q{Minimal CMS Rails Engine or more likelly a "static" pages manager.\nPages can be created, deleted, edited and arranged into sections using a file tree like interface courtesy of jQuery tree (http://jstree.com).\n\nIt attempts to be as minimal, flexible and unobtrusive as posible leaving a lot of functionality like templating languages\nand authentication/authorization for page creation, deletion and editing for the Rails app developer to implement.}
9
+ gem.description = %Q{Minimal CMS Rails Engine or more likelly a "static" pages manager.\nPages can be created, deleted, edited and arranged into sections using a file tree like interface courtesy of jQuery tree (http://jstree.com).\n\nIt attempts to be as minimal, flexible and unobtrusive as posible leaving a lot of functionality like templating languages\nand authentication/authorization for page creation, deletion and editing for the Rails app developer to implement. (It now works after premature release)}
10
10
  gem.email = "macarui@gmail.com"
11
11
  gem.homepage = "http://github.com/maca/tiny_cms"
12
12
  gem.authors = ["Macario"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -5,19 +5,12 @@ module Rails
5
5
 
6
6
  # Create devise route. Based on route_resources
7
7
  def route_tiny_cms resource
8
- new_routes = <<-RUBY
9
- map.resources :#{resource}, :except => [:new], :collection => {:reorder => :put}
10
- map.all '*path', :controller => :#{resource}, :action => :show
11
- RUBY
12
-
8
+ new_routes = "map.resources :#{resource}, :except => [:new], :collection => {:reorder => :put}\n map.all '*path', :controller => :#{resource}, :action => :show"
13
9
  logger.route new_routes
14
10
 
15
11
  unless options[:pretend]
16
12
  gsub_file 'config/routes.rb', /(end(?:\n|\s)*\Z)/mi do |match|
17
- <<-RUBY
18
- #{ new_routes }
19
- #{ match }
20
- RUBY
13
+ " #{ new_routes }\nend"
21
14
  end
22
15
  end
23
16
  end
@@ -25,14 +18,11 @@ module Rails
25
18
 
26
19
  class Destroy < RewindBase
27
20
  # Destroy devise route. Based on route_resources
28
- def route_devise resource
21
+ def route_tiny_cms resource
29
22
  logger.route "Removing routes for #{resource} resource and catch all route"
30
-
31
- look_for = "\n map.resources :#{resource}, :except => [:new], :collection => {:reorder => :put}\n"
32
- gsub_file 'config/routes.rb', /(#{look_for})/mi, ''
33
-
34
- look_for = "\n map.resources :#{resource}, :except => [:new], :collection => {:reorder => :put}\n"
35
- gsub_file 'config/routes.rb', /#{look_for}/mi, ''
23
+
24
+ new_routes = " map.resources :#{resource}, :except => [:new], :collection => {:reorder => :put}\n map.all '*path', :controller => :#{resource}, :action => :show\n"
25
+ gsub_file 'config/routes.rb', new_routes, ''
36
26
  end
37
27
  end
38
28
  end
@@ -1,2 +1,2 @@
1
- class <%= plural_class_name %>Controller < TinyCMS::PagesController
1
+ class <%= class_name.pluralize %>Controller < TinyCMS::PagesController
2
2
  end
@@ -7,10 +7,11 @@ class TinyCmsGenerator < Rails::Generator::NamedBase
7
7
  m.directory "app/models/#{class_path}"
8
8
  m.template 'model.rb', "app/models/#{file_path}.rb"
9
9
 
10
+ m.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "tiny_cms_create_#{table_name}"
11
+
10
12
  m.directory "app/controllers/#{class_path}"
11
13
  m.template 'controller.rb', "app/controllers/#{plural_name}_controller.rb"
12
14
 
13
- m.migration_template 'migration.rb', 'db/migrate', :migration_file_name => "tiny_cms_create_#{table_name}"
14
15
  m.route_tiny_cms table_name
15
16
  end
16
17
  end
@@ -1,4 +1,4 @@
1
- document.write("<script type='text/javascript' src='/javascripts/jquery-tree/jquery.tree.js'></script>");
1
+ document.write("<script type='text/javascript' src='/javascripts/jquery-tree/jquery.tree.min.js'></script>");
2
2
  document.write("<script type='text/javascript' src='/javascripts/jquery-tree/jquery-tree-plugins/jquery.tree.contextmenu.js'></script>");
3
3
  document.write("<script type='text/javascript' src='/javascripts/jquery-ui-dialog.js'></script>");
4
4
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Macario
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-01 00:00:00 -05:00
17
+ date: 2010-06-04 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ description: |-
48
48
  Pages can be created, deleted, edited and arranged into sections using a file tree like interface courtesy of jQuery tree (http://jstree.com).
49
49
 
50
50
  It attempts to be as minimal, flexible and unobtrusive as posible leaving a lot of functionality like templating languages
51
- and authentication/authorization for page creation, deletion and editing for the Rails app developer to implement.
51
+ and authentication/authorization for page creation, deletion and editing for the Rails app developer to implement. (It now works after premature release)
52
52
  email: macarui@gmail.com
53
53
  executables: []
54
54