feather_cms 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/feather_cms/config.rb +0 -4
- data/lib/feather_cms/version.rb +1 -1
- data/lib/feather_cms.rb +0 -1
- data/lib/generators/feather_cms/feather_cms_generator.rb +3 -2
- data/lib/generators/feather_cms/templates/helper.rb +18 -0
- data/lib/generators/feather_cms/templates/model.rb +2 -0
- metadata +4 -4
- data/lib/feather_cms/view_helper.rb +0 -20
data/lib/feather_cms/config.rb
CHANGED
@@ -17,10 +17,6 @@ module FeatherCms
|
|
17
17
|
FeatherCms::TemplateCache.init
|
18
18
|
Dir.mkdir(template_store_path) unless Dir.exists?(template_store_path)
|
19
19
|
|
20
|
-
if defined?(ActionView::Helpers)
|
21
|
-
ActionView::Helpers.send(:include, FeatherCms::ViewHelper)
|
22
|
-
end
|
23
|
-
|
24
20
|
if defined?(Rails)
|
25
21
|
@@config[:layouts] = Dir.entries(Rails.root.to_s + '/app/views/layouts').reject do |i|
|
26
22
|
i.start_with?('.', '_', 'feather_layout')
|
data/lib/feather_cms/version.rb
CHANGED
data/lib/feather_cms.rb
CHANGED
@@ -7,8 +7,9 @@ class FeatherCmsGenerator < Rails::Generators::Base
|
|
7
7
|
@storage = ['file', 'db'].include?(options['storage']) ? options['storage'] : 'file'
|
8
8
|
|
9
9
|
template 'initializer.rb', 'config/initializers/feather_cms.rb'
|
10
|
-
template 'controller.rb',
|
11
|
-
template 'model.rb',
|
10
|
+
template 'controller.rb', 'app/controllers/feathers_controller.rb'
|
11
|
+
template 'model.rb', 'app/models/feather_page.rb'
|
12
|
+
template 'helper.rb', 'app/helpers/feathers_helper.rb'
|
12
13
|
|
13
14
|
migration_file = Dir.glob("db/migrate/[0-9]*_*.rb").grep(/\d+_create_feather_pages.rb$/).first
|
14
15
|
migration_number = if migration_file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module FeathersHelper
|
2
|
+
def feather_cms_include_tag
|
3
|
+
javascript_include_tag('codemirror', 'modes/htmlmixed', 'modes/javascript',
|
4
|
+
'modes/xml', 'modes/css', 'feather_cms') +
|
5
|
+
stylesheet_link_tag('codemirror')
|
6
|
+
end
|
7
|
+
|
8
|
+
def feather_cms_template(object_name, method, options = {})
|
9
|
+
options[:class] = "#{options[:class]} codemirror_feather_cms"
|
10
|
+
text_area(object_name, method, options = {})
|
11
|
+
end
|
12
|
+
|
13
|
+
def feather_cms_template_tag(name, content = nil, options = {})
|
14
|
+
options[:class] = "#{options[:class]} codemirror_feather_cms"
|
15
|
+
text_area_tag(name, content = nil, options = {})
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feather_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152934440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152934440
|
25
25
|
description: Lightweight do it youself cms
|
26
26
|
email:
|
27
27
|
- jiren@joshsoftware.com
|
@@ -40,7 +40,6 @@ files:
|
|
40
40
|
- lib/feather_cms/railtie.rb
|
41
41
|
- lib/feather_cms/template_cache.rb
|
42
42
|
- lib/feather_cms/version.rb
|
43
|
-
- lib/feather_cms/view_helper.rb
|
44
43
|
- lib/generators/feather_cms/USAGE
|
45
44
|
- lib/generators/feather_cms/feather_cms_generator.rb
|
46
45
|
- lib/generators/feather_cms/templates/bootstrap.css
|
@@ -65,6 +64,7 @@ files:
|
|
65
64
|
- lib/generators/feather_cms/templates/codemirror/util/simple-hint.js
|
66
65
|
- lib/generators/feather_cms/templates/controller.rb
|
67
66
|
- lib/generators/feather_cms/templates/form.html.erb
|
67
|
+
- lib/generators/feather_cms/templates/helper.rb
|
68
68
|
- lib/generators/feather_cms/templates/index.html.erb
|
69
69
|
- lib/generators/feather_cms/templates/initializer.rb
|
70
70
|
- lib/generators/feather_cms/templates/layout.html.erb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module FeatherCms
|
2
|
-
module ViewHelper
|
3
|
-
def feather_cms_include_tag
|
4
|
-
javascript_include_tag('codemirror', 'modes/htmlmixed', 'modes/javascript',
|
5
|
-
'modes/xml', 'modes/css', 'feather_cms') +
|
6
|
-
stylesheet_link_tag('codemirror')
|
7
|
-
end
|
8
|
-
|
9
|
-
def feather_cms_template(object_name, method, options = {})
|
10
|
-
options[:class] = "#{options[:class]} codemirror_feather_cms"
|
11
|
-
text_area(object_name, method, options = {})
|
12
|
-
end
|
13
|
-
|
14
|
-
def feather_cms_template_tag(name, content = nil, options = {})
|
15
|
-
options[:class] = "#{options[:class]} codemirror_feather_cms"
|
16
|
-
text_area_tag(name, content = nil, options = {})
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|