user_mgmt 0.0.62 → 0.0.511

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -8
  3. data/Gemfile +2 -12
  4. data/README.md +2 -10
  5. data/Rakefile +0 -35
  6. data/app/controllers/user_mgmt_controller.rb +4 -0
  7. data/app/views/user_mgmt/registrations/_user_form.html.haml +6 -3
  8. data/app/views/user_mgmt/registrations/new.html.haml +7 -18
  9. data/lib/generators/templates/README +2 -18
  10. data/lib/generators/templates/user_mgmt.rb +1 -28
  11. data/lib/generators/user_mgmt/install_generator.rb +0 -6
  12. data/lib/user_mgmt/configurator.rb +8 -0
  13. data/lib/user_mgmt/engine.rb +5 -28
  14. data/lib/user_mgmt/version.rb +1 -1
  15. data/lib/user_mgmt.rb +13 -8
  16. data/user_mgmt.gemspec +24 -40
  17. metadata +19 -298
  18. data/Gemfile.lock +0 -171
  19. data/MIT-LICENSE +0 -20
  20. data/app/assets/images/user_mgmt/.keep +0 -0
  21. data/app/assets/javascripts/user_mgmt/application.js +0 -13
  22. data/app/assets/javascripts/user_mgmt/registrations.js +0 -2
  23. data/app/assets/javascripts/user_mgmt/sessions.js +0 -2
  24. data/app/assets/stylesheets/user_mgmt/application.css.scss +0 -14
  25. data/app/assets/stylesheets/user_mgmt/registrations.css +0 -34
  26. data/app/assets/stylesheets/user_mgmt/sessions.css +0 -4
  27. data/app/controllers/user_mgmt/application_controller.rb +0 -101
  28. data/app/controllers/user_mgmt/registrations_controller.rb +0 -32
  29. data/app/controllers/user_mgmt/sessions_controller.rb +0 -81
  30. data/app/helpers/user_mgmt/application_helper.rb +0 -9
  31. data/app/helpers/user_mgmt/registrations_helper.rb +0 -4
  32. data/app/helpers/user_mgmt/sessions_helper.rb +0 -4
  33. data/app/models/user_mgmt/user.rb +0 -15
  34. data/app/views/layouts/user_mgmt/application.html.haml +0 -17
  35. data/app/views/user_mgmt/registrations/edit.html.haml +0 -5
  36. data/app/views/user_mgmt/sessions/new.html.haml +0 -30
  37. data/app/views/user_mgmt/sessions/oauth_email.html.haml +0 -11
  38. data/bin/rails +0 -8
  39. data/config/routes.rb +0 -16
  40. data/lib/tasks/user_mgmt_tasks.rake +0 -4
  41. data/test/controllers/user_mgmt/registrations_controller_test.rb +0 -16
  42. data/test/controllers/user_mgmt/sessions_controller_test.rb +0 -21
  43. data/test/dummy/README.rdoc +0 -28
  44. data/test/dummy/Rakefile +0 -6
  45. data/test/dummy/app/assets/images/.keep +0 -0
  46. data/test/dummy/app/assets/javascripts/application.js +0 -13
  47. data/test/dummy/app/assets/javascripts/simulate.js +0 -2
  48. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  49. data/test/dummy/app/assets/stylesheets/simulate.css +0 -4
  50. data/test/dummy/app/controllers/application_controller.rb +0 -8
  51. data/test/dummy/app/controllers/concerns/.keep +0 -0
  52. data/test/dummy/app/controllers/simulate_controller.rb +0 -5
  53. data/test/dummy/app/helpers/application_helper.rb +0 -2
  54. data/test/dummy/app/helpers/simulate_helper.rb +0 -2
  55. data/test/dummy/app/mailers/.keep +0 -0
  56. data/test/dummy/app/models/.keep +0 -0
  57. data/test/dummy/app/models/concerns/.keep +0 -0
  58. data/test/dummy/app/views/layouts/application.html.haml +0 -17
  59. data/test/dummy/app/views/simulate/index.html.haml +0 -12
  60. data/test/dummy/bin/bundle +0 -3
  61. data/test/dummy/bin/rails +0 -4
  62. data/test/dummy/bin/rake +0 -4
  63. data/test/dummy/config/application.rb +0 -23
  64. data/test/dummy/config/boot.rb +0 -5
  65. data/test/dummy/config/database.yml +0 -25
  66. data/test/dummy/config/environment.rb +0 -5
  67. data/test/dummy/config/environments/development.rb +0 -29
  68. data/test/dummy/config/environments/production.rb +0 -80
  69. data/test/dummy/config/environments/test.rb +0 -36
  70. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  71. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  72. data/test/dummy/config/initializers/inflections.rb +0 -16
  73. data/test/dummy/config/initializers/mime_types.rb +0 -5
  74. data/test/dummy/config/initializers/secret_token.rb +0 -12
  75. data/test/dummy/config/initializers/session_store.rb +0 -3
  76. data/test/dummy/config/initializers/user_mgmt.rb +0 -37
  77. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  78. data/test/dummy/config/locales/en.yml +0 -23
  79. data/test/dummy/config/routes.rb +0 -7
  80. data/test/dummy/config.ru +0 -4
  81. data/test/dummy/lib/assets/.keep +0 -0
  82. data/test/dummy/log/.keep +0 -0
  83. data/test/dummy/public/404.html +0 -58
  84. data/test/dummy/public/422.html +0 -58
  85. data/test/dummy/public/500.html +0 -57
  86. data/test/dummy/public/favicon.ico +0 -0
  87. data/test/dummy/test/controllers/simulate_controller_test.rb +0 -9
  88. data/test/dummy/test/helpers/simulate_helper_test.rb +0 -4
  89. data/test/helpers/user_mgmt/registrations_helper_test.rb +0 -6
  90. data/test/helpers/user_mgmt/sessions_helper_test.rb +0 -6
  91. data/test/integration/navigation_test.rb +0 -10
  92. data/test/test_helper.rb +0 -15
  93. data/test/user_mgmt_test.rb +0 -7
@@ -1,101 +0,0 @@
1
- module UserMgmt
2
- class ApplicationController < ActionController::Base
3
- require "net/http"
4
- require "uri"
5
-
6
- def main_page
7
- redirect_to main_app.root_path
8
- end
9
-
10
- private
11
- def current_user
12
- @current_user ||= nil#User.find(session[:user_session_id]) if session[:user_session_id]
13
- end
14
- helper_method :current_user
15
-
16
- def sign_up email, password, password_confirmation, host= UserMgmt.external_database_URI
17
- send_request :post, :users, { user: { email: email, password: password,
18
- password_confirmation: password_confirmation }, method: :simple }, host
19
- end
20
-
21
- def sign_up_oauth uid, strategy, email, host= UserMgmt.external_database_URI
22
- send_request :post, :users, { user: { uid: uid, strategy: strategy, email: email }, method: :oauth }, host
23
- end
24
-
25
- def log_in email, password, host= UserMgmt.external_database_URI
26
- send_request :get, :login, { user: { email: email, password: password }, method: :simple }, host
27
- end
28
-
29
- def log_in_oauth uid, strategy, host= UserMgmt.external_database_URI
30
- send_request :get, :login, { user: { uid: uid, strategy: strategy }, method: :oauth }, host
31
- end
32
-
33
- def log_out umid, host= UserMgmt.external_database_URI
34
- send_request :delete, :logout, { user: umid }, host
35
- end
36
-
37
- def add_strategy uid, strategy, umid, session, host= UserMgmt.external_database_URI
38
- send_request :post, :add_strategy, { new_strategy: { uid: uid, strategy: strategy },
39
- user: umid, session_id: session }, host
40
- end
41
-
42
- def remove_strategy umid, strategy, session, host= UserMgmt.external_database_URI
43
- send_request :delete, :remove_strategy, { user: umid, strategy: strategy,
44
- session_id: session }, host
45
- end
46
-
47
- def delete_user umid, session, host= UserMgmt.external_database_URI
48
- send_request :delete, :destroy, { user: umid, session_id: session }, host
49
- end
50
-
51
- def change_password user, password, new_pw, new_pw_confirm, session, host= UserMgmt.external_database_URI
52
- send_request :put, :change_password, { user: user, password: password,
53
- new_password: new_pw, new_password_confirmation: new_pw_confirm,
54
- session: session }, host
55
- end
56
-
57
- def reset_password reset_token, new_pw, new_pw_confirm, host= UserMgmt.external_database_URI
58
- send_request :put, :change_password, { reset_token: reset_token, new_password: new_pw,
59
- new_password_confirmation: new_pw_confirm }, host
60
- end
61
-
62
- def reset_password_request email, host= UserMgmt.external_database_URI
63
- send_request :post, :reset_password, { email: email }, host
64
- end
65
-
66
- def change_email user, password, new_email, new_email_confirm, session, host= UserMgmt.external_database_URI
67
- send_request :put, :change_email, { email: user, password: password, new_email: new_email,
68
- new_email_confirmation: new_email_confirm, session: session }, host
69
- end
70
-
71
- private
72
-
73
- def send_request method, path='/', params={}, host= UserMgmt.external_database_URI
74
- path = path.to_s.downcase
75
- path = '/' << path unless path.start_with? '/'
76
- uri = URI.parse(host)
77
- http = Net::HTTP.new(uri.host, uri.port)
78
-
79
- case method.to_s.downcase
80
- when 'get'
81
- request = Net::HTTP::Get.new(uri.request_uri << path, initheader = {'Content-Type' =>'application/json'})
82
- when 'post'
83
- request = Net::HTTP::Post.new(uri.request_uri << path, initheader = {'Content-Type' =>'application/json'})
84
- when 'put'
85
- request = Net::HTTP::Put.new(uri.request_uri << path, initheader = {'Content-Type' =>'application/json'})
86
- when 'delete'
87
- request = Net::HTTP::Delete.new(uri.request_uri << path, initheader = {'Content-Type' =>'application/json'})
88
- end
89
-
90
- request.body = params.to_json
91
- response = http.request(request)
92
- begin
93
- return { body: JSON.parse(response.body), status: response.code }
94
- rescue
95
- return { body: response.body, status: response.code }
96
- end
97
- end
98
-
99
-
100
- end
101
- end
@@ -1,32 +0,0 @@
1
- require_dependency "user_mgmt/application_controller"
2
-
3
- module UserMgmt
4
- class RegistrationsController < ApplicationController
5
-
6
- # GET /user/sign_up
7
- def new
8
-
9
- end
10
-
11
- # POST /user
12
- def create
13
-
14
- response = sign_up *params[:user].values
15
-
16
- if response[:status] == "200"
17
- flash[:notice] = "User was created succesfully!"
18
- redirect_to main_app.root_path
19
- else
20
- flash[:warning] = response[:body]#"User couldn't be created. Try again."
21
- redirect_to sign_up_path
22
- end
23
-
24
- end
25
-
26
- # GET /user/edit
27
- def edit
28
-
29
- end
30
-
31
- end
32
- end
@@ -1,81 +0,0 @@
1
- require_dependency "user_mgmt/application_controller"
2
-
3
- module UserMgmt
4
- class SessionsController < ApplicationController
5
-
6
- # GET /user/log_in
7
- def new
8
-
9
- end
10
-
11
- # POST /user/log_in
12
- def create
13
-
14
- response = log_in *params[:user].values
15
-
16
- if response[:status] == "200"
17
- flash[:notice] = "User logged in!"
18
- session[:user_session_id] = response[:body]["session"]
19
- redirect_to main_app.root_path
20
- else
21
- flash[:warning] = response[:body]
22
- redirect_to log_in_path
23
- end
24
-
25
- end
26
-
27
- # GET 'auth/:provider/callback'
28
- # That is the controller method that is called after getting the information from an oauth strategy
29
- def oauth_email
30
-
31
- @uid = env['omniauth.auth']["uid"]
32
- @provider= env['omniauth.auth']["provider"]
33
-
34
- if @provider == "google_oauth2"
35
- @provider = "google"
36
- end
37
-
38
- if @provider == "windowslive"
39
- @provider = "windows_live"
40
- end
41
-
42
- response = log_in_oauth @uid, @provider
43
-
44
- # if user logged in succesfully, just redirect to main page,
45
- # otherwise it means the user doesn't exist yet, so continue
46
- # normaly (user will be asked for his email).
47
- if response[:status] == "200"
48
- session[:user_session_id] = response[:body]["session"]
49
- redirect_to main_app.root_path, notice: "User logged in!"
50
- end
51
-
52
- end
53
-
54
- # POST '/oauth_log_in'
55
- def create_oauth
56
-
57
- response = sign_up_oauth params["uid"], params["provider"].to_sym, params["user"]["Email"]
58
-
59
- #if for some reason, the user couldn't be created
60
- if response[:status] == "400"
61
- redirect_to sign_up_path, notice: response[:body]
62
- end
63
-
64
- response = log_in_oauth params["uid"], params["provider"].to_sym
65
-
66
- session[:user_session_id] = response[:body]["session"]
67
-
68
- redirect_to main_app.root_path, notice: "User logged in!"
69
-
70
- end
71
-
72
- # GET /user/log_out
73
- def destroy
74
-
75
- session[:user_session_id] = nil
76
- redirect_to main_app.root_path, notice: "Logged out!"
77
-
78
- end
79
-
80
- end
81
- end
@@ -1,9 +0,0 @@
1
- module UserMgmt
2
- module ApplicationHelper
3
-
4
- def user_logged_in
5
- session[:user_session_id] != nil
6
- end
7
-
8
- end
9
- end
@@ -1,4 +0,0 @@
1
- module UserMgmt
2
- module RegistrationsHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module UserMgmt
2
- module SessionsHelper
3
- end
4
- end
@@ -1,15 +0,0 @@
1
- module UserMgmt
2
- class User
3
-
4
- attr_accessor :email, :password, :password_confirmation
5
-
6
- def self.find session_id
7
-
8
- end
9
-
10
- def self.dummy
11
- "yay"
12
- end
13
-
14
- end
15
- end
@@ -1,17 +0,0 @@
1
- !!! 5
2
- %html
3
- %head
4
-
5
- %title UserMgmt
6
- = stylesheet_link_tag "user_mgmt/application", media: "all"
7
- = javascript_include_tag "user_mgmt/application"
8
- = csrf_meta_tags
9
-
10
- %body
11
- #main
12
- - if flash[:notice]
13
- #notice.message= flash[:notice]
14
- - elsif flash[:warning]
15
- #warning.message= flash[:warning]
16
-
17
- = yield
@@ -1,5 +0,0 @@
1
- .container
2
- = form_tag main_app.root_path, :class => "form-signin", :method => :get do
3
- %h2 Edit
4
- = render :partial => 'user_form'
5
- = submit_tag 'submit', :class => "btn btn-large btn-primary"
@@ -1,30 +0,0 @@
1
- .container
2
- = form_tag user_log_in_path, :class => "form-signin", :method => :post do
3
- %h2.form-signin-heading Log in
4
-
5
- %div
6
- = text_field :user, 'Email', :class => "input-block-level", :placeholder => "Email"
7
-
8
- %div
9
- = text_field :user, 'Password', :class => "input-block-level", :type => "password", :placeholder => 'Password'
10
-
11
- = submit_tag 'submit', :class => "btn btn-large btn-primary"
12
-
13
- %ul.unstyled
14
- %li
15
-
16
- = link_to "Log in with Facebook", "auth/facebook"
17
- %li
18
- = link_to "Log in with Twitter", "auth/twitter"
19
- %li
20
- = link_to "Log in with Outlook", "auth/windowslive"
21
- %li
22
- = link_to "Log in with LinkedIn", "auth/linkedin"
23
- %li
24
- = link_to "Log in with Yahoo", "auth/yahoo"
25
- %li
26
- = link_to "Log in with GMail", "auth/google_oauth2"
27
-
28
-
29
-
30
-
@@ -1,11 +0,0 @@
1
- .container
2
-
3
- = form_tag oauth_log_in_path(:uid => @uid, :provider => @provider), :class => "form-signin", :method => :post do
4
- %h2.form-signin-heading Sign up
5
-
6
- %h4 Tell us your email address please:
7
-
8
- %div
9
- = text_field :user, 'Email', :class => "input-block-level", :placeholder => "Email"
10
-
11
- = submit_tag 'submit', :class => "btn btn-large btn-primary"
data/bin/rails DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
3
-
4
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
- ENGINE_PATH = File.expand_path('../../lib/user_mgmt/engine', __FILE__)
6
-
7
- require 'rails/all'
8
- require 'rails/engine/commands'
data/config/routes.rb DELETED
@@ -1,16 +0,0 @@
1
- UserMgmt::Engine.routes.draw do
2
-
3
- get '/log_in' => "sessions#new", as: 'log_in'
4
- post '/log_in' => "sessions#create", as: 'user_log_in'
5
- get '/log_out' => "sessions#destroy", as: 'log_out'
6
- post '/oauth_log_in' => "sessions#create_oauth", as: 'oauth_log_in'
7
-
8
- get '/sign_up' => 'registrations#new', as: 'sign_up'
9
- get '/edit' => 'registrations#edit', as: 'edit'
10
- post '/' => 'registrations#create', as: 'user'
11
-
12
- get 'auth/:provider/callback' => 'sessions#oauth_email', as: 'oauth_email'
13
- get 'auth/failure' => 'application#main_page'
14
-
15
-
16
- end
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :user_mgmt do
3
- # # Task goes here
4
- # end
@@ -1,16 +0,0 @@
1
- require 'test_helper'
2
-
3
- module UserMgmt
4
- class RegistrationsControllerTest < ActionController::TestCase
5
- test "should get new" do
6
- get :new
7
- assert_response :success
8
- end
9
-
10
- test "should get create" do
11
- get :create
12
- assert_response :success
13
- end
14
-
15
- end
16
- end
@@ -1,21 +0,0 @@
1
- require 'test_helper'
2
-
3
- module UserMgmt
4
- class SessionsControllerTest < ActionController::TestCase
5
- test "should get new" do
6
- get :new
7
- assert_response :success
8
- end
9
-
10
- test "should get create" do
11
- get :create
12
- assert_response :success
13
- end
14
-
15
- test "should get destroy" do
16
- get :destroy
17
- assert_response :success
18
- end
19
-
20
- end
21
- end
@@ -1,28 +0,0 @@
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>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
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
File without changes
@@ -1,13 +0,0 @@
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 .
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,13 +0,0 @@
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
- */
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,8 +0,0 @@
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
-
6
- # helper UserMgmt::ApplicationHelper
7
-
8
- end
File without changes
@@ -1,5 +0,0 @@
1
- class SimulateController < ApplicationController
2
- def index
3
-
4
- end
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- module SimulateHelper
2
- end
File without changes
File without changes
File without changes
@@ -1,17 +0,0 @@
1
- !!! 5
2
- %html
3
- %head
4
-
5
- %title Dummy
6
- = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
7
- = javascript_include_tag "application", "data-turbolinks-track" => true
8
- = csrf_meta_tags
9
-
10
- %body
11
- #main
12
- - if flash[:notice]
13
- #notice.message= flash[:notice]
14
- - elsif flash[:warning]
15
- #warning.message= flash[:warning]
16
-
17
- = yield
@@ -1,12 +0,0 @@
1
- %h1 Main Page
2
- %br
3
- - if user_logged_in
4
- Logged In
5
- = link_to "Log Out", user_mgmt.log_out_path
6
- - else
7
- Logged Out
8
- %ul
9
- %li
10
- = link_to "Sign up", user_mgmt.sign_up_path
11
- %li
12
- = link_to "Log in", user_mgmt.log_in_path
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,23 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "user_mgmt"
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
-
@@ -1,5 +0,0 @@
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__)
@@ -1,25 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Dummy::Application.initialize!
@@ -1,29 +0,0 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raise an error on page load if there are pending migrations
23
- config.active_record.migration_error = :page_load
24
-
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
- end