manage 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +64 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/javascripts/manage/application.js +3 -0
  5. data/app/assets/javascripts/manage/resource.js +2 -0
  6. data/app/assets/stylesheets/manage/application.css +13 -0
  7. data/app/assets/stylesheets/manage/resource.css +4 -0
  8. data/app/controllers/manage/admin_users_controller.rb +3 -0
  9. data/app/controllers/manage/application_controller.rb +19 -0
  10. data/app/controllers/manage/dashboards_controller.rb +4 -0
  11. data/app/controllers/manage/resource_controller.rb +17 -0
  12. data/app/controllers/manage/responder.rb +12 -0
  13. data/app/controllers/manage/sessions_controller.rb +6 -0
  14. data/app/helpers/manage/application_helper.rb +4 -0
  15. data/app/helpers/manage/resource_helper.rb +7 -0
  16. data/app/views/layouts/manage/_main_menu.html.slim +7 -0
  17. data/app/views/layouts/manage/application.html.slim +27 -0
  18. data/app/views/layouts/manage/sign_in.html.slim +24 -0
  19. data/app/views/manage/admin_users/_form.html.slim +6 -0
  20. data/app/views/manage/resource/_form.html.slim +4 -0
  21. data/app/views/manage/resource/_index.html.slim +17 -0
  22. data/app/views/manage/resource/edit.html.slim +7 -0
  23. data/app/views/manage/resource/index.html.slim +6 -0
  24. data/app/views/manage/resource/new.html.slim +4 -0
  25. data/app/views/manage/resource/show.html.slim +11 -0
  26. data/app/views/sessions/new.html.slim +11 -0
  27. data/config/locales/bg.yml +25 -0
  28. data/config/locales/en.yml +21 -0
  29. data/config/routes.rb +8 -0
  30. data/lib/manage/engine.rb +9 -0
  31. data/lib/manage/version.rb +3 -0
  32. data/lib/manage.rb +3 -0
  33. data/lib/tasks/manage_tasks.rake +4 -0
  34. data/test/controllers/manage/resource_controller_test.rb +9 -0
  35. data/test/dummy/README.rdoc +28 -0
  36. data/test/dummy/Rakefile +6 -0
  37. data/test/dummy/app/assets/javascripts/application.js +13 -0
  38. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  39. data/test/dummy/app/controllers/application_controller.rb +5 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  42. data/test/dummy/bin/bundle +3 -0
  43. data/test/dummy/bin/rails +4 -0
  44. data/test/dummy/bin/rake +4 -0
  45. data/test/dummy/config/application.rb +23 -0
  46. data/test/dummy/config/boot.rb +5 -0
  47. data/test/dummy/config/database.yml +25 -0
  48. data/test/dummy/config/environment.rb +5 -0
  49. data/test/dummy/config/environments/development.rb +29 -0
  50. data/test/dummy/config/environments/production.rb +80 -0
  51. data/test/dummy/config/environments/test.rb +36 -0
  52. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  53. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  54. data/test/dummy/config/initializers/inflections.rb +16 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +12 -0
  57. data/test/dummy/config/initializers/session_store.rb +3 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.yml +23 -0
  60. data/test/dummy/config/routes.rb +4 -0
  61. data/test/dummy/config.ru +4 -0
  62. data/test/dummy/public/404.html +58 -0
  63. data/test/dummy/public/422.html +58 -0
  64. data/test/dummy/public/500.html +57 -0
  65. data/test/dummy/public/favicon.ico +0 -0
  66. data/test/helpers/manage/resource_helper_test.rb +6 -0
  67. data/test/integration/navigation_test.rb +10 -0
  68. data/test/manage_test.rb +7 -0
  69. data/test/test_helper.rb +15 -0
  70. metadata +279 -0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,64 @@
1
+ = Manage
2
+
3
+ Admin backend based on http://iain.nl/backends-in-rails-3-1
4
+
5
+ == Installing
6
+
7
+ Add the engine
8
+
9
+ to Gemfile
10
+
11
+ gem 'manage'
12
+
13
+
14
+ to routes.rb yourapp/config/routes.rb:
15
+
16
+ mount Manage::Engine, at: "/manage"
17
+
18
+ == Defining resource for administration
19
+
20
+
21
+ Add the resource to your app routes.rb yourapp/config/routes.rb:
22
+
23
+ Manage::Engine.routes.draw do
24
+ resources :cities
25
+ end
26
+
27
+
28
+ Create controller in your application yourapp/app/controllers/manage/cities_controller.rb
29
+
30
+ class Manage::CitiesController < Manage::ResourceController
31
+ end
32
+
33
+
34
+ === View overriding
35
+ You can overrede the views in
36
+
37
+ app/views/manage/countries
38
+
39
+ * _index.html.slim
40
+ * _form.html_slim
41
+ * edit.html.slim
42
+ * new.html.slim
43
+ * show.html.slim
44
+
45
+
46
+
47
+
48
+ == Authorization
49
+ In your app do
50
+
51
+ rails generate devise AdminUser
52
+
53
+ delete "devise_for :admin_users" from routes.rb
54
+
55
+
56
+ Create an admin user. The users benefit from the devise password validation/generation but doesn't use the devise controllers.
57
+
58
+
59
+ AdminUser.create(email: 'admin@example.com', password: '11223344', password_confirmation: '11223344')
60
+
61
+
62
+ == License
63
+
64
+ This project rocks and uses MIT license
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Manage'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,3 @@
1
+ //= require jquery
2
+ //= require jquery_ujs
3
+ //= require_tree .
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,3 @@
1
+ class Manage::AdminUsersController < Manage::ResourceController
2
+
3
+ end
@@ -0,0 +1,19 @@
1
+ class Manage::ApplicationController < ActionController::Base
2
+ # before_filter :authenticate_admin_user!
3
+ before_filter :authenticate_admin
4
+
5
+ def authenticate_admin
6
+ authenticate_or_request_with_http_basic do |username, password|
7
+ @current_user = AdminUser.where(email: username).first
8
+ return request_http_basic_authentication if @current_user.blank?
9
+ return request_http_basic_authentication unless @current_user.valid_password?(password)
10
+ @current_user
11
+ end
12
+ end
13
+
14
+ helper_method :current_user
15
+ def current_user
16
+ @current_user
17
+ end
18
+
19
+ end
@@ -0,0 +1,4 @@
1
+ class Manage::DashboardsController < Manage::ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,17 @@
1
+ require_dependency "manage/application_controller"
2
+
3
+ class Manage::ResourceController < Manage::ApplicationController
4
+ inherit_resources
5
+
6
+ self.responder = Manage::Responder
7
+
8
+ layout 'manage/application'
9
+
10
+ has_scope :page, default: 1
11
+
12
+ respond_to :html
13
+
14
+ def permitted_params
15
+ params.permit!
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ # app/controllers/backend/responder.rb
2
+ class Manage::Responder < ::ActionController::Responder
3
+
4
+ include Responders::FlashResponder
5
+ include Responders::HttpCacheResponder
6
+
7
+ def initialize(*)
8
+ super
9
+ @flash_now = :on_failure
10
+ end
11
+
12
+ end
@@ -0,0 +1,6 @@
1
+ # class Devise::Users::SessionsController < Devise::SessionsController
2
+ class Manage::SessionsController < ::Devise::SessionsController
3
+ layout "manage/sign_in"
4
+
5
+ end
6
+
@@ -0,0 +1,4 @@
1
+ module Manage
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module Manage
2
+ module ResourceHelper
3
+ def attributes
4
+ resource_class.attribute_names - %w(id created_at updated_at)
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ h1 Main menu
2
+ p Override me in /views/layouts/manage/main_menu
3
+ ul
4
+ li link_to City.model_name.human(count: 2), manage.cities_path
5
+ li link_to 'users', users_path
6
+ li = link_to AdminUser.model_name.human(count:2), admin_users_path
7
+ li link_to 'terms', main_app.about_us_pages_path
@@ -0,0 +1,27 @@
1
+ html
2
+ head
3
+ title Manage
4
+ = stylesheet_link_tag "manage/application", media: "all"
5
+ = javascript_include_tag "manage/application"
6
+ = csrf_meta_tags
7
+
8
+ body class="#{controller.action_name} #{controller_path.gsub(/[-\/]/, '-')} simple" data-locale=I18n.locale
9
+ header
10
+ = current_user.email
11
+ = render '/layouts/manage/main_menu'
12
+ row
13
+ #flash
14
+ - flash.each do |key, value|
15
+ - key = 'info' if key == :notice
16
+ .alert_wrapper data-dismiss="alert"
17
+ div(class="alert alert-#{key} #{key}")
18
+ button(type="button" class="close" data-dismiss="alert") &times;
19
+ - if value.is_a?(Array)
20
+ - value.each do |element|
21
+ p #{element.html_safe}
22
+ - else
23
+ p #{value.html_safe}
24
+ .clearfix
25
+
26
+
27
+ = yield
@@ -0,0 +1,24 @@
1
+ html
2
+ head
3
+ title Manage
4
+ = stylesheet_link_tag "manage/application", media: "all"
5
+ = javascript_include_tag "manage/application"
6
+ = csrf_meta_tags
7
+
8
+ body class="#{controller.action_name} #{controller_path.gsub(/[-\/]/, '-')} simple" data-locale=I18n.locale
9
+ row
10
+ #flash
11
+ - flash.each do |key, value|
12
+ - key = 'info' if key == :notice
13
+ .alert_wrapper data-dismiss="alert"
14
+ div(class="alert alert-#{key} #{key}")
15
+ button(type="button" class="close" data-dismiss="alert") &times;
16
+ - if value.is_a?(Array)
17
+ - value.each do |element|
18
+ p #{element.html_safe}
19
+ - else
20
+ p #{value.html_safe}
21
+ .clearfix
22
+
23
+
24
+ = yield
@@ -0,0 +1,6 @@
1
+ = simple_form_for [ resource ] do |f|
2
+ = f.input :email
3
+ = f.input :password
4
+ = f.input :password_confirmation
5
+
6
+ = f.submit
@@ -0,0 +1,4 @@
1
+ = simple_form_for [ resource ] do |f|
2
+ - attributes.each do |attr|
3
+ = f.input attr
4
+ = f.submit
@@ -0,0 +1,17 @@
1
+ table
2
+ thead
3
+ tr
4
+ - attributes.each do |attr|
5
+ th= resource_class.human_attribute_name(attr)
6
+ th &nbsp;
7
+ tbody
8
+ - collection.each do |resource|
9
+ tr[resource]
10
+ - attributes.each do |attr|
11
+ td= resource.public_send(attr).to_s.truncate(20)
12
+ td
13
+ = link_to t('manage.actions.show'), [resource]
14
+ |
15
+ = link_to t('manage.actions.edit'), [:edit, resource]
16
+ |
17
+ = link_to t('manage.actions.destroy'), [resource], method: :delete, data: { confirm: t('manage.confirmations.Are you sure')}
@@ -0,0 +1,7 @@
1
+ h2 = t('manage.edit.title', model: resource_class.model_name.human)
2
+
3
+ nav
4
+ / = link_to 'index', collection_url
5
+ = link_to t('manage.actions.index', model: resource_class.model_name.human(count: 2)), resource.class
6
+
7
+ = render "form", attributes: attributes
@@ -0,0 +1,6 @@
1
+ nav
2
+ = link_to t('manage.actions.new', model: resource_class.model_name.human), [:new, resource_class.name.tableize.singularize]
3
+
4
+ = render "index", attributes: attributes
5
+
6
+ = paginate collection
@@ -0,0 +1,4 @@
1
+ h2 = t('manage.new.title', model: resource_class.model_name.human)
2
+
3
+
4
+ = render "form", attributes: attributes
@@ -0,0 +1,11 @@
1
+ nav
2
+ = link_to t('manage.actions.index', model: resource_class.model_name.human(count: 2)), resource.class
3
+ = link_to t('manage.actions.edit'), resource.class
4
+
5
+ article
6
+ dl
7
+ - resource_class.attribute_names.each do |attr|
8
+ dt= resource_class.human_attribute_name(attr)
9
+ dd= resource.public_send(attr)
10
+
11
+
@@ -0,0 +1,11 @@
1
+ h2 = t('.sign_in')
2
+
3
+ = simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
4
+ .form-inputs
5
+ = f.input :email, :required => false, :autofocus => true
6
+ = f.input :password, :required => false
7
+ = f.input :remember_me, :as => :boolean if devise_mapping.rememberable?
8
+ .form-actions
9
+ = f.button :submit, t('devise.users.registrations.login')
10
+
11
+ = render "devise/users/shared/links"
@@ -0,0 +1,25 @@
1
+ bg:
2
+ manage:
3
+ actions:
4
+ show: Покажи
5
+ new: Създай %{model}
6
+ edit: Редакция
7
+ destroy: Изтрии
8
+ index: Списък с %{model}
9
+ edit:
10
+ title: Редактирай %{model}
11
+ new:
12
+ title: Създаване на %{model}
13
+ confirmations:
14
+ Are you sure: Шуре ли сте?
15
+ flash:
16
+ actions:
17
+ create:
18
+ notice: 'Създадохме %{resource_name}'
19
+ alert: 'Не успешно създаване на %{resource_name}'
20
+ update:
21
+ notice: 'Обновихме %{resource_name}.'
22
+ alert: 'Не успешно обновяване на %{resource_name}'
23
+ destroy:
24
+ notice: 'Изтрихме %{resource_name}'
25
+ alert: 'Неуспешно изтриване на %{resource_name}'
@@ -0,0 +1,21 @@
1
+ en:
2
+ manage:
3
+ actions:
4
+ show: Show
5
+ edit: Edit
6
+ destroy: Delete
7
+ edit:
8
+ title: Edit %{model}
9
+ confirmations:
10
+ Are you sure: Are you sure?
11
+ flash:
12
+ actions:
13
+ create:
14
+ notice: '%{resource_name} was successfully created.'
15
+ alert: '%{resource_name} could not be created.'
16
+ update:
17
+ notice: '%{resource_name} was successfully updated.'
18
+ alert: '%{resource_name} could not be updated.'
19
+ destroy:
20
+ notice: '%{resource_name} was successfully destroyed.'
21
+ alert: '%{resource_name} could not be destroyed.'
data/config/routes.rb ADDED
@@ -0,0 +1,8 @@
1
+ Manage::Engine.routes.draw do
2
+ resources :dashboards
3
+ resources :admin_users
4
+
5
+ # devise_for :admin_users, skip: :registrations, controllers: {
6
+ # sessions: "manage/sessions",
7
+ # }
8
+ end
@@ -0,0 +1,9 @@
1
+ require 'responders'
2
+ require 'inherited_resources'
3
+ require 'has_scope'
4
+
5
+ module Manage
6
+ class Engine < ::Rails::Engine
7
+ isolate_namespace Manage
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Manage
2
+ VERSION = "1.0.0"
3
+ end
data/lib/manage.rb ADDED
@@ -0,0 +1,3 @@
1
+ require "manage/engine"
2
+ module Manage
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :manage do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Manage
4
+ class ResourceControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "manage"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!