sparkly-auth 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. data/.document +5 -0
  2. data/.gitignore +25 -0
  3. data/HISTORY.txt +7 -0
  4. data/README.rdoc +127 -1
  5. data/Rakefile +45 -13
  6. data/TODO +4 -0
  7. data/VERSION +1 -1
  8. data/app/controllers/sparkly_accounts_controller.rb +20 -13
  9. data/app/controllers/sparkly_controller.rb +5 -4
  10. data/app/controllers/sparkly_sessions_controller.rb +16 -9
  11. data/app/helpers/sparkly_accounts_helper.rb +2 -0
  12. data/app/helpers/sparkly_helper.rb +2 -0
  13. data/app/helpers/sparkly_sessions_helper.rb +2 -0
  14. data/app/models/remembrance_token.rb +3 -1
  15. data/app/views/sparkly_accounts/_rails2_form.html.erb +24 -0
  16. data/app/views/sparkly_accounts/_rails3_form.html.erb +26 -0
  17. data/app/views/sparkly_accounts/edit.html.erb +5 -23
  18. data/app/views/sparkly_accounts/new.html.erb +4 -23
  19. data/app/views/sparkly_sessions/_rails2_form.html.erb +22 -0
  20. data/app/views/sparkly_sessions/_rails3_form.html.erb +22 -0
  21. data/app/views/sparkly_sessions/new.html.erb +4 -21
  22. data/features/create_sparkly_account.feature +12 -0
  23. data/features/delete_sparkly_account.feature +12 -0
  24. data/features/edit_sparkly_account.feature +54 -0
  25. data/features/lock_abused_sparkly_account.feature +7 -0
  26. data/features/login_sparkly_session.feature +43 -0
  27. data/features/logout_sparkly_session.feature +16 -0
  28. data/features/setup/sparkly.rb +4 -0
  29. data/features/show_sparkly_account.feature +13 -0
  30. data/features/sparkly_session_timeout.feature +6 -0
  31. data/features/step_definitions/account/account_steps.rb +16 -0
  32. data/features/step_definitions/account/brief_steps.rb +9 -0
  33. data/features/step_definitions/debug_steps.rb +3 -0
  34. data/features/step_definitions/email_steps.rb +182 -0
  35. data/features/step_definitions/session/brief_steps.rb +0 -0
  36. data/features/step_definitions/session/logged_in_steps.rb +42 -0
  37. data/features/step_definitions/session/login_steps.rb +37 -0
  38. data/features/step_definitions/session/logout_steps.rb +5 -0
  39. data/features/step_definitions/session_steps.rb +16 -0
  40. data/features/step_definitions/sparkly_auth_steps.rb +0 -0
  41. data/features/step_definitions/web_steps.rb +287 -0
  42. data/features/support/env.rb +10 -0
  43. data/features/support/paths.rb +35 -0
  44. data/features/support/sparkly_helpers.rb +42 -0
  45. data/generators/sparkly/rails2.rb +79 -0
  46. data/generators/sparkly/rails3.rb +89 -0
  47. data/generators/sparkly/sparkly_generator.rb +4 -75
  48. data/generators/sparkly/templates/accounts_controller.rb +14 -13
  49. data/generators/sparkly/templates/accounts_helper.rb +1 -1
  50. data/generators/sparkly/templates/sessions_controller.rb +26 -12
  51. data/generators/sparkly/templates/sessions_helper.rb +1 -1
  52. data/generators/sparkly/templates/views/sparkly_accounts/_rails2_form.html.erb +24 -0
  53. data/generators/sparkly/templates/views/sparkly_accounts/_rails3_form.html.erb +26 -0
  54. data/generators/sparkly/templates/views/sparkly_accounts/edit.html.erb +5 -23
  55. data/generators/sparkly/templates/views/sparkly_accounts/new.html.erb +4 -23
  56. data/generators/sparkly/templates/views/sparkly_sessions/_rails2_form.html.erb +22 -0
  57. data/generators/sparkly/templates/views/sparkly_sessions/_rails3_form.html.erb +22 -0
  58. data/generators/sparkly/templates/views/sparkly_sessions/new.html.erb +4 -21
  59. data/lib/auth.rb +22 -1
  60. data/lib/auth/behavior/base.rb +25 -18
  61. data/lib/auth/behavior/base/configuration.rb +37 -0
  62. data/lib/auth/behavior/core.rb +22 -14
  63. data/lib/auth/behavior/core/authenticated_model_methods.rb +9 -1
  64. data/lib/auth/behavior/core/controller_extensions.rb +2 -2
  65. data/lib/auth/behavior/core/controller_extensions/class_methods.rb +1 -1
  66. data/lib/auth/behavior/core/password_methods.rb +5 -5
  67. data/lib/auth/behavior/remember_me.rb +7 -3
  68. data/lib/auth/behavior/remember_me/configuration.rb +8 -11
  69. data/lib/auth/behavior/remember_me/controller_extensions.rb +1 -1
  70. data/lib/auth/behavior_lookup.rb +4 -4
  71. data/lib/auth/builtin_behaviors.rb +3 -0
  72. data/lib/auth/configuration.rb +71 -25
  73. data/lib/auth/configuration/keys.rb +50 -0
  74. data/lib/auth/engine.rb +33 -0
  75. data/lib/auth/generators/views_generator.rb +13 -4
  76. data/lib/auth/model.rb +52 -22
  77. data/{init.rb → rails/hacks/rails2.rb} +1 -14
  78. data/rails/hacks/rails3.rb +22 -0
  79. data/rails/init.rb +7 -17
  80. data/rails/init_rails2.rb +39 -0
  81. data/rails/init_rails3.rb +2 -0
  82. data/rails/routes_rails3.rb +37 -0
  83. data/rake3 +1 -0
  84. data/rerun.txt +1 -0
  85. data/run_all_tests +1 -0
  86. data/sparkly-auth.gemspec +481 -23
  87. data/spec/behaviors/core/controller_extensions_spec.rb +49 -0
  88. data/spec/{lib/auth/behavior → behaviors}/core_spec.rb +29 -12
  89. data/spec/behaviors/remember_me/configuration_spec.rb +16 -0
  90. data/spec/behaviors/remember_me_spec.rb +167 -0
  91. data/spec/generators/sanity_checks_spec.rb +58 -0
  92. data/spec/lib/auth/configuration_spec.rb +61 -0
  93. data/spec/lib/auth/model_spec.rb +6 -9
  94. data/spec/lib/auth_spec.rb +2 -2
  95. data/spec/lib/hacks/rename_attributes_spec.rb +49 -0
  96. data/spec/routes_spec.rb +8 -2
  97. data/spec/spec2_helper.rb +52 -0
  98. data/spec/spec3_helper.rb +72 -0
  99. data/spec/spec_helper.rb +109 -49
  100. data/spec_env/rails2/README.1ST +23 -0
  101. data/spec_env/rails2/Rakefile +10 -0
  102. data/spec_env/rails2/app/controllers/application_controller.rb +13 -0
  103. data/spec_env/rails2/app/helpers/application_helper.rb +3 -0
  104. data/spec_env/rails2/app/models/user.rb +2 -0
  105. data/spec_env/rails2/app/views/application/not_found.html.erb +9 -0
  106. data/spec_env/rails2/app/views/layouts/application.html.erb +9 -0
  107. data/spec_env/rails2/config/boot.rb +110 -0
  108. data/spec_env/rails2/config/cucumber.yml +7 -0
  109. data/spec_env/rails2/config/database.yml +25 -0
  110. data/spec_env/rails2/config/environment.rb +46 -0
  111. data/spec_env/rails2/config/environments/cucumber.rb +35 -0
  112. data/spec_env/rails2/config/environments/development.rb +17 -0
  113. data/spec_env/rails2/config/environments/production.rb +28 -0
  114. data/spec_env/rails2/config/environments/test.rb +31 -0
  115. data/spec_env/rails2/config/initializers/backtrace_silencers.rb +7 -0
  116. data/spec_env/rails2/config/initializers/inflections.rb +10 -0
  117. data/spec_env/rails2/config/initializers/mime_types.rb +5 -0
  118. data/spec_env/rails2/config/initializers/new_rails_defaults.rb +21 -0
  119. data/spec_env/rails2/config/initializers/session_store.rb +15 -0
  120. data/spec_env/rails2/config/initializers/sparkly_authentication.rb +30 -0
  121. data/spec_env/rails2/config/locales/en.yml +5 -0
  122. data/spec_env/rails2/config/routes.rb +46 -0
  123. data/spec_env/rails2/db/development.sqlite3 +0 -0
  124. data/spec_env/rails2/db/migrate/001_create_sparkly_passwords.rb +19 -0
  125. data/spec_env/rails2/db/migrate/002_create_sparkly_remembered_tokens.rb +15 -0
  126. data/spec_env/rails2/db/migrate/003_add_confirmed_to_sparkly_passwords.rb +9 -0
  127. data/spec_env/rails2/db/migrate/20100607103543_create_users.rb +12 -0
  128. data/spec_env/rails2/db/migrate/20100609152058_add_email_to_users.rb +9 -0
  129. data/spec_env/rails2/db/schema.rb +42 -0
  130. data/spec_env/rails2/db/seeds.rb +7 -0
  131. data/spec_env/rails2/db/test.sqlite3 +0 -0
  132. data/spec_env/rails2/doc/README_FOR_APP +2 -0
  133. data/spec_env/rails2/doc/sparkly_authentication.txt +56 -0
  134. data/spec_env/rails2/features/support/env.rb +58 -0
  135. data/spec_env/rails2/lib/tasks/cucumber.rake +47 -0
  136. data/spec_env/rails2/lib/tasks/rspec.rake +144 -0
  137. data/spec_env/rails2/lib/tasks/sparkly_migration.rb +1 -0
  138. data/spec_env/rails2/log/cucumber.log +8412 -0
  139. data/spec_env/rails2/log/development.log +317 -0
  140. data/spec_env/rails2/log/test.log +32053 -0
  141. data/spec_env/rails2/public/404.html +30 -0
  142. data/spec_env/rails2/public/422.html +30 -0
  143. data/spec_env/rails2/public/500.html +30 -0
  144. data/spec_env/rails2/public/favicon.ico +0 -0
  145. data/spec_env/rails2/public/images/rails.png +0 -0
  146. data/spec_env/rails2/public/javascripts/application.js +2 -0
  147. data/spec_env/rails2/public/javascripts/controls.js +963 -0
  148. data/spec_env/rails2/public/javascripts/dragdrop.js +973 -0
  149. data/spec_env/rails2/public/javascripts/effects.js +1128 -0
  150. data/spec_env/rails2/public/javascripts/prototype.js +4320 -0
  151. data/spec_env/rails2/public/robots.txt +5 -0
  152. data/spec_env/rails2/rerun.txt +1 -0
  153. data/spec_env/rails2/script/about +4 -0
  154. data/spec_env/rails2/script/autospec +6 -0
  155. data/spec_env/rails2/script/console +3 -0
  156. data/spec_env/rails2/script/cucumber +10 -0
  157. data/spec_env/rails2/script/dbconsole +3 -0
  158. data/spec_env/rails2/script/destroy +3 -0
  159. data/spec_env/rails2/script/generate +3 -0
  160. data/spec_env/rails2/script/performance/benchmarker +3 -0
  161. data/spec_env/rails2/script/performance/profiler +3 -0
  162. data/spec_env/rails2/script/plugin +3 -0
  163. data/spec_env/rails2/script/runner +3 -0
  164. data/spec_env/rails2/script/server +3 -0
  165. data/spec_env/rails2/script/spec +10 -0
  166. data/spec_env/rails2/spec/controllers/sparkly_user_sessions_controller_spec.rb +10 -0
  167. data/spec_env/rails2/spec/rcov.opts +2 -0
  168. data/spec_env/rails2/spec/spec.opts +4 -0
  169. data/spec_env/rails2/spec/spec_helper.rb +54 -0
  170. data/spec_env/rails2/test/fixtures/users.yml +7 -0
  171. data/spec_env/rails2/test/performance/browsing_test.rb +9 -0
  172. data/spec_env/rails2/test/test_helper.rb +38 -0
  173. data/spec_env/rails2/test/unit/user_test.rb +8 -0
  174. data/spec_env/rails2/vendor/gems/sparkly-auth-bootstrap-1.0.0/.specification +63 -0
  175. data/spec_env/rails2/vendor/gems/sparkly-auth-bootstrap-1.0.0/generators/sparkly/sparkly_generator.rb +1 -0
  176. data/spec_env/rails2/vendor/gems/sparkly-auth-bootstrap-1.0.0/lib/sparkly-auth-bootstrap.rb +6 -0
  177. data/spec_env/rails2/vendor/gems/sparkly-auth-bootstrap-1.0.0/rails/init.rb +1 -0
  178. data/spec_env/rails2/vendor/gems/sparkly-auth-bootstrap-1.0.0/sparkly-auth-bootstrap.gemspec +55 -0
  179. data/spec_env/rails3/.gitignore +4 -0
  180. data/spec_env/rails3/Gemfile +43 -0
  181. data/spec_env/rails3/Gemfile.lock +124 -0
  182. data/spec_env/rails3/README +256 -0
  183. data/spec_env/rails3/Rakefile +7 -0
  184. data/spec_env/rails3/app/controllers/application_controller.rb +6 -0
  185. data/spec_env/rails3/app/helpers/application_helper.rb +2 -0
  186. data/spec_env/rails3/app/models/user.rb +3 -0
  187. data/spec_env/rails3/app/views/application/not_found.html.erb +9 -0
  188. data/spec_env/rails3/app/views/layouts/application.html.erb +22 -0
  189. data/spec_env/rails3/config.ru +4 -0
  190. data/spec_env/rails3/config/application.rb +47 -0
  191. data/spec_env/rails3/config/boot.rb +13 -0
  192. data/spec_env/rails3/config/cucumber.yml +8 -0
  193. data/spec_env/rails3/config/database.yml +28 -0
  194. data/spec_env/rails3/config/environment.rb +5 -0
  195. data/spec_env/rails3/config/environments/development.rb +22 -0
  196. data/spec_env/rails3/config/environments/production.rb +49 -0
  197. data/spec_env/rails3/config/environments/spec.rb +35 -0
  198. data/spec_env/rails3/config/environments/test.rb +43 -0
  199. data/spec_env/rails3/config/initializers/backtrace_silencers.rb +7 -0
  200. data/spec_env/rails3/config/initializers/inflections.rb +10 -0
  201. data/spec_env/rails3/config/initializers/mime_types.rb +5 -0
  202. data/spec_env/rails3/config/initializers/secret_token.rb +7 -0
  203. data/spec_env/rails3/config/initializers/session_store.rb +8 -0
  204. data/spec_env/rails3/config/initializers/sparkly_authentication.rb +30 -0
  205. data/spec_env/rails3/config/locales/en.yml +5 -0
  206. data/spec_env/rails3/config/routes.rb +61 -0
  207. data/spec_env/rails3/db/migrate/001_create_sparkly_passwords.rb +19 -0
  208. data/spec_env/rails3/db/migrate/002_create_sparkly_remembered_tokens.rb +15 -0
  209. data/spec_env/rails3/db/migrate/20100810132843_create_users.rb +13 -0
  210. data/spec_env/rails3/db/schema.rb +42 -0
  211. data/spec_env/rails3/db/seeds.rb +7 -0
  212. data/spec_env/rails3/doc/README_FOR_APP +2 -0
  213. data/spec_env/rails3/doc/sparkly_authentication.txt +56 -0
  214. data/spec_env/rails3/features/support/env.rb +62 -0
  215. data/spec_env/rails3/lib/sparkly/bootstrap.rb +1 -0
  216. data/spec_env/rails3/lib/tasks/.gitkeep +0 -0
  217. data/spec_env/rails3/lib/tasks/cucumber.rake +53 -0
  218. data/spec_env/rails3/lib/tasks/sparkly_migration.rb +1 -0
  219. data/spec_env/rails3/public/404.html +26 -0
  220. data/spec_env/rails3/public/422.html +26 -0
  221. data/spec_env/rails3/public/500.html +26 -0
  222. data/spec_env/rails3/public/favicon.ico +0 -0
  223. data/spec_env/rails3/public/images/rails.png +0 -0
  224. data/spec_env/rails3/public/javascripts/application.js +2 -0
  225. data/spec_env/rails3/public/javascripts/controls.js +965 -0
  226. data/spec_env/rails3/public/javascripts/dragdrop.js +974 -0
  227. data/spec_env/rails3/public/javascripts/effects.js +1123 -0
  228. data/spec_env/rails3/public/javascripts/prototype.js +6001 -0
  229. data/spec_env/rails3/public/javascripts/rails.js +175 -0
  230. data/spec_env/rails3/public/robots.txt +5 -0
  231. data/spec_env/rails3/public/stylesheets/.gitkeep +0 -0
  232. data/spec_env/rails3/script/cucumber +10 -0
  233. data/spec_env/rails3/script/rails +6 -0
  234. data/spec_env/rails3/test/fixtures/users.yml +7 -0
  235. data/spec_env/rails3/test/performance/browsing_test.rb +9 -0
  236. data/spec_env/rails3/test/test_helper.rb +13 -0
  237. data/spec_env/rails3/test/unit/user_test.rb +8 -0
  238. data/spec_env/rails3/vendor/plugins/.gitkeep +0 -0
  239. data/spec_env/rails3/webrat.log +5 -0
  240. metadata +393 -15
  241. data/dependencies.rb +0 -1
  242. data/spec/lib/auth/behavior/remember_me_spec.rb +0 -127
  243. data/spec/lib/auth/extensions/controller_spec.rb +0 -32
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
+ require 'commands/about'
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
3
+ ENV['RSPEC'] = 'true' # allows autotest to discover rspec
4
+ ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
5
+ system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) ||
6
+ $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH")
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/console'
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
4
+ if vendored_cucumber_bin
5
+ load File.expand_path(vendored_cucumber_bin)
6
+ else
7
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
8
+ require 'cucumber'
9
+ load Cucumber::BINARY
10
+ end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/dbconsole'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/server'
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)}
3
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
4
+ else
5
+ gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
6
+ ENV["RAILS_ENV"] ||= 'test'
7
+ require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
8
+ end
9
+ require 'spec/autorun'
10
+ exit ::Spec::Runner::CommandLine.run
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe SparklySessionsController do
4
+ it "should work after app reload" do
5
+ get :new, :model => "User"
6
+ Dispatcher.cleanup_application
7
+ Dispatcher.reload_application
8
+ get :new, :model => "User"
9
+ end
10
+ end
@@ -0,0 +1,2 @@
1
+ --exclude "spec/*,gems/*"
2
+ --rails
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
@@ -0,0 +1,54 @@
1
+ # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2
+ # from the project root directory.
3
+ ENV["RAILS_ENV"] ||= 'test'
4
+ require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
5
+ require 'spec/autorun'
6
+ require 'spec/rails'
7
+
8
+ # Uncomment the next line to use webrat's matchers
9
+ #require 'webrat/integrations/rspec-rails'
10
+
11
+ # Requires supporting files with custom matchers and macros, etc,
12
+ # in ./support/ and its subdirectories.
13
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
14
+
15
+ Spec::Runner.configure do |config|
16
+ # If you're not using ActiveRecord you should remove these
17
+ # lines, delete config/database.yml and disable :active_record
18
+ # in your config/boot.rb
19
+ config.use_transactional_fixtures = true
20
+ config.use_instantiated_fixtures = false
21
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
22
+
23
+ # == Fixtures
24
+ #
25
+ # You can declare fixtures for each example_group like this:
26
+ # describe "...." do
27
+ # fixtures :table_a, :table_b
28
+ #
29
+ # Alternatively, if you prefer to declare them only once, you can
30
+ # do so right here. Just uncomment the next line and replace the fixture
31
+ # names with your fixtures.
32
+ #
33
+ # config.global_fixtures = :table_a, :table_b
34
+ #
35
+ # If you declare global fixtures, be aware that they will be declared
36
+ # for all of your examples, even those that don't use them.
37
+ #
38
+ # You can also declare which fixtures to use (for example fixtures for test/fixtures):
39
+ #
40
+ # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
41
+ #
42
+ # == Mock Framework
43
+ #
44
+ # RSpec uses its own mocking framework by default. If you prefer to
45
+ # use mocha, flexmock or RR, uncomment the appropriate line:
46
+ #
47
+ # config.mock_with :mocha
48
+ # config.mock_with :flexmock
49
+ # config.mock_with :rr
50
+ #
51
+ # == Notes
52
+ #
53
+ # For more information take a look at Spec::Runner::Configuration and Spec::Runner
54
+ end
@@ -0,0 +1,7 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+
3
+ # one:
4
+ # column: value
5
+ #
6
+ # two:
7
+ # column: value
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+ require 'performance_test_help'
3
+
4
+ # Profiling results for each test method are written to tmp/performance.
5
+ class BrowsingTest < ActionController::PerformanceTest
6
+ def test_homepage
7
+ get '/'
8
+ end
9
+ end
@@ -0,0 +1,38 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
+ require 'test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Transactional fixtures accelerate your tests by wrapping each test method
7
+ # in a transaction that's rolled back on completion. This ensures that the
8
+ # test database remains unchanged so your fixtures don't have to be reloaded
9
+ # between every test method. Fewer database queries means faster tests.
10
+ #
11
+ # Read Mike Clark's excellent walkthrough at
12
+ # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
+ #
14
+ # Every Active Record database supports transactions except MyISAM tables
15
+ # in MySQL. Turn off transactional fixtures in this case; however, if you
16
+ # don't care one way or the other, switching from MyISAM to InnoDB tables
17
+ # is recommended.
18
+ #
19
+ # The only drawback to using transactional fixtures is when you actually
20
+ # need to test transactions. Since your test is bracketed by a transaction,
21
+ # any transactions started in your code will be automatically rolled back.
22
+ self.use_transactional_fixtures = true
23
+
24
+ # Instantiated fixtures are slow, but give you @david where otherwise you
25
+ # would need people(:david). If you don't want to migrate your existing
26
+ # test cases which use the @david style and don't mind the speed hit (each
27
+ # instantiated fixtures translates to a database query per test method),
28
+ # then set this back to true.
29
+ self.use_instantiated_fixtures = false
30
+
31
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
+ #
33
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
+ # -- they do not yet inherit this setting
35
+ fixtures :all
36
+
37
+ # Add more helper methods to be used by all tests here...
38
+ end
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # Replace this with your real tests.
5
+ test "the truth" do
6
+ assert true
7
+ end
8
+ end
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sparkly-auth-bootstrap
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ version: 1.0.0
10
+ platform: ruby
11
+ authors: []
12
+
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-08-09 00:00:00 -04:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description:
22
+ email:
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - lib
31
+ - lib/sparkly-auth.rb
32
+ has_rdoc: true
33
+ homepage:
34
+ licenses: []
35
+
36
+ post_install_message:
37
+ rdoc_options: []
38
+
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ segments:
53
+ - 0
54
+ version: "0"
55
+ requirements: []
56
+
57
+ rubyforge_project:
58
+ rubygems_version: 1.3.6
59
+ signing_key:
60
+ specification_version: 3
61
+ summary:
62
+ test_files: []
63
+
@@ -0,0 +1 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../../../../generators/sparkly/sparkly_generator'))
@@ -0,0 +1,6 @@
1
+ for path in %w(app/models app/controllers app/helpers app/metal)
2
+ path = File.expand_path File.join(File.dirname(__FILE__), '..', path)
3
+ ActiveSupport::Dependencies.load_once_paths.delete path
4
+ end
5
+
6
+ require File.expand_path(File.join(File.dirname(__FILE__), "../../../../../../lib/sparkly-auth"))
@@ -0,0 +1 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "../../../../../../rails/init"))
@@ -0,0 +1,55 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{sparkly-auth-bootstrap}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Colin MacKenzie IV"]
12
+ s.date = %q{2010-08-09}
13
+ s.description = %q{As fate would have it, I found other authentication solutions unable to suit my needs. So I rolled my own.}
14
+ s.email = %q{sinisterchipmunk@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ "init.rb",
20
+ "lib/sparkly-auth.rb",
21
+ ]
22
+ s.homepage = %q{http://www.thoughtsincomputation.com}
23
+ s.rdoc_options = ["--charset=UTF-8"]
24
+ s.require_paths = ["lib"]
25
+ s.rubygems_version = %q{1.3.6}
26
+ s.summary = %q{User authentication with Sparkles!}
27
+ s.test_files = [
28
+ ]
29
+
30
+ if s.respond_to? :specification_version then
31
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
32
+ s.specification_version = 3
33
+
34
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
35
+ s.add_runtime_dependency(%q<sc-core-ext>, [">= 1.2.0"])
36
+ s.add_development_dependency(%q<rspec-rails>, [">= 1.3.2"])
37
+ s.add_development_dependency(%q<webrat>, [">= 0.7.1"])
38
+ s.add_development_dependency(%q<genspec>, [">= 0.1.1"])
39
+ s.add_development_dependency(%q<email_spec>, [">= 0.6.2"])
40
+ else
41
+ s.add_dependency(%q<sc-core-ext>, [">= 1.2.0"])
42
+ s.add_dependency(%q<rspec-rails>, [">= 1.3.2"])
43
+ s.add_dependency(%q<webrat>, [">= 0.7.1"])
44
+ s.add_dependency(%q<genspec>, [">= 0.1.1"])
45
+ s.add_dependency(%q<email_spec>, [">= 0.6.2"])
46
+ end
47
+ else
48
+ s.add_dependency(%q<sc-core-ext>, [">= 1.2.0"])
49
+ s.add_dependency(%q<rspec-rails>, [">= 1.3.2"])
50
+ s.add_dependency(%q<webrat>, [">= 0.7.1"])
51
+ s.add_dependency(%q<genspec>, [">= 0.1.1"])
52
+ s.add_dependency(%q<email_spec>, [">= 0.6.2"])
53
+ end
54
+ end
55
+
@@ -0,0 +1,4 @@
1
+ .bundle
2
+ db/*.sqlite3
3
+ log/*.log
4
+ tmp/**/*
@@ -0,0 +1,43 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', '3.0.0.rc'
4
+
5
+ group :test, :cucumber do
6
+ # gem 'capybara'
7
+ gem 'webrat'
8
+ gem 'database_cleaner'
9
+ gem 'cucumber-rails'
10
+ gem 'cucumber'
11
+ gem 'spork'
12
+ gem 'launchy'
13
+ gem 'genspec', '0.2.0.prerails3.2'
14
+ gem 'email_spec'
15
+ gem 'rspec-rails', '>= 2.0.0.beta.19'
16
+ end
17
+
18
+ # Bundle edge Rails instead:
19
+ # gem 'rails', :git => 'git://github.com/rails/rails.git'
20
+
21
+ gem 'sqlite3-ruby', :require => 'sqlite3'
22
+
23
+ # Use unicorn as the web server
24
+ # gem 'unicorn'
25
+
26
+ # Deploy with Capistrano
27
+ # gem 'capistrano'
28
+
29
+ # To use debugger
30
+ # gem 'ruby-debug'
31
+
32
+ # Bundle the extra gems:
33
+ # gem 'bj'
34
+ # gem 'nokogiri', '1.4.1'
35
+ # gem 'sqlite3-ruby', :require => 'sqlite3'
36
+ # gem 'aws-s3', :require => 'aws/s3'
37
+
38
+ # Bundle gems for the local environment. Make sure to
39
+ # put test-only gems in this group so their generators
40
+ # and rake tasks are available in development mode:
41
+ # group :development, :test do
42
+ # gem 'webrat'
43
+ # end
@@ -0,0 +1,124 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionmailer (3.0.0.rc)
6
+ actionpack (= 3.0.0.rc)
7
+ mail (~> 2.2.5)
8
+ actionpack (3.0.0.rc)
9
+ activemodel (= 3.0.0.rc)
10
+ activesupport (= 3.0.0.rc)
11
+ builder (~> 2.1.2)
12
+ erubis (~> 2.6.6)
13
+ i18n (~> 0.4.1)
14
+ rack (~> 1.2.1)
15
+ rack-mount (~> 0.6.9)
16
+ rack-test (~> 0.5.4)
17
+ tzinfo (~> 0.3.22)
18
+ activemodel (3.0.0.rc)
19
+ activesupport (= 3.0.0.rc)
20
+ builder (~> 2.1.2)
21
+ i18n (~> 0.4.1)
22
+ activerecord (3.0.0.rc)
23
+ activemodel (= 3.0.0.rc)
24
+ activesupport (= 3.0.0.rc)
25
+ arel (~> 0.4.0)
26
+ tzinfo (~> 0.3.22)
27
+ activeresource (3.0.0.rc)
28
+ activemodel (= 3.0.0.rc)
29
+ activesupport (= 3.0.0.rc)
30
+ activesupport (3.0.0.rc)
31
+ arel (0.4.0)
32
+ activesupport (>= 3.0.0.beta)
33
+ builder (2.1.2)
34
+ configuration (1.1.0)
35
+ cucumber (0.8.5)
36
+ builder (~> 2.1.2)
37
+ diff-lcs (~> 1.1.2)
38
+ gherkin (~> 2.1.4)
39
+ json_pure (~> 1.4.3)
40
+ term-ansicolor (~> 1.0.4)
41
+ cucumber-rails (0.3.2)
42
+ cucumber (>= 0.8.0)
43
+ database_cleaner (0.5.2)
44
+ diff-lcs (1.1.2)
45
+ email_spec (1.0.0)
46
+ erubis (2.6.6)
47
+ abstract (>= 1.0.0)
48
+ genspec (0.2.0.prerails3.2)
49
+ rspec (>= 2.0.0.beta.14)
50
+ sc-core-ext (>= 1.2.1)
51
+ gherkin (2.1.5)
52
+ trollop (~> 1.16.2)
53
+ i18n (0.4.1)
54
+ json_pure (1.4.6)
55
+ launchy (0.3.7)
56
+ configuration (>= 0.0.5)
57
+ rake (>= 0.8.1)
58
+ mail (2.2.5)
59
+ activesupport (>= 2.3.6)
60
+ mime-types
61
+ treetop (>= 1.4.5)
62
+ mime-types (1.16)
63
+ nokogiri (1.4.2)
64
+ polyglot (0.3.1)
65
+ rack (1.2.1)
66
+ rack-mount (0.6.9)
67
+ rack (>= 1.0.0)
68
+ rack-test (0.5.4)
69
+ rack (>= 1.0)
70
+ rails (3.0.0.rc)
71
+ actionmailer (= 3.0.0.rc)
72
+ actionpack (= 3.0.0.rc)
73
+ activerecord (= 3.0.0.rc)
74
+ activeresource (= 3.0.0.rc)
75
+ activesupport (= 3.0.0.rc)
76
+ bundler (>= 1.0.0.rc.1)
77
+ railties (= 3.0.0.rc)
78
+ railties (3.0.0.rc)
79
+ actionpack (= 3.0.0.rc)
80
+ activesupport (= 3.0.0.rc)
81
+ rake (>= 0.8.3)
82
+ thor (~> 0.14.0)
83
+ rake (0.8.7)
84
+ rspec (2.0.0.beta.19)
85
+ rspec-core (= 2.0.0.beta.19)
86
+ rspec-expectations (= 2.0.0.beta.19)
87
+ rspec-mocks (= 2.0.0.beta.19)
88
+ rspec-core (2.0.0.beta.19)
89
+ rspec-expectations (2.0.0.beta.19)
90
+ diff-lcs (>= 1.1.2)
91
+ rspec-mocks (2.0.0.beta.19)
92
+ rspec-rails (2.0.0.beta.19)
93
+ rspec (= 2.0.0.beta.19)
94
+ webrat (>= 0.7.2.beta.1)
95
+ sc-core-ext (1.2.1)
96
+ activesupport (>= 2.3.5)
97
+ spork (0.8.4)
98
+ sqlite3-ruby (1.3.1)
99
+ term-ansicolor (1.0.5)
100
+ thor (0.14.0)
101
+ treetop (1.4.8)
102
+ polyglot (>= 0.3.1)
103
+ trollop (1.16.2)
104
+ tzinfo (0.3.22)
105
+ webrat (0.7.2.beta.1)
106
+ nokogiri (>= 1.2.0)
107
+ rack (>= 1.0)
108
+ rack-test (>= 0.5.3)
109
+
110
+ PLATFORMS
111
+ ruby
112
+
113
+ DEPENDENCIES
114
+ cucumber
115
+ cucumber-rails
116
+ database_cleaner
117
+ email_spec
118
+ genspec (= 0.2.0.prerails3.2)
119
+ launchy
120
+ rails (= 3.0.0.rc)
121
+ rspec-rails (>= 2.0.0.beta.19)
122
+ spork
123
+ sqlite3-ruby
124
+ webrat