optimacms 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf64180dc36b5fa4e9f0a965d4876c3e60f1fcae
4
- data.tar.gz: e39f18d55e0174be134dd5e2f2a5c1b9e721c551
3
+ metadata.gz: 7bef3151c386d3f2010aea623879adb69f327323
4
+ data.tar.gz: 3d58922701c88a7eede7cc0776f3fa29ab02083e
5
5
  SHA512:
6
- metadata.gz: df4dd642f28cab6fe0d854709362d6be529489d671669cb4e64ac771c626811f8920b1f87024a7a918f4370522f82da2f7c2c2d3bd8f523edb6277cd60f72e7d
7
- data.tar.gz: df03a2f62ed057ed1a5727650df97b5224d4a981e0b5551a9a702a4724158f85d98036d5185670219fadaa851f93c71a74cdaaad4b155c7cf3ccd5e5f597946f
6
+ metadata.gz: 0bd6252d6156aa11a7c2b673d06363110f8cea9942469dc0fd8eb1060400ec1db2e9a3eadbaded4333be11ffb8248e3de0381bf50efff0b04d1901d354c3f055
7
+ data.tar.gz: 9aef72234c545d6ec4c78bc131bc6f5bfad98c5c30f590a265e60d536e193d4dc9792cf9da931265f3df19bc87ba9c86c0d4f02df70fb4909492011d070a416d
data/config/routes.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  Optimacms::Engine.routes.draw do
2
2
 
3
3
  # admin
4
- scope '/cmsadmin', module: "admin" do
4
+ scope '/'+Optimacms.admin_namespace, module: "admin" do
5
5
  #devise_for :users, { class_name: "Optimacms::User", module: :devise }
6
6
 
7
7
  get '/' => 'dashboard#index', as: :dashboard
@@ -7,7 +7,7 @@ module Optimacms
7
7
  def self.config
8
8
  {
9
9
  class_name: "Optimacms::CmsAdminUser",
10
- path: '/cmsadmin',
10
+ path: '/'+Optimacms.main_namespace+'/'+Optimacms.admin_namespace,
11
11
  #path: ActiveAdmin.application.default_namespace || "/",
12
12
  controllers: Optimacms::Devise.controllers,
13
13
  path_names: { sign_in: 'login', sign_out: "logout" },
@@ -1,3 +1,3 @@
1
1
  module Optimacms
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/optimacms.rb CHANGED
@@ -9,4 +9,17 @@ module Optimacms
9
9
  end
10
10
 
11
11
 
12
+ #
13
+ mattr_accessor :main_namespace
14
+ def main_namespace
15
+ @@main_namespace || ''
16
+ end
17
+
18
+
19
+ #
20
+ mattr_accessor :admin_namespace
21
+ def admin_namespace
22
+ @@admin_namespace || 'admin'
23
+ end
24
+
12
25
  end
@@ -1,6 +1,6 @@
1
1
  %h2 Admin
2
2
  %ul
3
- %li= link_to '/cmsadmin', '/cmsadmin'
3
+ %li= link_to 'admin area', '/'+Optimacms.main_namespace+'/'+Optimacms.admin_namespace
4
4
 
5
5
  %h2 Users
6
6
  %ul
@@ -16,4 +16,4 @@
16
16
  %li= link_to '/newsitem-1.html', '/newsitem-1.html'
17
17
  %li= link_to '/services.html', '/services.html'
18
18
  %li= link_to '/service-education.html', '/service-education.html'
19
- %li= link_to '/service-hosting.html', '/service-hosting.html'
19
+ %li= link_to '/service-hosting.html', '/service-hosting.html'
@@ -19,7 +19,11 @@ default: &default
19
19
 
20
20
  development:
21
21
  <<: *default
22
- database: my_cms
22
+ host: <%= Rails.application.secrets.db_host %>
23
+ database: <%= Rails.application.secrets.db %>
24
+ username: <%= Rails.application.secrets.db_user %>
25
+ password: <%= Rails.application.secrets.db_password %>
26
+
23
27
 
24
28
  # Warning: The database defined as "test" will be erased and
25
29
  # re-generated from your development database when you run "rake".
@@ -1 +1,4 @@
1
- Optimacms.files_dir_path = 'img'
1
+ Optimacms.main_namespace = '' # blank or any like 'cms'
2
+ Optimacms.admin_namespace = 'admin'
3
+
4
+ Optimacms.files_dir_path = 'img'
@@ -11,7 +11,7 @@ Rails.application.routes.draw do
11
11
 
12
12
 
13
13
  # extend admin area
14
- scope '/cmsadmin', module: "optimacms" do
14
+ scope '/'+Optimacms.main_namespace+'/'+Optimacms.admin_namespace, module: "optimacms" do
15
15
  namespace :admin do
16
16
  resources :news do
17
17
  collection do
@@ -23,7 +23,7 @@ Rails.application.routes.draw do
23
23
 
24
24
 
25
25
  # the last!!!
26
- mount Optimacms::Engine => "/"
26
+ mount Optimacms::Engine => '/'+Optimacms.main_namespace
27
27
 
28
28
  #
29
29
  root to: 'home#index'
@@ -13,6 +13,12 @@
13
13
  development:
14
14
  secret_key_base: e135e2b53ab10b0afff68c3f7f0d96e491146342113ab6e1c38409af772139d5317e3da8946ef9f6e6474eb937bc86c11ffe8406c2f9c2369fb6ec1a5b9c4d3b
15
15
 
16
+ db: my_cms
17
+ db_host: devapi.gex
18
+ db_user: dev_gex
19
+ db_password: Galactic1
20
+
21
+
16
22
  test:
17
23
  secret_key_base: 8ab08b04db9f09047e4333306df25eab59472443ee5574b8fd0feb8873b17f97afe924e3380ad50f6197718707d8c474cd7578bd9deb6f708b83072e5e89226f
18
24
 
@@ -11,12 +11,12 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150610225422) do
14
+ ActiveRecord::Schema.define(version: 20150513224341) do
15
15
 
16
16
  create_table "cms_languages", force: :cascade do |t|
17
17
  t.string "title", limit: 250
18
18
  t.string "lang", limit: 4
19
- t.boolean "enabled", limit: 1, default: true, null: false
19
+ t.boolean "enabled", default: true, null: false
20
20
  t.string "charset", limit: 15, default: "utf8_unicode_ci", null: false
21
21
  t.string "locale", limit: 255, null: false
22
22
  t.string "lang_html", limit: 10, null: false
@@ -44,31 +44,30 @@ ActiveRecord::Schema.define(version: 20150610225422) do
44
44
  t.string "parsed_url", limit: 255
45
45
  t.integer "parent_id", limit: 4, default: 0, null: false
46
46
  t.string "view_path", limit: 255
47
- t.boolean "is_translated", limit: 1, default: false, null: false
47
+ t.boolean "is_translated", default: false, null: false
48
48
  t.integer "status", limit: 4, default: 0, null: false
49
49
  t.integer "pos", limit: 4, default: 0, null: false
50
50
  t.string "redir_url", limit: 255
51
51
  t.integer "template_id", limit: 4
52
52
  t.integer "layout_id", limit: 4
53
53
  t.integer "owner", limit: 4
54
- t.boolean "is_folder", limit: 1, default: false, null: false
54
+ t.boolean "is_folder", default: false, null: false
55
55
  t.string "controller_action", limit: 255
56
56
  t.datetime "created_at", null: false
57
57
  t.datetime "updated_at", null: false
58
58
  t.integer "enabled", limit: 1, default: 1, null: false
59
59
  end
60
60
 
61
- add_index "cms_pages", ["name"], name: "index_cms_pages_on_name", using: :btree
62
61
  add_index "cms_pages", ["parent_id"], name: "parent_id", using: :btree
63
62
  add_index "cms_pages", ["status"], name: "status", using: :btree
64
63
  add_index "cms_pages", ["url"], name: "url", using: :btree
65
64
 
66
65
  create_table "cms_pages_translation", force: :cascade do |t|
67
- t.integer "item_id", limit: 4, default: 0, null: false
66
+ t.integer "item_id", limit: 4, default: 0, null: false
68
67
  t.integer "page_id", limit: 4
69
- t.string "lang", limit: 5, null: false
68
+ t.string "lang", limit: 5, null: false
70
69
  t.string "meta_title", limit: 255
71
- t.text "meta_description", limit: 65535
70
+ t.string "meta_description", limit: 255
72
71
  t.string "meta_keywords", limit: 255
73
72
  t.string "template_filename", limit: 255
74
73
  end
@@ -86,11 +85,11 @@ ActiveRecord::Schema.define(version: 20150610225422) do
86
85
  t.integer "type_id", limit: 1
87
86
  t.string "tpl_format", limit: 255
88
87
  t.integer "pos", limit: 4
89
- t.boolean "is_translated", limit: 1, default: false, null: false
88
+ t.boolean "is_translated", default: false, null: false
90
89
  t.datetime "created_at", null: false
91
90
  t.datetime "updated_at", null: false
92
- t.boolean "is_folder", limit: 1, default: false, null: false
93
- t.boolean "enabled", limit: 1, default: true, null: false
91
+ t.boolean "is_folder", default: false, null: false
92
+ t.boolean "enabled", default: true, null: false
94
93
  t.string "ancestry", limit: 255
95
94
  end
96
95
 
@@ -129,13 +128,6 @@ ActiveRecord::Schema.define(version: 20150610225422) do
129
128
  add_index "cms_users", ["email"], name: "index_optimacms_cms_users_on_email", unique: true, using: :btree
130
129
  add_index "cms_users", ["reset_password_token"], name: "index_optimacms_cms_users_on_reset_password_token", unique: true, using: :btree
131
130
 
132
- create_table "news", force: :cascade do |t|
133
- t.string "title", limit: 255
134
- t.text "description", limit: 65535
135
- t.datetime "created_at", null: false
136
- t.datetime "updated_at", null: false
137
- end
138
-
139
131
  create_table "optimacms_articles", force: :cascade do |t|
140
132
  t.string "title", limit: 255
141
133
  t.text "text", limit: 65535
@@ -143,6 +135,24 @@ ActiveRecord::Schema.define(version: 20150610225422) do
143
135
  t.datetime "updated_at", null: false
144
136
  end
145
137
 
138
+ create_table "optimacms_cms_users", force: :cascade do |t|
139
+ t.string "email", limit: 255, default: "", null: false
140
+ t.string "encrypted_password", limit: 255, default: "", null: false
141
+ t.string "reset_password_token", limit: 255
142
+ t.datetime "reset_password_sent_at"
143
+ t.datetime "remember_created_at"
144
+ t.integer "sign_in_count", limit: 4, default: 0, null: false
145
+ t.datetime "current_sign_in_at"
146
+ t.datetime "last_sign_in_at"
147
+ t.string "current_sign_in_ip", limit: 255
148
+ t.string "last_sign_in_ip", limit: 255
149
+ t.datetime "created_at"
150
+ t.datetime "updated_at"
151
+ end
152
+
153
+ add_index "optimacms_cms_users", ["email"], name: "index_optimacms_cms_users_on_email", unique: true, using: :btree
154
+ add_index "optimacms_cms_users", ["reset_password_token"], name: "index_optimacms_cms_users_on_reset_password_token", unique: true, using: :btree
155
+
146
156
  create_table "users", force: :cascade do |t|
147
157
  t.string "email", limit: 255, default: "", null: false
148
158
  t.string "encrypted_password", limit: 255, default: "", null: false