dailycred 0.1.461 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -2
- data/README.md +43 -15
- data/Rakefile +2 -2
- data/app/controllers/sessions_controller.rb +1 -1
- data/app/views/sessions/info.html.erb +2 -2
- data/config/routes.rb +4 -4
- data/dailycred.gemspec +1 -1
- data/dummy-preauth/.gitignore +16 -0
- data/dummy-preauth/Gemfile +42 -0
- data/dummy-preauth/README.rdoc +28 -0
- data/dummy-preauth/Rakefile +6 -0
- data/dummy-preauth/app/assets/images/rails.png +0 -0
- data/dummy-preauth/app/assets/javascripts/application.js +16 -0
- data/{dummy/app/assets/javascripts/posts.js.coffee → dummy-preauth/app/assets/javascripts/welcome.js.coffee} +1 -1
- data/dummy-preauth/app/assets/stylesheets/application.css +13 -0
- data/{dummy/app/assets/stylesheets/posts.css.scss → dummy-preauth/app/assets/stylesheets/welcome.css.scss} +1 -1
- data/dummy-preauth/app/controllers/application_controller.rb +6 -0
- data/{dummy/app/mailers/.gitkeep → dummy-preauth/app/controllers/concerns/.keep} +0 -0
- data/dummy-preauth/app/controllers/sessions_controller.rb +34 -0
- data/dummy-preauth/app/controllers/users_controller.rb +30 -0
- data/dummy-preauth/app/controllers/welcome_controller.rb +9 -0
- data/dummy-preauth/app/helpers/application_helper.rb +2 -0
- data/dummy-preauth/app/helpers/sessions_helper.rb +2 -0
- data/dummy-preauth/app/helpers/users_helper.rb +2 -0
- data/dummy-preauth/app/helpers/welcome_helper.rb +2 -0
- data/{dummy/app/models/.gitkeep → dummy-preauth/app/mailers/.keep} +0 -0
- data/{dummy/lib/assets/.gitkeep → dummy-preauth/app/models/.keep} +0 -0
- data/{dummy/lib/tasks/.gitkeep → dummy-preauth/app/models/concerns/.keep} +0 -0
- data/dummy-preauth/app/models/user.rb +34 -0
- data/dummy-preauth/app/views/layouts/application.html.erb +14 -0
- data/dummy-preauth/app/views/sessions/new.html.erb +15 -0
- data/dummy-preauth/app/views/users/_form.html.erb +20 -0
- data/dummy-preauth/app/views/users/edit.html.erb +3 -0
- data/dummy-preauth/app/views/users/new.html.erb +5 -0
- data/dummy-preauth/app/views/welcome/index.html.erb +2 -0
- data/dummy-preauth/bin/bundle +3 -0
- data/dummy-preauth/bin/rails +4 -0
- data/dummy-preauth/bin/rake +4 -0
- data/dummy-preauth/config.ru +4 -0
- data/dummy-preauth/config/application.rb +22 -0
- data/dummy-preauth/config/boot.rb +4 -0
- data/dummy-preauth/config/database.yml +25 -0
- data/dummy-preauth/config/environment.rb +5 -0
- data/dummy-preauth/config/environments/development.rb +27 -0
- data/dummy-preauth/config/environments/production.rb +80 -0
- data/dummy-preauth/config/environments/test.rb +36 -0
- data/dummy-preauth/config/initializers/backtrace_silencers.rb +7 -0
- data/dummy-preauth/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy-preauth/config/initializers/inflections.rb +16 -0
- data/dummy-preauth/config/initializers/mime_types.rb +5 -0
- data/dummy-preauth/config/initializers/omniauth.rb +9 -0
- data/dummy-preauth/config/initializers/secret_token.rb +12 -0
- data/dummy-preauth/config/initializers/session_store.rb +3 -0
- data/dummy-preauth/config/initializers/wrap_parameters.rb +14 -0
- data/dummy-preauth/config/locales/en.yml +23 -0
- data/dummy-preauth/config/routes.rb +57 -0
- data/dummy-preauth/db/migrate/20130423011519_create_users.rb +15 -0
- data/dummy-preauth/db/migrate/20130423011738_add_uuid_to_users.rb +5 -0
- data/dummy-preauth/db/schema.rb +26 -0
- data/dummy-preauth/db/seeds.rb +7 -0
- data/{dummy/log/.gitkeep → dummy-preauth/lib/assets/.keep} +0 -0
- data/dummy-preauth/lib/controller_authentication.rb +48 -0
- data/{dummy/test/fixtures/.gitkeep → dummy-preauth/lib/tasks/.keep} +0 -0
- data/{dummy/test/functional/.gitkeep → dummy-preauth/log/.keep} +0 -0
- data/dummy-preauth/public/404.html +27 -0
- data/dummy-preauth/public/422.html +26 -0
- data/dummy-preauth/public/500.html +26 -0
- data/{dummy/test/integration/.gitkeep → dummy-preauth/public/favicon.ico} +0 -0
- data/dummy-preauth/public/robots.txt +5 -0
- data/{dummy/test/unit/.gitkeep → dummy-preauth/test/controllers/.keep} +0 -0
- data/dummy-preauth/test/controllers/welcome_controller_test.rb +9 -0
- data/{dummy/vendor/assets/javascripts/.gitkeep → dummy-preauth/test/fixtures/.keep} +0 -0
- data/dummy-preauth/test/fixtures/users.yml +12 -0
- data/dummy-preauth/test/functional/sessions_controller_test.rb +22 -0
- data/dummy-preauth/test/functional/users_controller_test.rb +51 -0
- data/{dummy/vendor/assets/stylesheets/.gitkeep → dummy-preauth/test/helpers/.keep} +0 -0
- data/dummy-preauth/test/helpers/welcome_helper_test.rb +4 -0
- data/{dummy/vendor/plugins/.gitkeep → dummy-preauth/test/integration/.keep} +0 -0
- data/dummy-preauth/test/mailers/.keep +0 -0
- data/dummy-preauth/test/models/.keep +0 -0
- data/dummy-preauth/test/test_helper.rb +15 -0
- data/dummy-preauth/test/unit/user_test.rb +86 -0
- data/dummy-preauth/vendor/assets/javascripts/.keep +0 -0
- data/dummy-preauth/vendor/assets/stylesheets/.keep +0 -0
- data/dummy/.gitignore +3 -2
- data/dummy/Gemfile +14 -28
- data/dummy/README.rdoc +15 -248
- data/dummy/Rakefile +0 -1
- data/dummy/app/assets/javascripts/application.js +2 -1
- data/dummy/app/controllers/application_controller.rb +5 -4
- data/dummy/app/controllers/concerns/.keep +0 -0
- data/dummy/app/mailers/.keep +0 -0
- data/dummy/app/models/.keep +0 -0
- data/dummy/app/models/concerns/.keep +0 -0
- data/dummy/app/views/layouts/application.html.erb +2 -6
- data/dummy/bin/bundle +3 -0
- data/dummy/bin/rails +4 -0
- data/dummy/bin/rake +4 -0
- data/dummy/config/application.rb +2 -42
- data/dummy/config/boot.rb +0 -2
- data/dummy/config/environment.rb +2 -2
- data/dummy/config/environments/development.rb +9 -19
- data/dummy/config/environments/production.rb +40 -27
- data/dummy/config/environments/test.rb +12 -13
- data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy/config/initializers/inflections.rb +6 -5
- data/dummy/config/initializers/omniauth.rb +9 -2
- data/dummy/config/initializers/secret_token.rb +6 -1
- data/dummy/config/initializers/session_store.rb +1 -6
- data/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/dummy/config/locales/en.yml +20 -2
- data/dummy/config/routes.rb +15 -26
- data/dummy/db/migrate/{20120925172903_create_users.rb → 20130417131939_create_users.rb} +7 -11
- data/dummy/db/schema.rb +9 -19
- data/dummy/lib/assets/.keep +0 -0
- data/dummy/lib/tasks/.keep +0 -0
- data/dummy/log/.keep +0 -0
- data/dummy/public/404.html +2 -1
- data/dummy/public/422.html +1 -1
- data/dummy/public/500.html +2 -1
- data/dummy/public/robots.txt +1 -1
- data/dummy/test/controllers/.keep +0 -0
- data/dummy/test/fixtures/.keep +0 -0
- data/dummy/test/helpers/.keep +0 -0
- data/dummy/test/integration/.keep +0 -0
- data/dummy/test/mailers/.keep +0 -0
- data/dummy/test/models/.keep +0 -0
- data/dummy/test/test_helper.rb +11 -58
- data/dummy/vendor/assets/javascripts/.keep +0 -0
- data/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/lib/dailycred.rb +2 -2
- data/lib/dailycred/acts_as_dailycred.rb +4 -17
- data/lib/dailycred/client.rb +1 -0
- data/lib/dailycred/engine.rb +3 -2
- data/lib/dailycred/helper.rb +4 -4
- data/lib/dailycred/middleware.rb +5 -2
- data/lib/dailycred/version.rb +1 -1
- data/lib/generators/dailycred_generator.rb +17 -8
- data/lib/generators/templates/migration_create_user.rb +3 -9
- data/lib/omniauth/strategies/dailycred.rb +2 -0
- data/spec/helper_spec.rb +1 -3
- data/test/generator_test.rb +4 -3
- metadata +103 -52
- data/dummy/Guardfile +0 -31
- data/dummy/app/assets/stylesheets/scaffolds.css.scss +0 -69
- data/dummy/app/controllers/posts_controller.rb +0 -86
- data/dummy/app/helpers/posts_helper.rb +0 -2
- data/dummy/app/models/post.rb +0 -3
- data/dummy/app/views/posts/_form.html.erb +0 -21
- data/dummy/app/views/posts/edit.html.erb +0 -6
- data/dummy/app/views/posts/index.html.erb +0 -23
- data/dummy/app/views/posts/new.html.erb +0 -5
- data/dummy/app/views/posts/show.html.erb +0 -10
- data/dummy/db/migrate/20120926012555_create_posts.rb +0 -9
- data/dummy/db/migrate/20121002192037_update_users_2.rb +0 -70
- data/dummy/db/migrate/20121108192739_add_column_to_posts.rb +0 -5
- data/dummy/public/index.html +0 -241
- data/dummy/script/rails +0 -6
- data/dummy/test/fixtures/posts.yml +0 -7
- data/dummy/test/fixtures/users.yml +0 -3
- data/dummy/test/functional/posts_controller_test.rb +0 -51
- data/dummy/test/performance/browsing_test.rb +0 -12
- data/dummy/test/unit/helpers/posts_helper_test.rb +0 -4
- data/dummy/test/unit/post_test.rb +0 -7
- data/dummy/test/unit/user_test.rb +0 -77
- data/spec/omniauth/strategies/dailycred_spec.rb +0 -64
data/dummy/Rakefile
CHANGED
@@ -5,11 +5,12 @@
|
|
5
5
|
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
//
|
8
|
+
// compiled file.
|
9
9
|
//
|
10
10
|
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
11
|
// GO AFTER THE REQUIRES BELOW.
|
12
12
|
//
|
13
13
|
//= require jquery
|
14
14
|
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
15
16
|
//= require_tree .
|
@@ -1,16 +1,17 @@
|
|
1
1
|
class ApplicationController < ActionController::Base
|
2
2
|
helper_method :current_user
|
3
|
+
|
3
4
|
private
|
4
5
|
|
5
6
|
# helper method for getting the current signed in user
|
6
7
|
def current_user
|
7
8
|
begin
|
8
|
-
@current_user
|
9
|
-
ap @current_user
|
10
|
-
@current_user
|
9
|
+
@current_user || User.find(session[:user_id]) if session[:user_id]
|
11
10
|
rescue
|
12
11
|
nil
|
13
12
|
end
|
14
13
|
end
|
15
|
-
|
14
|
+
# Prevent CSRF attacks by raising an exception.
|
15
|
+
# For APIs, you may want to use :null_session instead.
|
16
|
+
protect_from_forgery with: :exception
|
16
17
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,17 +2,13 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag "application", :
|
6
|
-
<%= javascript_include_tag "application" %>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
7
|
<%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
10
|
|
11
11
|
<%= yield %>
|
12
|
-
<%= link_to 'login', connect_path %>
|
13
|
-
<% if !current_user.nil? %>
|
14
|
-
<%= debug current_user %>
|
15
|
-
<% end %>
|
16
12
|
|
17
13
|
</body>
|
18
14
|
</html>
|
data/dummy/bin/bundle
ADDED
data/dummy/bin/rails
ADDED
data/dummy/bin/rake
ADDED
data/dummy/config/application.rb
CHANGED
@@ -2,12 +2,8 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
-
# If you want your assets lazily compiled in production, use this line
|
9
|
-
# Bundler.require(:default, :assets, Rails.env)
|
10
|
-
end
|
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)))
|
11
7
|
|
12
8
|
module Dummy
|
13
9
|
class Application < Rails::Application
|
@@ -15,16 +11,6 @@ module Dummy
|
|
15
11
|
# Application configuration should go into files in config/initializers
|
16
12
|
# -- all .rb files in that directory are automatically loaded.
|
17
13
|
|
18
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
-
|
21
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
-
|
25
|
-
# Activate observers that should always be running.
|
26
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
-
|
28
14
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
15
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
16
|
# config.time_zone = 'Central Time (US & Canada)'
|
@@ -32,31 +18,5 @@ module Dummy
|
|
32
18
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
19
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
20
|
# config.i18n.default_locale = :de
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
|
42
|
-
# Enable escaping HTML in JSON.
|
43
|
-
config.active_support.escape_html_entities_in_json = true
|
44
|
-
|
45
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
46
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
47
|
-
# like if you have constraints or database-specific column types
|
48
|
-
# config.active_record.schema_format = :sql
|
49
|
-
|
50
|
-
# Enforce whitelist mode for mass assignment.
|
51
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
52
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
53
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
54
|
-
config.active_record.whitelist_attributes = true
|
55
|
-
|
56
|
-
# Enable the asset pipeline
|
57
|
-
config.assets.enabled = true
|
58
|
-
|
59
|
-
# Version of your assets, change this if you want to expire all your assets
|
60
|
-
config.assets.version = '1.0'
|
61
21
|
end
|
62
22
|
end
|
data/dummy/config/boot.rb
CHANGED
data/dummy/config/environment.rb
CHANGED
@@ -1,37 +1,27 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
5
|
# every request. This slows down response time but is perfect for development
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
#
|
10
|
-
config.
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
18
|
|
19
|
-
# Print deprecation notices to the Rails logger
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
|
-
#
|
23
|
-
config.
|
22
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
config.active_record.migration_error = :page_load
|
24
24
|
|
25
|
-
#
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
|
-
# Do not compress assets
|
33
|
-
config.assets.compress = false
|
34
|
-
|
35
|
-
# Expands the lines which load the assets
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
36
26
|
config.assets.debug = true
|
37
27
|
end
|
@@ -1,67 +1,80 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
|
-
# Code is not reloaded between requests
|
4
|
+
# Code is not reloaded between requests.
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
|
-
#
|
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.
|
8
14
|
config.consider_all_requests_local = false
|
9
15
|
config.action_controller.perform_caching = true
|
10
16
|
|
11
|
-
#
|
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).
|
12
23
|
config.serve_static_assets = false
|
13
24
|
|
14
|
-
# Compress JavaScripts and CSS
|
15
|
-
config.assets.
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
16
28
|
|
17
|
-
#
|
29
|
+
# Whether to fallback to assets pipeline if a precompiled asset is missed.
|
18
30
|
config.assets.compile = false
|
19
31
|
|
20
|
-
# Generate digests for assets URLs
|
32
|
+
# Generate digests for assets URLs.
|
21
33
|
config.assets.digest = true
|
22
34
|
|
23
|
-
#
|
24
|
-
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
25
37
|
|
26
|
-
# Specifies the header that your server uses for sending files
|
38
|
+
# Specifies the header that your server uses for sending files.
|
27
39
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
40
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
41
|
|
30
42
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
43
|
# config.force_ssl = true
|
32
44
|
|
33
|
-
#
|
34
|
-
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
35
47
|
|
36
|
-
# Prepend all log lines with the following tags
|
48
|
+
# Prepend all log lines with the following tags.
|
37
49
|
# config.log_tags = [ :subdomain, :uuid ]
|
38
50
|
|
39
|
-
# Use a different logger for distributed setups
|
51
|
+
# Use a different logger for distributed setups.
|
40
52
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
53
|
|
42
|
-
# Use a different cache store in production
|
54
|
+
# Use a different cache store in production.
|
43
55
|
# config.cache_store = :mem_cache_store
|
44
56
|
|
45
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
46
58
|
# config.action_controller.asset_host = "http://assets.example.com"
|
47
59
|
|
48
|
-
# Precompile additional assets
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
49
62
|
# config.assets.precompile += %w( search.js )
|
50
63
|
|
51
|
-
#
|
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.
|
52
66
|
# config.action_mailer.raise_delivery_errors = false
|
53
67
|
|
54
|
-
# Enable threaded mode
|
55
|
-
# config.threadsafe!
|
56
|
-
|
57
68
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
-
# the I18n.default_locale when a translation can not be found)
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
59
70
|
config.i18n.fallbacks = true
|
60
71
|
|
61
|
-
# Send deprecation notices to registered listeners
|
72
|
+
# Send deprecation notices to registered listeners.
|
62
73
|
config.active_support.deprecation = :notify
|
63
74
|
|
64
|
-
#
|
65
|
-
#
|
66
|
-
|
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
|
67
80
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
5
|
# test suite. You never need to work with it otherwise. Remember that
|
@@ -7,31 +7,30 @@ Dummy::Application.configure do
|
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
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.
|
11
16
|
config.serve_static_assets = true
|
12
17
|
config.static_cache_control = "public, max-age=3600"
|
13
18
|
|
14
|
-
#
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
19
|
+
# Show full error reports and disable caching.
|
18
20
|
config.consider_all_requests_local = true
|
19
21
|
config.action_controller.perform_caching = false
|
20
22
|
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
22
24
|
config.action_dispatch.show_exceptions = false
|
23
25
|
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
26
28
|
|
27
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
28
30
|
# The :test delivery method accumulates sent emails in the
|
29
31
|
# ActionMailer::Base.deliveries array.
|
30
32
|
config.action_mailer.delivery_method = :test
|
31
33
|
|
32
|
-
#
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
-
|
35
|
-
# Print deprecation notices to the stderr
|
34
|
+
# Print deprecation notices to the stderr.
|
36
35
|
config.active_support.deprecation = :stderr
|
37
36
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
#
|
5
|
-
#
|
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|
|
6
7
|
# inflect.plural /^(ox)$/i, '\1en'
|
7
8
|
# inflect.singular /^(ox)en/i, '\1'
|
8
9
|
# inflect.irregular 'person', 'people'
|
9
10
|
# inflect.uncountable %w( fish sheep )
|
10
11
|
# end
|
11
|
-
|
12
|
+
|
12
13
|
# These inflection rules are supported but not enabled by default:
|
13
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
14
15
|
# inflect.acronym 'RESTful'
|
15
16
|
# end
|
@@ -1,2 +1,9 @@
|
|
1
|
-
Rails.configuration.DAILYCRED_CLIENT_ID = "
|
2
|
-
Rails.configuration.DAILYCRED_SECRET_KEY = "
|
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
|
+
# }
|
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
# Your secret key for verifying the integrity of signed cookies.
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
5
6
|
# Make sure the secret is at least 30 characters and all random,
|
6
7
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
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 = 'cb5a0759593cd5f1cb9802a3c05fb35cd7348e8b867a69136addced11ff4763bc78da24db0b3e9d0fefd8696dc35de025090e9800b992b33d68ee2afcaf1895f'
|
@@ -1,8 +1,3 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
Dummy::Application.config.session_store :
|
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
|
3
|
+
Dummy::Application.config.session_store :encrypted_cookie_store, key: '_dummy_session'
|