enjoy_cms 0.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +249 -0
- data/LICENSE.txt +22 -0
- data/README.md +137 -0
- data/Rakefile +1 -0
- data/app/assets/javascripts/enjoy_cms.coffee +6 -0
- data/app/assets/javascripts/enjoy_cms/flash.js.coffee +3 -0
- data/app/assets/javascripts/enjoy_cms/map.js.coffee +22 -0
- data/app/assets/javascripts/head.load.js +707 -0
- data/app/assets/javascripts/jquery.placeholder.js +157 -0
- data/app/assets/stylesheets/enjoy_cms.sass +5 -0
- data/app/assets/stylesheets/enjoy_cms/flash.sass +63 -0
- data/app/assets/stylesheets/enjoy_cms/normalize.scss +406 -0
- data/app/assets/stylesheets/enjoy_cms/powered.sass +18 -0
- data/app/controllers/concerns/enjoy/errors.rb +93 -0
- data/app/controllers/concerns/enjoy/fancybox.rb +14 -0
- data/app/controllers/concerns/enjoy/localizeable.rb +33 -0
- data/app/controllers/concerns/enjoy/nav_menu.rb +64 -0
- data/app/controllers/concerns/enjoy/no_cache.rb +12 -0
- data/app/controllers/concerns/enjoy/seo_pages.rb +83 -0
- data/app/controllers/enjoy/contacts_controller.rb +5 -0
- data/app/controllers/enjoy/home_controller.rb +6 -0
- data/app/controllers/enjoy/news_controller.rb +5 -0
- data/app/controllers/enjoy/pages_controller.rb +5 -0
- data/app/controllers/enjoy/search_controller.rb +6 -0
- data/app/helpers/enjoy/gzip_helper.rb +27 -0
- data/app/helpers/enjoy/powered_helper.rb +12 -0
- data/app/mailers/enjoy/contact_mailer.rb +17 -0
- data/app/models/concerns/enjoy/boolean_field.rb +17 -0
- data/app/models/concerns/enjoy/enableable.rb +8 -0
- data/app/models/concerns/enjoy/geocodeable.rb +4 -0
- data/app/models/concerns/enjoy/mappable.rb +95 -0
- data/app/models/concerns/enjoy/mongoid_paperclip.rb +37 -0
- data/app/models/concerns/enjoy/seoable.rb +36 -0
- data/app/models/concerns/enjoy/sitemap_data.rb +23 -0
- data/app/models/concerns/enjoy/sort_field.rb +20 -0
- data/app/models/concerns/enjoy/sortable.rb +8 -0
- data/app/models/enjoy/contact_message.rb +12 -0
- data/app/models/enjoy/embedded_element.rb +15 -0
- data/app/models/enjoy/embedded_gallery_image.rb +15 -0
- data/app/models/enjoy/gallery.rb +10 -0
- data/app/models/enjoy/gallery_image.rb +10 -0
- data/app/models/enjoy/menu.rb +12 -0
- data/app/models/enjoy/news.rb +12 -0
- data/app/models/enjoy/page.rb +12 -0
- data/app/models/enjoy/seo.rb +13 -0
- data/app/views/blocks/_favicon.html.slim +21 -0
- data/app/views/blocks/_footer.html.slim +1 -0
- data/app/views/blocks/_seo_block.html.slim +18 -0
- data/app/views/blocks/_seo_block_with_obj.html.slim +27 -0
- data/app/views/devise/registrations/edit.html.slim +21 -0
- data/app/views/devise/registrations/new.html.slim +21 -0
- data/app/views/devise/sessions/new.html.slim +22 -0
- data/app/views/devise/shared/_links.html.slim +11 -0
- data/app/views/enjoy/contact_mailer/new_message_email.html.slim +15 -0
- data/app/views/enjoy/contacts/index.html.slim +10 -0
- data/app/views/enjoy/contacts/new.html.slim +10 -0
- data/app/views/enjoy/contacts/sent.html.slim +4 -0
- data/app/views/enjoy/home/index.html.slim +1 -0
- data/app/views/enjoy/news/index.html.slim +9 -0
- data/app/views/enjoy/news/show.html.slim +8 -0
- data/app/views/enjoy/pages/show.html.slim +1 -0
- data/app/views/enjoy/search/index.html.slim +19 -0
- data/app/views/errors/_base.html.slim +3 -0
- data/app/views/errors/error_403.html.slim +1 -0
- data/app/views/errors/error_404.html.slim +1 -0
- data/app/views/errors/error_500.html.slim +1 -0
- data/app/views/layouts/application.html.slim +25 -0
- data/app/views/rails_admin/main/_check_boxes.html.slim +27 -0
- data/app/views/rails_admin/main/_enum_check_boxes.html.slim +5 -0
- data/app/views/rails_admin/main/_enum_radio_buttons.html.slim +5 -0
- data/app/views/rails_admin/main/_form_raw.html.slim +1 -0
- data/app/views/shared/_admin_link.html.slim +3 -0
- data/app/views/shared/_messages.html.slim +7 -0
- data/app/views/shared/_meta.html.slim +19 -0
- data/app/views/shared/_obj.html.slim +21 -0
- data/app/views/shared/_og.html.slim +4 -0
- data/app/views/simple_captcha/_simple_captcha.html.slim +12 -0
- data/config/initializers/simple_captcha.rb +29 -0
- data/config/locales/en.enjoy.yml +29 -0
- data/config/locales/en.enjoy_admin.yml +6 -0
- data/config/locales/ru.cancan.yml +4 -0
- data/config/locales/ru.devise.yml +65 -0
- data/config/locales/ru.enjoy.yml +39 -0
- data/config/locales/ru.enjoy_admin.yml +6 -0
- data/config/locales/ru.kaminari.yml +17 -0
- data/config/locales/ru.models.yml +103 -0
- data/config/locales/ru.mongoid.yml +450 -0
- data/config/locales/ru.rails_admin.yml +148 -0
- data/config/locales/ru.simple_captcha.yml +3 -0
- data/config/locales/ru.simple_form.yml +9 -0
- data/config/routes.rb +14 -0
- data/enjoy_cms.gemspec +53 -0
- data/lib/enjoy/admin.rb +350 -0
- data/lib/enjoy/admin/contact_message.rb +36 -0
- data/lib/enjoy/admin/embedded_element.rb +11 -0
- data/lib/enjoy/admin/embedded_gallery_image.rb +15 -0
- data/lib/enjoy/admin/gallery.rb +20 -0
- data/lib/enjoy/admin/gallery_image.rb +18 -0
- data/lib/enjoy/admin/menu.rb +27 -0
- data/lib/enjoy/admin/news.rb +57 -0
- data/lib/enjoy/admin/page.rb +81 -0
- data/lib/enjoy/admin/seo.rb +17 -0
- data/lib/enjoy/configuration.rb +73 -0
- data/lib/enjoy/controller.rb +31 -0
- data/lib/enjoy/controllers/contacts.rb +70 -0
- data/lib/enjoy/controllers/news.rb +36 -0
- data/lib/enjoy/controllers/pages.rb +22 -0
- data/lib/enjoy/controllers/search.rb +62 -0
- data/lib/enjoy/elastic_search.rb +31 -0
- data/lib/enjoy/engine.rb +46 -0
- data/lib/enjoy/migration.rb +34 -0
- data/lib/enjoy/model.rb +22 -0
- data/lib/enjoy/models/active_record/contact_message.rb +14 -0
- data/lib/enjoy/models/active_record/menu.rb +17 -0
- data/lib/enjoy/models/active_record/news.rb +26 -0
- data/lib/enjoy/models/active_record/page.rb +20 -0
- data/lib/enjoy/models/active_record/seo.rb +17 -0
- data/lib/enjoy/models/contact_message.rb +37 -0
- data/lib/enjoy/models/embedded_element.rb +12 -0
- data/lib/enjoy/models/embedded_gallery_image.rb +16 -0
- data/lib/enjoy/models/gallery.rb +29 -0
- data/lib/enjoy/models/gallery_image.rb +23 -0
- data/lib/enjoy/models/menu.rb +28 -0
- data/lib/enjoy/models/mongoid/contact_message.rb +20 -0
- data/lib/enjoy/models/mongoid/embedded_element.rb +13 -0
- data/lib/enjoy/models/mongoid/embedded_gallery_image.rb +19 -0
- data/lib/enjoy/models/mongoid/gallery.rb +23 -0
- data/lib/enjoy/models/mongoid/gallery_image.rb +21 -0
- data/lib/enjoy/models/mongoid/menu.rb +15 -0
- data/lib/enjoy/models/mongoid/news.rb +29 -0
- data/lib/enjoy/models/mongoid/page.rb +25 -0
- data/lib/enjoy/models/mongoid/seo.rb +28 -0
- data/lib/enjoy/models/news.rb +58 -0
- data/lib/enjoy/models/page.rb +90 -0
- data/lib/enjoy/models/seo.rb +22 -0
- data/lib/enjoy/patch.rb +58 -0
- data/lib/enjoy/rails_admin_menu.rb +145 -0
- data/lib/enjoy/simple_form_patch.rb +12 -0
- data/lib/enjoy/tasks.rb +13 -0
- data/lib/enjoy/version.rb +3 -0
- data/lib/enjoy_cms.rb +109 -0
- data/lib/filename_to_slug.rb +34 -0
- data/lib/generators/enjoy/ability_generator.rb +14 -0
- data/lib/generators/enjoy/admin_generator.rb +21 -0
- data/lib/generators/enjoy/capify_generator.rb +39 -0
- data/lib/generators/enjoy/layout_generator.rb +14 -0
- data/lib/generators/enjoy/migration_generator.rb +18 -0
- data/lib/generators/enjoy/templates/Capfile +17 -0
- data/lib/generators/enjoy/templates/ability.erb +26 -0
- data/lib/generators/enjoy/templates/admin.erb +89 -0
- data/lib/generators/enjoy/templates/deploy.erb +47 -0
- data/lib/generators/enjoy/templates/dl.erb +30 -0
- data/lib/generators/enjoy/templates/migration_contact_messages.rb +15 -0
- data/lib/generators/enjoy/templates/migration_news.rb +26 -0
- data/lib/generators/enjoy/templates/migration_pages.rb +45 -0
- data/lib/generators/enjoy/templates/migration_seos.rb +14 -0
- data/lib/generators/enjoy/templates/production.erb +8 -0
- data/lib/generators/enjoy/templates/unicorn.erb +66 -0
- data/lib/generators/enjoy/utils.rb +21 -0
- data/lib/manual_slug.rb +10 -0
- data/lib/manual_slug/active_record.rb +32 -0
- data/lib/manual_slug/mongoid.rb +36 -0
- data/lib/rails_admin/custom_show_in_app.rb +43 -0
- data/release.sh +13 -0
- data/template.rb +824 -0
- metadata +579 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c91e2c1674c4bb1bb096be9fd64088bf83806348
|
4
|
+
data.tar.gz: b2907dcd0e29d94170dac29ab220a2f7005fb21a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b5fcbf1ee7a9d011724f07b1218ee9ac03e9f9822957d97af9ce4cf6189e3f768751d57a19b753ef68b5dddeb434ffb30d568514dffd4a0a2af3f9b2ab78f5d1
|
7
|
+
data.tar.gz: 6a210f4e87e3367e8e7d73dff28f8a33766793ede0b2dd54bda880168e9d0d4c58a2217f7a18a4172772178de9c536a64098608f2b53b3e051a2023d8845e262
|
data/.gitignore
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
.idea
|
2
|
+
.idea/*
|
3
|
+
|
4
|
+
*.gem
|
5
|
+
*.rbc
|
6
|
+
.bundle
|
7
|
+
.config
|
8
|
+
.yardoc
|
9
|
+
InstalledFiles
|
10
|
+
_yardoc
|
11
|
+
coverage
|
12
|
+
doc/
|
13
|
+
lib/bundler/man
|
14
|
+
pkg
|
15
|
+
rdoc
|
16
|
+
spec/reports
|
17
|
+
test/tmp
|
18
|
+
test/version_tmp
|
19
|
+
tmp
|
20
|
+
mongoid/Gemfile.lock
|
21
|
+
activerecord/Gemfile.lock
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
enjoy_cms
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.3
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,249 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
enjoy_cms (0.1.0.beta1)
|
5
|
+
ack_rails_admin_jcrop
|
6
|
+
addressable
|
7
|
+
ckeditor
|
8
|
+
coffee-rails
|
9
|
+
devise
|
10
|
+
geocoder
|
11
|
+
glebtv-simple_captcha
|
12
|
+
jquery-rails
|
13
|
+
kaminari
|
14
|
+
rails (= 4.2.4)
|
15
|
+
rails_admin
|
16
|
+
rails_admin_mongoid_localize_field
|
17
|
+
rails_admin_nested_set
|
18
|
+
rails_admin_settings
|
19
|
+
rails_admin_toggleable
|
20
|
+
simple-navigation
|
21
|
+
simple_form
|
22
|
+
sitemap_generator
|
23
|
+
smart_excerpt
|
24
|
+
stringex
|
25
|
+
thor
|
26
|
+
turbolinks
|
27
|
+
validates_email_format_of
|
28
|
+
x-real-ip
|
29
|
+
|
30
|
+
GEM
|
31
|
+
remote: https://rubygems.org/
|
32
|
+
specs:
|
33
|
+
ack_rails_admin_jcrop (0.0.6)
|
34
|
+
mini_magick
|
35
|
+
rails (>= 3.0.0)
|
36
|
+
rails_admin (>= 0.3.0)
|
37
|
+
actionmailer (4.2.4)
|
38
|
+
actionpack (= 4.2.4)
|
39
|
+
actionview (= 4.2.4)
|
40
|
+
activejob (= 4.2.4)
|
41
|
+
mail (~> 2.5, >= 2.5.4)
|
42
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
43
|
+
actionpack (4.2.4)
|
44
|
+
actionview (= 4.2.4)
|
45
|
+
activesupport (= 4.2.4)
|
46
|
+
rack (~> 1.6)
|
47
|
+
rack-test (~> 0.6.2)
|
48
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
49
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
50
|
+
actionview (4.2.4)
|
51
|
+
activesupport (= 4.2.4)
|
52
|
+
builder (~> 3.1)
|
53
|
+
erubis (~> 2.7.0)
|
54
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
55
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
56
|
+
activejob (4.2.4)
|
57
|
+
activesupport (= 4.2.4)
|
58
|
+
globalid (>= 0.3.0)
|
59
|
+
activemodel (4.2.4)
|
60
|
+
activesupport (= 4.2.4)
|
61
|
+
builder (~> 3.1)
|
62
|
+
activerecord (4.2.4)
|
63
|
+
activemodel (= 4.2.4)
|
64
|
+
activesupport (= 4.2.4)
|
65
|
+
arel (~> 6.0)
|
66
|
+
activesupport (4.2.4)
|
67
|
+
i18n (~> 0.7)
|
68
|
+
json (~> 1.7, >= 1.7.7)
|
69
|
+
minitest (~> 5.1)
|
70
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
71
|
+
tzinfo (~> 1.1)
|
72
|
+
addressable (2.4.0)
|
73
|
+
arel (6.0.3)
|
74
|
+
bcrypt (3.1.10)
|
75
|
+
bson (4.0.0)
|
76
|
+
builder (3.2.2)
|
77
|
+
ckeditor (4.1.5)
|
78
|
+
cocaine
|
79
|
+
orm_adapter (~> 0.5.0)
|
80
|
+
climate_control (0.0.3)
|
81
|
+
activesupport (>= 3.0)
|
82
|
+
cocaine (0.5.8)
|
83
|
+
climate_control (>= 0.0.3, < 1.0)
|
84
|
+
coffee-rails (4.1.1)
|
85
|
+
coffee-script (>= 2.2.0)
|
86
|
+
railties (>= 4.0.0, < 5.1.x)
|
87
|
+
coffee-script (2.4.1)
|
88
|
+
coffee-script-source
|
89
|
+
execjs
|
90
|
+
coffee-script-source (1.10.0)
|
91
|
+
concurrent-ruby (1.0.0)
|
92
|
+
devise (3.5.3)
|
93
|
+
bcrypt (~> 3.0)
|
94
|
+
orm_adapter (~> 0.1)
|
95
|
+
railties (>= 3.2.6, < 5)
|
96
|
+
responders
|
97
|
+
thread_safe (~> 0.1)
|
98
|
+
warden (~> 1.2.3)
|
99
|
+
erubis (2.7.0)
|
100
|
+
execjs (2.6.0)
|
101
|
+
font-awesome-rails (4.5.0.0)
|
102
|
+
railties (>= 3.2, < 5.0)
|
103
|
+
geocoder (1.2.14)
|
104
|
+
glebtv-simple_captcha (0.6.7)
|
105
|
+
globalid (0.3.6)
|
106
|
+
activesupport (>= 4.1.0)
|
107
|
+
haml (4.0.7)
|
108
|
+
tilt
|
109
|
+
htmlentities (4.3.4)
|
110
|
+
i18n (0.7.0)
|
111
|
+
jquery-rails (4.0.5)
|
112
|
+
rails-dom-testing (~> 1.0)
|
113
|
+
railties (>= 4.2.0)
|
114
|
+
thor (>= 0.14, < 2.0)
|
115
|
+
jquery-ui-rails (5.0.5)
|
116
|
+
railties (>= 3.2.16)
|
117
|
+
json (1.8.3)
|
118
|
+
kaminari (0.16.3)
|
119
|
+
actionpack (>= 3.0.0)
|
120
|
+
activesupport (>= 3.0.0)
|
121
|
+
loofah (2.0.3)
|
122
|
+
nokogiri (>= 1.5.9)
|
123
|
+
mail (2.6.3)
|
124
|
+
mime-types (>= 1.16, < 3)
|
125
|
+
mime-types (2.99)
|
126
|
+
mini_magick (4.3.6)
|
127
|
+
mini_portile2 (2.0.0)
|
128
|
+
minitest (5.8.3)
|
129
|
+
mongo (2.2.1)
|
130
|
+
bson (~> 4.0)
|
131
|
+
mongoid (5.0.2)
|
132
|
+
activemodel (~> 4.0)
|
133
|
+
mongo (~> 2.1)
|
134
|
+
origin (~> 2.1)
|
135
|
+
tzinfo (>= 0.3.37)
|
136
|
+
nested_form (0.3.2)
|
137
|
+
nokogiri (1.6.7.1)
|
138
|
+
mini_portile2 (~> 2.0.0.rc2)
|
139
|
+
origin (2.1.1)
|
140
|
+
orm_adapter (0.5.0)
|
141
|
+
rack (1.6.4)
|
142
|
+
rack-pjax (0.8.0)
|
143
|
+
nokogiri (~> 1.5)
|
144
|
+
rack (~> 1.1)
|
145
|
+
rack-test (0.6.3)
|
146
|
+
rack (>= 1.0)
|
147
|
+
rails (4.2.4)
|
148
|
+
actionmailer (= 4.2.4)
|
149
|
+
actionpack (= 4.2.4)
|
150
|
+
actionview (= 4.2.4)
|
151
|
+
activejob (= 4.2.4)
|
152
|
+
activemodel (= 4.2.4)
|
153
|
+
activerecord (= 4.2.4)
|
154
|
+
activesupport (= 4.2.4)
|
155
|
+
bundler (>= 1.3.0, < 2.0)
|
156
|
+
railties (= 4.2.4)
|
157
|
+
sprockets-rails
|
158
|
+
rails-deprecated_sanitizer (1.0.3)
|
159
|
+
activesupport (>= 4.2.0.alpha)
|
160
|
+
rails-dom-testing (1.0.7)
|
161
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
162
|
+
nokogiri (~> 1.6.0)
|
163
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
164
|
+
rails-html-sanitizer (1.0.2)
|
165
|
+
loofah (~> 2.0)
|
166
|
+
rails_admin (0.8.1)
|
167
|
+
builder (~> 3.1)
|
168
|
+
coffee-rails (~> 4.0)
|
169
|
+
font-awesome-rails (>= 3.0, < 5)
|
170
|
+
haml (~> 4.0)
|
171
|
+
jquery-rails (>= 3.0, < 5)
|
172
|
+
jquery-ui-rails (~> 5.0)
|
173
|
+
kaminari (~> 0.14)
|
174
|
+
nested_form (~> 0.3)
|
175
|
+
rack-pjax (~> 0.7)
|
176
|
+
rails (~> 4.0)
|
177
|
+
remotipart (~> 1.0)
|
178
|
+
safe_yaml (~> 1.0)
|
179
|
+
sass-rails (>= 4.0, < 6)
|
180
|
+
rails_admin_mongoid_localize_field (0.1.3)
|
181
|
+
haml
|
182
|
+
mongoid (>= 3.0)
|
183
|
+
rails (>= 3.0)
|
184
|
+
rails_admin (>= 0.5)
|
185
|
+
rails_admin_nested_set (0.4.5)
|
186
|
+
rails_admin
|
187
|
+
rails_admin_settings (1.1.3)
|
188
|
+
rails_admin_toggleable (0.6.0)
|
189
|
+
rails_admin
|
190
|
+
railties (4.2.4)
|
191
|
+
actionpack (= 4.2.4)
|
192
|
+
activesupport (= 4.2.4)
|
193
|
+
rake (>= 0.8.7)
|
194
|
+
thor (>= 0.18.1, < 2.0)
|
195
|
+
rake (10.4.2)
|
196
|
+
remotipart (1.2.1)
|
197
|
+
responders (2.1.1)
|
198
|
+
railties (>= 4.2.0, < 5.1)
|
199
|
+
safe_yaml (1.0.4)
|
200
|
+
sass (3.4.20)
|
201
|
+
sass-rails (5.0.4)
|
202
|
+
railties (>= 4.0.0, < 5.0)
|
203
|
+
sass (~> 3.1)
|
204
|
+
sprockets (>= 2.8, < 4.0)
|
205
|
+
sprockets-rails (>= 2.0, < 4.0)
|
206
|
+
tilt (>= 1.1, < 3)
|
207
|
+
simple-navigation (4.0.3)
|
208
|
+
activesupport (>= 2.3.2)
|
209
|
+
simple_form (3.2.1)
|
210
|
+
actionpack (> 4, < 5.1)
|
211
|
+
activemodel (> 4, < 5.1)
|
212
|
+
sitemap_generator (5.1.0)
|
213
|
+
builder
|
214
|
+
smart_excerpt (0.1.5)
|
215
|
+
activesupport
|
216
|
+
htmlentities
|
217
|
+
sprockets (3.5.2)
|
218
|
+
concurrent-ruby (~> 1.0)
|
219
|
+
rack (> 1, < 3)
|
220
|
+
sprockets-rails (3.0.0)
|
221
|
+
actionpack (>= 4.0)
|
222
|
+
activesupport (>= 4.0)
|
223
|
+
sprockets (>= 3.0.0)
|
224
|
+
stringex (2.5.2)
|
225
|
+
thor (0.19.1)
|
226
|
+
thread_safe (0.3.5)
|
227
|
+
tilt (2.0.1)
|
228
|
+
turbolinks (2.5.3)
|
229
|
+
coffee-rails
|
230
|
+
tzinfo (1.2.2)
|
231
|
+
thread_safe (~> 0.1)
|
232
|
+
validates_email_format_of (1.6.3)
|
233
|
+
i18n
|
234
|
+
warden (1.2.4)
|
235
|
+
rack (>= 1.0)
|
236
|
+
x-real-ip (0.2.1)
|
237
|
+
activesupport
|
238
|
+
rack
|
239
|
+
|
240
|
+
PLATFORMS
|
241
|
+
ruby
|
242
|
+
|
243
|
+
DEPENDENCIES
|
244
|
+
bundler
|
245
|
+
enjoy_cms!
|
246
|
+
rake
|
247
|
+
|
248
|
+
BUNDLED WITH
|
249
|
+
1.11.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Alexander Kiseliev
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
# EnjoyCms
|
2
|
+
|
3
|
+
# DEVELOPMENT VERSION. DO NOT USE IT
|
4
|
+
|
5
|
+
Rails + RailsAdmin + Mongoid/PostgreSQL CMS
|
6
|
+
|
7
|
+
Very opinionated and tuned for my needs.
|
8
|
+
|
9
|
+
**Before 1.0 API and class names should be considered unstable and can change at any time!**
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'enjoy_cms_mongoid'
|
16
|
+
|
17
|
+
or:
|
18
|
+
|
19
|
+
gem 'enjoy_cms_activerecord'
|
20
|
+
|
21
|
+
*Only PostgreSQL is tested or supported for AR(from root repo). Others will probably work, but untested.*
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
$ gem install enjoy_cms
|
30
|
+
|
31
|
+
For activerecord, generate migrations and run them
|
32
|
+
|
33
|
+
rails g rails_admin_settings:migration
|
34
|
+
rails g enjoy_cms:migration
|
35
|
+
rake db:migrate
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
### Using app generator
|
40
|
+
|
41
|
+
Make sure you have rails 5.0 installed
|
42
|
+
|
43
|
+
rails -v
|
44
|
+
|
45
|
+
If not, uninstall rails and install again
|
46
|
+
|
47
|
+
gem uninstall rails
|
48
|
+
gem install enjoy_cms
|
49
|
+
|
50
|
+
Then, for mongoid:
|
51
|
+
|
52
|
+
rails new my_app -T -O -m https://raw.githubusercontent.com/enjoycreative/enjoy_cms/master/template.rb
|
53
|
+
|
54
|
+
for ActiveRecord:
|
55
|
+
|
56
|
+
rails new my_app -T --database=postgresql -m https://raw.githubusercontent.com/enjoycreative/enjoy_cms/master/template.rb
|
57
|
+
|
58
|
+
generator creates a new RVM gemset, so after cd'ing to app dir, you should run `bundle install` again if you use rvm.
|
59
|
+
|
60
|
+
### Localization
|
61
|
+
|
62
|
+
All models included in the gem support localization via either [hstore_translate](https://github.com/Leadformance/hstore_translate) or built-in Mongoid localize: true option.
|
63
|
+
|
64
|
+
You can get a nice admin UI for editing locales by adding [rails_admin_hstore_translate](https://github.com/glebtv/rails_admin_hstore_translate) or [rails_admin_mongoid_localize_field](https://github.com/sudosu/rails_admin_mongoid_localize_field)
|
65
|
+
|
66
|
+
Add to: ```app/models/page.rb```
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
class Page < Enjoy::Page
|
70
|
+
|
71
|
+
def regexp_prefix
|
72
|
+
"(?:\/ru|\/en)?"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
```
|
76
|
+
|
77
|
+
<!-- Wrap your routes with locale scope:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
scope "(:locale)", locale: /en|ru/ do
|
81
|
+
get 'contacts' => 'contacts#new', as: :contacts
|
82
|
+
post 'contacts' => 'contacts#create', as: :create_contacts
|
83
|
+
end
|
84
|
+
``` -->
|
85
|
+
|
86
|
+
Add to application_controller.rb:
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
class ApplicationController < ActionController::Base
|
90
|
+
include Enjoy::Controller
|
91
|
+
include Enjoy::Localizeable
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
95
|
+
Enable localization in EnjoyCMS:
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
Enjoy.configure do |enjoy|
|
99
|
+
enjoy.news_image_styles = {small: '107x126#'}
|
100
|
+
enjoy.contacts_captcha = true
|
101
|
+
enjoy.contacts_message_required = true
|
102
|
+
...
|
103
|
+
enjoy.localize = true
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
Add ```rails_admin_hstore_translate``` or ```hstore_translate``` gem if using PostgreSQL:
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
gem 'rails_admin_hstore_translate'
|
111
|
+
```
|
112
|
+
|
113
|
+
or
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
gem 'hstore_translate'
|
117
|
+
```
|
118
|
+
|
119
|
+
Add ```rails_admin_mongoid_localize_field``` gem if using MongoDB:
|
120
|
+
|
121
|
+
```ruby
|
122
|
+
gem 'rails_admin_mongoid_localize_field'
|
123
|
+
```
|
124
|
+
|
125
|
+
### Documentation
|
126
|
+
|
127
|
+
It's basically Mongoid + Rails Admin + some of my common models and controllers, capistrano config (from root repo), etc.
|
128
|
+
|
129
|
+
See their documentation for more info
|
130
|
+
|
131
|
+
## Contributing
|
132
|
+
|
133
|
+
1. Fork it
|
134
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
135
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
136
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
137
|
+
5. Create new Pull Request
|