customize_admin 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.
Files changed (76) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/javascripts/customize_admin/admin/application.js +2 -0
  5. data/app/assets/javascripts/customize_admin/admin/base.js +2 -0
  6. data/app/assets/javascripts/customize_admin/application.js +11 -0
  7. data/app/assets/javascripts/customize_admin/bootstrap.js.coffee +19 -0
  8. data/app/assets/stylesheets/customize_admin/application.css +17 -0
  9. data/app/assets/stylesheets/customize_admin/bootstrap.css.less +5 -0
  10. data/app/controllers/customize_admin/application_controller.rb +5 -0
  11. data/app/controllers/customize_admin/base_controller.rb +41 -0
  12. data/app/helpers/customize_admin/application_helper.rb +18 -0
  13. data/app/helpers/customize_admin/base_helper.rb +4 -0
  14. data/app/views/customize_admin/application/_admin_menu.html.erb +1 -0
  15. data/app/views/customize_admin/base/_form (kopia).html.erb +13 -0
  16. data/app/views/customize_admin/base/_form.html.erb +8 -0
  17. data/app/views/customize_admin/base/_index_action.html.erb +4 -0
  18. data/app/views/customize_admin/base/_more_form_inputs.html.erb +0 -0
  19. data/app/views/customize_admin/base/_more_index_action.html.erb +1 -0
  20. data/app/views/customize_admin/base/_more_show_action.html.erb +0 -0
  21. data/app/views/customize_admin/base/edit.html.erb +9 -0
  22. data/app/views/customize_admin/base/index.html.erb +49 -0
  23. data/app/views/customize_admin/base/new.html.erb +6 -0
  24. data/app/views/customize_admin/base/show.html.erb +12 -0
  25. data/app/views/layouts/customize_admin/application.html.erb +37 -0
  26. data/config/initializers/ckeditor.rb +18 -0
  27. data/config/initializers/formtastic.rb +82 -0
  28. data/config/routes.rb +7 -0
  29. data/lib/customize_admin.rb +4 -0
  30. data/lib/customize_admin/engine.rb +5 -0
  31. data/lib/customize_admin/version.rb +3 -0
  32. data/lib/generators/customize_admin/install/USAGE +8 -0
  33. data/lib/generators/customize_admin/install/install_generator.rb +51 -0
  34. data/lib/generators/customize_admin/install/templates/dashboard_controller.rb +5 -0
  35. data/lib/generators/customize_admin/install/templates/index.html.erb +1 -0
  36. data/lib/generators/customize_admin/scaffold/USAGE +8 -0
  37. data/lib/generators/customize_admin/scaffold/scaffold_generator.rb +46 -0
  38. data/lib/generators/customize_admin/scaffold/templates/controller_template.rb +2 -0
  39. data/lib/tasks/customize_admin_tasks.rake +13 -0
  40. data/lib/templates/erb/scaffold/_form.html.erb +11 -0
  41. data/test/customize_admin_test.rb +7 -0
  42. data/test/dummy/Rakefile +7 -0
  43. data/test/dummy/app/assets/javascripts/application.js +9 -0
  44. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  45. data/test/dummy/app/controllers/application_controller.rb +3 -0
  46. data/test/dummy/app/helpers/application_helper.rb +2 -0
  47. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  48. data/test/dummy/config.ru +4 -0
  49. data/test/dummy/config/application.rb +45 -0
  50. data/test/dummy/config/boot.rb +10 -0
  51. data/test/dummy/config/database.yml +25 -0
  52. data/test/dummy/config/environment.rb +5 -0
  53. data/test/dummy/config/environments/development.rb +30 -0
  54. data/test/dummy/config/environments/production.rb +60 -0
  55. data/test/dummy/config/environments/test.rb +39 -0
  56. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  57. data/test/dummy/config/initializers/inflections.rb +10 -0
  58. data/test/dummy/config/initializers/mime_types.rb +5 -0
  59. data/test/dummy/config/initializers/secret_token.rb +7 -0
  60. data/test/dummy/config/initializers/session_store.rb +8 -0
  61. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  62. data/test/dummy/config/locales/en.yml +5 -0
  63. data/test/dummy/config/routes.rb +4 -0
  64. data/test/dummy/log/development.log +0 -0
  65. data/test/dummy/public/404.html +26 -0
  66. data/test/dummy/public/422.html +26 -0
  67. data/test/dummy/public/500.html +26 -0
  68. data/test/dummy/public/favicon.ico +0 -0
  69. data/test/dummy/script/rails +6 -0
  70. data/test/functional/customize_admin/admin/application_controller_test.rb +9 -0
  71. data/test/functional/customize_admin/admin/base_controller_test.rb +9 -0
  72. data/test/integration/navigation_test.rb +10 -0
  73. data/test/test_helper.rb +10 -0
  74. data/test/unit/helpers/customize_admin/admin/application_helper_test.rb +6 -0
  75. data/test/unit/helpers/customize_admin/admin/base_helper_test.rb +6 -0
  76. metadata +184 -0
@@ -0,0 +1,39 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
33
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # like if you have constraints or database-specific column types
35
+ # config.active_record.schema_format = :sql
36
+
37
+ # Print deprecation notices to the stderr
38
+ config.active_support.deprecation = :stderr
39
+ end
@@ -0,0 +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!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +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
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'efd979560c3bde97c083515fdf88d84ae03083b6d669149495992f9d79db146e28243861080f6a096b10fa9e12ce1d347af5399f9fd906d5b11a9bd319e841a1'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -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,5 @@
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"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount CustomizeAdmin::Engine => "/customize_admin"
4
+ end
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,26 @@
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
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </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,9 @@
1
+ require 'test_helper'
2
+
3
+ module CustomizeAdmin
4
+ class Admin::ApplicationControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module CustomizeAdmin
4
+ class Admin::BaseControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module CustomizeAdmin
4
+ class Admin::ApplicationHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module CustomizeAdmin
4
+ class Admin::BaseHelperTest < ActionView::TestCase
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: customize_admin
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Jakub Cieslar
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-01-03 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rails
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 3.1.1
24
+ type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: sqlite3
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :development
36
+ version_requirements: *id002
37
+ description: CustomizeAdmin.
38
+ email:
39
+ - cieslar.jakub@gmail.com
40
+ executables: []
41
+
42
+ extensions: []
43
+
44
+ extra_rdoc_files: []
45
+
46
+ files:
47
+ - app/controllers/customize_admin/application_controller.rb
48
+ - app/controllers/customize_admin/base_controller.rb
49
+ - app/assets/stylesheets/customize_admin/bootstrap.css.less
50
+ - app/assets/stylesheets/customize_admin/application.css
51
+ - app/assets/javascripts/customize_admin/admin/application.js
52
+ - app/assets/javascripts/customize_admin/admin/base.js
53
+ - app/assets/javascripts/customize_admin/application.js
54
+ - app/assets/javascripts/customize_admin/bootstrap.js.coffee
55
+ - app/helpers/customize_admin/application_helper.rb
56
+ - app/helpers/customize_admin/base_helper.rb
57
+ - app/views/customize_admin/application/_admin_menu.html.erb
58
+ - app/views/customize_admin/base/_more_form_inputs.html.erb
59
+ - app/views/customize_admin/base/new.html.erb
60
+ - app/views/customize_admin/base/index.html.erb
61
+ - app/views/customize_admin/base/_form (kopia).html.erb
62
+ - app/views/customize_admin/base/_more_show_action.html.erb
63
+ - app/views/customize_admin/base/_index_action.html.erb
64
+ - app/views/customize_admin/base/_form.html.erb
65
+ - app/views/customize_admin/base/edit.html.erb
66
+ - app/views/customize_admin/base/show.html.erb
67
+ - app/views/customize_admin/base/_more_index_action.html.erb
68
+ - app/views/layouts/customize_admin/application.html.erb
69
+ - config/initializers/ckeditor.rb
70
+ - config/initializers/formtastic.rb
71
+ - config/routes.rb
72
+ - lib/customize_admin/version.rb
73
+ - lib/customize_admin/engine.rb
74
+ - lib/generators/customize_admin/scaffold/USAGE
75
+ - lib/generators/customize_admin/scaffold/scaffold_generator.rb
76
+ - lib/generators/customize_admin/scaffold/templates/controller_template.rb
77
+ - lib/generators/customize_admin/install/install_generator.rb
78
+ - lib/generators/customize_admin/install/USAGE
79
+ - lib/generators/customize_admin/install/templates/index.html.erb
80
+ - lib/generators/customize_admin/install/templates/dashboard_controller.rb
81
+ - lib/tasks/customize_admin_tasks.rake
82
+ - lib/customize_admin.rb
83
+ - lib/templates/erb/scaffold/_form.html.erb
84
+ - MIT-LICENSE
85
+ - Rakefile
86
+ - README.rdoc
87
+ - test/customize_admin_test.rb
88
+ - test/test_helper.rb
89
+ - test/dummy/Rakefile
90
+ - test/dummy/app/controllers/application_controller.rb
91
+ - test/dummy/app/assets/stylesheets/application.css
92
+ - test/dummy/app/assets/javascripts/application.js
93
+ - test/dummy/app/helpers/application_helper.rb
94
+ - test/dummy/app/views/layouts/application.html.erb
95
+ - test/dummy/config.ru
96
+ - test/dummy/config/locales/en.yml
97
+ - test/dummy/config/initializers/mime_types.rb
98
+ - test/dummy/config/initializers/wrap_parameters.rb
99
+ - test/dummy/config/initializers/secret_token.rb
100
+ - test/dummy/config/initializers/session_store.rb
101
+ - test/dummy/config/initializers/backtrace_silencers.rb
102
+ - test/dummy/config/initializers/inflections.rb
103
+ - test/dummy/config/environment.rb
104
+ - test/dummy/config/routes.rb
105
+ - test/dummy/config/application.rb
106
+ - test/dummy/config/boot.rb
107
+ - test/dummy/config/environments/test.rb
108
+ - test/dummy/config/environments/production.rb
109
+ - test/dummy/config/environments/development.rb
110
+ - test/dummy/config/database.yml
111
+ - test/dummy/log/development.log
112
+ - test/dummy/public/404.html
113
+ - test/dummy/public/favicon.ico
114
+ - test/dummy/public/500.html
115
+ - test/dummy/public/422.html
116
+ - test/dummy/script/rails
117
+ - test/integration/navigation_test.rb
118
+ - test/unit/helpers/customize_admin/admin/base_helper_test.rb
119
+ - test/unit/helpers/customize_admin/admin/application_helper_test.rb
120
+ - test/functional/customize_admin/admin/base_controller_test.rb
121
+ - test/functional/customize_admin/admin/application_controller_test.rb
122
+ homepage: ""
123
+ licenses: []
124
+
125
+ post_install_message:
126
+ rdoc_options: []
127
+
128
+ require_paths:
129
+ - lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: "0"
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: "0"
142
+ requirements: []
143
+
144
+ rubyforge_project:
145
+ rubygems_version: 1.8.13
146
+ signing_key:
147
+ specification_version: 3
148
+ summary: CustomizeAdmin s.
149
+ test_files:
150
+ - test/customize_admin_test.rb
151
+ - test/test_helper.rb
152
+ - test/dummy/Rakefile
153
+ - test/dummy/app/controllers/application_controller.rb
154
+ - test/dummy/app/assets/stylesheets/application.css
155
+ - test/dummy/app/assets/javascripts/application.js
156
+ - test/dummy/app/helpers/application_helper.rb
157
+ - test/dummy/app/views/layouts/application.html.erb
158
+ - test/dummy/config.ru
159
+ - test/dummy/config/locales/en.yml
160
+ - test/dummy/config/initializers/mime_types.rb
161
+ - test/dummy/config/initializers/wrap_parameters.rb
162
+ - test/dummy/config/initializers/secret_token.rb
163
+ - test/dummy/config/initializers/session_store.rb
164
+ - test/dummy/config/initializers/backtrace_silencers.rb
165
+ - test/dummy/config/initializers/inflections.rb
166
+ - test/dummy/config/environment.rb
167
+ - test/dummy/config/routes.rb
168
+ - test/dummy/config/application.rb
169
+ - test/dummy/config/boot.rb
170
+ - test/dummy/config/environments/test.rb
171
+ - test/dummy/config/environments/production.rb
172
+ - test/dummy/config/environments/development.rb
173
+ - test/dummy/config/database.yml
174
+ - test/dummy/log/development.log
175
+ - test/dummy/public/404.html
176
+ - test/dummy/public/favicon.ico
177
+ - test/dummy/public/500.html
178
+ - test/dummy/public/422.html
179
+ - test/dummy/script/rails
180
+ - test/integration/navigation_test.rb
181
+ - test/unit/helpers/customize_admin/admin/base_helper_test.rb
182
+ - test/unit/helpers/customize_admin/admin/application_helper_test.rb
183
+ - test/functional/customize_admin/admin/base_controller_test.rb
184
+ - test/functional/customize_admin/admin/application_controller_test.rb