dailycred 0.1.461 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +2 -2
  3. data/README.md +43 -15
  4. data/Rakefile +2 -2
  5. data/app/controllers/sessions_controller.rb +1 -1
  6. data/app/views/sessions/info.html.erb +2 -2
  7. data/config/routes.rb +4 -4
  8. data/dailycred.gemspec +1 -1
  9. data/dummy-preauth/.gitignore +16 -0
  10. data/dummy-preauth/Gemfile +42 -0
  11. data/dummy-preauth/README.rdoc +28 -0
  12. data/dummy-preauth/Rakefile +6 -0
  13. data/dummy-preauth/app/assets/images/rails.png +0 -0
  14. data/dummy-preauth/app/assets/javascripts/application.js +16 -0
  15. data/{dummy/app/assets/javascripts/posts.js.coffee → dummy-preauth/app/assets/javascripts/welcome.js.coffee} +1 -1
  16. data/dummy-preauth/app/assets/stylesheets/application.css +13 -0
  17. data/{dummy/app/assets/stylesheets/posts.css.scss → dummy-preauth/app/assets/stylesheets/welcome.css.scss} +1 -1
  18. data/dummy-preauth/app/controllers/application_controller.rb +6 -0
  19. data/{dummy/app/mailers/.gitkeep → dummy-preauth/app/controllers/concerns/.keep} +0 -0
  20. data/dummy-preauth/app/controllers/sessions_controller.rb +34 -0
  21. data/dummy-preauth/app/controllers/users_controller.rb +30 -0
  22. data/dummy-preauth/app/controllers/welcome_controller.rb +9 -0
  23. data/dummy-preauth/app/helpers/application_helper.rb +2 -0
  24. data/dummy-preauth/app/helpers/sessions_helper.rb +2 -0
  25. data/dummy-preauth/app/helpers/users_helper.rb +2 -0
  26. data/dummy-preauth/app/helpers/welcome_helper.rb +2 -0
  27. data/{dummy/app/models/.gitkeep → dummy-preauth/app/mailers/.keep} +0 -0
  28. data/{dummy/lib/assets/.gitkeep → dummy-preauth/app/models/.keep} +0 -0
  29. data/{dummy/lib/tasks/.gitkeep → dummy-preauth/app/models/concerns/.keep} +0 -0
  30. data/dummy-preauth/app/models/user.rb +34 -0
  31. data/dummy-preauth/app/views/layouts/application.html.erb +14 -0
  32. data/dummy-preauth/app/views/sessions/new.html.erb +15 -0
  33. data/dummy-preauth/app/views/users/_form.html.erb +20 -0
  34. data/dummy-preauth/app/views/users/edit.html.erb +3 -0
  35. data/dummy-preauth/app/views/users/new.html.erb +5 -0
  36. data/dummy-preauth/app/views/welcome/index.html.erb +2 -0
  37. data/dummy-preauth/bin/bundle +3 -0
  38. data/dummy-preauth/bin/rails +4 -0
  39. data/dummy-preauth/bin/rake +4 -0
  40. data/dummy-preauth/config.ru +4 -0
  41. data/dummy-preauth/config/application.rb +22 -0
  42. data/dummy-preauth/config/boot.rb +4 -0
  43. data/dummy-preauth/config/database.yml +25 -0
  44. data/dummy-preauth/config/environment.rb +5 -0
  45. data/dummy-preauth/config/environments/development.rb +27 -0
  46. data/dummy-preauth/config/environments/production.rb +80 -0
  47. data/dummy-preauth/config/environments/test.rb +36 -0
  48. data/dummy-preauth/config/initializers/backtrace_silencers.rb +7 -0
  49. data/dummy-preauth/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/dummy-preauth/config/initializers/inflections.rb +16 -0
  51. data/dummy-preauth/config/initializers/mime_types.rb +5 -0
  52. data/dummy-preauth/config/initializers/omniauth.rb +9 -0
  53. data/dummy-preauth/config/initializers/secret_token.rb +12 -0
  54. data/dummy-preauth/config/initializers/session_store.rb +3 -0
  55. data/dummy-preauth/config/initializers/wrap_parameters.rb +14 -0
  56. data/dummy-preauth/config/locales/en.yml +23 -0
  57. data/dummy-preauth/config/routes.rb +57 -0
  58. data/dummy-preauth/db/migrate/20130423011519_create_users.rb +15 -0
  59. data/dummy-preauth/db/migrate/20130423011738_add_uuid_to_users.rb +5 -0
  60. data/dummy-preauth/db/schema.rb +26 -0
  61. data/dummy-preauth/db/seeds.rb +7 -0
  62. data/{dummy/log/.gitkeep → dummy-preauth/lib/assets/.keep} +0 -0
  63. data/dummy-preauth/lib/controller_authentication.rb +48 -0
  64. data/{dummy/test/fixtures/.gitkeep → dummy-preauth/lib/tasks/.keep} +0 -0
  65. data/{dummy/test/functional/.gitkeep → dummy-preauth/log/.keep} +0 -0
  66. data/dummy-preauth/public/404.html +27 -0
  67. data/dummy-preauth/public/422.html +26 -0
  68. data/dummy-preauth/public/500.html +26 -0
  69. data/{dummy/test/integration/.gitkeep → dummy-preauth/public/favicon.ico} +0 -0
  70. data/dummy-preauth/public/robots.txt +5 -0
  71. data/{dummy/test/unit/.gitkeep → dummy-preauth/test/controllers/.keep} +0 -0
  72. data/dummy-preauth/test/controllers/welcome_controller_test.rb +9 -0
  73. data/{dummy/vendor/assets/javascripts/.gitkeep → dummy-preauth/test/fixtures/.keep} +0 -0
  74. data/dummy-preauth/test/fixtures/users.yml +12 -0
  75. data/dummy-preauth/test/functional/sessions_controller_test.rb +22 -0
  76. data/dummy-preauth/test/functional/users_controller_test.rb +51 -0
  77. data/{dummy/vendor/assets/stylesheets/.gitkeep → dummy-preauth/test/helpers/.keep} +0 -0
  78. data/dummy-preauth/test/helpers/welcome_helper_test.rb +4 -0
  79. data/{dummy/vendor/plugins/.gitkeep → dummy-preauth/test/integration/.keep} +0 -0
  80. data/dummy-preauth/test/mailers/.keep +0 -0
  81. data/dummy-preauth/test/models/.keep +0 -0
  82. data/dummy-preauth/test/test_helper.rb +15 -0
  83. data/dummy-preauth/test/unit/user_test.rb +86 -0
  84. data/dummy-preauth/vendor/assets/javascripts/.keep +0 -0
  85. data/dummy-preauth/vendor/assets/stylesheets/.keep +0 -0
  86. data/dummy/.gitignore +3 -2
  87. data/dummy/Gemfile +14 -28
  88. data/dummy/README.rdoc +15 -248
  89. data/dummy/Rakefile +0 -1
  90. data/dummy/app/assets/javascripts/application.js +2 -1
  91. data/dummy/app/controllers/application_controller.rb +5 -4
  92. data/dummy/app/controllers/concerns/.keep +0 -0
  93. data/dummy/app/mailers/.keep +0 -0
  94. data/dummy/app/models/.keep +0 -0
  95. data/dummy/app/models/concerns/.keep +0 -0
  96. data/dummy/app/views/layouts/application.html.erb +2 -6
  97. data/dummy/bin/bundle +3 -0
  98. data/dummy/bin/rails +4 -0
  99. data/dummy/bin/rake +4 -0
  100. data/dummy/config/application.rb +2 -42
  101. data/dummy/config/boot.rb +0 -2
  102. data/dummy/config/environment.rb +2 -2
  103. data/dummy/config/environments/development.rb +9 -19
  104. data/dummy/config/environments/production.rb +40 -27
  105. data/dummy/config/environments/test.rb +12 -13
  106. data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  107. data/dummy/config/initializers/inflections.rb +6 -5
  108. data/dummy/config/initializers/omniauth.rb +9 -2
  109. data/dummy/config/initializers/secret_token.rb +6 -1
  110. data/dummy/config/initializers/session_store.rb +1 -6
  111. data/dummy/config/initializers/wrap_parameters.rb +6 -6
  112. data/dummy/config/locales/en.yml +20 -2
  113. data/dummy/config/routes.rb +15 -26
  114. data/dummy/db/migrate/{20120925172903_create_users.rb → 20130417131939_create_users.rb} +7 -11
  115. data/dummy/db/schema.rb +9 -19
  116. data/dummy/lib/assets/.keep +0 -0
  117. data/dummy/lib/tasks/.keep +0 -0
  118. data/dummy/log/.keep +0 -0
  119. data/dummy/public/404.html +2 -1
  120. data/dummy/public/422.html +1 -1
  121. data/dummy/public/500.html +2 -1
  122. data/dummy/public/robots.txt +1 -1
  123. data/dummy/test/controllers/.keep +0 -0
  124. data/dummy/test/fixtures/.keep +0 -0
  125. data/dummy/test/helpers/.keep +0 -0
  126. data/dummy/test/integration/.keep +0 -0
  127. data/dummy/test/mailers/.keep +0 -0
  128. data/dummy/test/models/.keep +0 -0
  129. data/dummy/test/test_helper.rb +11 -58
  130. data/dummy/vendor/assets/javascripts/.keep +0 -0
  131. data/dummy/vendor/assets/stylesheets/.keep +0 -0
  132. data/lib/dailycred.rb +2 -2
  133. data/lib/dailycred/acts_as_dailycred.rb +4 -17
  134. data/lib/dailycred/client.rb +1 -0
  135. data/lib/dailycred/engine.rb +3 -2
  136. data/lib/dailycred/helper.rb +4 -4
  137. data/lib/dailycred/middleware.rb +5 -2
  138. data/lib/dailycred/version.rb +1 -1
  139. data/lib/generators/dailycred_generator.rb +17 -8
  140. data/lib/generators/templates/migration_create_user.rb +3 -9
  141. data/lib/omniauth/strategies/dailycred.rb +2 -0
  142. data/spec/helper_spec.rb +1 -3
  143. data/test/generator_test.rb +4 -3
  144. metadata +103 -52
  145. data/dummy/Guardfile +0 -31
  146. data/dummy/app/assets/stylesheets/scaffolds.css.scss +0 -69
  147. data/dummy/app/controllers/posts_controller.rb +0 -86
  148. data/dummy/app/helpers/posts_helper.rb +0 -2
  149. data/dummy/app/models/post.rb +0 -3
  150. data/dummy/app/views/posts/_form.html.erb +0 -21
  151. data/dummy/app/views/posts/edit.html.erb +0 -6
  152. data/dummy/app/views/posts/index.html.erb +0 -23
  153. data/dummy/app/views/posts/new.html.erb +0 -5
  154. data/dummy/app/views/posts/show.html.erb +0 -10
  155. data/dummy/db/migrate/20120926012555_create_posts.rb +0 -9
  156. data/dummy/db/migrate/20121002192037_update_users_2.rb +0 -70
  157. data/dummy/db/migrate/20121108192739_add_column_to_posts.rb +0 -5
  158. data/dummy/public/index.html +0 -241
  159. data/dummy/script/rails +0 -6
  160. data/dummy/test/fixtures/posts.yml +0 -7
  161. data/dummy/test/fixtures/users.yml +0 -3
  162. data/dummy/test/functional/posts_controller_test.rb +0 -51
  163. data/dummy/test/performance/browsing_test.rb +0 -12
  164. data/dummy/test/unit/helpers/posts_helper_test.rb +0 -4
  165. data/dummy/test/unit/post_test.rb +0 -7
  166. data/dummy/test/unit/user_test.rb +0 -77
  167. data/spec/omniauth/strategies/dailycred_spec.rb +0 -64
@@ -0,0 +1,9 @@
1
+ class WelcomeController < ApplicationController
2
+ def index
3
+ if logged_in?
4
+ render json: current_user
5
+ else
6
+ render text: 'hello'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module SessionsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module UsersHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module WelcomeHelper
2
+ end
@@ -0,0 +1,34 @@
1
+ class User < ActiveRecord::Base
2
+ # new columns need to be added here to be writable through mass assignment
3
+ attr_accessible :username, :email, :password, :password_confirmation
4
+
5
+ attr_accessor :password
6
+ before_save :prepare_password
7
+
8
+ # validates_presence_of :username
9
+ validates_uniqueness_of :username, :email, :allow_blank => true
10
+ # validates_format_of :username, :with => /^[-\w\._@]+$/i, :allow_blank => true, :message => "should only contain letters, numbers, or .-_@"
11
+ # validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
12
+ # validates_presence_of :password, :on => :create
13
+ validates_confirmation_of :password
14
+ validates_length_of :password, :minimum => 4, :allow_blank => true
15
+
16
+ # login can be either username or email address
17
+ def self.authenticate(login, pass)
18
+ user = find_by_username(login) || find_by_email(login)
19
+ return user if user && user.password_hash == user.encrypt_password(pass)
20
+ end
21
+
22
+ def encrypt_password(pass)
23
+ BCrypt::Engine.hash_secret(pass, password_salt)
24
+ end
25
+
26
+ private
27
+
28
+ def prepare_password
29
+ unless password.blank?
30
+ self.password_salt = BCrypt::Engine.generate_salt
31
+ self.password_hash = encrypt_password(password)
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>DummyPreauth</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,15 @@
1
+ <% title "Log in" %>
2
+
3
+ <p>Don't have an account? <%= link_to "Sign up!", signup_path %></p>
4
+
5
+ <%= form_tag sessions_path do %>
6
+ <p>
7
+ <%= label_tag :login, "Username or Email Address" %><br />
8
+ <%= text_field_tag :login, params[:login] %>
9
+ </p>
10
+ <p>
11
+ <%= label_tag :password %><br />
12
+ <%= password_field_tag :password %>
13
+ </p>
14
+ <p><%= submit_tag "Log in" %></p>
15
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <%= form_for @user do |f| %>
2
+ <%= f.error_messages %>
3
+ <p>
4
+ <%= f.label :username %><br />
5
+ <%= f.text_field :username %>
6
+ </p>
7
+ <p>
8
+ <%= f.label :email, "Email Address" %><br />
9
+ <%= f.text_field :email %>
10
+ </p>
11
+ <p>
12
+ <%= f.label :password %><br />
13
+ <%= f.password_field :password %>
14
+ </p>
15
+ <p>
16
+ <%= f.label :password_confirmation, "Confirm Password" %><br />
17
+ <%= f.password_field :password_confirmation %>
18
+ </p>
19
+ <p><%= f.submit (@user.new_record? ? "Sign up" : "Update") %></p>
20
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <% title "Update Profile" %>
2
+
3
+ <%= render 'form' %>
@@ -0,0 +1,5 @@
1
+ <% title "Sign up" %>
2
+
3
+ <p>Already have an account? <%= link_to "Log in", login_path %>.</p>
4
+
5
+ <%= render 'form' %>
@@ -0,0 +1,2 @@
1
+ <h1>Welcome#index</h1>
2
+ <p>Find me in app/views/welcome/index.html.erb</p>
@@ -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,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run DummyPreauth::Application
@@ -0,0 +1,22 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Assets should be precompiled for production (so we don't need the gems loaded then)
6
+ Bundler.require(*Rails.groups(assets: %w(development test)))
7
+
8
+ module DummyPreauth
9
+ class Application < Rails::Application
10
+ config.autoload_paths << "#{config.root}/lib" # 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
@@ -0,0 +1,4 @@
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'])
@@ -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
+ DummyPreauth::Application.initialize!
@@ -0,0 +1,27 @@
1
+ DummyPreauth::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
+ config.assets.debug = true
27
+ end
@@ -0,0 +1,80 @@
1
+ DummyPreauth::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Whether to fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ DummyPreauth::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
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ 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,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]
@@ -0,0 +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
@@ -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,9 @@
1
+ Rails.configuration.DAILYCRED_CLIENT_ID = "37a067dd-3fef-4efd-909a-38b8081c5867"
2
+ Rails.configuration.DAILYCRED_SECRET_KEY = "b622f8a7-fa92-4fe8-bb74-b5bad5db79d3-817ddff2-6fa1-4499-ae47-69ea0d4c5c44"
3
+
4
+ # configure where users should be redirected after authentication
5
+ #
6
+ # Rails.configuration.DAILYCRED_OPTIONS = {
7
+ # :after_auth => '/hello', #after login
8
+ # :after_unauth => '/goodbye' #after logout
9
+ # }
@@ -0,0 +1,12 @@
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
+
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
+ DummyPreauth::Application.config.secret_key_base = '20a97e42c77642cf2698fd06ba6ac64194485e064674f48e0ddc73723524e4830d4a3105a3cc85e427f01c5338e1e5a838ab790448d0cd34415137e14786e0ba'