lobby 0.0.1a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/javascripts/lobby/application.js +13 -0
  5. data/app/assets/stylesheets/lobby/application.css +13 -0
  6. data/app/controllers/lobby/application_controller.rb +3 -0
  7. data/app/controllers/lobby/application_controller.rb~ +6 -0
  8. data/app/controllers/lobby/confirmation_controller.rb +46 -0
  9. data/app/controllers/lobby/confirmation_controller.rb~ +44 -0
  10. data/app/controllers/lobby/password_forgotten_controller.rb +48 -0
  11. data/app/controllers/lobby/password_forgotten_controller.rb~ +48 -0
  12. data/app/controllers/lobby/sessions_controller.rb +33 -0
  13. data/app/controllers/lobby/sessions_controller.rb~ +33 -0
  14. data/app/controllers/lobby/users_controller.rb +23 -0
  15. data/app/controllers/lobby/users_controller.rb~ +23 -0
  16. data/app/forms/password_forgotten_form.rb +5 -0
  17. data/app/forms/password_forgotten_form.rb~ +5 -0
  18. data/app/helpers/lobby/application_helper.rb +4 -0
  19. data/app/mailers/confirmation_mailer.rb +30 -0
  20. data/app/mailers/confirmation_mailer.rb~ +28 -0
  21. data/app/models/auth_user.rb~ +100 -0
  22. data/app/models/authentication.rb~ +13 -0
  23. data/app/models/lobby/auth_user.rb +100 -0
  24. data/app/models/lobby/auth_user.rb~ +100 -0
  25. data/app/models/lobby/authentication.rb +13 -0
  26. data/app/models/lobby/password_forgotten_form_abstract.rb +47 -0
  27. data/app/models/password_forgotten_form_abstract.rb~ +45 -0
  28. data/app/views/layouts/lobby/application.html.erb +14 -0
  29. data/app/views/sessions/new.html.haml +19 -0
  30. data/app/views/sessions/new.html.haml~ +0 -0
  31. data/config/locales/de.yml +529 -0
  32. data/config/locales/de.yml~ +529 -0
  33. data/config/locales/en.bootstrap.yml +18 -0
  34. data/config/locales/en.yml +532 -0
  35. data/config/locales/en.yml~ +530 -0
  36. data/config/routes.rb +21 -0
  37. data/config/routes.rb~ +23 -0
  38. data/db/migrate/20131205180849_create_users.rb +16 -0
  39. data/db/migrate/20131205180849_create_users.rb~ +16 -0
  40. data/lib/lobby/engine.rb +7 -0
  41. data/lib/lobby/engine.rb~ +5 -0
  42. data/lib/lobby/version.rb +3 -0
  43. data/lib/lobby/version.rb~ +3 -0
  44. data/lib/lobby.rb +4 -0
  45. data/lib/tasks/lobby_tasks.rake +4 -0
  46. data/test/dummy/README.rdoc +28 -0
  47. data/test/dummy/Rakefile +6 -0
  48. data/test/dummy/app/assets/javascripts/application.js +13 -0
  49. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  50. data/test/dummy/app/controllers/application_controller.rb +6 -0
  51. data/test/dummy/app/controllers/application_controller.rb~ +5 -0
  52. data/test/dummy/app/helpers/application_helper.rb +2 -0
  53. data/test/dummy/app/models/user.rb +30 -0
  54. data/test/dummy/app/models/user.rb~ +30 -0
  55. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  56. data/test/dummy/app/views/lobby/common/_form_errors.html.haml +6 -0
  57. data/test/dummy/app/views/lobby/confirmation/new_email_token.html.haml +10 -0
  58. data/test/dummy/app/views/lobby/confirmation/registration.html.haml +15 -0
  59. data/test/dummy/app/views/lobby/confirmation/registration.html.haml~ +15 -0
  60. data/test/dummy/app/views/lobby/confirmation/resend_signup_token.html.haml +17 -0
  61. data/test/dummy/app/views/lobby/confirmation/resend_signup_token.html.haml~ +17 -0
  62. data/test/dummy/app/views/lobby/confirmation/user_email.html.haml +0 -0
  63. data/test/dummy/app/views/lobby/confirmation_mailer/new_email_request.text.haml +1 -0
  64. data/test/dummy/app/views/lobby/confirmation_mailer/registration.text.haml +1 -0
  65. data/test/dummy/app/views/lobby/confirmation_mailer/resend_signup_token.text.haml +1 -0
  66. data/test/dummy/app/views/lobby/confirmation_mailer/send_password_reset.text.haml +1 -0
  67. data/test/dummy/app/views/lobby/password_forgotten/new.html.haml +21 -0
  68. data/test/dummy/app/views/lobby/password_forgotten/new.html.haml~ +21 -0
  69. data/test/dummy/app/views/lobby/password_forgotten/order_new_password.html.haml +13 -0
  70. data/test/dummy/app/views/lobby/password_forgotten/order_new_password.html.haml~ +13 -0
  71. data/test/dummy/app/views/lobby/password_forgotten/recover_password_auth.html.haml +9 -0
  72. data/test/dummy/app/views/lobby/sessions/new.html.haml +12 -0
  73. data/test/dummy/app/views/lobby/sessions/new.html.haml~ +12 -0
  74. data/test/dummy/app/views/lobby/users/new.html.haml +20 -0
  75. data/test/dummy/app/views/lobby/users/new.html.haml~ +20 -0
  76. data/test/dummy/bin/bundle +3 -0
  77. data/test/dummy/bin/rails +4 -0
  78. data/test/dummy/bin/rake +4 -0
  79. data/test/dummy/config/app_config.yml +31 -0
  80. data/test/dummy/config/application.rb +23 -0
  81. data/test/dummy/config/boot.rb +5 -0
  82. data/test/dummy/config/database.yml +25 -0
  83. data/test/dummy/config/environment.rb +5 -0
  84. data/test/dummy/config/environments/development.rb +29 -0
  85. data/test/dummy/config/environments/production.rb +80 -0
  86. data/test/dummy/config/environments/test.rb +36 -0
  87. data/test/dummy/config/initializers/action_mailer.rb +75 -0
  88. data/test/dummy/config/initializers/action_mailer.rb~ +75 -0
  89. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  90. data/test/dummy/config/initializers/constants.rb +1 -0
  91. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  92. data/test/dummy/config/initializers/inflections.rb +16 -0
  93. data/test/dummy/config/initializers/load_app_config.rb +3 -0
  94. data/test/dummy/config/initializers/mime_types.rb +5 -0
  95. data/test/dummy/config/initializers/secret_token.rb +12 -0
  96. data/test/dummy/config/initializers/session_store.rb +3 -0
  97. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  98. data/test/dummy/config/locales/en.yml +23 -0
  99. data/test/dummy/config/routes.rb +4 -0
  100. data/test/dummy/config.ru +4 -0
  101. data/test/dummy/db/development.sqlite3 +0 -0
  102. data/test/dummy/log/development.log +10657 -0
  103. data/test/dummy/public/404.html +58 -0
  104. data/test/dummy/public/422.html +58 -0
  105. data/test/dummy/public/500.html +57 -0
  106. data/test/dummy/public/favicon.ico +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/14bc37f3a9c398f6798dd6a37b000ced +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/940a306c051fc9ecf6ca85c072fac574 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/959f475481f39907c5c22136d3ad0b02 +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/c4adbd06827a23aa54492fb7cb615529 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/c615a56268b779cf1f55f9134c8ae04e +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/e4cc9c240851fac0c22ef37d0ee2fb62 +0 -0
  113. data/test/integration/navigation_test.rb +10 -0
  114. data/test/lobby_test.rb +7 -0
  115. data/test/test_helper.rb +15 -0
  116. metadata +294 -0
@@ -0,0 +1,75 @@
1
+ # Email settings
2
+
3
+ if Rails.env == "production"
4
+ ActionMailer::Base.delivery_method = :smtp
5
+ ActionMailer::Base.raise_delivery_errors = true
6
+ ActionMailer::Base.perform_deliveries = true
7
+ ActionMailer::Base.smtp_settings = {
8
+ :address => "www.example.com",
9
+ :port => 25,
10
+ :domain => 'example.com',
11
+ :authentication => :plain,
12
+ :enable_starttls_auto => true,
13
+ :user_name => "username",
14
+ :password => "password"
15
+ }
16
+ end
17
+
18
+ if Rails.env == "staging"
19
+ ActionMailer::Base.delivery_method = :smtp
20
+ ActionMailer::Base.raise_delivery_errors = true
21
+ ActionMailer::Base.perform_deliveries = true
22
+ ActionMailer::Base.smtp_settings = {
23
+ :address => "www.example.com",
24
+ :port => 25,
25
+ :domain => 'example.com',
26
+ :authentication => :plain,
27
+ :enable_starttls_auto => true,
28
+ :user_name => "username",
29
+ :password => "password"
30
+ }
31
+ end
32
+
33
+ if Rails.env == "development"
34
+ ActionMailer::Base.delivery_method = :smtp
35
+ ActionMailer::Base.raise_delivery_errors = true
36
+ ActionMailer::Base.perform_deliveries = false
37
+ ActionMailer::Base.smtp_settings = {
38
+ :address => "www.example.com",
39
+ :port => 25,
40
+ :domain => 'example.com',
41
+ :authentication => :plain,
42
+ :enable_starttls_auto => true,
43
+ :user_name => "username",
44
+ :password => "password"
45
+ }
46
+ end
47
+
48
+ if Rails.env == "test"
49
+ ActionMailer::Base.perform_deliveries = true
50
+ ActionMailer::Base.smtp_settings = {
51
+ :openssl_verify_mode => 'none'
52
+ }
53
+ end
54
+
55
+ if ActionMailer::Base.delivery_method == :smtp and ActionMailer::Base.smtp_settings.has_key?(:pop3_auth)
56
+ class ActionMailer::Base
57
+ alias_method :base_perform_delivery_smtp, :perform_delivery_smtp
58
+ @@pop3_auth_done = nil
59
+
60
+ private
61
+
62
+ def perform_delivery_smtp(mail)
63
+ do_pop_auth if !@@pop3_auth_done or (Time.now - smtp_settings[:pop3_auth][:expires]) >= @@pop3_auth_done
64
+ base_perform_delivery_smtp(mail)
65
+ end
66
+
67
+ def do_pop_auth
68
+ require 'net/pop'
69
+ pop = Net::POP3.new(smtp_settings[:pop3_auth][:server])
70
+ pop.start(smtp_settings[:pop3_auth][:user_name], smtp_settings[:pop3_auth][:password])
71
+ @@pop3_auth_done = Time.now
72
+ pop.finish
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+ # Email settings
2
+
3
+ if Rails.env == "production"
4
+ ActionMailer::Base.delivery_method = :smtp
5
+ ActionMailer::Base.raise_delivery_errors = true
6
+ ActionMailer::Base.perform_deliveries = true
7
+ ActionMailer::Base.smtp_settings = {
8
+ :address => "wp056.webpack.hosteurope.de",
9
+ :port => 25,
10
+ :domain => 'improwiki.com',
11
+ :authentication => :plain,
12
+ :enable_starttls_auto => true,
13
+ :user_name => "wp11107305-improwiki",
14
+ :password => "haxenfuss#4"
15
+ }
16
+ end
17
+
18
+ if Rails.env == "staging"
19
+ ActionMailer::Base.delivery_method = :smtp
20
+ ActionMailer::Base.raise_delivery_errors = true
21
+ ActionMailer::Base.perform_deliveries = true
22
+ ActionMailer::Base.smtp_settings = {
23
+ :address => "wp056.webpack.hosteurope.de",
24
+ :port => 25,
25
+ :domain => 'improwiki.com',
26
+ :authentication => :plain,
27
+ :enable_starttls_auto => true,
28
+ :user_name => "wp11107305-improwiki",
29
+ :password => "haxenfuss#4"
30
+ }
31
+ end
32
+
33
+ if Rails.env == "development"
34
+ ActionMailer::Base.delivery_method = :smtp
35
+ ActionMailer::Base.raise_delivery_errors = true
36
+ ActionMailer::Base.perform_deliveries = false
37
+ ActionMailer::Base.smtp_settings = {
38
+ :address => "smtp.1und1.de",
39
+ :port => 25,
40
+ :domain => 'projekt2.wm2011.boyke.de',
41
+ :authentication => :plain,
42
+ :enable_starttls_auto => true,
43
+ :user_name => "outbox@projekt.wm2011.boyke.de",
44
+ :password => "xwm2011x"
45
+ }
46
+ end
47
+
48
+ if Rails.env == "test"
49
+ ActionMailer::Base.perform_deliveries = true
50
+ ActionMailer::Base.smtp_settings = {
51
+ :openssl_verify_mode => 'none'
52
+ }
53
+ end
54
+
55
+ if ActionMailer::Base.delivery_method == :smtp and ActionMailer::Base.smtp_settings.has_key?(:pop3_auth)
56
+ class ActionMailer::Base
57
+ alias_method :base_perform_delivery_smtp, :perform_delivery_smtp
58
+ @@pop3_auth_done = nil
59
+
60
+ private
61
+
62
+ def perform_delivery_smtp(mail)
63
+ do_pop_auth if !@@pop3_auth_done or (Time.now - smtp_settings[:pop3_auth][:expires]) >= @@pop3_auth_done
64
+ base_perform_delivery_smtp(mail)
65
+ end
66
+
67
+ def do_pop_auth
68
+ require 'net/pop'
69
+ pop = Net::POP3.new(smtp_settings[:pop3_auth][:server])
70
+ pop.start(smtp_settings[:pop3_auth][:user_name], smtp_settings[:pop3_auth][:password])
71
+ @@pop3_auth_done = Time.now
72
+ pop.finish
73
+ end
74
+ end
75
+ 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 @@
1
+ EMAIL_REGEX = /^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i
@@ -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,3 @@
1
+ YAML::ENGINE.yamler = "syck" # http://crohr.me/2011/02/23/issue-with-ruby1.9.2-yaml-parser-and-merge-keys-in-yaml-configuration-file.html
2
+ APP_CONFIG = YAML.load_file("#{Rails.root.to_s}/config/app_config.yml")[Rails.env]
3
+
@@ -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,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used 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
+ Dummy::Application.config.secret_key_base = '38d3e0a39c713763b47c729c68431b2750dca7cb140f79eba837d2f77654f9b1417ca0c8b55d80992ff9e85dcee44fa83b33934f8ccf4a7f924f567b1685a573'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Lobby::Engine => "/lobby"
4
+ end
@@ -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 Rails.application
Binary file