manage 1.3.41 → 1.3.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.rdoc +2 -0
  4. data/Rakefile +31 -31
  5. data/app/assets/javascripts/manage/collection_actions.js.coffee +30 -30
  6. data/app/assets/javascripts/manage/handlers.js.coffee +46 -46
  7. data/app/assets/javascripts/manage/table_checkboxes.js.coffee +11 -11
  8. data/app/controllers/manage/application_controller.rb +13 -13
  9. data/app/controllers/manage/dashboards_controller.rb +4 -4
  10. data/app/controllers/manage/responder.rb +11 -11
  11. data/app/controllers/manage/sessions_controller.rb +11 -11
  12. data/app/helpers/manage/application_helper.rb +42 -42
  13. data/app/helpers/manage/form_helper.rb +21 -21
  14. data/app/helpers/manage/resource_helper.rb +77 -77
  15. data/app/models/admin_user.rb +4 -4
  16. data/app/views/layouts/manage/_main_menu.html.slim +52 -52
  17. data/app/views/layouts/manage/sign_in.html.slim +30 -30
  18. data/app/views/manage/resource/_form.html.slim +4 -4
  19. data/app/views/manage/resource/index/_collection_actions.html.slim +2 -2
  20. data/app/views/manage/resource/index/_count.html.slim +6 -6
  21. data/app/views/manage/resource/show.html.slim +10 -10
  22. data/app/views/manage/sessions/new.html.slim +10 -10
  23. data/config/initializers/devise.rb +247 -247
  24. data/config/initializers/session_store.rb +1 -3
  25. data/config/initializers/simple_form.rb +145 -145
  26. data/config/initializers/simple_form_foundation.rb +26 -26
  27. data/config/locales/devise.en.yml +59 -59
  28. data/config/locales/en.yml +20 -20
  29. data/config/routes.rb +10 -10
  30. data/db/migrate/20131204142720_create_admin_users.rb +24 -24
  31. data/lib/manage.rb +5 -5
  32. data/lib/manage/engine.rb +21 -21
  33. data/lib/manage/fields.rb +6 -6
  34. data/lib/manage/version.rb +1 -1
  35. data/lib/tasks/manage_tasks.rake +15 -15
  36. data/lib/templates/erb/scaffold/_form.html.erb +13 -13
  37. data/spec/controllers/manage/resource_controller_spec.rb +29 -29
  38. data/spec/dummy/README.rdoc +28 -28
  39. data/spec/dummy/Rakefile +6 -6
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -13
  41. data/spec/dummy/app/assets/stylesheets/application.css +13 -13
  42. data/spec/dummy/app/controllers/application_controller.rb +5 -5
  43. data/spec/dummy/app/controllers/manage/posts_controller.rb +4 -4
  44. data/spec/dummy/app/helpers/application_helper.rb +2 -2
  45. data/spec/dummy/app/models/post.rb +3 -3
  46. data/spec/dummy/app/models/user.rb +5 -5
  47. data/spec/dummy/app/views/layouts/application.html.erb +14 -14
  48. data/spec/dummy/bin/bundle +3 -3
  49. data/spec/dummy/bin/rails +4 -4
  50. data/spec/dummy/bin/rake +4 -4
  51. data/spec/dummy/config.ru +4 -4
  52. data/spec/dummy/config/application.rb +24 -24
  53. data/spec/dummy/config/boot.rb +5 -5
  54. data/spec/dummy/config/database.yml +25 -25
  55. data/spec/dummy/config/environment.rb +5 -5
  56. data/spec/dummy/config/environments/development.rb +29 -29
  57. data/spec/dummy/config/environments/production.rb +80 -80
  58. data/spec/dummy/config/environments/test.rb +36 -36
  59. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
  60. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
  61. data/spec/dummy/config/initializers/inflections.rb +16 -16
  62. data/spec/dummy/config/initializers/mime_types.rb +5 -5
  63. data/spec/dummy/config/initializers/secret_token.rb +12 -12
  64. data/spec/dummy/config/initializers/session_store.rb +3 -3
  65. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
  66. data/spec/dummy/config/locales/en.yml +23 -23
  67. data/spec/dummy/config/routes.rb +10 -10
  68. data/spec/dummy/db/migrate/20130716083410_init_migration.rb +21 -21
  69. data/spec/dummy/db/schema.rb +53 -53
  70. data/spec/dummy/public/404.html +58 -58
  71. data/spec/dummy/public/422.html +58 -58
  72. data/spec/dummy/public/500.html +57 -57
  73. data/spec/fields/reader_spec.rb +79 -79
  74. data/spec/spec_helper.rb +24 -24
  75. metadata +24 -24
@@ -1,7 +1,7 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -1,4 +1,4 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -1,16 +1,16 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -1,5 +1,5 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -1,12 +1,12 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure your secret_key_base is kept private
11
- # if you're sharing your code publicly.
12
- Dummy::Application.config.secret_key_base = '637ca0bb13506e39659f7cd989146b04dc6c9e0f8d925d9473167e4c4dfb8a8c5096a2fe6cb17cbd2ea317b778a446b750d5faef1264de44f22a2e441ee72db4'
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = '637ca0bb13506e39659f7cd989146b04dc6c9e0f8d925d9473167e4c4dfb8a8c5096a2fe6cb17cbd2ea317b778a446b750d5faef1264de44f22a2e441ee72db4'
@@ -1,3 +1,3 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +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] if respond_to?(:wrap_parameters)
9
- end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
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] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -1,23 +1,23 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
- en:
23
- hello: "Hello world"
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -1,10 +1,10 @@
1
- Rails.application.routes.draw do
2
-
3
- mount Manage::Engine => "/manage"
4
-
5
- Manage::Engine.routes.draw do
6
- resources :users
7
- resources :posts
8
- end
9
-
10
- end
1
+ Rails.application.routes.draw do
2
+
3
+ mount Manage::Engine => "/manage"
4
+
5
+ Manage::Engine.routes.draw do
6
+ resources :users
7
+ resources :posts
8
+ end
9
+
10
+ end
@@ -1,21 +1,21 @@
1
- class InitMigration < ActiveRecord::Migration
2
- def change
3
-
4
- create_table "posts", force: true do |t|
5
- t.text "content"
6
- t.datetime "created_at"
7
- t.datetime "updated_at"
8
- t.integer "user_id"
9
- end
10
-
11
- add_index "posts", ["user_id"]
12
-
13
- create_table "users", force: true do |t|
14
- t.string "username"
15
- t.string "email", null: false
16
- t.datetime "created_at"
17
- t.datetime "updated_at"
18
- end
19
- end
20
-
21
- end
1
+ class InitMigration < ActiveRecord::Migration
2
+ def change
3
+
4
+ create_table "posts", force: true do |t|
5
+ t.text "content"
6
+ t.datetime "created_at"
7
+ t.datetime "updated_at"
8
+ t.integer "user_id"
9
+ end
10
+
11
+ add_index "posts", ["user_id"]
12
+
13
+ create_table "users", force: true do |t|
14
+ t.string "username"
15
+ t.string "email", null: false
16
+ t.datetime "created_at"
17
+ t.datetime "updated_at"
18
+ end
19
+ end
20
+
21
+ end
@@ -1,53 +1,53 @@
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 that you check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(version: 20131204142720) do
15
-
16
- create_table "admin_users", force: true do |t|
17
- t.string "email", default: "", null: false
18
- t.string "encrypted_password", default: "", null: false
19
- t.string "reset_password_token"
20
- t.datetime "reset_password_sent_at"
21
- t.datetime "remember_created_at"
22
- t.integer "sign_in_count", default: 0
23
- t.datetime "current_sign_in_at"
24
- t.datetime "last_sign_in_at"
25
- t.string "current_sign_in_ip"
26
- t.string "last_sign_in_ip"
27
- t.integer "failed_attempts", default: 0
28
- t.string "unlock_token"
29
- t.datetime "locked_at"
30
- t.datetime "created_at"
31
- t.datetime "updated_at"
32
- end
33
-
34
- add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true
35
- add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
36
-
37
- create_table "posts", force: true do |t|
38
- t.text "content"
39
- t.datetime "created_at"
40
- t.datetime "updated_at"
41
- t.integer "user_id"
42
- end
43
-
44
- add_index "posts", ["user_id"], name: "index_posts_on_user_id"
45
-
46
- create_table "users", force: true do |t|
47
- t.string "username"
48
- t.string "email", null: false
49
- t.datetime "created_at"
50
- t.datetime "updated_at"
51
- end
52
-
53
- end
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 that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20131204142720) do
15
+
16
+ create_table "admin_users", force: true do |t|
17
+ t.string "email", default: "", null: false
18
+ t.string "encrypted_password", default: "", null: false
19
+ t.string "reset_password_token"
20
+ t.datetime "reset_password_sent_at"
21
+ t.datetime "remember_created_at"
22
+ t.integer "sign_in_count", default: 0
23
+ t.datetime "current_sign_in_at"
24
+ t.datetime "last_sign_in_at"
25
+ t.string "current_sign_in_ip"
26
+ t.string "last_sign_in_ip"
27
+ t.integer "failed_attempts", default: 0
28
+ t.string "unlock_token"
29
+ t.datetime "locked_at"
30
+ t.datetime "created_at"
31
+ t.datetime "updated_at"
32
+ end
33
+
34
+ add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true
35
+ add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
36
+
37
+ create_table "posts", force: true do |t|
38
+ t.text "content"
39
+ t.datetime "created_at"
40
+ t.datetime "updated_at"
41
+ t.integer "user_id"
42
+ end
43
+
44
+ add_index "posts", ["user_id"], name: "index_posts_on_user_id"
45
+
46
+ create_table "users", force: true do |t|
47
+ t.string "username"
48
+ t.string "email", null: false
49
+ t.datetime "created_at"
50
+ t.datetime "updated_at"
51
+ end
52
+
53
+ end
@@ -1,58 +1,58 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/404.html -->
52
- <div class="dialog">
53
- <h1>The page you were looking for doesn't exist.</h1>
54
- <p>You may have mistyped the address or the page may have moved.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>