kuztuscms 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.
- data/.gitignore +9 -0
- data/.rvmrc +55 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +156 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +12 -0
- data/Rakefile +29 -0
- data/app/assets/images/kuztuscms/.gitkeep +0 -0
- data/app/assets/images/kuztuscms/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/kuztuscms/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/kuztuscms/.DS_Store +0 -0
- data/app/assets/javascripts/kuztuscms/application.js +15 -0
- data/app/assets/javascripts/kuztuscms/bootstrap.js +1720 -0
- data/app/assets/javascripts/kuztuscms/codemirror-compressed.js +1 -0
- data/app/assets/stylesheets/kuztuscms/.DS_Store +0 -0
- data/app/assets/stylesheets/kuztuscms/application.css.scss +16 -0
- data/app/assets/stylesheets/kuztuscms/bootstrap-responsive.css +581 -0
- data/app/assets/stylesheets/kuztuscms/bootstrap.css +3496 -0
- data/app/assets/stylesheets/kuztuscms/codemirror.css +115 -0
- data/app/controllers/kuztuscms/articles_controller.rb +53 -0
- data/app/controllers/kuztuscms/home_controller.rb +6 -0
- data/app/controllers/kuztuscms/layouts_controller.rb +75 -0
- data/app/controllers/kuztuscms/pages_controller.rb +73 -0
- data/app/controllers/kuztuscms/settings_controller.rb +48 -0
- data/app/controllers/kuztuscms/templates_controller.rb +72 -0
- data/app/controllers/kuztuscms/users_controller.rb +74 -0
- data/app/controllers/kuztuscms_controller.rb +23 -0
- data/app/helpers/kuztuscms/application_helper.rb +4 -0
- data/app/models/kuztuscms/article.rb +4 -0
- data/app/models/kuztuscms/layout.rb +14 -0
- data/app/models/kuztuscms/page.rb +8 -0
- data/app/models/kuztuscms/setting.rb +11 -0
- data/app/models/kuztuscms/template.rb +14 -0
- data/app/models/kuztuscms/user.rb +20 -0
- data/app/views/devise/_links.erb +27 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +18 -0
- data/app/views/devise/registrations/edit.html.erb +25 -0
- data/app/views/devise/registrations/new.html.erb +21 -0
- data/app/views/devise/sessions/new.html.erb +31 -0
- data/app/views/devise/unlocks/new.html.erb +19 -0
- data/app/views/kuztuscms/articles/_form.html.erb +35 -0
- data/app/views/kuztuscms/articles/edit.html.erb +1 -0
- data/app/views/kuztuscms/articles/index.html.erb +22 -0
- data/app/views/kuztuscms/articles/new.html.erb +1 -0
- data/app/views/kuztuscms/articles/show.html.erb +4 -0
- data/app/views/kuztuscms/home/index.html.erb +1 -0
- data/app/views/kuztuscms/layouts/_form.html.erb +58 -0
- data/app/views/kuztuscms/layouts/edit.html.erb +2 -0
- data/app/views/kuztuscms/layouts/index.html.erb +32 -0
- data/app/views/kuztuscms/layouts/new.html.erb +2 -0
- data/app/views/kuztuscms/pages/_form.html.erb +72 -0
- data/app/views/kuztuscms/pages/edit.html.erb +1 -0
- data/app/views/kuztuscms/pages/index.html.erb +28 -0
- data/app/views/kuztuscms/pages/new.html.erb +1 -0
- data/app/views/kuztuscms/pages/show.html.erb +1 -0
- data/app/views/kuztuscms/settings/_form.html.erb +35 -0
- data/app/views/kuztuscms/settings/edit.html.erb +1 -0
- data/app/views/kuztuscms/settings/index.html.erb +24 -0
- data/app/views/kuztuscms/settings/new.html.erb +1 -0
- data/app/views/kuztuscms/shared/_codemirror.html.erb +20 -0
- data/app/views/kuztuscms/templates/_form.html.erb +58 -0
- data/app/views/kuztuscms/templates/edit.html.erb +3 -0
- data/app/views/kuztuscms/templates/index.html.erb +28 -0
- data/app/views/kuztuscms/templates/new.html.erb +2 -0
- data/app/views/kuztuscms/users/_form.html.erb +56 -0
- data/app/views/kuztuscms/users/edit.html.erb +1 -0
- data/app/views/kuztuscms/users/index.html.erb +28 -0
- data/app/views/kuztuscms/users/new.html.erb +1 -0
- data/app/views/kuztuscms/users/show.html.erb +15 -0
- data/app/views/layouts/kuztuscms/application.html.erb +57 -0
- data/config/initializers/devise.rb +225 -0
- data/config/initializers/resolver.rb +65 -0
- data/config/locales/devise.en.yml +57 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +18 -0
- data/db/migrate/20120218074040_devise_create_kuztuscms_users.rb +52 -0
- data/db/migrate/20120218075211_create_kuztuscms_pages.rb +15 -0
- data/db/migrate/20120311080242_create_kuztuscms_templates.rb +38 -0
- data/db/migrate/20120311141419_create_kuztuscms_articles.rb +10 -0
- data/db/migrate/20120311173954_create_kuztuscms_layouts.rb +43 -0
- data/db/migrate/20120316081613_create_kuztuscms_settings.rb +10 -0
- data/kuztuscms.gemspec +33 -0
- data/lib/kuztuscms/engine.rb +13 -0
- data/lib/kuztuscms/settings.rb +26 -0
- data/lib/kuztuscms/version.rb +3 -0
- data/lib/kuztuscms.rb +7 -0
- data/lib/tasks/kuztuscms_tasks.rake +4 -0
- data/script/rails +8 -0
- data/spec/controllers/kuztuscms/articles_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/languages_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/layouts_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/pages_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/settings_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/templates_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/translations_controller_spec.rb +164 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/javascripts/home.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/assets/stylesheets/home.css +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/home_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +16 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +38 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +9 -0
- data/spec/dummy/config/locales/ru.yml +5 -0
- data/spec/dummy/config/routes.rb +8 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120313083011_devise_create_kuztuscms_users.kuztuscms.rb +59 -0
- data/spec/dummy/db/migrate/20120313083012_create_kuztuscms_pages.kuztuscms.rb +16 -0
- data/spec/dummy/db/migrate/20120313083013_create_kuztuscms_templates.kuztuscms.rb +15 -0
- data/spec/dummy/db/migrate/20120313083014_create_kuztuscms_articles.kuztuscms.rb +11 -0
- data/spec/dummy/db/migrate/20120313083015_create_kuztuscms_layouts.kuztuscms.rb +41 -0
- data/spec/dummy/db/migrate/20120316084434_create_kuztuscms_settings.kuztuscms.rb +11 -0
- data/spec/dummy/db/schema.rb +90 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/helpers/kuztuscms/articles_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/languages_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/layouts_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/pages_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/settings_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/templates_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/translations_helper_spec.rb +15 -0
- data/spec/models/kuztuscms/article_spec.rb +5 -0
- data/spec/models/kuztuscms/language_spec.rb +5 -0
- data/spec/models/kuztuscms/layout_spec.rb +5 -0
- data/spec/models/kuztuscms/page_spec.rb +5 -0
- data/spec/models/kuztuscms/setting_spec.rb +5 -0
- data/spec/models/kuztuscms/template_spec.rb +5 -0
- data/spec/models/kuztuscms/translation_spec.rb +5 -0
- data/spec/models/kuztuscms/user_spec.rb +5 -0
- data/spec/routing/kuztuscms/articles_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/languages_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/layouts_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/pages_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/settings_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/templates_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/translations_routing_spec.rb +35 -0
- data/spec/views/kuztuscms/articles/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/articles/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/articles/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/articles/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/languages/edit.html.erb_spec.rb +22 -0
- data/spec/views/kuztuscms/languages/index.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/languages/new.html.erb_spec.rb +22 -0
- data/spec/views/kuztuscms/languages/show.html.erb_spec.rb +21 -0
- data/spec/views/kuztuscms/layouts/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/layouts/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/layouts/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/layouts/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/pages/edit.html.erb_spec.rb +15 -0
- data/spec/views/kuztuscms/pages/index.html.erb_spec.rb +14 -0
- data/spec/views/kuztuscms/pages/new.html.erb_spec.rb +15 -0
- data/spec/views/kuztuscms/pages/show.html.erb_spec.rb +11 -0
- data/spec/views/kuztuscms/settings/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/settings/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/settings/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/settings/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/templates/edit.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/templates/index.html.erb_spec.rb +40 -0
- data/spec/views/kuztuscms/templates/new.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/templates/show.html.erb_spec.rb +30 -0
- data/spec/views/kuztuscms/translations/edit.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/translations/index.html.erb_spec.rb +40 -0
- data/spec/views/kuztuscms/translations/new.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/translations/show.html.erb_spec.rb +30 -0
- data/test/integration/kuztuscms/setting_test.rb +7 -0
- metadata +351 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
#
|
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
|
4
|
+
# is enabled by default.
|
|
5
|
+
|
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
|
8
|
+
wrap_parameters :format => [:json]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Disable root element in JSON by default.
|
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
|
13
|
+
self.include_root_in_json = false
|
|
14
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
|
3
|
+
|
|
4
|
+
en:
|
|
5
|
+
hello: "Hello world"
|
|
6
|
+
hello2: 'Hello world2'
|
|
7
|
+
key1:
|
|
8
|
+
key2: 'value1'
|
|
9
|
+
key3: 'value2'
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# This migration comes from kuztuscms (originally 20120218074040)
|
|
2
|
+
class DeviseCreateKuztuscmsUsers < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table(:kuztuscms_users) do |t|
|
|
5
|
+
t.string :email
|
|
6
|
+
|
|
7
|
+
## Database authenticatable
|
|
8
|
+
t.string :username, :null => false, :default => ""
|
|
9
|
+
t.string :encrypted_password, :null => false, :default => ""
|
|
10
|
+
|
|
11
|
+
## Recoverable
|
|
12
|
+
t.string :reset_password_token
|
|
13
|
+
t.datetime :reset_password_sent_at
|
|
14
|
+
|
|
15
|
+
## Rememberable
|
|
16
|
+
t.datetime :remember_created_at
|
|
17
|
+
|
|
18
|
+
## Trackable
|
|
19
|
+
t.integer :sign_in_count, :default => 0
|
|
20
|
+
t.datetime :current_sign_in_at
|
|
21
|
+
t.datetime :last_sign_in_at
|
|
22
|
+
t.string :current_sign_in_ip
|
|
23
|
+
t.string :last_sign_in_ip
|
|
24
|
+
|
|
25
|
+
## Encryptable
|
|
26
|
+
t.string :password_salt
|
|
27
|
+
|
|
28
|
+
## Confirmable
|
|
29
|
+
# t.string :confirmation_token
|
|
30
|
+
# t.datetime :confirmed_at
|
|
31
|
+
# t.datetime :confirmation_sent_at
|
|
32
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
|
33
|
+
|
|
34
|
+
## Lockable
|
|
35
|
+
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
|
36
|
+
t.string :unlock_token # Only if unlock strategy is :email or :both
|
|
37
|
+
t.datetime :locked_at
|
|
38
|
+
|
|
39
|
+
## Token authenticatable
|
|
40
|
+
t.string :authentication_token
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
t.timestamps
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
add_index :kuztuscms_users, :email, :unique => true
|
|
47
|
+
add_index :kuztuscms_users, :reset_password_token, :unique => true
|
|
48
|
+
# add_index :kuztuscms_users, :confirmation_token, :unique => true
|
|
49
|
+
add_index :kuztuscms_users, :unlock_token, :unique => true
|
|
50
|
+
add_index :kuztuscms_users, :authentication_token, :unique => true
|
|
51
|
+
|
|
52
|
+
Kuztuscms::User.create!(
|
|
53
|
+
:email => 'admin@domain.com',
|
|
54
|
+
:username => 'admin',
|
|
55
|
+
:password => 'kuztuscms',
|
|
56
|
+
:password_confirmation => 'kuztuscms'
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This migration comes from kuztuscms (originally 20120218075211)
|
|
2
|
+
class CreateKuztuscmsPages < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :kuztuscms_pages do |t|
|
|
5
|
+
t.string :name
|
|
6
|
+
t.string :title
|
|
7
|
+
t.string :path
|
|
8
|
+
t.text :description
|
|
9
|
+
t.text :keywords
|
|
10
|
+
t.integer :layout_id
|
|
11
|
+
t.integer :article_id
|
|
12
|
+
|
|
13
|
+
t.timestamps
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This migration comes from kuztuscms (originally 20120311080242)
|
|
2
|
+
class CreateKuztuscmsTemplates < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :kuztuscms_templates do |t|
|
|
5
|
+
t.text :body
|
|
6
|
+
t.string :path
|
|
7
|
+
t.string :format
|
|
8
|
+
t.string :locale
|
|
9
|
+
t.string :handler
|
|
10
|
+
t.boolean :partial, :default => false
|
|
11
|
+
|
|
12
|
+
t.timestamps
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This migration comes from kuztuscms (originally 20120311173954)
|
|
2
|
+
class CreateKuztuscmsLayouts < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :kuztuscms_layouts do |t|
|
|
5
|
+
t.text :body
|
|
6
|
+
t.string :path
|
|
7
|
+
t.string :format
|
|
8
|
+
t.string :locale
|
|
9
|
+
t.string :handler
|
|
10
|
+
t.boolean :partial, :default => false
|
|
11
|
+
|
|
12
|
+
t.timestamps
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
body = <<EOF
|
|
16
|
+
<!DOCTYPE html>
|
|
17
|
+
<html>
|
|
18
|
+
<head>
|
|
19
|
+
<title><%= @page.title %></title>
|
|
20
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
|
21
|
+
<%= javascript_include_tag "application" %>
|
|
22
|
+
<%= csrf_meta_tags %>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<p class=notice><%= notice %></p>
|
|
26
|
+
<p class=alert><%= alert %></p>
|
|
27
|
+
|
|
28
|
+
<%= yield %>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
31
|
+
EOF
|
|
32
|
+
Kuztuscms::Layout.create(
|
|
33
|
+
:body => body,
|
|
34
|
+
:path => 'default',
|
|
35
|
+
:format => 'html',
|
|
36
|
+
:locale => 'en',
|
|
37
|
+
:handler => 'erb',
|
|
38
|
+
:partial => false
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(:version => 20120316084434) do
|
|
15
|
+
|
|
16
|
+
create_table "kuztuscms_articles", :force => true do |t|
|
|
17
|
+
t.string "name"
|
|
18
|
+
t.text "body"
|
|
19
|
+
t.datetime "created_at", :null => false
|
|
20
|
+
t.datetime "updated_at", :null => false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
create_table "kuztuscms_layouts", :force => true do |t|
|
|
24
|
+
t.text "body"
|
|
25
|
+
t.string "path"
|
|
26
|
+
t.string "format"
|
|
27
|
+
t.string "locale"
|
|
28
|
+
t.string "handler"
|
|
29
|
+
t.boolean "partial", :default => false
|
|
30
|
+
t.datetime "created_at", :null => false
|
|
31
|
+
t.datetime "updated_at", :null => false
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
create_table "kuztuscms_pages", :force => true do |t|
|
|
35
|
+
t.string "name"
|
|
36
|
+
t.string "title"
|
|
37
|
+
t.string "path"
|
|
38
|
+
t.text "description"
|
|
39
|
+
t.text "keywords"
|
|
40
|
+
t.integer "layout_id"
|
|
41
|
+
t.integer "article_id"
|
|
42
|
+
t.datetime "created_at", :null => false
|
|
43
|
+
t.datetime "updated_at", :null => false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
create_table "kuztuscms_settings", :force => true do |t|
|
|
47
|
+
t.string "key"
|
|
48
|
+
t.string "value"
|
|
49
|
+
t.datetime "created_at", :null => false
|
|
50
|
+
t.datetime "updated_at", :null => false
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
create_table "kuztuscms_templates", :force => true do |t|
|
|
54
|
+
t.text "body"
|
|
55
|
+
t.string "path"
|
|
56
|
+
t.string "format"
|
|
57
|
+
t.string "locale"
|
|
58
|
+
t.string "handler"
|
|
59
|
+
t.boolean "partial", :default => false
|
|
60
|
+
t.datetime "created_at", :null => false
|
|
61
|
+
t.datetime "updated_at", :null => false
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
create_table "kuztuscms_users", :force => true do |t|
|
|
65
|
+
t.string "email"
|
|
66
|
+
t.string "username", :default => "", :null => false
|
|
67
|
+
t.string "encrypted_password", :default => "", :null => false
|
|
68
|
+
t.string "reset_password_token"
|
|
69
|
+
t.datetime "reset_password_sent_at"
|
|
70
|
+
t.datetime "remember_created_at"
|
|
71
|
+
t.integer "sign_in_count", :default => 0
|
|
72
|
+
t.datetime "current_sign_in_at"
|
|
73
|
+
t.datetime "last_sign_in_at"
|
|
74
|
+
t.string "current_sign_in_ip"
|
|
75
|
+
t.string "last_sign_in_ip"
|
|
76
|
+
t.string "password_salt"
|
|
77
|
+
t.integer "failed_attempts", :default => 0
|
|
78
|
+
t.string "unlock_token"
|
|
79
|
+
t.datetime "locked_at"
|
|
80
|
+
t.string "authentication_token"
|
|
81
|
+
t.datetime "created_at", :null => false
|
|
82
|
+
t.datetime "updated_at", :null => false
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
add_index "kuztuscms_users", ["authentication_token"], :name => "index_kuztuscms_users_on_authentication_token", :unique => true
|
|
86
|
+
add_index "kuztuscms_users", ["email"], :name => "index_kuztuscms_users_on_email", :unique => true
|
|
87
|
+
add_index "kuztuscms_users", ["reset_password_token"], :name => "index_kuztuscms_users_on_reset_password_token", :unique => true
|
|
88
|
+
add_index "kuztuscms_users", ["unlock_token"], :name => "index_kuztuscms_users_on_unlock_token", :unique => true
|
|
89
|
+
|
|
90
|
+
end
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/404.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/422.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
+
div.dialog {
|
|
8
|
+
width: 25em;
|
|
9
|
+
padding: 0 4em;
|
|
10
|
+
margin: 4em auto 0 auto;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-right-color: #999;
|
|
13
|
+
border-bottom-color: #999;
|
|
14
|
+
}
|
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<!-- This file lives in public/500.html -->
|
|
21
|
+
<div class="dialog">
|
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
+
|
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
+
require 'rails/commands'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the ArticlesHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe ArticlesHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe ArticlesHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the LanguagesHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe LanguagesHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe LanguagesHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the LayoutsHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe LayoutsHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe LayoutsHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the PagesHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe PagesHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe PagesHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the SettingsHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe SettingsHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe SettingsHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the TemplatesHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe TemplatesHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe TemplatesHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
# Specs in this file have access to a helper object that includes
|
|
4
|
+
# the TranslationsHelper. For example:
|
|
5
|
+
#
|
|
6
|
+
# describe TranslationsHelper do
|
|
7
|
+
# describe "string concat" do
|
|
8
|
+
# it "concats two strings with spaces" do
|
|
9
|
+
# helper.concat_strings("this","that").should == "this that"
|
|
10
|
+
# end
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
describe TranslationsHelper do
|
|
14
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
|
15
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe ArticlesController do
|
|
4
|
+
describe "routing" do
|
|
5
|
+
|
|
6
|
+
it "routes to #index" do
|
|
7
|
+
get("/articles").should route_to("articles#index")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it "routes to #new" do
|
|
11
|
+
get("/articles/new").should route_to("articles#new")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "routes to #show" do
|
|
15
|
+
get("/articles/1").should route_to("articles#show", :id => "1")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "routes to #edit" do
|
|
19
|
+
get("/articles/1/edit").should route_to("articles#edit", :id => "1")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it "routes to #create" do
|
|
23
|
+
post("/articles").should route_to("articles#create")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "routes to #update" do
|
|
27
|
+
put("/articles/1").should route_to("articles#update", :id => "1")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "routes to #destroy" do
|
|
31
|
+
delete("/articles/1").should route_to("articles#destroy", :id => "1")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe LanguagesController do
|
|
4
|
+
describe "routing" do
|
|
5
|
+
|
|
6
|
+
it "routes to #index" do
|
|
7
|
+
get("/languages").should route_to("languages#index")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it "routes to #new" do
|
|
11
|
+
get("/languages/new").should route_to("languages#new")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "routes to #show" do
|
|
15
|
+
get("/languages/1").should route_to("languages#show", :id => "1")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "routes to #edit" do
|
|
19
|
+
get("/languages/1/edit").should route_to("languages#edit", :id => "1")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it "routes to #create" do
|
|
23
|
+
post("/languages").should route_to("languages#create")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "routes to #update" do
|
|
27
|
+
put("/languages/1").should route_to("languages#update", :id => "1")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "routes to #destroy" do
|
|
31
|
+
delete("/languages/1").should route_to("languages#destroy", :id => "1")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|