cambium 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +339 -15
- data/{lib/generators/cambium/templates/app/assets/javascripts/admin/admin.js.coffee → app/assets/javascripts/cambium/admin/application.js.coffee} +4 -10
- data/app/assets/javascripts/cambium/admin/routers/router.js.coffee +25 -0
- data/app/assets/javascripts/cambium/admin/users.js +2 -0
- data/app/assets/javascripts/cambium/admin/views/dropdown_menu.js.coffee +24 -0
- data/app/assets/javascripts/cambium/admin/views/pickadate.js.coffee +15 -0
- data/app/assets/stylesheets/cambium/admin/application.scss +27 -0
- data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_colors.scss +7 -7
- data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones.scss +18 -18
- data/app/assets/stylesheets/cambium/admin/partials/_globals.scss +21 -0
- data/app/assets/stylesheets/cambium/admin/partials/activity.scss +52 -0
- data/app/assets/stylesheets/cambium/admin/partials/components.scss +64 -0
- data/app/assets/stylesheets/cambium/admin/partials/dashboard.scss +48 -0
- data/app/assets/stylesheets/cambium/admin/partials/forms.scss +107 -0
- data/app/assets/stylesheets/cambium/admin/partials/header.scss +113 -0
- data/app/assets/stylesheets/cambium/admin/partials/page_title.scss +42 -0
- data/app/assets/stylesheets/cambium/admin/partials/sidebar.scss +41 -0
- data/app/assets/stylesheets/cambium/admin/partials/tables.scss +80 -0
- data/app/assets/stylesheets/cambium/admin/partials/typography.scss +5 -0
- data/app/assets/stylesheets/cambium/admin/partials/wireframe.scss +52 -0
- data/app/assets/stylesheets/cambium/admin/users.css +4 -0
- data/app/controllers/cambium/admin/dashboard_controller.rb +12 -0
- data/app/controllers/cambium/admin/search_controller.rb +9 -0
- data/app/controllers/cambium/admin/users_controller.rb +30 -0
- data/app/controllers/cambium/admin_controller.rb +90 -0
- data/app/helpers/cambium/cambium_helper.rb +205 -0
- data/app/presenters/cambium/admin_presenter.rb +127 -0
- data/app/views/cambium/admin/_activity.html.erb +6 -0
- data/app/views/cambium/admin/_header.html.erb +41 -0
- data/app/views/cambium/admin/_sidebar.html.erb +19 -0
- data/app/views/cambium/admin/_status.html.erb +5 -0
- data/app/views/cambium/admin/dashboard/show.html.erb +5 -0
- data/app/views/cambium/admin/edit.html.erb +7 -0
- data/app/views/cambium/admin/index.html.erb +7 -0
- data/app/views/cambium/admin/new.html.erb +7 -0
- data/app/views/cambium/admin/paper_trail/versions/_version.html.erb +20 -0
- data/app/views/cambium/admin/search/index.html.erb +38 -0
- data/app/views/layouts/admin.html.erb +25 -0
- data/bin/rails +12 -0
- data/cambium.gemspec +19 -15
- data/config/routes.rb +10 -0
- data/lib/cambium/configuration.rb +28 -0
- data/lib/cambium/engine.rb +2 -1
- data/lib/cambium/version.rb +1 -1
- data/lib/cambium.rb +12 -1
- data/lib/generators/cambium/admin_generator.rb +104 -0
- data/lib/generators/cambium/app_generator.rb +205 -0
- data/lib/generators/cambium/controller_generator.rb +81 -0
- data/lib/generators/cambium/gemfile_generator.rb +36 -0
- data/lib/generators/cambium/install_generator.rb +19 -0
- data/lib/generators/cambium/user_generator.rb +40 -0
- data/lib/generators/{cambium/helpers → helpers}/generators_helper.rb +32 -24
- data/lib/generators/templates/Gemfile.erb +79 -0
- data/lib/generators/{cambium/templates/app/assets/javascripts/backbone/app.js.coffee → templates/app/assets/javascripts/application.js.coffee} +9 -1
- data/lib/generators/templates/app/assets/javascripts/views/default_helpers.js.coffee +16 -0
- data/lib/generators/templates/app/assets/stylesheets/admin/admin.scss +3 -0
- data/lib/generators/templates/app/controllers/admin/controller.rb.erb +2 -0
- data/lib/generators/{cambium/templates → templates}/app/controllers/application_controller.rb +1 -5
- data/lib/generators/{cambium/templates → templates}/app/models/user.rb +4 -4
- data/lib/generators/templates/app/views/application/_status.html.erb +3 -0
- data/lib/generators/{cambium/templates → templates}/app/views/layouts/application.html.erb +1 -1
- data/lib/generators/templates/config/admin/controller.yml.erb +24 -0
- data/lib/generators/templates/config/admin/sidebar.yml +9 -0
- data/lib/generators/templates/config/admin/users.yml +31 -0
- data/lib/generators/{cambium/templates → templates}/config/application.rb +6 -4
- data/lib/generators/templates/config/initializers/_hash.rb +23 -0
- data/lib/generators/templates/config/initializers/_settings.rb +18 -0
- data/lib/generators/templates/config/initializers/assets.rb +1 -0
- data/lib/generators/templates/config/initializers/cambium.rb +16 -0
- data/lib/generators/templates/config/private.yml +16 -0
- data/lib/generators/templates/config/routes.rb +54 -0
- data/lib/generators/templates/config/settings.yml +16 -0
- data/lib/generators/{cambium/templates → templates}/gitignore +1 -1
- data/lib/help/cambium_prereqs.txt +13 -0
- data/lib/help/pg_search_post_install.txt +13 -0
- data/lib/{generators/cambium/templates/lib/tasks → tasks}/db.rake +2 -2
- data/lib/{generators/cambium/templates/lib/tasks → tasks}/rename.rake +1 -1
- data/test/controllers/cambium/admin/dashboard_controller_test.rb +9 -0
- data/test/controllers/cambium/admin/users_controller_test.rb +9 -0
- data/test/controllers/cambium/admin_controller_test.rb +9 -0
- metadata +192 -152
- data/bin/cambium +0 -16
- data/lib/generators/cambium/helpers/dependencies_helper.rb +0 -58
- data/lib/generators/cambium/install/admin_generator.rb +0 -110
- data/lib/generators/cambium/install/app_generator.rb +0 -162
- data/lib/generators/cambium/install/config_generator.rb +0 -182
- data/lib/generators/cambium/install/utilities_generator.rb +0 -57
- data/lib/generators/cambium/model/image_generator.rb +0 -67
- data/lib/generators/cambium/model/page_generator.rb +0 -131
- data/lib/generators/cambium/model/post_generator.rb +0 -71
- data/lib/generators/cambium/model/tag_generator.rb +0 -40
- data/lib/generators/cambium/model/user_generator.rb +0 -78
- data/lib/generators/cambium/templates/Gemfile +0 -43
- data/lib/generators/cambium/templates/Gemfile.erb +0 -40
- data/lib/generators/cambium/templates/_partials/pages/admin_icon.rb +0 -6
- data/lib/generators/cambium/templates/app/assets/javascripts/.DS_Store +0 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/collections/.gitkeep +0 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/.gitkeep +0 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/image.js.coffee +0 -14
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/tag.js.coffee +0 -14
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/parser_rules/custom.js +0 -552
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/routers/router.js.coffee +0 -37
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/tag.jst.ejs +0 -7
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/image.jst.ejs +0 -3
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/paginator_controls.jst.ejs +0 -8
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/paginator_nav.jst.ejs +0 -11
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/post_tag.jst.ejs +0 -1
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/accordion.js.coffee +0 -33
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/counter.js.coffee +0 -25
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/dropdown_toggle.js.coffee +0 -16
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/image_upload.js.coffee +0 -28
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/init_counter.js.coffee +0 -13
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/paginator.js.coffee +0 -86
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/publishable.js.coffee +0 -12
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/tags.js.coffee +0 -158
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/wysiwyg.js.coffee +0 -87
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/wysihtml5.js +0 -9521
- data/lib/generators/cambium/templates/app/assets/javascripts/application.js +0 -10
- data/lib/generators/cambium/templates/app/assets/javascripts/backbone/templates/.keep +0 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/admin.scss +0 -14
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_content.scss +0 -88
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_form.scss +0 -470
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_globals.scss +0 -39
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_header.scss +0 -121
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_nav.scss +0 -45
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_wireframe.scss +0 -24
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/wysihtml5.css +0 -7
- data/lib/generators/cambium/templates/app/controllers/admin/images_controller.rb +0 -45
- data/lib/generators/cambium/templates/app/controllers/admin/pages_controller.rb +0 -42
- data/lib/generators/cambium/templates/app/controllers/admin/posts_controller.rb +0 -39
- data/lib/generators/cambium/templates/app/controllers/admin/taggings_controller.rb +0 -69
- data/lib/generators/cambium/templates/app/controllers/admin/tags_controller.rb +0 -11
- data/lib/generators/cambium/templates/app/controllers/admin/users_controller.rb +0 -13
- data/lib/generators/cambium/templates/app/controllers/admin_controller.rb +0 -97
- data/lib/generators/cambium/templates/app/controllers/images_controller.rb +0 -45
- data/lib/generators/cambium/templates/app/controllers/pages_controller.rb +0 -12
- data/lib/generators/cambium/templates/app/controllers/posts_controller.rb +0 -11
- data/lib/generators/cambium/templates/app/helpers/admin/pages_controller.rb +0 -47
- data/lib/generators/cambium/templates/app/helpers/admin_helper.rb +0 -121
- data/lib/generators/cambium/templates/app/models/concerns/name.rb +0 -7
- data/lib/generators/cambium/templates/app/models/concerns/title.rb +0 -7
- data/lib/generators/cambium/templates/app/models/image.rb +0 -43
- data/lib/generators/cambium/templates/app/models/page.rb +0 -81
- data/lib/generators/cambium/templates/app/models/post.rb +0 -45
- data/lib/generators/cambium/templates/app/models/tag.rb +0 -33
- data/lib/generators/cambium/templates/app/models/tagging.rb +0 -20
- data/lib/generators/cambium/templates/app/uploaders/image_uploader.rb +0 -91
- data/lib/generators/cambium/templates/app/views/admin/_buttons.html.erb +0 -5
- data/lib/generators/cambium/templates/app/views/admin/_form.html.erb +0 -11
- data/lib/generators/cambium/templates/app/views/admin/_title.html.erb +0 -1
- data/lib/generators/cambium/templates/app/views/admin/edit.html.erb +0 -2
- data/lib/generators/cambium/templates/app/views/admin/images/_image.html.erb +0 -1
- data/lib/generators/cambium/templates/app/views/admin/images/create.js.erb +0 -7
- data/lib/generators/cambium/templates/app/views/admin/images/index.json.jbuilder +0 -4
- data/lib/generators/cambium/templates/app/views/admin/index.html.erb +0 -50
- data/lib/generators/cambium/templates/app/views/admin/new.html.erb +0 -2
- data/lib/generators/cambium/templates/app/views/admin/pages/_form.html.erb +0 -26
- data/lib/generators/cambium/templates/app/views/admin/posts/_form.html.erb +0 -40
- data/lib/generators/cambium/templates/app/views/admin/shared/_footer.html.erb +0 -2
- data/lib/generators/cambium/templates/app/views/admin/shared/_header.html.erb +0 -2
- data/lib/generators/cambium/templates/app/views/admin/shared/_insert_image.html.erb +0 -12
- data/lib/generators/cambium/templates/app/views/admin/shared/_nav.html.erb +0 -12
- data/lib/generators/cambium/templates/app/views/admin/shared/_status.html.erb +0 -3
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_editor.html.erb +0 -54
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_left.html.erb +0 -9
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_right.html.erb +0 -9
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_page.html.erb +0 -22
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_section.html.erb +0 -8
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_publishable.html.erb +0 -33
- data/lib/generators/cambium/templates/app/views/admin/users/_form.html.erb +0 -11
- data/lib/generators/cambium/templates/app/views/application/_status.html.erb +0 -3
- data/lib/generators/cambium/templates/app/views/layouts/.DS_Store +0 -0
- data/lib/generators/cambium/templates/app/views/layouts/admin.html.erb +0 -44
- data/lib/generators/cambium/templates/app/views/page_templates/default.html.erb +0 -2
- data/lib/generators/cambium/templates/app/views/posts/_post.html.erb +0 -4
- data/lib/generators/cambium/templates/app/views/posts/index.html.erb +0 -1
- data/lib/generators/cambium/templates/app/views/posts/show.html.erb +0 -10
- data/lib/generators/cambium/templates/config/app_routes.rb +0 -77
- data/lib/generators/cambium/templates/config/database.mysql2.yml.erb +0 -15
- data/lib/generators/cambium/templates/config/database.pg.yml.erb +0 -14
- data/lib/generators/cambium/templates/config/database.sqlite3.yml.erb +0 -18
- data/lib/generators/cambium/templates/config/initializers/_settings.rb +0 -11
- data/lib/generators/cambium/templates/config/initializers/assets.rb +0 -1
- data/lib/generators/cambium/templates/config/routes.rb.erb +0 -42
- data/lib/generators/cambium/templates/config/settings.yml +0 -15
- data/lib/generators/cambium/templates/config/settings_private.sample.yml +0 -15
- data/lib/generators/cambium/templates/config/settings_private.yml +0 -13
- data/lib/generators/cambium/templates/db/migrate/create_pages.rb.erb +0 -24
- data/lib/generators/cambium/templates/db/migrate/create_posts.rb +0 -19
- data/lib/generators/cambium/templates/lib/.DS_Store +0 -0
- data/lib/help/cambium +0 -7
- /data/{lib/generators/cambium/templates/app/assets/javascripts/backbone/collections → app/assets/javascripts/cambium/admin/templates}/.keep +0 -0
- /data/{lib/generators/cambium/templates/app/assets/javascripts/backbone → app/assets/javascripts/cambium/admin}/views/default_helpers.js.coffee +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/__default.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_buttons.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_components.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_forms.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_helpers.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_images.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_nav.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_tables.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_typography.scss +0 -0
- /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_wireframe.scss +0 -0
- /data/{lib/generators/cambium/templates/app → app}/models/concerns/idx.rb +0 -0
- /data/{lib/generators/cambium/templates/app → app}/models/concerns/image_cropper.rb +0 -0
- /data/{lib/generators/cambium/templates/app → app}/models/concerns/publishable.rb +0 -0
- /data/{lib/generators/cambium/templates/app → app}/models/concerns/slug.rb +0 -0
- /data/{lib/generators/cambium/templates/app → app}/models/concerns/tags.rb +0 -0
- /data/lib/generators/{cambium/helpers → helpers}/_autoloader.rb +0 -0
- /data/lib/generators/{cambium/templates/app/assets/javascripts/backbone → templates/app/assets/javascripts}/routers/router.js.coffee +0 -0
- /data/lib/generators/{cambium/templates/app/assets/javascripts/backbone/models → templates/app/assets/javascripts/templates}/.keep +0 -0
- /data/lib/generators/{cambium/templates → templates}/app/assets/stylesheets/application.scss +0 -0
- /data/lib/generators/{cambium/templates → templates}/app/views/home/index.html.erb +0 -0
- /data/lib/generators/{cambium/templates → templates}/db/seeds.rb +0 -0
- /data/{lib/generators/cambium/templates/vendor → vendor}/assets/javascripts/modernizr.js +0 -0
- /data/{lib/generators/cambium/templates/vendor → vendor}/assets/stylesheets/normalize.scss +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cambium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean C Davis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -26,7 +26,63 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.6'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: kaminari
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: mark_it_zero
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: paper_trail
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: pg_search
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: pickadate-rails
|
30
86
|
requirement: !ruby/object:Gem::Requirement
|
31
87
|
requirements:
|
32
88
|
- - ">="
|
@@ -53,12 +109,40 @@ dependencies:
|
|
53
109
|
- - ">="
|
54
110
|
- !ruby/object:Gem::Version
|
55
111
|
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: rake
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: superslug
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
56
140
|
description: ''
|
57
141
|
email:
|
58
142
|
- scdavis41@gmail.com
|
59
143
|
- warren@hungry-media.com
|
60
144
|
executables:
|
61
|
-
-
|
145
|
+
- rails
|
62
146
|
extensions: []
|
63
147
|
extra_rdoc_files: []
|
64
148
|
files:
|
@@ -67,157 +151,110 @@ files:
|
|
67
151
|
- LICENSE.txt
|
68
152
|
- README.md
|
69
153
|
- Rakefile
|
70
|
-
-
|
154
|
+
- app/assets/javascripts/cambium/admin/application.js.coffee
|
155
|
+
- app/assets/javascripts/cambium/admin/routers/router.js.coffee
|
156
|
+
- app/assets/javascripts/cambium/admin/templates/.keep
|
157
|
+
- app/assets/javascripts/cambium/admin/users.js
|
158
|
+
- app/assets/javascripts/cambium/admin/views/default_helpers.js.coffee
|
159
|
+
- app/assets/javascripts/cambium/admin/views/dropdown_menu.js.coffee
|
160
|
+
- app/assets/javascripts/cambium/admin/views/pickadate.js.coffee
|
161
|
+
- app/assets/stylesheets/cambium/admin/application.scss
|
162
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/__default.scss
|
163
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_buttons.scss
|
164
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_colors.scss
|
165
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_components.scss
|
166
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_forms.scss
|
167
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_helpers.scss
|
168
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_images.scss
|
169
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_nav.scss
|
170
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_tables.scss
|
171
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_typography.scss
|
172
|
+
- app/assets/stylesheets/cambium/admin/bones/bones-config/_wireframe.scss
|
173
|
+
- app/assets/stylesheets/cambium/admin/bones/bones.scss
|
174
|
+
- app/assets/stylesheets/cambium/admin/partials/_globals.scss
|
175
|
+
- app/assets/stylesheets/cambium/admin/partials/activity.scss
|
176
|
+
- app/assets/stylesheets/cambium/admin/partials/components.scss
|
177
|
+
- app/assets/stylesheets/cambium/admin/partials/dashboard.scss
|
178
|
+
- app/assets/stylesheets/cambium/admin/partials/forms.scss
|
179
|
+
- app/assets/stylesheets/cambium/admin/partials/header.scss
|
180
|
+
- app/assets/stylesheets/cambium/admin/partials/page_title.scss
|
181
|
+
- app/assets/stylesheets/cambium/admin/partials/sidebar.scss
|
182
|
+
- app/assets/stylesheets/cambium/admin/partials/tables.scss
|
183
|
+
- app/assets/stylesheets/cambium/admin/partials/typography.scss
|
184
|
+
- app/assets/stylesheets/cambium/admin/partials/wireframe.scss
|
185
|
+
- app/assets/stylesheets/cambium/admin/users.css
|
186
|
+
- app/controllers/cambium/admin/dashboard_controller.rb
|
187
|
+
- app/controllers/cambium/admin/search_controller.rb
|
188
|
+
- app/controllers/cambium/admin/users_controller.rb
|
189
|
+
- app/controllers/cambium/admin_controller.rb
|
190
|
+
- app/helpers/cambium/cambium_helper.rb
|
191
|
+
- app/models/concerns/idx.rb
|
192
|
+
- app/models/concerns/image_cropper.rb
|
193
|
+
- app/models/concerns/publishable.rb
|
194
|
+
- app/models/concerns/slug.rb
|
195
|
+
- app/models/concerns/tags.rb
|
196
|
+
- app/presenters/cambium/admin_presenter.rb
|
197
|
+
- app/views/cambium/admin/_activity.html.erb
|
198
|
+
- app/views/cambium/admin/_header.html.erb
|
199
|
+
- app/views/cambium/admin/_sidebar.html.erb
|
200
|
+
- app/views/cambium/admin/_status.html.erb
|
201
|
+
- app/views/cambium/admin/dashboard/show.html.erb
|
202
|
+
- app/views/cambium/admin/edit.html.erb
|
203
|
+
- app/views/cambium/admin/index.html.erb
|
204
|
+
- app/views/cambium/admin/new.html.erb
|
205
|
+
- app/views/cambium/admin/paper_trail/versions/_version.html.erb
|
206
|
+
- app/views/cambium/admin/search/index.html.erb
|
207
|
+
- app/views/layouts/admin.html.erb
|
208
|
+
- bin/rails
|
71
209
|
- cambium.gemspec
|
210
|
+
- config/routes.rb
|
72
211
|
- lib/cambium.rb
|
212
|
+
- lib/cambium/configuration.rb
|
73
213
|
- lib/cambium/engine.rb
|
74
214
|
- lib/cambium/version.rb
|
75
|
-
- lib/generators/cambium/
|
76
|
-
- lib/generators/cambium/
|
77
|
-
- lib/generators/cambium/
|
78
|
-
- lib/generators/cambium/
|
79
|
-
- lib/generators/cambium/
|
80
|
-
- lib/generators/cambium/
|
81
|
-
- lib/generators/
|
82
|
-
- lib/generators/
|
83
|
-
- lib/generators/
|
84
|
-
- lib/generators/
|
85
|
-
- lib/generators/
|
86
|
-
- lib/generators/
|
87
|
-
- lib/generators/
|
88
|
-
- lib/generators/
|
89
|
-
- lib/generators/
|
90
|
-
- lib/generators/
|
91
|
-
- lib/generators/
|
92
|
-
- lib/generators/
|
93
|
-
- lib/generators/
|
94
|
-
- lib/generators/
|
95
|
-
- lib/generators/
|
96
|
-
- lib/generators/
|
97
|
-
- lib/generators/
|
98
|
-
- lib/generators/
|
99
|
-
- lib/generators/
|
100
|
-
- lib/generators/
|
101
|
-
- lib/generators/
|
102
|
-
- lib/generators/
|
103
|
-
- lib/generators/
|
104
|
-
- lib/generators/
|
105
|
-
- lib/generators/
|
106
|
-
- lib/generators/
|
107
|
-
- lib/generators/
|
108
|
-
- lib/generators/
|
109
|
-
- lib/
|
110
|
-
- lib/
|
111
|
-
- lib/
|
112
|
-
- lib/
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
- lib/generators/cambium/templates/app/assets/javascripts/backbone/templates/.keep
|
119
|
-
- lib/generators/cambium/templates/app/assets/javascripts/backbone/views/default_helpers.js.coffee
|
120
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/admin.scss
|
121
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/__default.scss
|
122
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_buttons.scss
|
123
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_colors.scss
|
124
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_components.scss
|
125
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_forms.scss
|
126
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_helpers.scss
|
127
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_images.scss
|
128
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_nav.scss
|
129
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_tables.scss
|
130
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_typography.scss
|
131
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_wireframe.scss
|
132
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones.scss
|
133
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_content.scss
|
134
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_form.scss
|
135
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_globals.scss
|
136
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_header.scss
|
137
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_nav.scss
|
138
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_wireframe.scss
|
139
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/admin/wysihtml5.css
|
140
|
-
- lib/generators/cambium/templates/app/assets/stylesheets/application.scss
|
141
|
-
- lib/generators/cambium/templates/app/controllers/admin/images_controller.rb
|
142
|
-
- lib/generators/cambium/templates/app/controllers/admin/pages_controller.rb
|
143
|
-
- lib/generators/cambium/templates/app/controllers/admin/posts_controller.rb
|
144
|
-
- lib/generators/cambium/templates/app/controllers/admin/taggings_controller.rb
|
145
|
-
- lib/generators/cambium/templates/app/controllers/admin/tags_controller.rb
|
146
|
-
- lib/generators/cambium/templates/app/controllers/admin/users_controller.rb
|
147
|
-
- lib/generators/cambium/templates/app/controllers/admin_controller.rb
|
148
|
-
- lib/generators/cambium/templates/app/controllers/application_controller.rb
|
149
|
-
- lib/generators/cambium/templates/app/controllers/images_controller.rb
|
150
|
-
- lib/generators/cambium/templates/app/controllers/pages_controller.rb
|
151
|
-
- lib/generators/cambium/templates/app/controllers/posts_controller.rb
|
152
|
-
- lib/generators/cambium/templates/app/helpers/admin/pages_controller.rb
|
153
|
-
- lib/generators/cambium/templates/app/helpers/admin_helper.rb
|
154
|
-
- lib/generators/cambium/templates/app/models/concerns/idx.rb
|
155
|
-
- lib/generators/cambium/templates/app/models/concerns/image_cropper.rb
|
156
|
-
- lib/generators/cambium/templates/app/models/concerns/name.rb
|
157
|
-
- lib/generators/cambium/templates/app/models/concerns/publishable.rb
|
158
|
-
- lib/generators/cambium/templates/app/models/concerns/slug.rb
|
159
|
-
- lib/generators/cambium/templates/app/models/concerns/tags.rb
|
160
|
-
- lib/generators/cambium/templates/app/models/concerns/title.rb
|
161
|
-
- lib/generators/cambium/templates/app/models/image.rb
|
162
|
-
- lib/generators/cambium/templates/app/models/page.rb
|
163
|
-
- lib/generators/cambium/templates/app/models/post.rb
|
164
|
-
- lib/generators/cambium/templates/app/models/tag.rb
|
165
|
-
- lib/generators/cambium/templates/app/models/tagging.rb
|
166
|
-
- lib/generators/cambium/templates/app/models/user.rb
|
167
|
-
- lib/generators/cambium/templates/app/uploaders/image_uploader.rb
|
168
|
-
- lib/generators/cambium/templates/app/views/admin/_buttons.html.erb
|
169
|
-
- lib/generators/cambium/templates/app/views/admin/_form.html.erb
|
170
|
-
- lib/generators/cambium/templates/app/views/admin/_title.html.erb
|
171
|
-
- lib/generators/cambium/templates/app/views/admin/edit.html.erb
|
172
|
-
- lib/generators/cambium/templates/app/views/admin/images/_image.html.erb
|
173
|
-
- lib/generators/cambium/templates/app/views/admin/images/create.js.erb
|
174
|
-
- lib/generators/cambium/templates/app/views/admin/images/index.json.jbuilder
|
175
|
-
- lib/generators/cambium/templates/app/views/admin/index.html.erb
|
176
|
-
- lib/generators/cambium/templates/app/views/admin/new.html.erb
|
177
|
-
- lib/generators/cambium/templates/app/views/admin/pages/_form.html.erb
|
178
|
-
- lib/generators/cambium/templates/app/views/admin/posts/_form.html.erb
|
179
|
-
- lib/generators/cambium/templates/app/views/admin/shared/_footer.html.erb
|
180
|
-
- lib/generators/cambium/templates/app/views/admin/shared/_header.html.erb
|
181
|
-
- lib/generators/cambium/templates/app/views/admin/shared/_insert_image.html.erb
|
182
|
-
- lib/generators/cambium/templates/app/views/admin/shared/_nav.html.erb
|
183
|
-
- lib/generators/cambium/templates/app/views/admin/shared/_status.html.erb
|
184
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_editor.html.erb
|
185
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_left.html.erb
|
186
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_right.html.erb
|
187
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_form_page.html.erb
|
188
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_form_section.html.erb
|
189
|
-
- lib/generators/cambium/templates/app/views/admin/shared/forms/_publishable.html.erb
|
190
|
-
- lib/generators/cambium/templates/app/views/admin/users/_form.html.erb
|
191
|
-
- lib/generators/cambium/templates/app/views/application/_status.html.erb
|
192
|
-
- lib/generators/cambium/templates/app/views/home/index.html.erb
|
193
|
-
- lib/generators/cambium/templates/app/views/layouts/.DS_Store
|
194
|
-
- lib/generators/cambium/templates/app/views/layouts/admin.html.erb
|
195
|
-
- lib/generators/cambium/templates/app/views/layouts/application.html.erb
|
196
|
-
- lib/generators/cambium/templates/app/views/page_templates/default.html.erb
|
197
|
-
- lib/generators/cambium/templates/app/views/posts/_post.html.erb
|
198
|
-
- lib/generators/cambium/templates/app/views/posts/index.html.erb
|
199
|
-
- lib/generators/cambium/templates/app/views/posts/show.html.erb
|
200
|
-
- lib/generators/cambium/templates/config/app_routes.rb
|
201
|
-
- lib/generators/cambium/templates/config/application.rb
|
202
|
-
- lib/generators/cambium/templates/config/database.mysql2.yml.erb
|
203
|
-
- lib/generators/cambium/templates/config/database.pg.yml.erb
|
204
|
-
- lib/generators/cambium/templates/config/database.sqlite3.yml.erb
|
205
|
-
- lib/generators/cambium/templates/config/initializers/_settings.rb
|
206
|
-
- lib/generators/cambium/templates/config/initializers/assets.rb
|
207
|
-
- lib/generators/cambium/templates/config/routes.rb.erb
|
208
|
-
- lib/generators/cambium/templates/config/settings.yml
|
209
|
-
- lib/generators/cambium/templates/config/settings_private.sample.yml
|
210
|
-
- lib/generators/cambium/templates/config/settings_private.yml
|
211
|
-
- lib/generators/cambium/templates/db/migrate/create_pages.rb.erb
|
212
|
-
- lib/generators/cambium/templates/db/migrate/create_posts.rb
|
213
|
-
- lib/generators/cambium/templates/db/seeds.rb
|
214
|
-
- lib/generators/cambium/templates/gitignore
|
215
|
-
- lib/generators/cambium/templates/lib/.DS_Store
|
216
|
-
- lib/generators/cambium/templates/lib/tasks/db.rake
|
217
|
-
- lib/generators/cambium/templates/lib/tasks/rename.rake
|
218
|
-
- lib/generators/cambium/templates/vendor/assets/javascripts/modernizr.js
|
219
|
-
- lib/generators/cambium/templates/vendor/assets/stylesheets/normalize.scss
|
220
|
-
- lib/help/cambium
|
215
|
+
- lib/generators/cambium/admin_generator.rb
|
216
|
+
- lib/generators/cambium/app_generator.rb
|
217
|
+
- lib/generators/cambium/controller_generator.rb
|
218
|
+
- lib/generators/cambium/gemfile_generator.rb
|
219
|
+
- lib/generators/cambium/install_generator.rb
|
220
|
+
- lib/generators/cambium/user_generator.rb
|
221
|
+
- lib/generators/helpers/_autoloader.rb
|
222
|
+
- lib/generators/helpers/generators_helper.rb
|
223
|
+
- lib/generators/templates/Gemfile.erb
|
224
|
+
- lib/generators/templates/app/assets/javascripts/application.js.coffee
|
225
|
+
- lib/generators/templates/app/assets/javascripts/routers/router.js.coffee
|
226
|
+
- lib/generators/templates/app/assets/javascripts/templates/.keep
|
227
|
+
- lib/generators/templates/app/assets/javascripts/views/default_helpers.js.coffee
|
228
|
+
- lib/generators/templates/app/assets/stylesheets/admin/admin.scss
|
229
|
+
- lib/generators/templates/app/assets/stylesheets/application.scss
|
230
|
+
- lib/generators/templates/app/controllers/admin/controller.rb.erb
|
231
|
+
- lib/generators/templates/app/controllers/application_controller.rb
|
232
|
+
- lib/generators/templates/app/models/user.rb
|
233
|
+
- lib/generators/templates/app/views/application/_status.html.erb
|
234
|
+
- lib/generators/templates/app/views/home/index.html.erb
|
235
|
+
- lib/generators/templates/app/views/layouts/application.html.erb
|
236
|
+
- lib/generators/templates/config/admin/controller.yml.erb
|
237
|
+
- lib/generators/templates/config/admin/sidebar.yml
|
238
|
+
- lib/generators/templates/config/admin/users.yml
|
239
|
+
- lib/generators/templates/config/application.rb
|
240
|
+
- lib/generators/templates/config/initializers/_hash.rb
|
241
|
+
- lib/generators/templates/config/initializers/_settings.rb
|
242
|
+
- lib/generators/templates/config/initializers/assets.rb
|
243
|
+
- lib/generators/templates/config/initializers/cambium.rb
|
244
|
+
- lib/generators/templates/config/private.yml
|
245
|
+
- lib/generators/templates/config/routes.rb
|
246
|
+
- lib/generators/templates/config/settings.yml
|
247
|
+
- lib/generators/templates/db/seeds.rb
|
248
|
+
- lib/generators/templates/gitignore
|
249
|
+
- lib/help/cambium_prereqs.txt
|
250
|
+
- lib/help/pg_search_post_install.txt
|
251
|
+
- lib/tasks/db.rake
|
252
|
+
- lib/tasks/rename.rake
|
253
|
+
- test/controllers/cambium/admin/dashboard_controller_test.rb
|
254
|
+
- test/controllers/cambium/admin/users_controller_test.rb
|
255
|
+
- test/controllers/cambium/admin_controller_test.rb
|
256
|
+
- vendor/assets/javascripts/modernizr.js
|
257
|
+
- vendor/assets/stylesheets/normalize.scss
|
221
258
|
homepage: ''
|
222
259
|
licenses:
|
223
260
|
- MIT
|
@@ -242,4 +279,7 @@ rubygems_version: 2.2.0
|
|
242
279
|
signing_key:
|
243
280
|
specification_version: 4
|
244
281
|
summary: Rails generators to facilitate development.
|
245
|
-
test_files:
|
282
|
+
test_files:
|
283
|
+
- test/controllers/cambium/admin/dashboard_controller_test.rb
|
284
|
+
- test/controllers/cambium/admin/users_controller_test.rb
|
285
|
+
- test/controllers/cambium/admin_controller_test.rb
|
data/bin/cambium
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
@be = "bundle exec"
|
4
|
-
@g = "#{@be} rails g"
|
5
|
-
|
6
|
-
case ARGV.first
|
7
|
-
when "setup"
|
8
|
-
system "#{@g} cambium:setup:config"
|
9
|
-
system "#{@g} cambium:setup:users"
|
10
|
-
system "#{@g} cambium:setup:app"
|
11
|
-
system "#{@g} cambium:setup:admin"
|
12
|
-
system "#{@g} cambium:setup:utilities"
|
13
|
-
else
|
14
|
-
gem_root = Gem::Specification.find_by_name("cambium").gem_dir
|
15
|
-
puts File.read("#{gem_root}/lib/help/cambium")
|
16
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
module Cambium
|
2
|
-
module DependenciesHelper
|
3
|
-
|
4
|
-
# This method accepts an array of dependencies as THE GENERATOR COMMAND. So,
|
5
|
-
# for example, if we need to make sure `bundle exec rails generate
|
6
|
-
# cambium:install:users` has been run, we would call
|
7
|
-
# check_dependencies(['cambium:install:users']).
|
8
|
-
#
|
9
|
-
# We use that value to determine the subsequent method to call. So,
|
10
|
-
# check_dependencies(['cambium:install:users']) will call
|
11
|
-
# require_cambium_install_users
|
12
|
-
#
|
13
|
-
def check_dependencies(dependencies = [])
|
14
|
-
cmds = []
|
15
|
-
dependencies.each do |d|
|
16
|
-
cmds << d unless eval("#{d.split(':').join('_')}_generated?")
|
17
|
-
end
|
18
|
-
if cmds.size > 0
|
19
|
-
display_dependency_errors(cmds)
|
20
|
-
exit
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# Gives the user output of the errors
|
25
|
-
#
|
26
|
-
def display_dependency_errors(cmds)
|
27
|
-
say set_color(
|
28
|
-
"\nERROR! You need to run the following command(s):\n",
|
29
|
-
:red,
|
30
|
-
:bold
|
31
|
-
)
|
32
|
-
cmds.each { |cmd| say " $ bundle exec rails g #{cmd}" }
|
33
|
-
say set_color(
|
34
|
-
"\nbefore running this generator.",
|
35
|
-
:red,
|
36
|
-
:bold
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
|
-
##########################################################################
|
41
|
-
# The following methods are the individual checks and their appropriate
|
42
|
-
# responses.
|
43
|
-
##########################################################################
|
44
|
-
|
45
|
-
def cambium_install_admin_generated?
|
46
|
-
class_exists?('AdminController')
|
47
|
-
end
|
48
|
-
|
49
|
-
def cambium_model_user_generated?
|
50
|
-
class_exists?('User')
|
51
|
-
end
|
52
|
-
|
53
|
-
def cambium_model_image_generated?
|
54
|
-
class_exists?('Image')
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
end
|
@@ -1,110 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rails/generators'
|
3
|
-
require File.expand_path('../../helpers/_autoloader.rb', __FILE__)
|
4
|
-
|
5
|
-
module Cambium
|
6
|
-
module Install
|
7
|
-
class AdminGenerator < Rails::Generators::Base
|
8
|
-
desc "Setup admin files for new rails project"
|
9
|
-
|
10
|
-
source_root File.expand_path('../../templates', __FILE__)
|
11
|
-
|
12
|
-
def set_dependencies
|
13
|
-
check_dependencies(['cambium:model:user'])
|
14
|
-
end
|
15
|
-
|
16
|
-
# Admin controllers are added in this manner because we have controllers
|
17
|
-
# in the directory which we do not want to copy over by default.
|
18
|
-
#
|
19
|
-
def add_admin_controller
|
20
|
-
copy_files [
|
21
|
-
'admin_controller.rb',
|
22
|
-
'admin/users_controller.rb'
|
23
|
-
], "app/controllers"
|
24
|
-
end
|
25
|
-
|
26
|
-
# Continuing from the previous method, we also need to individually copy
|
27
|
-
# the view files over, since these default views have to site directly in
|
28
|
-
# the app/views/admin folder, and can't be placed in a subdirectory.
|
29
|
-
#
|
30
|
-
# Any new partial will have to be added here manually.
|
31
|
-
#
|
32
|
-
def add_admin_views
|
33
|
-
copy_files [
|
34
|
-
'_buttons.html.erb',
|
35
|
-
'_form.html.erb',
|
36
|
-
'_title.html.erb',
|
37
|
-
'edit.html.erb',
|
38
|
-
'index.html.erb',
|
39
|
-
'new.html.erb'
|
40
|
-
], "app/views/admin"
|
41
|
-
directories ['shared','users'], "app/views/admin"
|
42
|
-
end
|
43
|
-
|
44
|
-
# The admin layout gives us the customization we need to layout our CMS.
|
45
|
-
# Here we ask the user for some input for those items that will vary from
|
46
|
-
# project-to-project.
|
47
|
-
#
|
48
|
-
def add_layouts
|
49
|
-
@site_title = "#{Rails.application.class.parent_name.humanize.titleize} Admin"
|
50
|
-
site_title = ask "\n#{set_color('Admin Title:', :green, :bold)} [default: #{@site_title}]"
|
51
|
-
@site_title = site_title unless site_title.blank?
|
52
|
-
admin = "app/views/layouts/admin.html.erb"
|
53
|
-
template admin, admin
|
54
|
-
end
|
55
|
-
|
56
|
-
# Currently, all the helper methods are shoved into one file. The plan is
|
57
|
-
# to break the methods out into individual helpers, namespaced under
|
58
|
-
# admin.
|
59
|
-
#
|
60
|
-
def add_admin_helper
|
61
|
-
template "app/helpers/admin_helper.rb",
|
62
|
-
"app/helpers/admin_helper.rb"
|
63
|
-
end
|
64
|
-
|
65
|
-
# Like the app side, the admin uses the Backbone.js framework since it's
|
66
|
-
# lightweight and easy-to-use. We've added several scripts to make your
|
67
|
-
# CMS powerful right out of the box.
|
68
|
-
#
|
69
|
-
def add_admin_javascripts
|
70
|
-
directory "app/assets/javascripts/admin",
|
71
|
-
"app/assets/javascripts/admin"
|
72
|
-
end
|
73
|
-
|
74
|
-
# Our admin styles use Bones, along with some customization on top of
|
75
|
-
# Bones. Let's install these.
|
76
|
-
#
|
77
|
-
def add_admin_styles
|
78
|
-
directory "app/assets/stylesheets/admin",
|
79
|
-
"app/assets/stylesheets/admin"
|
80
|
-
end
|
81
|
-
|
82
|
-
# Here we are adding the gems we will need for the admin. Many of these
|
83
|
-
# are duplicates from the app gems, but that's ok, since we check to see
|
84
|
-
# if they exist first.
|
85
|
-
#
|
86
|
-
def add_application_gems
|
87
|
-
gems = [
|
88
|
-
'unicorn-rails',
|
89
|
-
'jquery-rails',
|
90
|
-
'uglifier',
|
91
|
-
'sass-rails',
|
92
|
-
'bourbon',
|
93
|
-
'coffee-rails',
|
94
|
-
'backbone-on-rails',
|
95
|
-
'bones-rails',
|
96
|
-
'jbuilder',
|
97
|
-
'pickadate-rails',
|
98
|
-
'simple_form',
|
99
|
-
'wysihtml5-rails',
|
100
|
-
'jquery-fileupload-rails',
|
101
|
-
]
|
102
|
-
add_gems_to_gemfile(gems)
|
103
|
-
added_gems = []
|
104
|
-
gems.each { |g| added_gems << g unless gem_exists?(g) }
|
105
|
-
gemfile_update_notification(added_gems)
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|