wordjelly-auth 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/lib/auth/version.rb +1 -1
  3. data/spec/auth_test.rb +7 -0
  4. data/spec/controllers/auth/admin_create_users_controller_spec.rb +141 -0
  5. data/spec/controllers/auth/clients_controller_spec.rb +223 -0
  6. data/spec/controllers/auth/search_controller_spec.rb +5 -0
  7. data/spec/controllers/auth/shopping/discounts_controller_spec.rb +54 -0
  8. data/spec/controllers/auth/users/profiles_controller_spec.rb +5 -0
  9. data/spec/dummy/README.rdoc +28 -0
  10. data/spec/dummy/Rakefile +6 -0
  11. data/spec/dummy/app/assets/javascripts/activity.js +2 -0
  12. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  13. data/spec/dummy/app/assets/javascripts/home.js +2 -0
  14. data/spec/dummy/app/assets/javascripts/pollymer.min.js +170 -0
  15. data/spec/dummy/app/assets/javascripts/tests.js +2 -0
  16. data/spec/dummy/app/assets/javascripts/topics.js +2 -0
  17. data/spec/dummy/app/assets/stylesheets/activity.css +4 -0
  18. data/spec/dummy/app/assets/stylesheets/application.scss +16 -0
  19. data/spec/dummy/app/assets/stylesheets/home.css +4 -0
  20. data/spec/dummy/app/assets/stylesheets/tests.css +4 -0
  21. data/spec/dummy/app/assets/stylesheets/topics.css +4 -0
  22. data/spec/dummy/app/controllers/activity_controller.rb +3 -0
  23. data/spec/dummy/app/controllers/admins/confirmations_controller.rb +28 -0
  24. data/spec/dummy/app/controllers/admins/omniauth_callbacks_controller.rb +28 -0
  25. data/spec/dummy/app/controllers/admins/passwords_controller.rb +32 -0
  26. data/spec/dummy/app/controllers/admins/registrations_controller.rb +60 -0
  27. data/spec/dummy/app/controllers/admins/sessions_controller.rb +5 -0
  28. data/spec/dummy/app/controllers/admins/unlocks_controller.rb +28 -0
  29. data/spec/dummy/app/controllers/application_controller.rb +49 -0
  30. data/spec/dummy/app/controllers/home_controller.rb +13 -0
  31. data/spec/dummy/app/controllers/otp_controller.rb +3 -0
  32. data/spec/dummy/app/controllers/shopping/cart_items_controller.rb +28 -0
  33. data/spec/dummy/app/controllers/shopping/carts_controller.rb +4 -0
  34. data/spec/dummy/app/controllers/shopping/discounts_controller.rb +3 -0
  35. data/spec/dummy/app/controllers/shopping/payments_controller.rb +5 -0
  36. data/spec/dummy/app/controllers/shopping/products_controller.rb +2 -0
  37. data/spec/dummy/app/controllers/tests_controller.rb +58 -0
  38. data/spec/dummy/app/controllers/topics_controller.rb +63 -0
  39. data/spec/dummy/app/controllers/users/sessions_controller.rb +3 -0
  40. data/spec/dummy/app/controllers/webhooks_controller.rb +13 -0
  41. data/spec/dummy/app/helpers/activity_helper.rb +2 -0
  42. data/spec/dummy/app/helpers/api/v1/token_auth_helper.rb +2 -0
  43. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  44. data/spec/dummy/app/helpers/home_helper.rb +2 -0
  45. data/spec/dummy/app/helpers/tests_helper.rb +2 -0
  46. data/spec/dummy/app/helpers/topics_helper.rb +2 -0
  47. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  48. data/spec/dummy/app/mailers/new.rb +3 -0
  49. data/spec/dummy/app/models/activity.rb +3 -0
  50. data/spec/dummy/app/models/admin.rb +12 -0
  51. data/spec/dummy/app/models/noti.rb +48 -0
  52. data/spec/dummy/app/models/noti_response.rb +9 -0
  53. data/spec/dummy/app/models/shopping/cart.rb +3 -0
  54. data/spec/dummy/app/models/shopping/cart_item.rb +7 -0
  55. data/spec/dummy/app/models/shopping/discount.rb +3 -0
  56. data/spec/dummy/app/models/shopping/payment.rb +16 -0
  57. data/spec/dummy/app/models/shopping/product.rb +6 -0
  58. data/spec/dummy/app/models/test.rb +5 -0
  59. data/spec/dummy/app/models/topic.rb +75 -0
  60. data/spec/dummy/app/models/user.rb +95 -0
  61. data/spec/dummy/app/views/home/index.html.erb +6 -0
  62. data/spec/dummy/app/views/home/send_notification.html.erb +2 -0
  63. data/spec/dummy/app/views/layouts/application.html.erb +26 -0
  64. data/spec/dummy/app/views/layouts/mailer.html.erb +8 -0
  65. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  66. data/spec/dummy/app/views/new/notification.html.erb +1 -0
  67. data/spec/dummy/app/views/new/notification.text.erb +1 -0
  68. data/spec/dummy/app/views/shopping/_navigation_options.html.erb +1 -0
  69. data/spec/dummy/app/views/tests/_form.html.erb +25 -0
  70. data/spec/dummy/app/views/tests/edit.html.erb +6 -0
  71. data/spec/dummy/app/views/tests/index.html.erb +33 -0
  72. data/spec/dummy/app/views/tests/new.html.erb +5 -0
  73. data/spec/dummy/app/views/tests/show.html.erb +14 -0
  74. data/spec/dummy/app/views/topics/_form.html.erb +25 -0
  75. data/spec/dummy/app/views/topics/edit.html.erb +6 -0
  76. data/spec/dummy/app/views/topics/index.html.erb +29 -0
  77. data/spec/dummy/app/views/topics/new.html.erb +5 -0
  78. data/spec/dummy/app/views/topics/show.html.erb +14 -0
  79. data/spec/dummy/app/views/users/sessions/create.js.erb +6 -0
  80. data/spec/dummy/bin/bundle +3 -0
  81. data/spec/dummy/bin/rails +4 -0
  82. data/spec/dummy/bin/rake +4 -0
  83. data/spec/dummy/bin/setup +29 -0
  84. data/spec/dummy/config.ru +8 -0
  85. data/spec/dummy/config/application.rb +31 -0
  86. data/spec/dummy/config/boot.rb +5 -0
  87. data/spec/dummy/config/environment.rb +4 -0
  88. data/spec/dummy/config/environments/development.rb +57 -0
  89. data/spec/dummy/config/environments/production.rb +92 -0
  90. data/spec/dummy/config/environments/test.rb +44 -0
  91. data/spec/dummy/config/initializers/assets.rb +11 -0
  92. data/spec/dummy/config/initializers/aws.rb +15 -0
  93. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  94. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  95. data/spec/dummy/config/initializers/devise.rb +273 -0
  96. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  97. data/spec/dummy/config/initializers/inflections.rb +16 -0
  98. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  99. data/spec/dummy/config/initializers/preinitializer.rb +167 -0
  100. data/spec/dummy/config/initializers/redis.rb +9 -0
  101. data/spec/dummy/config/initializers/session_store.rb +3 -0
  102. data/spec/dummy/config/initializers/wrap_parameters.rb +9 -0
  103. data/spec/dummy/config/locales/devise.en.yml +62 -0
  104. data/spec/dummy/config/locales/en.yml +25 -0
  105. data/spec/dummy/config/mongoid.yml +142 -0
  106. data/spec/dummy/config/redis.yml +14 -0
  107. data/spec/dummy/config/routes.rb +38 -0
  108. data/spec/dummy/config/secrets.yml +22 -0
  109. data/spec/dummy/db/seeds.rb +48 -0
  110. data/spec/dummy/lib/admin/parameter_sanitizer.rb +9 -0
  111. data/spec/dummy/lib/assets/files/test_names.json +1 -0
  112. data/spec/dummy/lib/user/parameter_sanitizer.rb +8 -0
  113. data/spec/dummy/public/404.html +67 -0
  114. data/spec/dummy/public/422.html +67 -0
  115. data/spec/dummy/public/500.html +66 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/dummy/shoryuken.yml +5 -0
  118. data/spec/dummy/sidekiq.yml +9 -0
  119. data/spec/dummy/sidekiq_prep.sh +6 -0
  120. data/spec/dummy/spec/controllers/activity_controller_spec.rb +5 -0
  121. data/spec/dummy/spec/controllers/tests_controller_spec.rb +141 -0
  122. data/spec/dummy/spec/factories/tests.rb +6 -0
  123. data/spec/dummy/spec/fixtures/new/send_notification +3 -0
  124. data/spec/dummy/spec/helpers/activity_helper_spec.rb +15 -0
  125. data/spec/dummy/spec/helpers/tests_helper_spec.rb +15 -0
  126. data/spec/dummy/spec/mailers/new_spec.rb +18 -0
  127. data/spec/dummy/spec/mailers/previews/new_preview.rb +13 -0
  128. data/spec/dummy/spec/models/test_spec.rb +5 -0
  129. data/spec/dummy/spec/requests/tests_spec.rb +10 -0
  130. data/spec/dummy/spec/routing/tests_routing_spec.rb +39 -0
  131. data/spec/dummy/spec/views/tests/edit.html.erb_spec.rb +21 -0
  132. data/spec/dummy/spec/views/tests/index.html.erb_spec.rb +22 -0
  133. data/spec/dummy/spec/views/tests/new.html.erb_spec.rb +21 -0
  134. data/spec/dummy/spec/views/tests/show.html.erb_spec.rb +16 -0
  135. data/spec/dummy/test/controllers/api/v1/token_auth_controller_test.rb +7 -0
  136. data/spec/dummy/test/controllers/home_controller_test.rb +9 -0
  137. data/spec/dummy/test/controllers/oauth_tests_controller_test.rb +7 -0
  138. data/spec/dummy/test/fixtures/oauth_tests.yml +11 -0
  139. data/spec/dummy/test/fixtures/users.yml +7 -0
  140. data/spec/dummy/test/models/oauth_test_test.rb +7 -0
  141. data/spec/dummy/test/models/user_test.rb +7 -0
  142. data/spec/factories/client_factory.rb +77 -0
  143. data/spec/features/additional_login_param_feature_spec.rb +63 -0
  144. data/spec/features/extension_spec.rb +680 -0
  145. data/spec/features/redirect_disable_spec.rb +74 -0
  146. data/spec/fixtures/auth/clients.yml +13 -0
  147. data/spec/helpers/auth/admin_create_users_helper_spec.rb +15 -0
  148. data/spec/helpers/auth/resource_helper_spec.rb +15 -0
  149. data/spec/helpers/auth/search_helper_spec.rb +15 -0
  150. data/spec/helpers/auth/users/profiles_helper_spec.rb +15 -0
  151. data/spec/integration/navigation_test.rb +8 -0
  152. data/spec/mailers/auth/notifier_spec.rb +5 -0
  153. data/spec/mailers/previews/auth/notifier_preview.rb +4 -0
  154. data/spec/models/auth/admin_create_user_spec.rb +5 -0
  155. data/spec/models/auth/client_test.rb +9 -0
  156. data/spec/models/auth/shopping/discount_spec.rb +5 -0
  157. data/spec/rails_helper.rb +70 -0
  158. data/spec/requests/admin/confirmation_request_spec.rb +164 -0
  159. data/spec/requests/admin/password_request_spec.rb +191 -0
  160. data/spec/requests/admin/registration_request_spec.rb +574 -0
  161. data/spec/requests/admin/session_request_spec.rb +352 -0
  162. data/spec/requests/admin/unlock_request_spec.rb +178 -0
  163. data/spec/requests/admin_create_user_request_spec.rb +303 -0
  164. data/spec/requests/background_job_request_spec.rb +28 -0
  165. data/spec/requests/cart_item_request_spec.rb +381 -0
  166. data/spec/requests/cart_request_spec.rb +451 -0
  167. data/spec/requests/client_request_spec.rb +65 -0
  168. data/spec/requests/discount_request_spec.rb +589 -0
  169. data/spec/requests/payment_request_spec.rb +1254 -0
  170. data/spec/requests/search_request_spec.rb +173 -0
  171. data/spec/requests/topic_request_spec.rb +138 -0
  172. data/spec/requests/user/additional_login_param_and_email_validation_spec.rb +673 -0
  173. data/spec/requests/user/confirmation_request_spec.rb +189 -0
  174. data/spec/requests/user/omniauth_callbacks_request_spec.rb +682 -0
  175. data/spec/requests/user/otp_basic_flow_request_spec.rb +512 -0
  176. data/spec/requests/user/password_request_spec.rb +216 -0
  177. data/spec/requests/user/registration_request_spec.rb +615 -0
  178. data/spec/requests/user/session_request_spec.rb +361 -0
  179. data/spec/requests/user/unlock_request_spec.rb +208 -0
  180. data/spec/routing/admin/admin_routes_spec.rb +15 -0
  181. data/spec/routing/auth/admin_create_users_routing_spec.rb +39 -0
  182. data/spec/routing/clients_controller_routes_spec.rb +75 -0
  183. data/spec/routing/engine_routes_spec.rb +16 -0
  184. data/spec/spec_helper.rb +138 -0
  185. data/spec/support/factory_girl.rb +3 -0
  186. data/spec/support/omniauth_macros.rb +195 -0
  187. data/spec/support/payumoney_support.rb +11 -0
  188. data/spec/support/sign_in_support.rb +361 -0
  189. data/spec/support/wait_for_ajax.rb +11 -0
  190. data/spec/views/auth/admin_create_users/edit.html.erb_spec.rb +14 -0
  191. data/spec/views/auth/admin_create_users/index.html.erb_spec.rb +14 -0
  192. data/spec/views/auth/admin_create_users/new.html.erb_spec.rb +14 -0
  193. data/spec/views/auth/admin_create_users/show.html.erb_spec.rb +11 -0
  194. data/spec/views/auth/shopping/discounts/create.html.erb_spec.rb +5 -0
  195. data/spec/views/auth/shopping/discounts/destroy.html.erb_spec.rb +5 -0
  196. data/spec/views/auth/shopping/discounts/edit.html.erb_spec.rb +5 -0
  197. data/spec/views/auth/shopping/discounts/index.html.erb_spec.rb +5 -0
  198. data/spec/views/auth/shopping/discounts/new.html.erb_spec.rb +5 -0
  199. data/spec/views/auth/shopping/discounts/show.html.erb_spec.rb +5 -0
  200. data/spec/views/auth/shopping/discounts/update.html.erb_spec.rb +5 -0
  201. data/spec/views/profile/show.html.erb_spec.rb +5 -0
  202. metadata +401 -3
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -0,0 +1,8 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ console = ActiveSupport::Logger.new($stdout)
5
+ console.formatter = Rails.logger.formatter
6
+ console.level = Rails.logger.level
7
+ Rails.logger.extend(ActiveSupport::Logger.broadcast(console))
8
+ run Rails.application
@@ -0,0 +1,31 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ # require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "action_view/railtie"
8
+ require "sprockets/railtie"
9
+ require "rails/test_unit/railtie"
10
+
11
+ Bundler.require(*Rails.groups)
12
+ require "auth"
13
+
14
+ module Dummy
15
+ class Application < Rails::Application
16
+ # Settings in config/environments/* take precedence over those specified here.
17
+ # Application configuration should go into files in config/initializers
18
+ # -- all .rb files in that directory are automatically loaded.
19
+
20
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22
+ # config.time_zone = 'Central Time (US & Canada)'
23
+
24
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
+ # config.i18n.default_locale = :de
27
+ config.autoload_paths += %W(#{config.root}/lib)
28
+ config.autoload_paths += Dir["#{config.root}/lib/**/"]
29
+ end
30
+ end
31
+
@@ -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.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,4 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+ # Initialize the Rails application.
4
+ Rails.application.initialize!
@@ -0,0 +1,57 @@
1
+ Rails.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 = true
18
+
19
+ ## OLDER Mailer CONFIGURATION ##
20
+
21
+ #config.action_mailer.default_url_options = { :host => 'localhost:3000' }
22
+ #config.action_mailer.delivery_method = :smtp
23
+ #config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025}
24
+
25
+ ### MAILGUN CONFIGURATION ###
26
+
27
+ config.action_mailer.delivery_method = :mailgun
28
+ config.action_mailer.mailgun_settings = {
29
+ api_key: 'key-6263360b078081b625182ff17d7a92fd',
30
+ domain: 'sandboxc0248205473845c3a998e44941ee503e.mailgun.org'
31
+ }
32
+
33
+
34
+ # Print deprecation notices to the Rails logger.
35
+ config.active_support.deprecation = :log
36
+
37
+ # Debug mode disables concatenation and preprocessing of assets.
38
+ # This option may cause significant delays in view rendering with a large
39
+ # number of complex assets.
40
+ config.assets.debug = true
41
+
42
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
43
+ # yet still be able to expire them through the digest params.
44
+ config.assets.digest = true
45
+
46
+ # Adds additional error checking when serving assets at runtime.
47
+ # Checks for improperly declared sprockets dependencies.
48
+ # Raises helpful error messages.
49
+ config.assets.raise_runtime_errors = true
50
+
51
+
52
+
53
+
54
+
55
+ # Raises error for missing translations
56
+ # config.action_view.raise_on_missing_translations = true
57
+ end
@@ -0,0 +1,92 @@
1
+ Rails.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 threaded 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
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
37
+
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
+
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
+
44
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
+ # config.force_ssl = true
46
+
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
50
+
51
+ # Prepend all log lines with the following tags.
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
66
+
67
+
68
+ ## OLDER Mailer CONFIGURATION ##
69
+
70
+ #config.action_mailer.default_url_options = { :host => 'localhost:3000' }
71
+ #config.action_mailer.delivery_method = :smtp
72
+ #config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025}
73
+
74
+ ### MAILGUN CONFIGURATION ###
75
+
76
+ config.action_mailer.delivery_method = :mailgun
77
+ config.action_mailer.mailgun_settings = {
78
+ api_key: 'key-6263360b078081b625182ff17d7a92fd',
79
+ domain: 'sandboxc0248205473845c3a998e44941ee503e.mailgun.org'
80
+ }
81
+
82
+
83
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
84
+ # the I18n.default_locale when a translation cannot be found).
85
+ config.i18n.fallbacks = true
86
+
87
+ # Send deprecation notices to registered listeners.
88
+ config.active_support.deprecation = :notify
89
+
90
+ # Use default logging formatter so that PID and timestamp are not suppressed.
91
+ config.log_formatter = ::Logger::Formatter.new
92
+ end
@@ -0,0 +1,44 @@
1
+ Rails.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 file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = 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.default_url_options = { :host => 'localhost:3000' }
33
+ config.action_mailer.delivery_method = :test
34
+
35
+
36
+ # Randomize the order test cases are executed.
37
+ config.active_support.test_order = :random
38
+
39
+ # Print deprecation notices to the stderr.
40
+ config.active_support.deprecation = :stderr
41
+
42
+ # Raises error for missing translations
43
+ # config.action_view.raise_on_missing_translations = true
44
+ end
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,15 @@
1
+ =begin
2
+ require 'aws-sdk'
3
+ Aws.config.update({
4
+ region: "eu-west-1",
5
+ credentials: Aws::Credentials.new("AKIAJXE7NYZBKHOJPETA", "kFq/M56jgvxNYKBeCxZnxOOlgE2aWDXhqI0yb8+8")
6
+ })
7
+
8
+
9
+ sqs = Aws::SQS::Client.new(
10
+ region: "eu-west-1",
11
+ credentials: Aws::Credentials.new("AKIAJXE7NYZBKHOJPETA", "kFq/M56jgvxNYKBeCxZnxOOlgE2aWDXhqI0yb8+8")
12
+ )
13
+ #l = sqs.create_queue({queue_name: 'default'})
14
+ #puts l.to_s
15
+ =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,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,273 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ =begin
4
+ Devise.setup do |config|
5
+
6
+ # The secret key used by Devise. Devise uses this key to generate
7
+ # random tokens. Changing this key will render invalid all existing
8
+ # confirmation, reset password and unlock tokens in the database.
9
+ # Devise will use the `secret_key_base` as its `secret_key`
10
+ # by default. You can change it below and use your own secret key.
11
+ # config.secret_key = 'c05c64532fc17dcf16df18b1f84a6c9e6c077a07ae6aa33e64e450405a0c6191963fe9fc76927baf3040883cf1bfcb507438272a64daac1a45ab6c365b88801c'
12
+
13
+ # ==> Mailer Configuration
14
+ # Configure the e-mail address which will be shown in Devise::Mailer,
15
+ # note that it will be overwritten if you use your own mailer class
16
+ # with default "from" parameter.
17
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
18
+
19
+ # Configure the class responsible to send e-mails.
20
+ # config.mailer = 'Devise::Mailer'
21
+
22
+ # Configure the parent class responsible to send e-mails.
23
+ # config.parent_mailer = 'ActionMailer::Base'
24
+
25
+ # ==> ORM configuration
26
+ # Load and configure the ORM. Supports :active_record (default) and
27
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
28
+ # available as additional gems.
29
+ require 'devise/orm/mongoid'
30
+
31
+ # ==> Configuration for any authentication mechanism
32
+ # Configure which keys are used when authenticating a user. The default is
33
+ # just :email. You can configure it to use [:username, :subdomain], so for
34
+ # authenticating a user, both parameters are required. Remember that those
35
+ # parameters are used only when authenticating and not when retrieving from
36
+ # session. If you need permissions, you should implement that in a before filter.
37
+ # You can also supply a hash where the value is a boolean determining whether
38
+ # or not authentication should be aborted when the value is not present.
39
+ # config.authentication_keys = [:email]
40
+
41
+ # Configure parameters from the request object used for authentication. Each entry
42
+ # given should be a request method and it will automatically be passed to the
43
+ # find_for_authentication method and considered in your model lookup. For instance,
44
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
45
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
46
+ # config.request_keys = []
47
+
48
+ # Configure which authentication keys should be case-insensitive.
49
+ # These keys will be downcased upon creating or modifying a user and when used
50
+ # to authenticate or find a user. Default is :email.
51
+ config.case_insensitive_keys = [:email]
52
+
53
+ # Configure which authentication keys should have whitespace stripped.
54
+ # These keys will have whitespace before and after removed upon creating or
55
+ # modifying a user and when used to authenticate or find a user. Default is :email.
56
+ config.strip_whitespace_keys = [:email]
57
+
58
+ # Tell if authentication through request.params is enabled. True by default.
59
+ # It can be set to an array that will enable params authentication only for the
60
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
61
+ # enable it only for database (email + password) authentication.
62
+ # config.params_authenticatable = true
63
+
64
+ # Tell if authentication through HTTP Auth is enabled. False by default.
65
+ # It can be set to an array that will enable http authentication only for the
66
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
67
+ # enable it only for database authentication. The supported strategies are:
68
+ # :database = Support basic authentication with authentication key + password
69
+ # config.http_authenticatable = false
70
+
71
+ # If 401 status code should be returned for AJAX requests. True by default.
72
+ # config.http_authenticatable_on_xhr = true
73
+
74
+ # The realm used in Http Basic Authentication. 'Application' by default.
75
+ # config.http_authentication_realm = 'Application'
76
+
77
+ # It will change confirmation, password recovery and other workflows
78
+ # to behave the same regardless if the e-mail provided was right or wrong.
79
+ # Does not affect registerable.
80
+ # config.paranoid = true
81
+
82
+ # By default Devise will store the user in session. You can skip storage for
83
+ # particular strategies by setting this option.
84
+ # Notice that if you are skipping storage for all authentication paths, you
85
+ # may want to disable generating routes to Devise's sessions controller by
86
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
87
+ config.skip_session_storage = [:http_auth]
88
+
89
+ # By default, Devise cleans up the CSRF token on authentication to
90
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
91
+ # requests for sign in and sign up, you need to get a new CSRF token
92
+ # from the server. You can disable this option at your own risk.
93
+ # config.clean_up_csrf_token_on_authentication = true
94
+
95
+ # ==> Configuration for :database_authenticatable
96
+ # For bcrypt, this is the cost for hashing the password and defaults to 11. If
97
+ # using other algorithms, it sets how many times you want the password to be hashed.
98
+ #
99
+ # Limiting the stretches to just one in testing will increase the performance of
100
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
101
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
102
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
103
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
104
+ config.stretches = Rails.env.test? ? 1 : 11
105
+
106
+ # Set up a pepper to generate the hashed password.
107
+ # config.pepper = '681f9db1f50590d3ccdb9f4483b1ad02b50a812517cec9a83df92f5a70db7346848d864503dbad8d6ae37e20df87569ee28613a7074599be29e91d9cc9f13da0'
108
+
109
+ # Send a notification email when the user's password is changed
110
+ # config.send_password_change_notification = false
111
+
112
+ # ==> Configuration for :confirmable
113
+ # A period that the user is allowed to access the website even without
114
+ # confirming their account. For instance, if set to 2.days, the user will be
115
+ # able to access the website for two days without confirming their account,
116
+ # access will be blocked just in the third day. Default is 0.days, meaning
117
+ # the user cannot access the website without confirming their account.
118
+ # config.allow_unconfirmed_access_for = 2.days
119
+
120
+ # A period that the user is allowed to confirm their account before their
121
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
122
+ # their account within 3 days after the mail was sent, but on the fourth day
123
+ # their account can't be confirmed with the token any more.
124
+ # Default is nil, meaning there is no restriction on how long a user can take
125
+ # before confirming their account.
126
+ # config.confirm_within = 3.days
127
+
128
+ # If true, requires any email changes to be confirmed (exactly the same way as
129
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
130
+ # db field (see migrations). Until confirmed, new email is stored in
131
+ # unconfirmed_email column, and copied to email column on successful confirmation.
132
+ config.reconfirmable = true
133
+
134
+ # Defines which key will be used when confirming an account
135
+ # config.confirmation_keys = [:email]
136
+
137
+ # ==> Configuration for :rememberable
138
+ # The time the user will be remembered without asking for credentials again.
139
+ # config.remember_for = 2.weeks
140
+
141
+ # Invalidates all the remember me tokens when the user signs out.
142
+ config.expire_all_remember_me_on_sign_out = true
143
+
144
+ # If true, extends the user's remember period when remembered via cookie.
145
+ # config.extend_remember_period = false
146
+
147
+ # Options to be passed to the created cookie. For instance, you can set
148
+ # secure: true in order to force SSL only cookies.
149
+ # config.rememberable_options = {}
150
+
151
+ # ==> Configuration for :validatable
152
+ # Range for password length.
153
+ config.password_length = 6..128
154
+
155
+ # Email regex used to validate email formats. It simply asserts that
156
+ # one (and only one) @ exists in the given string. This is mainly
157
+ # to give user feedback and not to assert the e-mail validity.
158
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
159
+
160
+ # ==> Configuration for :timeoutable
161
+ # The time you want to timeout the user session without activity. After this
162
+ # time the user will be asked for credentials again. Default is 30 minutes.
163
+ # config.timeout_in = 30.minutes
164
+
165
+ # ==> Configuration for :lockable
166
+ # Defines which strategy will be used to lock an account.
167
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
168
+ # :none = No lock strategy. You should handle locking by yourself.
169
+ # config.lock_strategy = :failed_attempts
170
+
171
+ # Defines which key will be used when locking and unlocking an account
172
+ # config.unlock_keys = [:email]
173
+
174
+ # Defines which strategy will be used to unlock an account.
175
+ # :email = Sends an unlock link to the user email
176
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
177
+ # :both = Enables both strategies
178
+ # :none = No unlock strategy. You should handle unlocking by yourself.
179
+ # config.unlock_strategy = :both
180
+
181
+ # Number of authentication tries before locking an account if lock_strategy
182
+ # is failed attempts.
183
+ # config.maximum_attempts = 20
184
+
185
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
186
+ # config.unlock_in = 1.hour
187
+
188
+ # Warn on the last attempt before the account is locked.
189
+ # config.last_attempt_warning = true
190
+
191
+ # ==> Configuration for :recoverable
192
+ #
193
+ # Defines which key will be used when recovering the password for an account
194
+ # config.reset_password_keys = [:email]
195
+
196
+ # Time interval you can reset your password with a reset password key.
197
+ # Don't put a too small interval or your users won't have the time to
198
+ # change their passwords.
199
+ config.reset_password_within = 6.hours
200
+
201
+ # When set to false, does not sign a user in automatically after their password is
202
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
203
+ # config.sign_in_after_reset_password = true
204
+
205
+ # ==> Configuration for :encryptable
206
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
207
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
208
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
209
+ # for default behavior) and :restful_authentication_sha1 (then you should set
210
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
211
+ #
212
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
213
+ # config.encryptor = :sha512
214
+
215
+ # ==> Scopes configuration
216
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
217
+ # "users/sessions/new". It's turned off by default because it's slower if you
218
+ # are using only default views.
219
+ # config.scoped_views = false
220
+
221
+ # Configure the default scope given to Warden. By default it's the first
222
+ # devise role declared in your routes (usually :user).
223
+ # config.default_scope = :user
224
+
225
+ # Set this configuration to false if you want /users/sign_out to sign out
226
+ # only the current scope. By default, Devise signs out all scopes.
227
+ # config.sign_out_all_scopes = true
228
+
229
+ # ==> Navigation configuration
230
+ # Lists the formats that should be treated as navigational. Formats like
231
+ # :html, should redirect to the sign in page when the user does not have
232
+ # access, but formats like :xml or :json, should return 401.
233
+ #
234
+ # If you have any extra navigational formats, like :iphone or :mobile, you
235
+ # should add them to the navigational formats lists.
236
+ #
237
+ # The "*/*" below is required to match Internet Explorer requests.
238
+ config.navigational_formats = ["*/*", :html, :json]
239
+
240
+ # The default HTTP method used to sign out a resource. Default is :delete.
241
+ config.sign_out_via = :delete
242
+
243
+ # ==> OmniAuth
244
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
245
+ # up on your models and hooks.
246
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
247
+
248
+
249
+ # ==> Warden configuration
250
+ # If you want to use other strategies, that are not supported by Devise, or
251
+ # change the failure app, you can configure them inside the config.warden block.
252
+ #
253
+ # config.warden do |manager|
254
+ # manager.intercept_401 = false
255
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
256
+ # end
257
+
258
+ # ==> Mountable engine configurations
259
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
260
+ # is mountable, there are some extra configurations to be taken into account.
261
+ # The following options are available, assuming the engine is mounted as:
262
+ #
263
+ # mount MyEngine, at: '/my_engine'
264
+ #
265
+ # The router that invoked `devise_for`, in the example above, would be:
266
+ # config.router_name = :my_engine
267
+ #
268
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
269
+ # so you need to do it manually. For the users scope, it would be:
270
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
271
+ end
272
+ =end
273
+