contour 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/CHANGELOG.rdoc +13 -0
  2. data/README.rdoc +1 -7
  3. data/Rakefile +38 -0
  4. data/{vendor → app}/assets/images/contour/addfile.png +0 -0
  5. data/{vendor → app}/assets/images/contour/arrow.png +0 -0
  6. data/{vendor → app}/assets/images/contour/blank.png +0 -0
  7. data/{vendor → app}/assets/images/contour/cas_32.png +0 -0
  8. data/{vendor → app}/assets/images/contour/cas_64.png +0 -0
  9. data/{vendor → app}/assets/images/contour/cross.png +0 -0
  10. data/{vendor → app}/assets/images/contour/delete.png +0 -0
  11. data/{vendor → app}/assets/images/contour/doc.png +0 -0
  12. data/{vendor → app}/assets/images/contour/download.png +0 -0
  13. data/{vendor → app}/assets/images/contour/edit.png +0 -0
  14. data/{vendor → app}/assets/images/contour/email.png +0 -0
  15. data/{vendor → app}/assets/images/contour/external.png +0 -0
  16. data/{vendor → app}/assets/images/contour/facebook_32.png +0 -0
  17. data/{vendor → app}/assets/images/contour/facebook_64.png +0 -0
  18. data/{vendor → app}/assets/images/contour/favorite_no.png +0 -0
  19. data/{vendor → app}/assets/images/contour/favorite_yes.png +0 -0
  20. data/{vendor → app}/assets/images/contour/feed.png +0 -0
  21. data/{vendor → app}/assets/images/contour/google_apps_32.png +0 -0
  22. data/{vendor → app}/assets/images/contour/google_apps_64.png +0 -0
  23. data/{vendor → app}/assets/images/contour/im.png +0 -0
  24. data/{vendor → app}/assets/images/contour/information.png +0 -0
  25. data/{vendor → app}/assets/images/contour/key.png +0 -0
  26. data/{vendor → app}/assets/images/contour/ldap_32.png +0 -0
  27. data/{vendor → app}/assets/images/contour/ldap_64.png +0 -0
  28. data/{vendor → app}/assets/images/contour/linkedin_32.png +0 -0
  29. data/{vendor → app}/assets/images/contour/linkedin_64.png +0 -0
  30. data/{vendor → app}/assets/images/contour/mydocuments.png +0 -0
  31. data/{vendor → app}/assets/images/contour/open.png +0 -0
  32. data/{vendor → app}/assets/images/contour/openid_32.png +0 -0
  33. data/{vendor → app}/assets/images/contour/openid_64.png +0 -0
  34. data/{vendor → app}/assets/images/contour/pdf.png +0 -0
  35. data/{vendor → app}/assets/images/contour/save.png +0 -0
  36. data/{vendor → app}/assets/images/contour/search.png +0 -0
  37. data/{vendor → app}/assets/images/contour/tag_blue.png +0 -0
  38. data/{vendor → app}/assets/images/contour/tag_green.png +0 -0
  39. data/{vendor → app}/assets/images/contour/tag_neutral.png +0 -0
  40. data/{vendor → app}/assets/images/contour/tag_red.png +0 -0
  41. data/{vendor → app}/assets/images/contour/tick.png +0 -0
  42. data/{vendor → app}/assets/images/contour/twitter_32.png +0 -0
  43. data/{vendor → app}/assets/images/contour/twitter_64.png +0 -0
  44. data/{vendor → app}/assets/images/contour/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  45. data/{vendor → app}/assets/images/contour/ui-bg_flat_55_fbec88_40x100.png +0 -0
  46. data/{vendor → app}/assets/images/contour/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  47. data/{vendor → app}/assets/images/contour/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  48. data/{vendor → app}/assets/images/contour/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  49. data/{vendor → app}/assets/images/contour/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  50. data/{vendor → app}/assets/images/contour/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  51. data/{vendor → app}/assets/images/contour/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  52. data/{vendor → app}/assets/images/contour/ui-icons_217bc0_256x240.png +0 -0
  53. data/{vendor → app}/assets/images/contour/ui-icons_2e83ff_256x240.png +0 -0
  54. data/{vendor → app}/assets/images/contour/ui-icons_469bdd_256x240.png +0 -0
  55. data/{vendor → app}/assets/images/contour/ui-icons_6da8d5_256x240.png +0 -0
  56. data/{vendor → app}/assets/images/contour/ui-icons_cd0a0a_256x240.png +0 -0
  57. data/{vendor → app}/assets/images/contour/ui-icons_d8e7f3_256x240.png +0 -0
  58. data/{vendor → app}/assets/images/contour/ui-icons_f9bd01_256x240.png +0 -0
  59. data/{vendor → app}/assets/images/contour/visited.png +0 -0
  60. data/{vendor → app}/assets/images/contour/warning.png +0 -0
  61. data/{vendor → app}/assets/images/contour/xls.png +0 -0
  62. data/{vendor → app}/assets/javascripts/contour.js +0 -0
  63. data/{vendor → app}/assets/javascripts/contour/errors.js.coffee +0 -0
  64. data/app/assets/javascripts/contour/global.js.coffee +13 -0
  65. data/app/assets/javascripts/contour/menu.js.coffee +21 -0
  66. data/{vendor → app}/assets/javascripts/contour/popup.js.coffee +0 -0
  67. data/{vendor → app}/assets/javascripts/external/exporting-2.1.9.src.js +0 -0
  68. data/{vendor → app}/assets/javascripts/external/highcharts-2.1.9.src.js +0 -0
  69. data/{vendor → app}/assets/javascripts/external/jquery-ui-1.8.10.custom.min.js +0 -0
  70. data/{vendor → app}/assets/javascripts/external/waypoints.js +0 -0
  71. data/{vendor → app}/assets/stylesheets/bluetrip-screen.css +0 -0
  72. data/{vendor → app}/assets/stylesheets/contour.css +0 -0
  73. data/{vendor → app}/assets/stylesheets/contour/authentication.css +0 -0
  74. data/{vendor → app}/assets/stylesheets/contour/global.css +2 -1
  75. data/{vendor → app}/assets/stylesheets/contour/header.css +0 -0
  76. data/app/assets/stylesheets/contour/menu.css +109 -0
  77. data/{vendor → app}/assets/stylesheets/contour/message.css +15 -3
  78. data/{vendor → app}/assets/stylesheets/contour/popup.css +0 -0
  79. data/{vendor → app}/assets/stylesheets/jquery-ui-1.8.10.custom.css +0 -0
  80. data/app/models/authentication.rb +11 -0
  81. data/app/views/contour/authentications/_menu.html.erb +26 -0
  82. data/app/views/contour/layouts/_menu.html.erb +15 -21
  83. data/app/views/contour/layouts/application.html.erb +2 -4
  84. data/app/views/contour/sessions/new.html.erb +2 -2
  85. data/config/routes.rb +16 -0
  86. data/contour.gemspec +15 -11
  87. data/lib/contour.rb +10 -6
  88. data/lib/contour/engine.rb +0 -1
  89. data/lib/contour/version.rb +2 -2
  90. data/lib/generators/contour/install_generator.rb +5 -4
  91. data/lib/generators/templates/contour.rb +10 -6
  92. data/test/contour_test.rb +7 -0
  93. data/test/dummy/Rakefile +7 -0
  94. data/test/dummy/app/assets/javascripts/application.js +8 -0
  95. data/test/dummy/app/assets/stylesheets/application.css +8 -0
  96. data/test/dummy/app/controllers/application_controller.rb +3 -0
  97. data/test/dummy/app/helpers/application_helper.rb +2 -0
  98. data/test/dummy/app/models/user.rb +45 -0
  99. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  100. data/test/dummy/config.ru +4 -0
  101. data/test/dummy/config/application.rb +45 -0
  102. data/test/dummy/config/boot.rb +10 -0
  103. data/test/dummy/config/database.yml +37 -0
  104. data/test/dummy/config/environment.rb +5 -0
  105. data/test/dummy/config/environments/development.rb +30 -0
  106. data/test/dummy/config/environments/production.rb +60 -0
  107. data/test/dummy/config/environments/test.rb +39 -0
  108. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  109. data/test/dummy/config/initializers/devise.rb +153 -0
  110. data/test/dummy/config/initializers/inflections.rb +10 -0
  111. data/test/dummy/config/initializers/mime_types.rb +5 -0
  112. data/test/dummy/config/initializers/omniauth.rb +22 -0
  113. data/test/dummy/config/initializers/secret_token.rb +7 -0
  114. data/test/dummy/config/initializers/session_store.rb +8 -0
  115. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  116. data/test/dummy/config/locales/en.yml +5 -0
  117. data/test/dummy/config/routes.rb +58 -0
  118. data/test/dummy/db/migrate/20111203203123_create_users.rb +26 -0
  119. data/test/dummy/db/migrate/20111203203307_create_authentications.rb +11 -0
  120. data/test/dummy/db/schema.rb +45 -0
  121. data/test/dummy/public/404.html +26 -0
  122. data/test/dummy/public/422.html +26 -0
  123. data/test/dummy/public/500.html +26 -0
  124. data/test/dummy/public/favicon.ico +0 -0
  125. data/test/dummy/script/rails +6 -0
  126. data/test/fixtures/authentications.yml +14 -9
  127. data/test/fixtures/users.yml +70 -0
  128. data/test/functional/authentications_controller_test.rb +2 -2
  129. data/test/functional/registrations_controller_test.rb +9 -9
  130. data/test/integration/navigation_test.rb +8 -0
  131. data/test/test_helper.rb +52 -0
  132. data/test/unit/authentication_test.rb +6 -3
  133. data/test/unit/user_test.rb +13 -0
  134. metadata +186 -96
  135. data/.gitignore +0 -7
  136. data/.rvmrc +0 -1
  137. data/lib/contour/engine/routes.rb +0 -10
  138. data/test/unit/helpers/registrations_helper_test.rb +0 -4
  139. data/vendor/assets/javascripts/contour/global.js.coffee +0 -38
  140. data/vendor/assets/javascripts/contour/menu.js.coffee +0 -6
  141. data/vendor/assets/stylesheets/contour/menu.css +0 -77
@@ -0,0 +1,60 @@
1
+ Dummy::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
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Use a different logger for distributed setups
37
+ # config.logger = SyslogLogger.new
38
+
39
+ # Use a different cache store in production
40
+ # config.cache_store = :mem_cache_store
41
+
42
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
43
+ # config.action_controller.asset_host = "http://assets.example.com"
44
+
45
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
46
+ # config.assets.precompile += %w( search.js )
47
+
48
+ # Disable delivery errors, bad email addresses will be ignored
49
+ # config.action_mailer.raise_delivery_errors = false
50
+
51
+ # Enable threaded mode
52
+ # config.threadsafe!
53
+
54
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
55
+ # the I18n.default_locale when a translation can not be found)
56
+ config.i18n.fallbacks = true
57
+
58
+ # Send deprecation notices to registered listeners
59
+ config.active_support.deprecation = :notify
60
+ end
@@ -0,0 +1,39 @@
1
+ Dummy::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
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
33
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # like if you have constraints or database-specific column types
35
+ # config.active_record.schema_format = :sql
36
+
37
+ # Print deprecation notices to the stderr
38
+ config.active_support.deprecation = :stderr
39
+ 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,153 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth. The first
2
+ # four configuration values can also be set straight in your models.
3
+ Devise.setup do |config|
4
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in DeviseMailer.
6
+ config.mailer_sender = "please-change-me@config-initializers-devise.com"
7
+
8
+ # Configure the class responsible to send e-mails.
9
+ # config.mailer = "Devise::Mailer"
10
+
11
+ # ==> ORM configuration
12
+ # Load and configure the ORM. Supports :active_record (default) and
13
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
14
+ # available as additional gems.
15
+ require 'devise/orm/active_record'
16
+
17
+ # ==> Configuration for any authentication mechanism
18
+ # Configure which keys are used when authenticating an user. By default is
19
+ # just :email. You can configure it to use [:username, :subdomain], so for
20
+ # authenticating an user, both parameters are required. Remember that those
21
+ # parameters are used only when authenticating and not when retrieving from
22
+ # session. If you need permissions, you should implement that in a before filter.
23
+ # config.authentication_keys = [ :email ]
24
+
25
+ # Tell if authentication through request.params is enabled. True by default.
26
+ # config.params_authenticatable = true
27
+
28
+ # Tell if authentication through HTTP Basic Auth is enabled. True by default.
29
+ # config.http_authenticatable = true
30
+
31
+ # Set this to true to use Basic Auth for AJAX requests. True by default.
32
+ # config.http_authenticatable_on_xhr = true
33
+
34
+ # The realm used in Http Basic Authentication
35
+ # config.http_authentication_realm = "Application"
36
+
37
+ # ==> Configuration for :database_authenticatable
38
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
39
+ # using other encryptors, it sets how many times you want the password re-encrypted.
40
+ config.stretches = 10
41
+
42
+ # Define which will be the encryption algorithm. Devise also supports encryptors
43
+ # from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
44
+ # you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
45
+ # (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
46
+ config.encryptor = :bcrypt
47
+
48
+ # Setup a pepper to generate the encrypted password.
49
+ config.pepper = "d142367154e5beacca404b1a6a4f8bc52c6fdcfa3ccc3cf8eb49f3458a688ee6ac3b9fae488432a3bfca863b8a90008368a9f3a3dfbe5a962e64b6ab8f3a3a1a"
50
+
51
+ # ==> Configuration for :confirmable
52
+ # The time you want to give your user to confirm his account. During this time
53
+ # he will be able to access your application without confirming. Default is nil.
54
+ # When confirm_within is zero, the user won't be able to sign in without confirming.
55
+ # You can use this to let your user access some features of your application
56
+ # without confirming the account, but blocking it after a certain period
57
+ # (ie 2 days).
58
+ # config.confirm_within = 2.days
59
+
60
+ # ==> Configuration for :rememberable
61
+ # The time the user will be remembered without asking for credentials again.
62
+ # config.remember_for = 2.weeks
63
+
64
+ # If true, a valid remember token can be re-used between multiple browsers.
65
+ # config.remember_across_browsers = true
66
+
67
+ # If true, extends the user's remember period when remembered via cookie.
68
+ # config.extend_remember_period = false
69
+
70
+ # ==> Configuration for :validatable
71
+ # Range for password length
72
+ # config.password_length = 6..20
73
+
74
+ # Regex to use to validate the email address
75
+ # config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
76
+
77
+ # ==> Configuration for :timeoutable
78
+ # The time you want to timeout the user session without activity. After this
79
+ # time the user will be asked for credentials again.
80
+ config.timeout_in = 8.hours
81
+
82
+ # ==> Configuration for :lockable
83
+ # Defines which strategy will be used to lock an account.
84
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
85
+ # :none = No lock strategy. You should handle locking by yourself.
86
+ # config.lock_strategy = :failed_attempts
87
+
88
+ # Defines which strategy will be used to unlock an account.
89
+ # :email = Sends an unlock link to the user email
90
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
91
+ # :both = Enables both strategies
92
+ # :none = No unlock strategy. You should handle unlocking by yourself.
93
+ # config.unlock_strategy = :both
94
+
95
+ # Number of authentication tries before locking an account if lock_strategy
96
+ # is failed attempts.
97
+ # config.maximum_attempts = 20
98
+
99
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
100
+ # config.unlock_in = 1.hour
101
+
102
+ # ==> Configuration for :token_authenticatable
103
+ # Defines name of the authentication token params key
104
+ # config.token_authentication_key = :auth_token
105
+
106
+ # ==> Scopes configuration
107
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
108
+ # "users/sessions/new". It's turned off by default because it's slower if you
109
+ # are using only default views.
110
+ # config.scoped_views = true
111
+
112
+ # Configure the default scope given to Warden. By default it's the first
113
+ # devise role declared in your routes.
114
+ # config.default_scope = :user
115
+
116
+ # Configure sign_out behavior.
117
+ # By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
118
+ # In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
119
+ # config.sign_out_all_scopes = false
120
+
121
+ # ==> Navigation configuration
122
+ # Lists the formats that should be treated as navigational. Formats like
123
+ # :html, should redirect to the sign in page when the user does not have
124
+ # access, but formats like :xml or :json, should return 401.
125
+ # If you have any extra navigational formats, like :iphone or :mobile, you
126
+ # should add them to the navigational formats lists. Default is [:html]
127
+ # config.navigational_formats = [:html, :iphone]
128
+
129
+ # ==> Warden configuration
130
+ # If you want to use other strategies, that are not (yet) supported by Devise,
131
+ # you can configure them inside the config.warden block. The example below
132
+ # allows you to setup OAuth, using http://github.com/roman/warden_oauth
133
+ #
134
+ # config.warden do |manager|
135
+ # manager.oauth(:twitter) do |twitter|
136
+ # twitter.consumer_secret = <YOUR CONSUMER SECRET>
137
+ # twitter.consumer_key = <YOUR CONSUMER KEY>
138
+ # twitter.options :site => 'http://twitter.com'
139
+ # end
140
+ # manager.default_strategies(:scope => :user).unshift :twitter_oauth
141
+ # end
142
+ end
143
+
144
+ module Devise
145
+ class FailureApp < ActionController::Metal
146
+ def http_auth
147
+ self.status = 403
148
+ self.headers["WWW-Authenticate"] = %(Basic realm=#{Devise.http_authentication_realm.inspect})
149
+ self.content_type = request.format.to_s
150
+ self.response_body = http_auth_body
151
+ end
152
+ end
153
+ end
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # 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,22 @@
1
+ require 'openid/store/filesystem'
2
+ Rails.application.config.middleware.use OmniAuth::Builder do
3
+ # provider :google_apps, OpenID::Store::Filesystem.new('/tmp')
4
+ # provider :twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
5
+ # provider :facebook, 'APP_ID', 'APP_SECRET'
6
+ # provider :linked_in, 'CONSUMER_KEY', 'CONSUMER_SECRET'
7
+ # provider :open_id, OpenID::Store::Filesystem.new('/tmp')
8
+ # provider :CAS, :cas_server => 'https://www.example.com/cas'
9
+ # provider :LDAP, :host => 'ldap.example.com', :port => 389, :method => :simple, :base => 'cn=users,dc=example,dc=com', :uid => 'sAMAccountName', :try_sasl => true, :sasl_mechanisms => "GSS-SPNEGO", :domain => ''
10
+ end
11
+
12
+ # This list will show the first choice as the default, and the rest as potential secondary login methods.
13
+ PROVIDERS = [:google_apps, :twitter, :facebook, :linked_in, :open_id, :CAS, :LDAP]
14
+
15
+ # LDAP
16
+ # :port (required) - The LDAP server port.
17
+ # :method (required) - May be :plain, :ssl, or :tls.
18
+ # :base (required) - The distinguished name (DN) for your organization; all users should be searchable under this base.
19
+ # :uid (required) - The LDAP attribute name for the user name in the login form. Typically AD would be 'sAMAccountName' or 'UniquePersonalIdentifier', while OpenLDAP is 'uid'. You can also use 'dn' for the user to put in the dn in the login form (but usually is too long for user to remember or know).
20
+ # :try_sasl - Try to use SASL connection to server.
21
+ # :sasl_mechanisms - Mechanisms supported are 'DIGEST-MD5' and 'GSS-SPNEGO'
22
+ # :domain - Enter to keep users from having to enter the LDAP domain, usually in the form domain\username. Backslash will be appended automatically.
@@ -0,0 +1,7 @@
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
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = '207c7644d0ea643a0ed5a78a2af90dae9da2caf19c96aaa3573bfa5e656c313af6374a71983d95155a4f1bdcfebf22b1bc495790904d81bb20e41392b0b3e97b'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
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
@@ -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]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id(.:format)))'
58
+ end
@@ -0,0 +1,26 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:users) do |t|
4
+ t.string :first_name
5
+ t.string :last_name
6
+ t.boolean :deleted, :null => false, :default => false
7
+
8
+ t.database_authenticatable :null => false
9
+ t.recoverable
10
+ t.rememberable
11
+ t.trackable
12
+
13
+ # t.confirmable
14
+ # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
15
+ # t.token_authenticatable
16
+
17
+
18
+ t.timestamps
19
+ end
20
+
21
+ add_index :users, :email, :unique => true
22
+ add_index :users, :reset_password_token, :unique => true
23
+ # add_index :users, :confirmation_token, :unique => true
24
+ # add_index :users, :unlock_token, :unique => true
25
+ end
26
+ end
@@ -0,0 +1,11 @@
1
+ class CreateAuthentications < ActiveRecord::Migration
2
+ def change
3
+ create_table :authentications do |t|
4
+ t.integer :user_id
5
+ t.string :provider
6
+ t.string :uid
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,45 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20111203203307) do
15
+
16
+ create_table "authentications", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.string "provider"
19
+ t.string "uid"
20
+ t.datetime "created_at"
21
+ t.datetime "updated_at"
22
+ end
23
+
24
+ create_table "users", :force => true do |t|
25
+ t.string "first_name"
26
+ t.string "last_name"
27
+ t.boolean "deleted", :default => false, :null => false
28
+ t.string "email", :default => "", :null => false
29
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
30
+ t.string "reset_password_token"
31
+ t.string "remember_token"
32
+ t.datetime "remember_created_at"
33
+ t.integer "sign_in_count", :default => 0
34
+ t.datetime "current_sign_in_at"
35
+ t.datetime "last_sign_in_at"
36
+ t.string "current_sign_in_ip"
37
+ t.string "last_sign_in_ip"
38
+ t.datetime "created_at"
39
+ t.datetime "updated_at"
40
+ end
41
+
42
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
43
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
44
+
45
+ end