geri 0.0.1
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +26 -0
- data/app/assets/javascripts/geri/admin.js +33 -0
- data/app/assets/javascripts/geri/admin/app.js +758 -0
- data/app/assets/javascripts/geri/admin/editor.js +56 -0
- data/app/assets/javascripts/geri/admin/password_resets.js +2 -0
- data/app/assets/stylesheets/geri/admin.css.less +60 -0
- data/app/assets/stylesheets/geri/admin/app.css +4915 -0
- data/app/assets/stylesheets/geri/admin/ckeditor/contents.css +135 -0
- data/app/assets/stylesheets/geri/admin/editor.css.less +38 -0
- data/app/assets/stylesheets/geri/admin/password_resets.css +4 -0
- data/app/assets/stylesheets/geri/admin/skin-blue.less +142 -0
- data/app/assets/vendor/ckeditor/CHANGES.md +1065 -0
- data/app/assets/vendor/ckeditor/LICENSE.md +1420 -0
- data/app/assets/vendor/ckeditor/README.md +39 -0
- data/app/assets/vendor/ckeditor/adapters/jquery.js +10 -0
- data/app/assets/vendor/ckeditor/build-config.js +69 -0
- data/app/assets/vendor/ckeditor/ckeditor.js +775 -0
- data/app/assets/vendor/ckeditor/config.js +34 -0
- data/app/assets/vendor/ckeditor/contents.css +135 -0
- data/app/assets/vendor/ckeditor/lang/en.js +5 -0
- data/app/assets/vendor/ckeditor/plugins/about/dialogs/about.js +7 -0
- data/app/assets/vendor/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/vendor/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/vendor/ckeditor/plugins/clipboard/dialogs/paste.js +12 -0
- data/app/assets/vendor/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/app/assets/vendor/ckeditor/plugins/icons.png +0 -0
- data/app/assets/vendor/ckeditor/plugins/icons_hidpi.png +0 -0
- data/app/assets/vendor/ckeditor/plugins/link/dialogs/anchor.js +7 -0
- data/app/assets/vendor/ckeditor/plugins/link/dialogs/link.js +26 -0
- data/app/assets/vendor/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/vendor/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/vendor/ckeditor/samples/css/samples.css +1640 -0
- data/app/assets/vendor/ckeditor/samples/img/github-top.png +0 -0
- data/app/assets/vendor/ckeditor/samples/img/header-bg.png +0 -0
- data/app/assets/vendor/ckeditor/samples/img/header-separator.png +0 -0
- data/app/assets/vendor/ckeditor/samples/img/logo.png +0 -0
- data/app/assets/vendor/ckeditor/samples/img/navigation-tip.png +0 -0
- data/app/assets/vendor/ckeditor/samples/index.html +128 -0
- data/app/assets/vendor/ckeditor/samples/js/sample.js +53 -0
- data/app/assets/vendor/ckeditor/samples/js/sf.js +17 -0
- data/app/assets/vendor/ckeditor/samples/old/ajax.html +85 -0
- data/app/assets/vendor/ckeditor/samples/old/api.html +210 -0
- data/app/assets/vendor/ckeditor/samples/old/appendto.html +59 -0
- data/app/assets/vendor/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- data/app/assets/vendor/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
- data/app/assets/vendor/ckeditor/samples/old/assets/posteddata.php +59 -0
- data/app/assets/vendor/ckeditor/samples/old/assets/sample.jpg +0 -0
- data/app/assets/vendor/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
- data/app/assets/vendor/ckeditor/samples/old/datafiltering.html +508 -0
- data/app/assets/vendor/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
- data/app/assets/vendor/ckeditor/samples/old/dialog/dialog.html +190 -0
- data/app/assets/vendor/ckeditor/samples/old/divreplace.html +144 -0
- data/app/assets/vendor/ckeditor/samples/old/enterkey/enterkey.html +106 -0
- data/app/assets/vendor/ckeditor/samples/old/index.html +122 -0
- data/app/assets/vendor/ckeditor/samples/old/inlineall.html +314 -0
- data/app/assets/vendor/ckeditor/samples/old/inlinebycode.html +124 -0
- data/app/assets/vendor/ckeditor/samples/old/inlinetextarea.html +113 -0
- data/app/assets/vendor/ckeditor/samples/old/jquery.html +103 -0
- data/app/assets/vendor/ckeditor/samples/old/readonly.html +76 -0
- data/app/assets/vendor/ckeditor/samples/old/replacebyclass.html +60 -0
- data/app/assets/vendor/ckeditor/samples/old/replacebycode.html +59 -0
- data/app/assets/vendor/ckeditor/samples/old/sample.css +357 -0
- data/app/assets/vendor/ckeditor/samples/old/sample.js +50 -0
- data/app/assets/vendor/ckeditor/samples/old/sample_posteddata.php +16 -0
- data/app/assets/vendor/ckeditor/samples/old/tabindex.html +78 -0
- data/app/assets/vendor/ckeditor/samples/old/toolbar/toolbar.html +235 -0
- data/app/assets/vendor/ckeditor/samples/old/uicolor.html +72 -0
- data/app/assets/vendor/ckeditor/samples/old/uilanguages.html +122 -0
- data/app/assets/vendor/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
- data/app/assets/vendor/ckeditor/samples/old/xhtmlstyle.html +234 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/index.html +446 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE +19 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +325 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +38 -0
- data/app/assets/vendor/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog_ie.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog_ie7.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog_ie8.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog_iequirks.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/dialog_opera.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor_gecko.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor_ie.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor_ie7.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor_ie8.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/editor_iequirks.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/icons.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/icons_hidpi.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/arrow.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/close.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/hidpi/close.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/hidpi/lock.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/hidpi/refresh.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/lock-open.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/lock.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/images/refresh.png +0 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/readme.md +35 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/sample/bootstrapck-sample.html +127 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css +1 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/sample/js/analytics.js +4 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js +189 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss +25 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie/dialog_ie.scss +62 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie/editor_ie.scss +71 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/dialog_ie7.scss +68 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/editor_ie7.scss +213 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss +24 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss +27 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss +21 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/editor_iequirks.scss +79 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss +31 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_colorpanel.scss +119 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_elementspath.scss +66 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_mainui.scss +189 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_menu.scss +182 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_panel.scss +199 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_presets.scss +32 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_reset.scss +107 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_richcombo.scss +174 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/_toolbar.scss +317 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/components/editor.scss +66 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/config/_colors.scss +61 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/config/_config.scss +9 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/config/_defaults.scss +37 -0
- data/app/assets/vendor/ckeditor/skins/bootstrapck/scss/dialog/dialog.scss +822 -0
- data/app/assets/vendor/ckeditor/styles.js +111 -0
- data/app/controllers/geri/admin/admin_users_controller.rb +56 -0
- data/app/controllers/geri/admin/dashboard_controller.rb +8 -0
- data/app/controllers/geri/admin/editor_controller.rb +33 -0
- data/app/controllers/geri/admin/password_resets_controller.rb +21 -0
- data/app/controllers/geri/admin/sessions_controller.rb +24 -0
- data/app/controllers/geri/admin_controller.rb +19 -0
- data/app/controllers/geri/application_controller.rb +5 -0
- data/app/controllers/geri/pages_controller.rb +34 -0
- data/app/helpers/geri/admin/dashboard_helper.rb +4 -0
- data/app/helpers/geri/admin/editor_helper.rb +4 -0
- data/app/helpers/geri/admin/pages_helper.rb +45 -0
- data/app/helpers/geri/admin/partials_helper.rb +4 -0
- data/app/helpers/geri/admin/password_resets_helper.rb +4 -0
- data/app/helpers/geri/admin/sessions_helper.rb +4 -0
- data/app/helpers/geri/admin_helper.rb +24 -0
- data/app/helpers/geri/admin_users_helper.rb +4 -0
- data/app/helpers/geri/application_helper.rb +26 -0
- data/app/helpers/geri/meta_helper.rb +32 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/geri/admin_user_mailer.rb +11 -0
- data/app/models/geri/admin_user.rb +14 -0
- data/app/models/geri/content.rb +6 -0
- data/app/models/geri/password_reset.rb +17 -0
- data/app/models/geri/session.rb +20 -0
- data/app/views/geri/admin/admin_users/_form.html.erb +5 -0
- data/app/views/geri/admin/admin_users/edit.html.erb +27 -0
- data/app/views/geri/admin/admin_users/index.html.erb +45 -0
- data/app/views/geri/admin/admin_users/new.html.erb +17 -0
- data/app/views/geri/admin/dashboard/index.html.erb +1 -0
- data/app/views/geri/admin/editor/template.html.erb +17 -0
- data/app/views/geri/admin/password_resets/new.html.erb +17 -0
- data/app/views/geri/admin/sessions/new.html.erb +23 -0
- data/app/views/geri/admin/shared/_aside.html.erb +16 -0
- data/app/views/geri/admin/shared/_header.html.erb +31 -0
- data/app/views/geri/admin/shared/_menu_item.html.erb +17 -0
- data/app/views/geri/admin_user_mailer/reset_password_email.text.erb +7 -0
- data/app/views/layouts/geri/admin.html.erb +24 -0
- data/app/views/layouts/geri/admin/sessions.html.erb +21 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/initializers/geri.rb +7 -0
- data/config/initializers/sorcery.rb +463 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/en.yml +13 -0
- data/config/routes.rb +23 -0
- data/db/migrate/20160409151523_create_geri_contents.rb +8 -0
- data/db/migrate/20160411205412_sorcery_core.rb +20 -0
- data/lib/generators/geri/install/USAGE +8 -0
- data/lib/generators/geri/install/install_generator.rb +54 -0
- data/lib/generators/geri/install/templates/bower.json +8 -0
- data/lib/generators/geri/install/templates/index.html.erb +46 -0
- data/lib/generators/geri/install/templates/initializer.rb +12 -0
- data/lib/generators/geri/install/templates/layout.html.erb +11 -0
- data/lib/generators/geri/install/templates/site.css.less +1 -0
- data/lib/generators/geri/install/templates/site.js +1 -0
- data/lib/geri.rb +7 -0
- data/lib/geri/cli.rb +6 -0
- data/lib/geri/cli/base.rb +23 -0
- data/lib/geri/cli/extension.rb +18 -0
- data/lib/geri/config.rb +29 -0
- data/lib/geri/config/menu_item.rb +35 -0
- data/lib/geri/engine.rb +34 -0
- data/lib/geri/tasks.rb +3 -0
- data/lib/geri/tasks/create_admin_user.rb +40 -0
- data/lib/geri/version.rb +3 -0
- data/lib/tasks/geri_tasks.rake +15 -0
- metadata +449 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
|
2
|
+
|
|
3
|
+
en:
|
|
4
|
+
devise:
|
|
5
|
+
confirmations:
|
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
|
9
|
+
failure:
|
|
10
|
+
already_authenticated: "You are already signed in."
|
|
11
|
+
inactive: "Your account is not activated yet."
|
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
|
13
|
+
locked: "Your account is locked."
|
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
|
19
|
+
mailer:
|
|
20
|
+
confirmation_instructions:
|
|
21
|
+
subject: "Confirmation instructions"
|
|
22
|
+
reset_password_instructions:
|
|
23
|
+
subject: "Reset password instructions"
|
|
24
|
+
unlock_instructions:
|
|
25
|
+
subject: "Unlock instructions"
|
|
26
|
+
password_change:
|
|
27
|
+
subject: "Password Changed"
|
|
28
|
+
omniauth_callbacks:
|
|
29
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
|
30
|
+
success: "Successfully authenticated from %{kind} account."
|
|
31
|
+
passwords:
|
|
32
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
|
33
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
|
34
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
|
35
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
|
36
|
+
updated_not_active: "Your password has been changed successfully."
|
|
37
|
+
registrations:
|
|
38
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
|
39
|
+
signed_up: "Welcome! You have signed up successfully."
|
|
40
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
|
41
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
|
42
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
|
43
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
|
44
|
+
updated: "Your account has been updated successfully."
|
|
45
|
+
sessions:
|
|
46
|
+
signed_in: "Signed in successfully."
|
|
47
|
+
signed_out: "Signed out successfully."
|
|
48
|
+
already_signed_out: "Signed out successfully."
|
|
49
|
+
unlocks:
|
|
50
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
|
51
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
|
52
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
|
53
|
+
errors:
|
|
54
|
+
messages:
|
|
55
|
+
already_confirmed: "was already confirmed, please try signing in"
|
|
56
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
|
57
|
+
expired: "has expired, please request a new one"
|
|
58
|
+
not_found: "not found"
|
|
59
|
+
not_locked: "was not locked"
|
|
60
|
+
not_saved:
|
|
61
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
|
62
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Geri::Engine.routes.draw do
|
|
2
|
+
|
|
3
|
+
namespace :admin, path: Geri::Config.admin_path do
|
|
4
|
+
|
|
5
|
+
get 'login' => 'sessions#new', as: :login
|
|
6
|
+
get 'signup' => 'admin_users#signup', as: :singup
|
|
7
|
+
delete 'logout' => 'sessions#destroy', as: :logout
|
|
8
|
+
|
|
9
|
+
resources :sessions, only: [:create, :destroy]
|
|
10
|
+
resources :admin_users
|
|
11
|
+
resources :password_resets, except: [:index, :destroy]
|
|
12
|
+
|
|
13
|
+
get 'editor' => 'editor#template'
|
|
14
|
+
post 'editor' => 'editor#update_contents'
|
|
15
|
+
get 'edit' => 'editor#index'
|
|
16
|
+
|
|
17
|
+
root to: 'dashboard#index'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
get '*path' => 'pages#show'
|
|
21
|
+
root to: 'pages#show'
|
|
22
|
+
|
|
23
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class SorceryCore < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :geri_admin_users do |t|
|
|
4
|
+
t.string :email, null: false
|
|
5
|
+
t.string :crypted_password
|
|
6
|
+
t.string :salt
|
|
7
|
+
|
|
8
|
+
t.string :first_name, null: false
|
|
9
|
+
t.string :last_name, null: false
|
|
10
|
+
|
|
11
|
+
t.string :reset_password_token, index: true
|
|
12
|
+
t.datetime :reset_password_token_expires_at
|
|
13
|
+
t.datetime :reset_password_email_sent_at
|
|
14
|
+
|
|
15
|
+
t.timestamps
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
add_index :geri_admin_users, :email, unique: true
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
class Geri::InstallGenerator < Rails::Generators::Base
|
|
2
|
+
source_root File.expand_path('../templates', __FILE__)
|
|
3
|
+
|
|
4
|
+
def create_initializer
|
|
5
|
+
template 'initializer.rb', 'config/initializers/geri/base.rb'
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def add_mount_point
|
|
9
|
+
gsub_file('config/routes.rb', 'Rails.application.routes.draw do', <<-EOF
|
|
10
|
+
Rails.application.routes.draw do
|
|
11
|
+
# Sets the mounted location of the Geri CMS, if you wish to mount this elsewhere simply update this line.
|
|
12
|
+
mount Geri::Engine => '/'
|
|
13
|
+
EOF
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def create_site_directory
|
|
18
|
+
empty_directory('app/site')
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def create_default_layout
|
|
22
|
+
copy_file('layout.html.erb', 'app/site/layout.html.erb')
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def create_default_index
|
|
26
|
+
copy_file('index.html.erb', 'app/site/index.html.erb')
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def create_assets_directory
|
|
30
|
+
empty_directory('app/site/assets')
|
|
31
|
+
empty_directory('app/site/assets/vendor')
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def setup_bower
|
|
35
|
+
copy_file('.bowerrc', 'app/site/.bowerrc')
|
|
36
|
+
copy_file('bower.json', 'app/site/bower.json')
|
|
37
|
+
inside('app/site') do
|
|
38
|
+
run 'bower install'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def install_default_css
|
|
43
|
+
copy_file('site.css.less', 'app/site/assets/stylesheets/site.css.less')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def install_default_js
|
|
47
|
+
copy_file('site.js', 'app/site/assets/javascripts/site.js')
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def update_gitignore
|
|
51
|
+
append_file('.gitignore', 'app/site/vendor')
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<%# METADATA %>
|
|
2
|
+
<% title 'GeriCMS' %>
|
|
3
|
+
<% keywords 'cms', 'gericms', 'rails cms', 'ruby cms' %>
|
|
4
|
+
<% description 'GeriCMS is a powerful Rails based CMS designed from the ground up for developers.' %>
|
|
5
|
+
|
|
6
|
+
<%# CONTENT %>
|
|
7
|
+
<nav class="navbar navbar-default">
|
|
8
|
+
<div class="container">
|
|
9
|
+
<div class="navbar-header">
|
|
10
|
+
<%= link_to 'GeriCMS', '#', class: 'navbar-brand' %>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</nav>
|
|
14
|
+
<div class="container">
|
|
15
|
+
<div class="row">
|
|
16
|
+
<div class="col-xs-4">
|
|
17
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In a mi ac elit imperdiet iaculis. Nunc vestibulum
|
|
18
|
+
arcu ut ultricies convallis. Cras sed arcu et nibh interdum porta vel et ipsum. Donec ullamcorper porta mauris,
|
|
19
|
+
id pulvinar turpis porta ac. Praesent non ultricies metus. Morbi sit amet eleifend ipsum. Cum sociis natoque
|
|
20
|
+
penatibus et magnis dis parturient montes, nascetur ridiculus mus. In in sapien enim. Nunc a eros ac neque cursus
|
|
21
|
+
congue non at nulla. Morbi mattis justo et nulla scelerisque, eu finibus tellus consectetur. Nullam quis
|
|
22
|
+
hendrerit libero. Quisque ac porttitor ligula, quis faucibus massa. Praesent ut tincidunt mi.
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-xs-4">
|
|
25
|
+
<%= editable :center_content do %>
|
|
26
|
+
Etiam porttitor dolor diam, ut cursus erat efficitur id. Duis hendrerit scelerisque vehicula. Aenean eu elit
|
|
27
|
+
nunc. Sed eleifend urna ut convallis rutrum. Vestibulum tortor justo, rutrum a fringilla eu, feugiat ac
|
|
28
|
+
sapien.
|
|
29
|
+
|
|
30
|
+
Vivamus consectetur ante lectus, at rhoncus arcu vulputate pulvinar. Curabitur semper orci vitae purus
|
|
31
|
+
tristique, sit amet hendrerit magna ultricies. Nam at nibh malesuada, auctor massa non, faucibus arcu.
|
|
32
|
+
Maecenas sed urna vitae quam aliquet euismod. Maecenas at ex enim. Quisque aliquam in purus ut hendrerit.
|
|
33
|
+
Donec sed gravida ex.Proin ornare vel sem id fringilla. Integer luctus leo sapien, vitae accumsan ante
|
|
34
|
+
pulvinar ut. Sed tristique magna sed blandit imperdiet.
|
|
35
|
+
<% end %>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="col-xs-4">
|
|
38
|
+
Nam a nibh non tortor facilisis egestas id sit amet dui. Ut tortor turpis, dapibus cursus libero vel, mattis
|
|
39
|
+
porta ligula. Sed quam augue, gravida ac mauris quis, sodales maximus metus. Fusce congue lacus id elit ultricies
|
|
40
|
+
suscipit volutpat in lorem. Aenean molestie placerat ultricies. Nunc varius sem at suscipit sagittis. Suspendisse
|
|
41
|
+
odio ipsum, scelerisque varius lacus sit amet, eleifend hendrerit elit. Curabitur euismod sagittis finibus.
|
|
42
|
+
Praesent mattis, lorem id lacinia dapibus, odio nibh fringilla sem, sed consequat est eros id sapien. Mauris
|
|
43
|
+
eget commodo risus.
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'bootstrap/less/bootstrap';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//= require jquery/dist/jquery
|
data/lib/geri.rb
ADDED
data/lib/geri/cli.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require_relative './extension'
|
|
2
|
+
|
|
3
|
+
module Geri
|
|
4
|
+
module CLI
|
|
5
|
+
class Base < Thor
|
|
6
|
+
include Thor::Actions
|
|
7
|
+
include Rails::Generators::Actions
|
|
8
|
+
|
|
9
|
+
desc 'new NAME', 'Generate new Geri based Rails application'
|
|
10
|
+
def new(name)
|
|
11
|
+
basepath = File.expand_path('../../../../', __FILE__)
|
|
12
|
+
Rails::Generators::AppGenerator.start [name,
|
|
13
|
+
'-m',
|
|
14
|
+
"#{basepath}/template.rb"
|
|
15
|
+
]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
desc 'extension COMMAND', 'Controls Geri extensions'
|
|
19
|
+
subcommand 'extension', Extension
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module Geri
|
|
2
|
+
module CLI
|
|
3
|
+
class Extension < Thor
|
|
4
|
+
include Thor::Actions
|
|
5
|
+
include Rails::Generators::Actions
|
|
6
|
+
|
|
7
|
+
desc 'install NAME', 'Install the named Geri extension'
|
|
8
|
+
def install(name)
|
|
9
|
+
extname = 'geri'
|
|
10
|
+
extname << "_#{name}" unless name == 'geri'
|
|
11
|
+
script = %Q{bundle exec rails runner -c 'puts Gem::Specification.find_by_name("#{extname}").gem_dir'}
|
|
12
|
+
gemdir = run script, capture: true, verbose: false
|
|
13
|
+
load("#{gemdir.strip}/installer.rb")
|
|
14
|
+
"#{extname.gsub('_', '/').classify}::Installer".constantize.start(name)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/geri/config.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require_relative './config/menu_item'
|
|
2
|
+
module Geri
|
|
3
|
+
module Config
|
|
4
|
+
include ActiveSupport::Configurable
|
|
5
|
+
config_accessor :admin_path # route to the administrative backend
|
|
6
|
+
config_accessor :menu_items, instance_reader: false # menu item registry
|
|
7
|
+
config_accessor :site_name # name of the site
|
|
8
|
+
config_accessor :mount_point # sets the mount point for the Geri::Engine
|
|
9
|
+
|
|
10
|
+
# Defaults
|
|
11
|
+
self.admin_path = '/admin'
|
|
12
|
+
self.menu_items = []
|
|
13
|
+
self.mount_point = '/'
|
|
14
|
+
|
|
15
|
+
def self.register_menu_item(title, path_or_options=nil, options={})
|
|
16
|
+
self.menu_items << item = MenuItem.new(title, path_or_options, options)
|
|
17
|
+
yield item if block_given?
|
|
18
|
+
self.menu_items.sort! { |a,b| a.priority <=> b.priority }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# configure override
|
|
22
|
+
def self.configure(&block)
|
|
23
|
+
begin
|
|
24
|
+
yield self
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Geri
|
|
2
|
+
module Config
|
|
3
|
+
class MenuItem
|
|
4
|
+
attr_reader :title, :priority, :is_parent, :menu_items, :icon
|
|
5
|
+
|
|
6
|
+
def initialize(title, path_or_options=nil, options={})
|
|
7
|
+
if !path_or_options || path_or_options.is_a?(Hash)
|
|
8
|
+
options = path_or_options if path_or_options
|
|
9
|
+
@is_parent = true
|
|
10
|
+
else
|
|
11
|
+
@path = path_or_options
|
|
12
|
+
end
|
|
13
|
+
@icon = options[:icon]
|
|
14
|
+
@title = title
|
|
15
|
+
@priority = options[:priority] || 0
|
|
16
|
+
@menu_items = []
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def register_menu_item(title, path_or_options=nil, options={})
|
|
20
|
+
self.menu_items << item = MenuItem.new(title, path_or_options, options)
|
|
21
|
+
yield item if block_given?
|
|
22
|
+
self.menu_items.sort! { |a, b| a.priority <=> b.priority }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def path
|
|
26
|
+
"#{Geri::Config.admin_path}#{@path}"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def to_partial_path
|
|
30
|
+
'shared/menu_item'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/lib/geri/engine.rb
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require_relative './config'
|
|
2
|
+
|
|
3
|
+
module Geri
|
|
4
|
+
class Engine < ::Rails::Engine
|
|
5
|
+
isolate_namespace Geri
|
|
6
|
+
|
|
7
|
+
initializer :append_migrations do |app|
|
|
8
|
+
unless app.root.to_s.match root.to_s
|
|
9
|
+
app.config.paths['db/migrate'] << config.paths['db/migrate'].expanded[0]
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
config.i18n.default_locale = :en
|
|
14
|
+
|
|
15
|
+
config.generators do |g|
|
|
16
|
+
g.test_framework :rspec
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
initializer :update_asset_paths do |app|
|
|
20
|
+
config.assets.paths << app.root.join('app', 'site', 'assets', 'javascripts')
|
|
21
|
+
config.assets.paths << app.root.join('app', 'site', 'assets', 'vendor')
|
|
22
|
+
config.assets.paths << app.root.join('app', 'site', 'assets', 'stylesheets')
|
|
23
|
+
config.assets.paths << app.root.join('app', 'site', 'assets', 'images')
|
|
24
|
+
config.assets.paths << app.root.join('app', 'assets', 'vendor')
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
initializer :update_assets do
|
|
28
|
+
config.assets.precompile += %w{ site.js site.css geri/admin.js geri/admin.css ckeditor/ckeditor.js } +
|
|
29
|
+
%w{ geri/admin/editor.css geri/admin/editor.js }
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|