tft_rails_dbc 0.1

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 (159) hide show
  1. data/.gitignore +6 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +8 -0
  4. data/LICENSE +57 -0
  5. data/README.md +90 -0
  6. data/Rakefile +25 -0
  7. data/lib/generators/chapter07/begin/USAGE +27 -0
  8. data/lib/generators/chapter07/begin/begin_generator.rb +39 -0
  9. data/lib/generators/chapter07/begin/instructions.md +74 -0
  10. data/lib/generators/chapter07/begin/templates/app/controllers/application_controller.rb +8 -0
  11. data/lib/generators/chapter07/begin/templates/app/controllers/pages_controller.rb +11 -0
  12. data/lib/generators/chapter07/begin/templates/app/controllers/users_controller.rb +3 -0
  13. data/lib/generators/chapter07/begin/templates/app/helpers/application_helper.rb +12 -0
  14. data/lib/generators/chapter07/begin/templates/app/helpers/pages_helper.rb +2 -0
  15. data/lib/generators/chapter07/begin/templates/app/helpers/users_helper.rb +7 -0
  16. data/lib/generators/chapter07/begin/templates/app/models/user.rb +9 -0
  17. data/lib/generators/chapter07/begin/templates/app/views/layouts/_footer.html.erb +9 -0
  18. data/lib/generators/chapter07/begin/templates/app/views/layouts/_header.html.erb +10 -0
  19. data/lib/generators/chapter07/begin/templates/app/views/layouts/_stylesheets.html.erb +7 -0
  20. data/lib/generators/chapter07/begin/templates/app/views/layouts/application.html.erb +17 -0
  21. data/lib/generators/chapter07/begin/templates/app/views/pages/about.html.erb +7 -0
  22. data/lib/generators/chapter07/begin/templates/app/views/pages/contact.html.erb +5 -0
  23. data/lib/generators/chapter07/begin/templates/app/views/pages/home.html.erb +7 -0
  24. data/lib/generators/chapter07/begin/templates/app/views/users/show.html.erb +15 -0
  25. data/lib/generators/chapter07/begin/templates/config/initializers/devise.rb +194 -0
  26. data/lib/generators/chapter07/begin/templates/config/locales/devise.en.yml +50 -0
  27. data/lib/generators/chapter07/begin/templates/config/routes.rb.tt +17 -0
  28. data/lib/generators/chapter07/begin/templates/db/migrate/20110608224650_devise_create_users.rb +29 -0
  29. data/lib/generators/chapter07/begin/templates/db/schema.rb +34 -0
  30. data/lib/generators/chapter07/begin/templates/public/images/logo.png +0 -0
  31. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/ie.css +36 -0
  32. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
  33. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
  34. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
  35. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/buttons/readme.txt +32 -0
  36. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/buttons/screen.css +97 -0
  37. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +14 -0
  38. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/fancy-type/screen.css +71 -0
  39. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
  40. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
  41. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
  42. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
  43. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
  44. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/lock.png +0 -0
  45. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  46. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
  47. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
  48. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/readme.txt +18 -0
  49. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/link-icons/screen.css +42 -0
  50. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/rtl/readme.txt +10 -0
  51. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/plugins/rtl/screen.css +110 -0
  52. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/print.css +29 -0
  53. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/screen.css +265 -0
  54. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/forms.css +82 -0
  55. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/grid.css +280 -0
  56. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/grid.png +0 -0
  57. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/ie.css +79 -0
  58. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/print.css +92 -0
  59. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/reset.css +65 -0
  60. data/lib/generators/chapter07/begin/templates/public/stylesheets/blueprint/src/typography.css +123 -0
  61. data/lib/generators/chapter07/begin/templates/public/stylesheets/custom.css +137 -0
  62. data/lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb +48 -0
  63. data/lib/generators/chapter07/begin/templates/spec/controllers/users_controller_07_spec.rb +38 -0
  64. data/lib/generators/chapter07/begin/templates/spec/factories.rb +9 -0
  65. data/lib/generators/chapter07/begin/templates/spec/models/user_07_spec.rb +38 -0
  66. data/lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb +44 -0
  67. data/lib/generators/chapter07/begin/templates/spec/spec_helper.rb +39 -0
  68. data/lib/generators/chapter07/solutions/USAGE +21 -0
  69. data/lib/generators/chapter07/solutions/solutions_generator.rb +23 -0
  70. data/lib/generators/chapter07/solutions/templates/app/controllers/pages_controller.rb +18 -0
  71. data/lib/generators/chapter07/solutions/templates/app/controllers/users_controller.rb +8 -0
  72. data/lib/generators/chapter07/solutions/templates/app/models/user.rb +11 -0
  73. data/lib/generators/chapter07/solutions/templates/app/views/layouts/_footer.html.erb +10 -0
  74. data/lib/generators/chapter07/solutions/templates/app/views/layouts/_header.html.erb +11 -0
  75. data/lib/generators/chapter07/solutions/templates/app/views/pages/help.html.erb +4 -0
  76. data/lib/generators/chapter07/solutions/templates/app/views/pages/home.html.erb +7 -0
  77. data/lib/generators/chapter07/solutions/templates/app/views/users/show.html.erb +15 -0
  78. data/lib/generators/chapter08_09/begin/USAGE +24 -0
  79. data/lib/generators/chapter08_09/begin/begin_generator.rb +29 -0
  80. data/lib/generators/chapter08_09/begin/instructions.md +65 -0
  81. data/lib/generators/chapter08_09/begin/snippets/custom.css +49 -0
  82. data/lib/generators/chapter08_09/begin/templates/spec/controllers/devise/registrations_controller_08_spec.rb +83 -0
  83. data/lib/generators/chapter08_09/begin/templates/spec/requests/layout_links_09_spec.rb +35 -0
  84. data/lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb +36 -0
  85. data/lib/generators/chapter08_09/solutions/USAGE +18 -0
  86. data/lib/generators/chapter08_09/solutions/solutions_generator.rb +12 -0
  87. data/lib/generators/chapter08_09/solutions/templates/app/helpers/application_helper.rb +16 -0
  88. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/passwords/edit.html.erb +16 -0
  89. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/passwords/new.html.erb +12 -0
  90. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/registrations/_fields.html.erb +16 -0
  91. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/registrations/edit.html.erb +28 -0
  92. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/registrations/new.html.erb +13 -0
  93. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/sessions/new.html.erb +17 -0
  94. data/lib/generators/chapter08_09/solutions/templates/app/views/devise/shared/_links.erb +25 -0
  95. data/lib/generators/chapter08_09/solutions/templates/app/views/layouts/_header.html.erb +19 -0
  96. data/lib/generators/chapter08_09/solutions/templates/app/views/layouts/application.html.erb +20 -0
  97. data/lib/generators/chapter10/begin/USAGE +24 -0
  98. data/lib/generators/chapter10/begin/begin_generator.rb +41 -0
  99. data/lib/generators/chapter10/begin/instructions.md +47 -0
  100. data/lib/generators/chapter10/begin/snippets/custom.css +12 -0
  101. data/lib/generators/chapter10/begin/snippets/factories.rb +10 -0
  102. data/lib/generators/chapter10/begin/templates/app/views/layouts/application.html.erb +21 -0
  103. data/lib/generators/chapter10/begin/templates/lib/tasks/sample_data.rake +24 -0
  104. data/lib/generators/chapter10/begin/templates/spec/controllers/users_controller_10_spec.rb +110 -0
  105. data/lib/generators/chapter10/begin/templates/spec/models/user_10_spec.rb +24 -0
  106. data/lib/generators/chapter10/solutions/USAGE +18 -0
  107. data/lib/generators/chapter10/solutions/snippets/migration_add_admin_to_users.rb +9 -0
  108. data/lib/generators/chapter10/solutions/solutions_generator.rb +32 -0
  109. data/lib/generators/chapter10/solutions/templates/app/controllers/users_controller.rb +28 -0
  110. data/lib/generators/chapter10/solutions/templates/app/views/users/_user.html.erb +8 -0
  111. data/lib/generators/chapter10/solutions/templates/app/views/users/index.html.erb +9 -0
  112. data/lib/generators/chapter11_1/begin/USAGE +24 -0
  113. data/lib/generators/chapter11_1/begin/begin_generator.rb +24 -0
  114. data/lib/generators/chapter11_1/begin/instructions.md +39 -0
  115. data/lib/generators/chapter11_1/begin/templates/lib/tasks/sample_data.rake +29 -0
  116. data/lib/generators/chapter11_1/begin/templates/spec/models/microposts_11_1_spec.rb +45 -0
  117. data/lib/generators/chapter11_1/begin/templates/spec/models/user_11_1_spec.rb +30 -0
  118. data/lib/generators/chapter11_1/solutions/USAGE +18 -0
  119. data/lib/generators/chapter11_1/solutions/snippets/migration_create_microposts.rb +17 -0
  120. data/lib/generators/chapter11_1/solutions/solutions_generator.rb +25 -0
  121. data/lib/generators/chapter11_1/solutions/templates/app/models/micropost.rb +10 -0
  122. data/lib/generators/chapter11_1/solutions/templates/app/models/user.rb +14 -0
  123. data/lib/generators/chapter11_1/solutions/templates/spec/factories.rb +16 -0
  124. data/lib/generators/chapter11_2/begin/USAGE +24 -0
  125. data/lib/generators/chapter11_2/begin/begin_generator.rb +30 -0
  126. data/lib/generators/chapter11_2/begin/instructions.md +35 -0
  127. data/lib/generators/chapter11_2/begin/snippets/custom.css +59 -0
  128. data/lib/generators/chapter11_2/begin/templates/app/views/users/show.html.erb +23 -0
  129. data/lib/generators/chapter11_2/begin/templates/spec/controllers/users_controller_11_2_spec.rb +31 -0
  130. data/lib/generators/chapter11_2/solutions/USAGE +18 -0
  131. data/lib/generators/chapter11_2/solutions/solutions_generator.rb +12 -0
  132. data/lib/generators/chapter11_2/solutions/templates/app/controllers/users_controller.rb +29 -0
  133. data/lib/generators/chapter11_2/solutions/templates/app/views/microposts/_micropost.html.erb +8 -0
  134. data/lib/generators/chapter11_2/solutions/templates/app/views/users/show.html.erb +23 -0
  135. data/lib/generators/chapter11_3/begin/USAGE +24 -0
  136. data/lib/generators/chapter11_3/begin/begin_generator.rb +24 -0
  137. data/lib/generators/chapter11_3/begin/instructions.md +80 -0
  138. data/lib/generators/chapter11_3/begin/templates/app/views/pages/home.html.erb +24 -0
  139. data/lib/generators/chapter11_3/begin/templates/app/views/shared/_feed.html.erb +6 -0
  140. data/lib/generators/chapter11_3/begin/templates/app/views/shared/_feed_item.html.erb +14 -0
  141. data/lib/generators/chapter11_3/begin/templates/app/views/shared/_micropost_form.html.erb +9 -0
  142. data/lib/generators/chapter11_3/begin/templates/app/views/shared/_user_info.html.erb +11 -0
  143. data/lib/generators/chapter11_3/begin/templates/spec/controllers/microposts_controllers_11_3_spec.rb +103 -0
  144. data/lib/generators/chapter11_3/begin/templates/spec/controllers/pages_controller_11_3_spec.rb +14 -0
  145. data/lib/generators/chapter11_3/begin/templates/spec/models/user_11_3_spec.rb +31 -0
  146. data/lib/generators/chapter11_3/begin/templates/spec/requests/micropost_11_3_spec.rb +41 -0
  147. data/lib/generators/chapter11_3/solutions/USAGE +18 -0
  148. data/lib/generators/chapter11_3/solutions/solutions_generator.rb +30 -0
  149. data/lib/generators/chapter11_3/solutions/templates/app/controllers/microposts_controller.rb +20 -0
  150. data/lib/generators/chapter11_3/solutions/templates/app/controllers/pages_controller.rb +22 -0
  151. data/lib/generators/chapter11_3/solutions/templates/app/views/microposts/_micropost.html.erb +15 -0
  152. data/lib/generators/chapter11_3/solutions/templates/app/views/pages/home.html.erb +24 -0
  153. data/lib/generators/chapter11_3/solutions/templates/app/views/shared/_error_messages.html.erb +13 -0
  154. data/lib/generators/chapter11_3/solutions/templates/app/views/shared/_feed.html.erb +6 -0
  155. data/lib/generators/chapter11_3/solutions/templates/app/views/shared/_feed_item.html.erb +21 -0
  156. data/lib/generators/chapter11_3/solutions/templates/app/views/shared/_micropost_form.html.erb +9 -0
  157. data/lib/generators/chapter11_3/solutions/templates/app/views/shared/_user_info.html.erb +11 -0
  158. data/lib/tft_rails.rb +2 -0
  159. metadata +217 -0
@@ -0,0 +1,194 @@
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-at-config-initializers-devise@example.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 a user. The default is
19
+ # just :email. You can configure it to use [:username, :subdomain], so for
20
+ # authenticating a 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
+ # You can also supply a hash where the value is a boolean determining whether
24
+ # or not authentication should be aborted when the value is not present.
25
+ # config.authentication_keys = [ :email ]
26
+
27
+ # Configure parameters from the request object used for authentication. Each entry
28
+ # given should be a request method and it will automatically be passed to the
29
+ # find_for_authentication method and considered in your model lookup. For instance,
30
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
31
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
32
+ # config.request_keys = []
33
+
34
+ # Configure which authentication keys should be case-insensitive.
35
+ # These keys will be downcased upon creating or modifying a user and when used
36
+ # to authenticate or find a user. Default is :email.
37
+ config.case_insensitive_keys = [ :email ]
38
+
39
+ # Tell if authentication through request.params is enabled. True by default.
40
+ # config.params_authenticatable = true
41
+
42
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
43
+ # config.http_authenticatable = false
44
+
45
+ # If http headers should be returned for AJAX requests. True by default.
46
+ # config.http_authenticatable_on_xhr = true
47
+
48
+ # The realm used in Http Basic Authentication. "Application" by default.
49
+ # config.http_authentication_realm = "Application"
50
+
51
+ # ==> Configuration for :database_authenticatable
52
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
53
+ # using other encryptors, it sets how many times you want the password re-encrypted.
54
+ config.stretches = 10
55
+
56
+ # Setup a pepper to generate the encrypted password.
57
+ # config.pepper = "2453d31d04ee354f4838a3e87b74ef2e12bd6ece8631c00a9b9b0e75f4fcbc05627e4e27751b10f1be93aa4994820513c105ad64790741141c354660e49de2ed"
58
+
59
+ # ==> Configuration for :confirmable
60
+ # The time you want to give your user to confirm his account. During this time
61
+ # he will be able to access your application without confirming. Default is 0.days
62
+ # When confirm_within is zero, the user won't be able to sign in without confirming.
63
+ # You can use this to let your user access some features of your application
64
+ # without confirming the account, but blocking it after a certain period
65
+ # (ie 2 days).
66
+ # config.confirm_within = 2.days
67
+
68
+ # Defines which key will be used when confirming an account
69
+ # config.confirmation_keys = [ :email ]
70
+
71
+ # ==> Configuration for :rememberable
72
+ # The time the user will be remembered without asking for credentials again.
73
+ # config.remember_for = 2.weeks
74
+
75
+ # If true, a valid remember token can be re-used between multiple browsers.
76
+ # config.remember_across_browsers = true
77
+
78
+ # If true, extends the user's remember period when remembered via cookie.
79
+ # config.extend_remember_period = false
80
+
81
+ # If true, uses the password salt as remember token. This should be turned
82
+ # to false if you are not using database authenticatable.
83
+ config.use_salt_as_remember_token = true
84
+
85
+ # Options to be passed to the created cookie. For instance, you can set
86
+ # :secure => true in order to force SSL only cookies.
87
+ # config.cookie_options = {}
88
+
89
+ # ==> Configuration for :validatable
90
+ # Range for password length. Default is 6..128.
91
+ # config.password_length = 6..128
92
+
93
+ # Regex to use to validate the email address
94
+ # config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
95
+
96
+ # ==> Configuration for :timeoutable
97
+ # The time you want to timeout the user session without activity. After this
98
+ # time the user will be asked for credentials again. Default is 30 minutes.
99
+ # config.timeout_in = 30.minutes
100
+
101
+ # ==> Configuration for :lockable
102
+ # Defines which strategy will be used to lock an account.
103
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
104
+ # :none = No lock strategy. You should handle locking by yourself.
105
+ # config.lock_strategy = :failed_attempts
106
+
107
+ # Defines which key will be used when locking and unlocking an account
108
+ # config.unlock_keys = [ :email ]
109
+
110
+ # Defines which strategy will be used to unlock an account.
111
+ # :email = Sends an unlock link to the user email
112
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
113
+ # :both = Enables both strategies
114
+ # :none = No unlock strategy. You should handle unlocking by yourself.
115
+ # config.unlock_strategy = :both
116
+
117
+ # Number of authentication tries before locking an account if lock_strategy
118
+ # is failed attempts.
119
+ # config.maximum_attempts = 20
120
+
121
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
122
+ # config.unlock_in = 1.hour
123
+
124
+ # ==> Configuration for :recoverable
125
+ #
126
+ # Defines which key will be used when recovering the password for an account
127
+ # config.reset_password_keys = [ :email ]
128
+
129
+ # Time interval you can reset your password with a reset password key.
130
+ # Don't put a too small interval or your users won't have the time to
131
+ # change their passwords.
132
+ config.reset_password_within = 2.hours
133
+
134
+ # ==> Configuration for :encryptable
135
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
136
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
137
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
138
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
139
+ # REST_AUTH_SITE_KEY to pepper)
140
+ # config.encryptor = :sha512
141
+
142
+ # ==> Configuration for :token_authenticatable
143
+ # Defines name of the authentication token params key
144
+ # config.token_authentication_key = :auth_token
145
+
146
+ # If true, authentication through token does not store user in session and needs
147
+ # to be supplied on each request. Useful if you are using the token as API token.
148
+ # config.stateless_token = false
149
+
150
+ # ==> Scopes configuration
151
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
152
+ # "users/sessions/new". It's turned off by default because it's slower if you
153
+ # are using only default views.
154
+ # config.scoped_views = false
155
+
156
+ # Configure the default scope given to Warden. By default it's the first
157
+ # devise role declared in your routes (usually :user).
158
+ # config.default_scope = :user
159
+
160
+ # Configure sign_out behavior.
161
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
162
+ # The default is true, which means any logout action will sign out all active scopes.
163
+ # config.sign_out_all_scopes = true
164
+
165
+ # ==> Navigation configuration
166
+ # Lists the formats that should be treated as navigational. Formats like
167
+ # :html, should redirect to the sign in page when the user does not have
168
+ # access, but formats like :xml or :json, should return 401.
169
+ #
170
+ # If you have any extra navigational formats, like :iphone or :mobile, you
171
+ # should add them to the navigational formats lists.
172
+ #
173
+ # The :"*/*" and "*/*" formats below is required to match Internet
174
+ # Explorer requests.
175
+ # config.navigational_formats = [:"*/*", "*/*", :html]
176
+
177
+ # The default HTTP method used to sign out a resource. Default is :get.
178
+ # config.sign_out_via = :get
179
+
180
+ # ==> OmniAuth
181
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
182
+ # up on your models and hooks.
183
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
184
+
185
+ # ==> Warden configuration
186
+ # If you want to use other strategies, that are not supported by Devise, or
187
+ # change the failure app, you can configure them inside the config.warden block.
188
+ #
189
+ # config.warden do |manager|
190
+ # manager.failure_app = AnotherApp
191
+ # manager.intercept_401 = false
192
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
193
+ # end
194
+ end
@@ -0,0 +1,50 @@
1
+ # Additional translations at http://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ errors:
5
+ messages:
6
+ expired: "has expired, please request a new one"
7
+ not_found: "not found"
8
+ already_confirmed: "was already confirmed, please try signing in"
9
+ not_locked: "was not locked"
10
+ not_saved:
11
+ one: "1 error prohibited this %{resource} from being saved:"
12
+ other: "%{count} errors prohibited this %{resource} from being saved:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: 'You are already signed in.'
17
+ unauthenticated: 'You need to sign in or sign up before continuing.'
18
+ unconfirmed: 'You have to confirm your account before continuing.'
19
+ locked: 'Your account is locked.'
20
+ invalid: 'Invalid email or password.'
21
+ invalid_token: 'Invalid authentication token.'
22
+ timeout: 'Your session expired, please sign in again to continue.'
23
+ inactive: 'Your account was not activated yet.'
24
+ sessions:
25
+ signed_in: 'Signed in successfully.'
26
+ signed_out: 'Signed out successfully.'
27
+ passwords:
28
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
+ updated: 'Your password was changed successfully. You are now signed in.'
30
+ confirmations:
31
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
32
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
33
+ registrations:
34
+ signed_up: 'Welcome! You have signed up successfully.'
35
+ inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
36
+ updated: 'You updated your account successfully.'
37
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
38
+ unlocks:
39
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
40
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
41
+ omniauth_callbacks:
42
+ success: 'Successfully authorized from %{kind} account.'
43
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
44
+ mailer:
45
+ confirmation_instructions:
46
+ subject: 'Confirmation instructions'
47
+ reset_password_instructions:
48
+ subject: 'Reset password instructions'
49
+ unlock_instructions:
50
+ subject: 'Unlock Instructions'
@@ -0,0 +1,17 @@
1
+ <%= Rails.application.class.parent_name %>::Application.routes.draw do
2
+ devise_for :users, :path_prefix => 'd' do
3
+ # Aliased routes to match Rails Tutorial
4
+ get 'signin', :to => 'devise/sessions#new'
5
+ get 'signout', :to => 'devise/sessions#destroy'
6
+ get 'signup', :to => 'devise/registrations#new'
7
+ end
8
+
9
+ # Additional user actions separated out into a new controller,
10
+ # Note that Devise's controllers already handle login/logou, sign-up, etc.
11
+ resources :users, :only => [:index, :show]
12
+
13
+ match '/contact', :to => 'pages#contact'
14
+ match '/about', :to => 'pages#about'
15
+
16
+ root :to => 'pages#home'
17
+ end
@@ -0,0 +1,29 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table(:users) do |t|
4
+ t.database_authenticatable :null => false
5
+ t.recoverable
6
+ t.rememberable
7
+ t.trackable
8
+
9
+ # t.encryptable
10
+ # t.confirmable
11
+ # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
12
+ # t.token_authenticatable
13
+
14
+ t.string :name
15
+
16
+ t.timestamps
17
+ end
18
+
19
+ add_index :users, :email, :unique => true
20
+ add_index :users, :reset_password_token, :unique => true
21
+ # add_index :users, :confirmation_token, :unique => true
22
+ # add_index :users, :unlock_token, :unique => true
23
+ # add_index :users, :authentication_token, :unique => true
24
+ end
25
+
26
+ def self.down
27
+ drop_table :users
28
+ end
29
+ end
@@ -0,0 +1,34 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your
6
+ # database schema. If you need to create the application database on another
7
+ # system, you should be using db:schema:load, not running all the migrations
8
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
10
+ #
11
+ # It's strongly recommended to check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(:version => 20110608224650) do
14
+
15
+ create_table "users", :force => true do |t|
16
+ t.string "email", :default => "", :null => false
17
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
18
+ t.string "reset_password_token"
19
+ t.datetime "reset_password_sent_at"
20
+ t.datetime "remember_created_at"
21
+ t.integer "sign_in_count", :default => 0
22
+ t.datetime "current_sign_in_at"
23
+ t.datetime "last_sign_in_at"
24
+ t.string "current_sign_in_ip"
25
+ t.string "last_sign_in_ip"
26
+ t.string "name"
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
+ end
30
+
31
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
32
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
33
+
34
+ end
@@ -0,0 +1,36 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+
4
+ Blueprint CSS Framework 1.0.1
5
+ http://blueprintcss.org
6
+
7
+ * Copyright (c) 2007-Present. See LICENSE for more info.
8
+ * See README for instructions on how to use Blueprint.
9
+ * For credits and origins, see AUTHORS.
10
+ * This is a compressed file. See the sources in the 'src' directory.
11
+
12
+ ----------------------------------------------------------------------- */
13
+
14
+ /* ie.css */
15
+ body {text-align:center;}
16
+ .container {text-align:left;}
17
+ * html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
18
+ * html legend {margin:0px -8px 16px 0;padding:0;}
19
+ sup {vertical-align:text-top;}
20
+ sub {vertical-align:text-bottom;}
21
+ html>body p code {*white-space:normal;}
22
+ hr {margin:-8px auto 11px;}
23
+ img {-ms-interpolation-mode:bicubic;}
24
+ .clearfix, .container {display:inline-block;}
25
+ * html .clearfix, * html .container {height:1%;}
26
+ fieldset {padding-top:0;}
27
+ legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;}
28
+ textarea {overflow:auto;}
29
+ label {vertical-align:middle;position:relative;top:-0.25em;}
30
+ input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
31
+ input.text:focus, input.title:focus {border-color:#666;}
32
+ input.text, input.title, textarea, select {margin:0.5em 0;}
33
+ input.checkbox, input.radio {position:relative;top:.25em;}
34
+ form.inline div, form.inline p {vertical-align:middle;}
35
+ form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
36
+ button, input.button {position:relative;top:0.25em;}
@@ -0,0 +1,32 @@
1
+ Buttons
2
+
3
+ * Gives you great looking CSS buttons, for both <a> and <button>.
4
+ * Demo: particletree.com/features/rediscovering-the-button-element
5
+
6
+
7
+ Credits
8
+ ----------------------------------------------------------------
9
+
10
+ * Created by Kevin Hale [particletree.com]
11
+ * Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
12
+
13
+
14
+ Usage
15
+ ----------------------------------------------------------------
16
+
17
+ 1) Add this plugin to lib/settings.yml.
18
+ See compress.rb for instructions.
19
+
20
+ 2) Use the following HTML code to place the buttons on your site:
21
+
22
+ <button type="submit" class="button positive">
23
+ <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
24
+ </button>
25
+
26
+ <a class="button" href="/password/reset/">
27
+ <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
28
+ </a>
29
+
30
+ <a href="#" class="button negative">
31
+ <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
32
+ </a>
@@ -0,0 +1,97 @@
1
+ /* --------------------------------------------------------------
2
+
3
+ buttons.css
4
+ * Gives you some great CSS-only buttons.
5
+
6
+ Created by Kevin Hale [particletree.com]
7
+ * particletree.com/features/rediscovering-the-button-element
8
+
9
+ See Readme.txt in this folder for instructions.
10
+
11
+ -------------------------------------------------------------- */
12
+
13
+ a.button, button {
14
+ display:block;
15
+ float:left;
16
+ margin: 0.7em 0.5em 0.7em 0;
17
+ padding:5px 10px 5px 7px; /* Links */
18
+
19
+ border:1px solid #dedede;
20
+ border-top:1px solid #eee;
21
+ border-left:1px solid #eee;
22
+
23
+ background-color:#f5f5f5;
24
+ font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
25
+ font-size:100%;
26
+ line-height:130%;
27
+ text-decoration:none;
28
+ font-weight:bold;
29
+ color:#565656;
30
+ cursor:pointer;
31
+ }
32
+ button {
33
+ width:auto;
34
+ overflow:visible;
35
+ padding:4px 10px 3px 7px; /* IE6 */
36
+ }
37
+ button[type] {
38
+ padding:4px 10px 4px 7px; /* Firefox */
39
+ line-height:17px; /* Safari */
40
+ }
41
+ *:first-child+html button[type] {
42
+ padding:4px 10px 3px 7px; /* IE7 */
43
+ }
44
+ button img, a.button img{
45
+ margin:0 3px -3px 0 !important;
46
+ padding:0;
47
+ border:none;
48
+ width:16px;
49
+ height:16px;
50
+ float:none;
51
+ }
52
+
53
+
54
+ /* Button colors
55
+ -------------------------------------------------------------- */
56
+
57
+ /* Standard */
58
+ button:hover, a.button:hover{
59
+ background-color:#dff4ff;
60
+ border:1px solid #c2e1ef;
61
+ color:#336699;
62
+ }
63
+ a.button:active{
64
+ background-color:#6299c5;
65
+ border:1px solid #6299c5;
66
+ color:#fff;
67
+ }
68
+
69
+ /* Positive */
70
+ body .positive {
71
+ color:#529214;
72
+ }
73
+ a.positive:hover, button.positive:hover {
74
+ background-color:#E6EFC2;
75
+ border:1px solid #C6D880;
76
+ color:#529214;
77
+ }
78
+ a.positive:active {
79
+ background-color:#529214;
80
+ border:1px solid #529214;
81
+ color:#fff;
82
+ }
83
+
84
+ /* Negative */
85
+ body .negative {
86
+ color:#d12f19;
87
+ }
88
+ a.negative:hover, button.negative:hover {
89
+ background-color:#fbe3e4;
90
+ border:1px solid #fbc2c4;
91
+ color:#d12f19;
92
+ }
93
+ a.negative:active {
94
+ background-color:#d12f19;
95
+ border:1px solid #d12f19;
96
+ color:#fff;
97
+ }
@@ -0,0 +1,14 @@
1
+ Fancy Type
2
+
3
+ * Gives you classes to use if you'd like some
4
+ extra fancy typography.
5
+
6
+ Credits and instructions are specified above each class
7
+ in the fancy-type.css file in this directory.
8
+
9
+
10
+ Usage
11
+ ----------------------------------------------------------------
12
+
13
+ 1) Add this plugin to lib/settings.yml.
14
+ See compress.rb for instructions.
@@ -0,0 +1,71 @@
1
+ /* --------------------------------------------------------------
2
+
3
+ fancy-type.css
4
+ * Lots of pretty advanced classes for manipulating text.
5
+
6
+ See the Readme file in this folder for additional instructions.
7
+
8
+ -------------------------------------------------------------- */
9
+
10
+ /* Indentation instead of line shifts for sibling paragraphs. */
11
+ p + p { text-indent:2em; margin-top:-1.5em; }
12
+ form p + p { text-indent: 0; } /* Don't want this in forms. */
13
+
14
+
15
+ /* For great looking type, use this code instead of asdf:
16
+ <span class="alt">asdf</span>
17
+ Best used on prepositions and ampersands. */
18
+
19
+ .alt {
20
+ color: #666;
21
+ font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
22
+ font-style: italic;
23
+ font-weight: normal;
24
+ }
25
+
26
+
27
+ /* For great looking quote marks in titles, replace "asdf" with:
28
+ <span class="dquo">&#8220;</span>asdf&#8221;
29
+ (That is, when the title starts with a quote mark).
30
+ (You may have to change this value depending on your font size). */
31
+
32
+ .dquo { margin-left: -.5em; }
33
+
34
+
35
+ /* Reduced size type with incremental leading
36
+ (http://www.markboulton.co.uk/journal/comments/incremental_leading/)
37
+
38
+ This could be used for side notes. For smaller type, you don't necessarily want to
39
+ follow the 1.5x vertical rhythm -- the line-height is too much.
40
+
41
+ Using this class, it reduces your font size and line-height so that for
42
+ every four lines of normal sized type, there is five lines of the sidenote. eg:
43
+
44
+ New type size in em's:
45
+ 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)
46
+
47
+ New line-height value:
48
+ 12px x 1.5 = 18px (old line-height)
49
+ 18px x 4 = 72px
50
+ 72px / 5 = 14.4px (new line height)
51
+ 14.4px / 10px = 1.44 (new line height in em's) */
52
+
53
+ p.incr, .incr p {
54
+ font-size: 10px;
55
+ line-height: 1.44em;
56
+ margin-bottom: 1.5em;
57
+ }
58
+
59
+
60
+ /* Surround uppercase words and abbreviations with this class.
61
+ Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
62
+
63
+ .caps {
64
+ font-variant: small-caps;
65
+ letter-spacing: 1px;
66
+ text-transform: lowercase;
67
+ font-size:1.2em;
68
+ line-height:1%;
69
+ font-weight:bold;
70
+ padding:0 2px;
71
+ }
@@ -0,0 +1,18 @@
1
+ Link Icons
2
+ * Icons for links based on protocol or file type.
3
+
4
+ This is not supported in IE versions < 7.
5
+
6
+
7
+ Credits
8
+ ----------------------------------------------------------------
9
+
10
+ * Marc Morgan
11
+ * Olav Bjorkoy [bjorkoy.com]
12
+
13
+
14
+ Usage
15
+ ----------------------------------------------------------------
16
+
17
+ 1) Add this line to your HTML:
18
+ <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">