user_impersonate2 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -12
  3. data/Rakefile +6 -4
  4. data/app/controllers/user_impersonate/impersonate_controller.rb +1 -1
  5. data/lib/user_impersonate/version.rb +1 -1
  6. data/test/{dummy → dummy-rails3}/README.rdoc +0 -0
  7. data/test/{dummy → dummy-rails3}/Rakefile +0 -0
  8. data/test/{dummy → dummy-rails3}/app/assets/javascripts/application.js +0 -0
  9. data/test/{dummy → dummy-rails3}/app/assets/javascripts/home.js +0 -0
  10. data/test/{dummy → dummy-rails3}/app/assets/stylesheets/application.css +0 -0
  11. data/test/{dummy → dummy-rails3}/app/assets/stylesheets/home.css +0 -0
  12. data/test/{dummy → dummy-rails3}/app/controllers/application_controller.rb +0 -0
  13. data/test/{dummy → dummy-rails3}/app/controllers/home_controller.rb +0 -0
  14. data/test/{dummy → dummy-rails3}/app/helpers/application_helper.rb +0 -0
  15. data/test/{dummy → dummy-rails3}/app/helpers/home_helper.rb +0 -0
  16. data/test/{dummy → dummy-rails3}/app/models/user.rb +0 -0
  17. data/test/{dummy → dummy-rails3}/app/views/home/index.html.erb +0 -0
  18. data/test/{dummy → dummy-rails3}/app/views/layouts/application.html.erb +0 -0
  19. data/test/{dummy → dummy-rails3}/app/views/user_impersonate/_header.html.erb +0 -0
  20. data/test/{dummy → dummy-rails3}/config.ru +0 -0
  21. data/test/{dummy → dummy-rails3}/config/application.rb +0 -0
  22. data/test/{dummy → dummy-rails3}/config/boot.rb +0 -0
  23. data/test/{dummy → dummy-rails3}/config/database.yml +0 -0
  24. data/test/{dummy → dummy-rails3}/config/environment.rb +0 -0
  25. data/test/{dummy → dummy-rails3}/config/environments/development.rb +0 -0
  26. data/test/{dummy → dummy-rails3}/config/environments/production.rb +0 -0
  27. data/test/{dummy → dummy-rails3}/config/environments/test.rb +0 -0
  28. data/test/{dummy → dummy-rails3}/config/initializers/backtrace_silencers.rb +0 -0
  29. data/test/{dummy → dummy-rails3}/config/initializers/devise.rb +0 -0
  30. data/test/{dummy → dummy-rails3}/config/initializers/inflections.rb +0 -0
  31. data/test/{dummy → dummy-rails3}/config/initializers/mime_types.rb +0 -0
  32. data/test/{dummy → dummy-rails3}/config/initializers/secret_token.rb +0 -0
  33. data/test/{dummy → dummy-rails3}/config/initializers/session_store.rb +0 -0
  34. data/test/{dummy → dummy-rails3}/config/initializers/user_impersonate.rb +0 -0
  35. data/test/{dummy → dummy-rails3}/config/initializers/wrap_parameters.rb +0 -0
  36. data/test/{dummy → dummy-rails3}/config/locales/devise.en.yml +0 -0
  37. data/test/{dummy → dummy-rails3}/config/locales/en.yml +0 -0
  38. data/test/{dummy → dummy-rails3}/config/routes.rb +0 -0
  39. data/test/{dummy → dummy-rails3}/db/development.sqlite3 +0 -0
  40. data/test/{dummy → dummy-rails3}/db/migrate/20120914174453_devise_create_users.rb +0 -0
  41. data/test/{dummy → dummy-rails3}/db/migrate/20120914184123_add_staff_flag_to_users.rb +0 -0
  42. data/test/{dummy → dummy-rails3}/db/schema.rb +0 -0
  43. data/test/{dummy → dummy-rails3}/db/test.sqlite3 +0 -0
  44. data/test/{dummy → dummy-rails3}/lib/tasks/cucumber.rake +0 -0
  45. data/test/dummy-rails3/log/development.log +262 -0
  46. data/test/dummy-rails3/log/test.log +1091 -0
  47. data/test/{dummy → dummy-rails3}/public/404.html +0 -0
  48. data/test/{dummy → dummy-rails3}/public/422.html +0 -0
  49. data/test/{dummy → dummy-rails3}/public/500.html +0 -0
  50. data/test/{dummy → dummy-rails3}/public/favicon.ico +0 -0
  51. data/test/{dummy → dummy-rails3}/script/rails +0 -0
  52. data/test/{dummy → dummy-rails3}/test/fixtures/users.yml +0 -0
  53. data/test/{dummy → dummy-rails3}/test/unit/helpers/home_helper_test.rb +0 -0
  54. data/test/{dummy → dummy-rails3}/test/unit/user_test.rb +0 -0
  55. data/test/dummy-rails4/README.rdoc +261 -0
  56. data/test/dummy-rails4/Rakefile +7 -0
  57. data/test/dummy-rails4/app/assets/javascripts/application.js +15 -0
  58. data/test/dummy-rails4/app/assets/javascripts/home.js +2 -0
  59. data/test/dummy-rails4/app/assets/stylesheets/application.css +16 -0
  60. data/test/dummy-rails4/app/assets/stylesheets/home.css +7 -0
  61. data/test/dummy-rails4/app/controllers/application_controller.rb +3 -0
  62. data/test/dummy-rails4/app/controllers/home_controller.rb +4 -0
  63. data/test/dummy-rails4/app/helpers/application_helper.rb +2 -0
  64. data/test/dummy-rails4/app/helpers/home_helper.rb +2 -0
  65. data/test/dummy-rails4/app/models/user.rb +17 -0
  66. data/test/dummy-rails4/app/views/home/index.html.erb +11 -0
  67. data/test/dummy-rails4/app/views/layouts/application.html.erb +22 -0
  68. data/test/dummy-rails4/app/views/user_impersonate/_header.html.erb +65 -0
  69. data/test/dummy-rails4/config.ru +4 -0
  70. data/test/dummy-rails4/config/application.rb +57 -0
  71. data/test/dummy-rails4/config/boot.rb +10 -0
  72. data/test/dummy-rails4/config/database.yml +25 -0
  73. data/test/dummy-rails4/config/environment.rb +5 -0
  74. data/test/dummy-rails4/config/environments/development.rb +36 -0
  75. data/test/dummy-rails4/config/environments/production.rb +69 -0
  76. data/test/dummy-rails4/config/environments/test.rb +33 -0
  77. data/test/dummy-rails4/config/initializers/backtrace_silencers.rb +7 -0
  78. data/test/dummy-rails4/config/initializers/devise.rb +234 -0
  79. data/test/dummy-rails4/config/initializers/inflections.rb +15 -0
  80. data/test/dummy-rails4/config/initializers/mime_types.rb +5 -0
  81. data/test/dummy-rails4/config/initializers/secret_token.rb +9 -0
  82. data/test/dummy-rails4/config/initializers/session_store.rb +8 -0
  83. data/test/dummy-rails4/config/initializers/user_impersonate.rb +18 -0
  84. data/test/dummy-rails4/config/initializers/wrap_parameters.rb +14 -0
  85. data/test/dummy-rails4/config/locales/devise.en.yml +58 -0
  86. data/test/dummy-rails4/config/locales/en.yml +5 -0
  87. data/test/dummy-rails4/config/routes.rb +8 -0
  88. data/test/dummy-rails4/db/development.sqlite3 +0 -0
  89. data/test/dummy-rails4/db/migrate/20120914174453_devise_create_users.rb +48 -0
  90. data/test/dummy-rails4/db/migrate/20120914184123_add_staff_flag_to_users.rb +5 -0
  91. data/test/dummy-rails4/db/schema.rb +36 -0
  92. data/test/dummy-rails4/db/test.sqlite3 +0 -0
  93. data/test/dummy-rails4/lib/tasks/cucumber.rake +65 -0
  94. data/test/dummy-rails4/log/development.log +27 -0
  95. data/test/dummy-rails4/log/test.log +465 -0
  96. data/test/dummy-rails4/public/404.html +26 -0
  97. data/test/dummy-rails4/public/422.html +26 -0
  98. data/test/dummy-rails4/public/500.html +25 -0
  99. data/test/dummy-rails4/public/favicon.ico +0 -0
  100. data/test/dummy-rails4/script/rails +6 -0
  101. data/test/dummy-rails4/test/fixtures/users.yml +14 -0
  102. data/test/dummy-rails4/test/unit/helpers/home_helper_test.rb +4 -0
  103. data/test/dummy-rails4/test/unit/user_test.rb +7 -0
  104. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  105. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
  106. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/2625847957ecb8614efc9b58b07cabdf +0 -0
  107. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  108. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  109. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/35f33ae400a6b0b5bf527436a68133b5 +0 -0
  110. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/3b83d2c20dfdb631259eb9d056ea4419 +0 -0
  111. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
  112. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/5f1c168e97e274509aa4673eab0d86f6 +0 -0
  113. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/681d1010f98d5ed273e67645c7cb454d +0 -0
  114. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/7411b44628aea038332f13f5ed73e073 +0 -0
  115. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/7f14251885cab31b58c878119cbdc199 +0 -0
  116. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/8483b329d12e7e986bc5a2204bbcb4f8 +0 -0
  117. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/8ff157af159f38d424ce1367e29760a2 +0 -0
  118. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/b6f020b01a84691088a0c459a18f9c7e +0 -0
  119. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
  120. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/bdaaf186999b6b59a3063d23b589d307 +0 -0
  121. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  122. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/d0cde4ef34755468270bb49c4a3689f1 +0 -0
  123. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  124. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
  125. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/f1aac9109f5dae028b3c56eb07311208 +0 -0
  126. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  127. data/test/dummy-rails4/tmp/cache/assets/test/sprockets/fd6c8e27b44aa2db77bf0a8b5118bdf8 +0 -0
  128. data/test/functional/impersonate_controller_test.rb +19 -0
  129. data/test/test_helper.rb +18 -4
  130. data/test/test_utils.rb +49 -0
  131. metadata +262 -112
  132. data/test/dummy/log/development.log +0 -751
  133. data/test/dummy/log/test.log +0 -8348
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,14 @@
1
+ # passwords are abc123
2
+
3
+ staff:
4
+ id: 1
5
+ name: Dr Nic Williams
6
+ email: drnicwilliams@gmail.com
7
+ staff: true
8
+ encrypted_password: $2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK
9
+
10
+ normal_user:
11
+ id: 2
12
+ name: Normal User
13
+ email: normaluser@gmail.com
14
+ encrypted_password: $2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class HomeHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,19 @@
1
+ require 'test_helper'
2
+
3
+ class UserImpersonate::ImpersonateControllerTest < ActionController::TestCase
4
+ test 'index should require authentication' do
5
+ get :index, :use_route => 'user_impersonate'
6
+ assert_redirected_to 'http://test.host/users/sign_in'
7
+ end
8
+
9
+ test 'create should require authentication' do
10
+ get :create, :use_route => 'user_impersonate'
11
+ assert_redirected_to 'http://test.host/users/sign_in'
12
+ end
13
+
14
+ test 'destroy should not require authentication' do
15
+ delete :destroy, :use_route => 'user_impersonate'
16
+ assert_redirected_to 'http://test.host/'
17
+ end
18
+ end
19
+
data/test/test_helper.rb CHANGED
@@ -1,11 +1,15 @@
1
+ require File.expand_path('../test_utils', __FILE__)
2
+
1
3
  require 'coveralls'
2
4
  Coveralls.wear!
3
5
 
4
6
  # Configure Rails Environment
5
- ENV["RAILS_ENV"] = "test"
7
+ ENV['RAILS_ENV'] = 'test'
8
+
9
+ require File.expand_path("../#{TestUtils.dummy_app_dir}/config/environment.rb", __FILE__)
10
+ require 'rails/test_help'
6
11
 
7
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
8
- require "rails/test_help"
12
+ puts "Rails #{Rails.version} is loaded"
9
13
 
10
14
  Rails.backtrace_cleaner.remove_silencers!
11
15
 
@@ -14,6 +18,16 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
14
18
 
15
19
  # Load fixtures from the engine
16
20
  if ActiveSupport::TestCase.method_defined?(:fixture_path=)
17
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
21
+ ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
22
+ end
23
+
24
+ class ActionController::TestCase
25
+ include Devise::TestHelpers
26
+
27
+ protected
28
+
29
+ def set_up_devise
30
+ @request.env['devise.mapping'] = Devise.mappings[:user]
31
+ end
18
32
  end
19
33
 
@@ -0,0 +1,49 @@
1
+ require 'rails'
2
+
3
+ module TestUtils
4
+ extend self
5
+
6
+ def rails_version
7
+ @rails_version ||= Gem::Version.new(Rails.version)
8
+ end
9
+
10
+ def rails_version_in_range?(minimum_version, maximum_version)
11
+ minimum_version = Gem::Version.new(minimum_version) if minimum_version.is_a?(String)
12
+ maximum_version = Gem::Version.new(maximum_version) if maximum_version.is_a?(String)
13
+ minimum_version <= rails_version && rails_version < maximum_version
14
+ end
15
+
16
+ def dummy_app_dir
17
+ major_version = if rails_3?
18
+ '3'
19
+ elsif rails_4?
20
+ '4'
21
+ else
22
+ raise "Unsupported Rails version #{TestUtils.rails_version}"
23
+ end
24
+ "dummy-rails#{major_version}"
25
+ end
26
+
27
+ def reset_fixture_cache
28
+ fixture_set.reset_cache
29
+ end
30
+
31
+ def create_fixtures(*args)
32
+ fixture_set.create_fixtures(*args)
33
+ end
34
+
35
+ private
36
+
37
+ def fixture_set
38
+ rails_3? ? ActiveRecord::Fixtures : ActiveRecord::FixtureSet
39
+ end
40
+
41
+ def rails_3?
42
+ rails_version_in_range?('3.2.0', '4.0.0')
43
+ end
44
+
45
+ def rails_4?
46
+ rails_version_in_range?('4.0.0', '5.0.0')
47
+ end
48
+ end
49
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_impersonate2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Cook
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-07 00:00:00.000000000 Z
13
+ date: 2014-03-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -117,83 +117,158 @@ executables: []
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - app/views/layouts/user_impersonate/application.html.erb
121
- - app/views/user_impersonate/_header.html.erb
122
- - app/views/user_impersonate/impersonate/index.html.erb
123
- - app/assets/javascripts/user_impersonate/impersonate.js
120
+ - app/controllers/user_impersonate/application_controller.rb
121
+ - app/controllers/user_impersonate/impersonate_controller.rb
124
122
  - app/assets/javascripts/user_impersonate/application.js
123
+ - app/assets/javascripts/user_impersonate/impersonate.js
125
124
  - app/assets/stylesheets/user_impersonate/impersonate.css
126
125
  - app/assets/stylesheets/user_impersonate/application.css
127
- - app/controllers/user_impersonate/application_controller.rb
128
- - app/controllers/user_impersonate/impersonate_controller.rb
129
126
  - app/helpers/user_impersonate/application_helper.rb
127
+ - app/views/layouts/user_impersonate/application.html.erb
128
+ - app/views/user_impersonate/_header.html.erb
129
+ - app/views/user_impersonate/impersonate/index.html.erb
130
130
  - config/cucumber.yml
131
131
  - config/routes.rb
132
- - lib/user_impersonate/version.rb
133
- - lib/user_impersonate/devise_helpers.rb
134
- - lib/user_impersonate/engine.rb
135
132
  - lib/user_impersonate.rb
133
+ - lib/generators/user_impersonate/user_impersonate_generator.rb
136
134
  - lib/generators/user_impersonate/templates/config/initializers/user_impersonate.rb
137
135
  - lib/generators/user_impersonate/templates/app/views/user_impersonate/_header.html.erb
138
136
  - lib/generators/user_impersonate/USAGE
139
- - lib/generators/user_impersonate/user_impersonate_generator.rb
137
+ - lib/user_impersonate/devise_helpers.rb
138
+ - lib/user_impersonate/engine.rb
139
+ - lib/user_impersonate/version.rb
140
140
  - lib/tasks/user_impersonate_tasks.rake
141
141
  - MIT-LICENSE
142
142
  - Rakefile
143
143
  - README.md
144
144
  - test/test_helper.rb
145
+ - test/functional/impersonate_controller_test.rb
145
146
  - test/unit/helpers/user_impersonate/impersonate_helper_test.rb
146
- - test/integration/navigation_test.rb
147
- - test/dummy/public/500.html
148
- - test/dummy/public/404.html
149
- - test/dummy/public/422.html
150
- - test/dummy/public/favicon.ico
151
- - test/dummy/lib/tasks/cucumber.rake
152
- - test/dummy/README.rdoc
153
- - test/dummy/script/rails
154
- - test/dummy/config/locales/en.yml
155
- - test/dummy/config/locales/devise.en.yml
156
- - test/dummy/config/environment.rb
157
- - test/dummy/config/environments/development.rb
158
- - test/dummy/config/environments/production.rb
159
- - test/dummy/config/environments/test.rb
160
- - test/dummy/config/routes.rb
161
- - test/dummy/config/initializers/inflections.rb
162
- - test/dummy/config/initializers/user_impersonate.rb
163
- - test/dummy/config/initializers/wrap_parameters.rb
164
- - test/dummy/config/initializers/mime_types.rb
165
- - test/dummy/config/initializers/secret_token.rb
166
- - test/dummy/config/initializers/session_store.rb
167
- - test/dummy/config/initializers/devise.rb
168
- - test/dummy/config/initializers/backtrace_silencers.rb
169
- - test/dummy/config/database.yml
170
- - test/dummy/config/boot.rb
171
- - test/dummy/config/application.rb
172
- - test/dummy/app/views/layouts/application.html.erb
173
- - test/dummy/app/views/user_impersonate/_header.html.erb
174
- - test/dummy/app/views/home/index.html.erb
175
- - test/dummy/app/assets/javascripts/application.js
176
- - test/dummy/app/assets/javascripts/home.js
177
- - test/dummy/app/assets/stylesheets/home.css
178
- - test/dummy/app/assets/stylesheets/application.css
179
- - test/dummy/app/controllers/application_controller.rb
180
- - test/dummy/app/controllers/home_controller.rb
181
- - test/dummy/app/models/user.rb
182
- - test/dummy/app/helpers/application_helper.rb
183
- - test/dummy/app/helpers/home_helper.rb
184
- - test/dummy/test/unit/user_test.rb
185
- - test/dummy/test/unit/helpers/home_helper_test.rb
186
- - test/dummy/test/fixtures/users.yml
187
- - test/dummy/config.ru
188
- - test/dummy/log/development.log
189
- - test/dummy/log/test.log
190
- - test/dummy/Rakefile
191
- - test/dummy/db/development.sqlite3
192
- - test/dummy/db/schema.rb
193
- - test/dummy/db/migrate/20120914184123_add_staff_flag_to_users.rb
194
- - test/dummy/db/migrate/20120914174453_devise_create_users.rb
195
- - test/dummy/db/test.sqlite3
147
+ - test/dummy-rails3/config/boot.rb
148
+ - test/dummy-rails3/config/locales/en.yml
149
+ - test/dummy-rails3/config/locales/devise.en.yml
150
+ - test/dummy-rails3/config/database.yml
151
+ - test/dummy-rails3/config/initializers/mime_types.rb
152
+ - test/dummy-rails3/config/initializers/wrap_parameters.rb
153
+ - test/dummy-rails3/config/initializers/session_store.rb
154
+ - test/dummy-rails3/config/initializers/user_impersonate.rb
155
+ - test/dummy-rails3/config/initializers/secret_token.rb
156
+ - test/dummy-rails3/config/initializers/backtrace_silencers.rb
157
+ - test/dummy-rails3/config/initializers/devise.rb
158
+ - test/dummy-rails3/config/initializers/inflections.rb
159
+ - test/dummy-rails3/config/application.rb
160
+ - test/dummy-rails3/config/environment.rb
161
+ - test/dummy-rails3/config/environments/production.rb
162
+ - test/dummy-rails3/config/environments/test.rb
163
+ - test/dummy-rails3/config/environments/development.rb
164
+ - test/dummy-rails3/config/routes.rb
165
+ - test/dummy-rails3/public/500.html
166
+ - test/dummy-rails3/public/422.html
167
+ - test/dummy-rails3/public/favicon.ico
168
+ - test/dummy-rails3/public/404.html
169
+ - test/dummy-rails3/app/controllers/application_controller.rb
170
+ - test/dummy-rails3/app/controllers/home_controller.rb
171
+ - test/dummy-rails3/app/assets/javascripts/application.js
172
+ - test/dummy-rails3/app/assets/javascripts/home.js
173
+ - test/dummy-rails3/app/assets/stylesheets/home.css
174
+ - test/dummy-rails3/app/assets/stylesheets/application.css
175
+ - test/dummy-rails3/app/models/user.rb
176
+ - test/dummy-rails3/app/helpers/home_helper.rb
177
+ - test/dummy-rails3/app/helpers/application_helper.rb
178
+ - test/dummy-rails3/app/views/layouts/application.html.erb
179
+ - test/dummy-rails3/app/views/user_impersonate/_header.html.erb
180
+ - test/dummy-rails3/app/views/home/index.html.erb
181
+ - test/dummy-rails3/db/migrate/20120914184123_add_staff_flag_to_users.rb
182
+ - test/dummy-rails3/db/migrate/20120914174453_devise_create_users.rb
183
+ - test/dummy-rails3/db/schema.rb
184
+ - test/dummy-rails3/db/test.sqlite3
185
+ - test/dummy-rails3/db/development.sqlite3
186
+ - test/dummy-rails3/log/test.log
187
+ - test/dummy-rails3/log/development.log
188
+ - test/dummy-rails3/config.ru
189
+ - test/dummy-rails3/lib/tasks/cucumber.rake
190
+ - test/dummy-rails3/Rakefile
191
+ - test/dummy-rails3/README.rdoc
192
+ - test/dummy-rails3/test/fixtures/users.yml
193
+ - test/dummy-rails3/test/unit/user_test.rb
194
+ - test/dummy-rails3/test/unit/helpers/home_helper_test.rb
195
+ - test/dummy-rails3/script/rails
196
196
  - test/user_impersonate_test.rb
197
+ - test/test_utils.rb
198
+ - test/integration/navigation_test.rb
199
+ - test/dummy-rails4/config/boot.rb
200
+ - test/dummy-rails4/config/locales/en.yml
201
+ - test/dummy-rails4/config/locales/devise.en.yml
202
+ - test/dummy-rails4/config/database.yml
203
+ - test/dummy-rails4/config/initializers/mime_types.rb
204
+ - test/dummy-rails4/config/initializers/wrap_parameters.rb
205
+ - test/dummy-rails4/config/initializers/session_store.rb
206
+ - test/dummy-rails4/config/initializers/user_impersonate.rb
207
+ - test/dummy-rails4/config/initializers/secret_token.rb
208
+ - test/dummy-rails4/config/initializers/backtrace_silencers.rb
209
+ - test/dummy-rails4/config/initializers/devise.rb
210
+ - test/dummy-rails4/config/initializers/inflections.rb
211
+ - test/dummy-rails4/config/application.rb
212
+ - test/dummy-rails4/config/environment.rb
213
+ - test/dummy-rails4/config/environments/production.rb
214
+ - test/dummy-rails4/config/environments/test.rb
215
+ - test/dummy-rails4/config/environments/development.rb
216
+ - test/dummy-rails4/config/routes.rb
217
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/7411b44628aea038332f13f5ed73e073
218
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/2625847957ecb8614efc9b58b07cabdf
219
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
220
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
221
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/40fc2f3d2a468a00e463f1d313cb1683
222
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/681d1010f98d5ed273e67645c7cb454d
223
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/35f33ae400a6b0b5bf527436a68133b5
224
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
225
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/edbef6e0d0a4742346cf479f2c522eb0
226
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/d0cde4ef34755468270bb49c4a3689f1
227
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/fd6c8e27b44aa2db77bf0a8b5118bdf8
228
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/3b83d2c20dfdb631259eb9d056ea4419
229
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/8483b329d12e7e986bc5a2204bbcb4f8
230
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/1c9faaf28d05409b88ad3113374d613c
231
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
232
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/bdaaf186999b6b59a3063d23b589d307
233
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
234
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/f1aac9109f5dae028b3c56eb07311208
235
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
236
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/b6f020b01a84691088a0c459a18f9c7e
237
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/5f1c168e97e274509aa4673eab0d86f6
238
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/b878faf942403e313a5b103e5d80488e
239
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/7f14251885cab31b58c878119cbdc199
240
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/8ff157af159f38d424ce1367e29760a2
241
+ - test/dummy-rails4/public/500.html
242
+ - test/dummy-rails4/public/422.html
243
+ - test/dummy-rails4/public/favicon.ico
244
+ - test/dummy-rails4/public/404.html
245
+ - test/dummy-rails4/app/controllers/application_controller.rb
246
+ - test/dummy-rails4/app/controllers/home_controller.rb
247
+ - test/dummy-rails4/app/assets/javascripts/application.js
248
+ - test/dummy-rails4/app/assets/javascripts/home.js
249
+ - test/dummy-rails4/app/assets/stylesheets/home.css
250
+ - test/dummy-rails4/app/assets/stylesheets/application.css
251
+ - test/dummy-rails4/app/models/user.rb
252
+ - test/dummy-rails4/app/helpers/home_helper.rb
253
+ - test/dummy-rails4/app/helpers/application_helper.rb
254
+ - test/dummy-rails4/app/views/layouts/application.html.erb
255
+ - test/dummy-rails4/app/views/user_impersonate/_header.html.erb
256
+ - test/dummy-rails4/app/views/home/index.html.erb
257
+ - test/dummy-rails4/db/migrate/20120914184123_add_staff_flag_to_users.rb
258
+ - test/dummy-rails4/db/migrate/20120914174453_devise_create_users.rb
259
+ - test/dummy-rails4/db/schema.rb
260
+ - test/dummy-rails4/db/test.sqlite3
261
+ - test/dummy-rails4/db/development.sqlite3
262
+ - test/dummy-rails4/log/test.log
263
+ - test/dummy-rails4/log/development.log
264
+ - test/dummy-rails4/config.ru
265
+ - test/dummy-rails4/lib/tasks/cucumber.rake
266
+ - test/dummy-rails4/Rakefile
267
+ - test/dummy-rails4/README.rdoc
268
+ - test/dummy-rails4/test/fixtures/users.yml
269
+ - test/dummy-rails4/test/unit/user_test.rb
270
+ - test/dummy-rails4/test/unit/helpers/home_helper_test.rb
271
+ - test/dummy-rails4/script/rails
197
272
  homepage: https://github.com/rcook/user_impersonate2
198
273
  licenses:
199
274
  - MIT
@@ -220,55 +295,130 @@ specification_version: 4
220
295
  summary: Allow staff users to pretend to be your customers
221
296
  test_files:
222
297
  - test/test_helper.rb
298
+ - test/functional/impersonate_controller_test.rb
223
299
  - test/unit/helpers/user_impersonate/impersonate_helper_test.rb
224
- - test/integration/navigation_test.rb
225
- - test/dummy/public/500.html
226
- - test/dummy/public/404.html
227
- - test/dummy/public/422.html
228
- - test/dummy/public/favicon.ico
229
- - test/dummy/lib/tasks/cucumber.rake
230
- - test/dummy/README.rdoc
231
- - test/dummy/script/rails
232
- - test/dummy/config/locales/en.yml
233
- - test/dummy/config/locales/devise.en.yml
234
- - test/dummy/config/environment.rb
235
- - test/dummy/config/environments/development.rb
236
- - test/dummy/config/environments/production.rb
237
- - test/dummy/config/environments/test.rb
238
- - test/dummy/config/routes.rb
239
- - test/dummy/config/initializers/inflections.rb
240
- - test/dummy/config/initializers/user_impersonate.rb
241
- - test/dummy/config/initializers/wrap_parameters.rb
242
- - test/dummy/config/initializers/mime_types.rb
243
- - test/dummy/config/initializers/secret_token.rb
244
- - test/dummy/config/initializers/session_store.rb
245
- - test/dummy/config/initializers/devise.rb
246
- - test/dummy/config/initializers/backtrace_silencers.rb
247
- - test/dummy/config/database.yml
248
- - test/dummy/config/boot.rb
249
- - test/dummy/config/application.rb
250
- - test/dummy/app/views/layouts/application.html.erb
251
- - test/dummy/app/views/user_impersonate/_header.html.erb
252
- - test/dummy/app/views/home/index.html.erb
253
- - test/dummy/app/assets/javascripts/application.js
254
- - test/dummy/app/assets/javascripts/home.js
255
- - test/dummy/app/assets/stylesheets/home.css
256
- - test/dummy/app/assets/stylesheets/application.css
257
- - test/dummy/app/controllers/application_controller.rb
258
- - test/dummy/app/controllers/home_controller.rb
259
- - test/dummy/app/models/user.rb
260
- - test/dummy/app/helpers/application_helper.rb
261
- - test/dummy/app/helpers/home_helper.rb
262
- - test/dummy/test/unit/user_test.rb
263
- - test/dummy/test/unit/helpers/home_helper_test.rb
264
- - test/dummy/test/fixtures/users.yml
265
- - test/dummy/config.ru
266
- - test/dummy/log/development.log
267
- - test/dummy/log/test.log
268
- - test/dummy/Rakefile
269
- - test/dummy/db/development.sqlite3
270
- - test/dummy/db/schema.rb
271
- - test/dummy/db/migrate/20120914184123_add_staff_flag_to_users.rb
272
- - test/dummy/db/migrate/20120914174453_devise_create_users.rb
273
- - test/dummy/db/test.sqlite3
300
+ - test/dummy-rails3/config/boot.rb
301
+ - test/dummy-rails3/config/locales/en.yml
302
+ - test/dummy-rails3/config/locales/devise.en.yml
303
+ - test/dummy-rails3/config/database.yml
304
+ - test/dummy-rails3/config/initializers/mime_types.rb
305
+ - test/dummy-rails3/config/initializers/wrap_parameters.rb
306
+ - test/dummy-rails3/config/initializers/session_store.rb
307
+ - test/dummy-rails3/config/initializers/user_impersonate.rb
308
+ - test/dummy-rails3/config/initializers/secret_token.rb
309
+ - test/dummy-rails3/config/initializers/backtrace_silencers.rb
310
+ - test/dummy-rails3/config/initializers/devise.rb
311
+ - test/dummy-rails3/config/initializers/inflections.rb
312
+ - test/dummy-rails3/config/application.rb
313
+ - test/dummy-rails3/config/environment.rb
314
+ - test/dummy-rails3/config/environments/production.rb
315
+ - test/dummy-rails3/config/environments/test.rb
316
+ - test/dummy-rails3/config/environments/development.rb
317
+ - test/dummy-rails3/config/routes.rb
318
+ - test/dummy-rails3/public/500.html
319
+ - test/dummy-rails3/public/422.html
320
+ - test/dummy-rails3/public/favicon.ico
321
+ - test/dummy-rails3/public/404.html
322
+ - test/dummy-rails3/app/controllers/application_controller.rb
323
+ - test/dummy-rails3/app/controllers/home_controller.rb
324
+ - test/dummy-rails3/app/assets/javascripts/application.js
325
+ - test/dummy-rails3/app/assets/javascripts/home.js
326
+ - test/dummy-rails3/app/assets/stylesheets/home.css
327
+ - test/dummy-rails3/app/assets/stylesheets/application.css
328
+ - test/dummy-rails3/app/models/user.rb
329
+ - test/dummy-rails3/app/helpers/home_helper.rb
330
+ - test/dummy-rails3/app/helpers/application_helper.rb
331
+ - test/dummy-rails3/app/views/layouts/application.html.erb
332
+ - test/dummy-rails3/app/views/user_impersonate/_header.html.erb
333
+ - test/dummy-rails3/app/views/home/index.html.erb
334
+ - test/dummy-rails3/db/migrate/20120914184123_add_staff_flag_to_users.rb
335
+ - test/dummy-rails3/db/migrate/20120914174453_devise_create_users.rb
336
+ - test/dummy-rails3/db/schema.rb
337
+ - test/dummy-rails3/db/test.sqlite3
338
+ - test/dummy-rails3/db/development.sqlite3
339
+ - test/dummy-rails3/log/test.log
340
+ - test/dummy-rails3/log/development.log
341
+ - test/dummy-rails3/config.ru
342
+ - test/dummy-rails3/lib/tasks/cucumber.rake
343
+ - test/dummy-rails3/Rakefile
344
+ - test/dummy-rails3/README.rdoc
345
+ - test/dummy-rails3/test/fixtures/users.yml
346
+ - test/dummy-rails3/test/unit/user_test.rb
347
+ - test/dummy-rails3/test/unit/helpers/home_helper_test.rb
348
+ - test/dummy-rails3/script/rails
274
349
  - test/user_impersonate_test.rb
350
+ - test/test_utils.rb
351
+ - test/integration/navigation_test.rb
352
+ - test/dummy-rails4/config/boot.rb
353
+ - test/dummy-rails4/config/locales/en.yml
354
+ - test/dummy-rails4/config/locales/devise.en.yml
355
+ - test/dummy-rails4/config/database.yml
356
+ - test/dummy-rails4/config/initializers/mime_types.rb
357
+ - test/dummy-rails4/config/initializers/wrap_parameters.rb
358
+ - test/dummy-rails4/config/initializers/session_store.rb
359
+ - test/dummy-rails4/config/initializers/user_impersonate.rb
360
+ - test/dummy-rails4/config/initializers/secret_token.rb
361
+ - test/dummy-rails4/config/initializers/backtrace_silencers.rb
362
+ - test/dummy-rails4/config/initializers/devise.rb
363
+ - test/dummy-rails4/config/initializers/inflections.rb
364
+ - test/dummy-rails4/config/application.rb
365
+ - test/dummy-rails4/config/environment.rb
366
+ - test/dummy-rails4/config/environments/production.rb
367
+ - test/dummy-rails4/config/environments/test.rb
368
+ - test/dummy-rails4/config/environments/development.rb
369
+ - test/dummy-rails4/config/routes.rb
370
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/7411b44628aea038332f13f5ed73e073
371
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/2625847957ecb8614efc9b58b07cabdf
372
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
373
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
374
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/40fc2f3d2a468a00e463f1d313cb1683
375
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/681d1010f98d5ed273e67645c7cb454d
376
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/35f33ae400a6b0b5bf527436a68133b5
377
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
378
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/edbef6e0d0a4742346cf479f2c522eb0
379
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/d0cde4ef34755468270bb49c4a3689f1
380
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/fd6c8e27b44aa2db77bf0a8b5118bdf8
381
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/3b83d2c20dfdb631259eb9d056ea4419
382
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/8483b329d12e7e986bc5a2204bbcb4f8
383
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/1c9faaf28d05409b88ad3113374d613c
384
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
385
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/bdaaf186999b6b59a3063d23b589d307
386
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
387
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/f1aac9109f5dae028b3c56eb07311208
388
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
389
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/b6f020b01a84691088a0c459a18f9c7e
390
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/5f1c168e97e274509aa4673eab0d86f6
391
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/b878faf942403e313a5b103e5d80488e
392
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/7f14251885cab31b58c878119cbdc199
393
+ - test/dummy-rails4/tmp/cache/assets/test/sprockets/8ff157af159f38d424ce1367e29760a2
394
+ - test/dummy-rails4/public/500.html
395
+ - test/dummy-rails4/public/422.html
396
+ - test/dummy-rails4/public/favicon.ico
397
+ - test/dummy-rails4/public/404.html
398
+ - test/dummy-rails4/app/controllers/application_controller.rb
399
+ - test/dummy-rails4/app/controllers/home_controller.rb
400
+ - test/dummy-rails4/app/assets/javascripts/application.js
401
+ - test/dummy-rails4/app/assets/javascripts/home.js
402
+ - test/dummy-rails4/app/assets/stylesheets/home.css
403
+ - test/dummy-rails4/app/assets/stylesheets/application.css
404
+ - test/dummy-rails4/app/models/user.rb
405
+ - test/dummy-rails4/app/helpers/home_helper.rb
406
+ - test/dummy-rails4/app/helpers/application_helper.rb
407
+ - test/dummy-rails4/app/views/layouts/application.html.erb
408
+ - test/dummy-rails4/app/views/user_impersonate/_header.html.erb
409
+ - test/dummy-rails4/app/views/home/index.html.erb
410
+ - test/dummy-rails4/db/migrate/20120914184123_add_staff_flag_to_users.rb
411
+ - test/dummy-rails4/db/migrate/20120914174453_devise_create_users.rb
412
+ - test/dummy-rails4/db/schema.rb
413
+ - test/dummy-rails4/db/test.sqlite3
414
+ - test/dummy-rails4/db/development.sqlite3
415
+ - test/dummy-rails4/log/test.log
416
+ - test/dummy-rails4/log/development.log
417
+ - test/dummy-rails4/config.ru
418
+ - test/dummy-rails4/lib/tasks/cucumber.rake
419
+ - test/dummy-rails4/Rakefile
420
+ - test/dummy-rails4/README.rdoc
421
+ - test/dummy-rails4/test/fixtures/users.yml
422
+ - test/dummy-rails4/test/unit/user_test.rb
423
+ - test/dummy-rails4/test/unit/helpers/home_helper_test.rb
424
+ - test/dummy-rails4/script/rails