any_login 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.rdoc +14 -0
- data/app/helpers/any_login/application_helper.rb +6 -8
- data/app/views/any_login/_any_login.html.erb +7 -0
- data/lib/any_login/engine.rb +1 -1
- data/lib/any_login/version.rb +1 -1
- data/lib/any_login.rb +39 -24
- data/lib/generators/any_login/templates/any_login.rb +36 -11
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +242 -0
- data/test/dummy/log/test.log +48 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/1lYE8qPBRKXUAsRnf3gk8NegJL-cYCzzh6NIBeYlHYs.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2g5n9TE_h1vRhV3RJrIQBVfGZN1rYPYr6ZvIVucNgVc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6PMCdMg_2dKBMD8DkCqmUoH3ldV5OkZ5nvwljDoBdH4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6XiaQhYzBvjXCUWKXqshbEiSqe8iUKVzB2C1zx077CQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/74gllNatUC7aGpNymuvKWAygn7TmNyd0qdXZ9lg1JQM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7rKwcpLdOaoHGxckn2Ge5FgUy8HBSM_cPzoj6ARz5wA.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7ur7VUze24s0VKgJKWpnUo96FYlWHEmE8HNVJZZMNTE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/8J5UttxuuNSM5mKh5hyRghI8PoNRFENY8X_6QLbbOfc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9Yy5ptCLoco7Uk0qKQkIBOu2FrXudYAbMe0Pr5EUP6w.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/GAdJwtpszZDaIVjZ1vy_hhrduwyRVZ-UVvY1VWHC1F8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JfpYYgQOl98bixTPqj3FAoDhSKXJ3Ub_MH9z3aP6jKA.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/L_AtkChIDzDQbs-Pr_TXgR7FmvAOxWVWDzDR2iiCdF4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/N9jHHJbDDw_LM4FA7zwLCiW83fx6uLBdIFrLd520GcU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RICxiF1Y7tRr1144F7mHmJPW-mEKzj8mvHddAM2tiiM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/TJ_tK7-p_GdGb90PrEmFmAzUwSzEWwdaj2pb6zy13H4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Ys5Ts1TOD1v2k9r5njUxtsWR_2umBhElFUFn-TdbVdA.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Yuwct-OnX5PPbaS2CntZxJXvNCybsLUNkmGLDVgEuTI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ZOwfReZtdQF3nr2dDzQ3PMk26MtadyN6_tJ0LLU5XAo.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/_XAa4A9kgYBFJKTDcxeigUkvP0v-7mFowxE6gA9Nq34.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/cXqemjURVtiopj1xhMeZ9dVPP8PQxmmcfoFxs2ECDJk.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fPB8bs3KxLsCUFTEzNau_ZIwS-VAp6LoRPrjOj1Zq-g.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fn9HMBg5BgHGU-ql2KTwyzCILAIS-aH-ssZTqHtM4nY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jrxvOglDTse_Kj8BCk9lkuFHiDWX2UgU3QXDCOZN7vM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kBJuqNn2dOEsIRU1oldMu8xwlvPC1pZBTR69vxdj_2Y.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kcVmthtooBjFRbwO_aq2c6lVTwDzHm7WxDH7IGe9vVA.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kgiPUYLb_KG1c_uvY-pH_5a1CxHa2ZkPfDkB4qjIbyc.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/myQlTWBqjEV7aXVwBtOaHIt42To2MmC_zlFFqkPxjmw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pIVqc5tXAaLDSQbx4dvcFawX1iRPdcw_JTjDIE6Y0eM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pnW3u_1AN48ig6ngefI89y96xoSlvnJurx-e3J-leoE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sNQ7iQBvq_XelttqcqDBcMEh3K8YKjfwmgRii488T5Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sYqD_6_DLhWbWmBm4ZOKDNI8bKtF7czThI6GXwmFlMU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ssS2x0Wl67rwXHaVHsh6CO7ayn9fQ5saIwATKN6O-nI.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tuEq0SXuQh3A3UWa1dGXRLlKGMt6evB5YqwFJRyPvIE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uugggZv5gxeHU2FxmV1B-bNg7quJtLpNiQUQBY8hEu4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0jA5lfD3fvRln2Lpwad15GMLNs8RriO4KKcRlFsQjh8.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/3XAU8R3fiEE6OgIsZ5gQ918XOwFOKxWNVA8vcONJXbQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6CdQfmkgjpTrL5F_ehI4WNNz6Yg2xNe_pRij4YyjAL4.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/7ur7VUze24s0VKgJKWpnUo96FYlWHEmE8HNVJZZMNTE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/EeL-ex2zDf6MESKX3ynbEdmYeCzzmpFqVu5hqML2vEs.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/G-vyOkbSpcdRZNhOMT0k0HEQZzJJ3sekNJt4YgXWZQw.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IOMbfoQfR-qD-bpkgD1igJJtaZC4bot1whKp5cxJj-4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/MDlZ0rIJluMjuliCJLWzhrX5lO0AUM2cl_BzrqtZG_A.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/PMZVY-zwwRDk2eGrVs1DXo4uoE0-tRV1T_lNc6zVpCc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RICxiF1Y7tRr1144F7mHmJPW-mEKzj8mvHddAM2tiiM.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/S80sRUfCKQYCKZK1ks6FNO0efL-DtBs9lhgR3H_vsbA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/SFevJOJkgJ-XvcouzG6L9oYRYVOk-M1H1Ax-Vv6FDuk.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/TiheS8JTp3Jf_QApcNBiXE2V8LIhfIttEW0MJ6DdOVI.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/fJ-D4KiiFTLvTVtsUJakeu735r93BhTa1PPkKNTRA9M.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/g0mCuw0iGGIEBxiAkuBYRuimdtlLIT3JIe1cbqD6re8.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hfcIYgN5MYGnoaYRJpz5nqXJLCQAFnjtH_G27uzzJLA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hkkRbmd0f5Qlza2cZEJmxegPxWdodLGuk6VUQubAvhk.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/j4SaXt8q2nYIOMkWij7fFwFMGFAu77WlBosC-a2sqcc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/lxoMOMZXc1uEmoYCkKiDFA8s7-qG8VJqowjJmcqD_so.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/m0CJLwmOCi5uv1V-3KomvYQuB7WRGiRr-IAhaWPEmAg.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/m561By1TEJMrTmO8cbFIaunG01z9U38KYjFIktir8fA.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/myQlTWBqjEV7aXVwBtOaHIt42To2MmC_zlFFqkPxjmw.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/pH0BLJKP6n4il39dYzNX__XhYPMtEui2rS7Xfs-NfKM.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/pIVqc5tXAaLDSQbx4dvcFawX1iRPdcw_JTjDIE6Y0eM.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/pnW3u_1AN48ig6ngefI89y96xoSlvnJurx-e3J-leoE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sYqD_6_DLhWbWmBm4ZOKDNI8bKtF7czThI6GXwmFlMU.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ssS2x0Wl67rwXHaVHsh6CO7ayn9fQ5saIwATKN6O-nI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tuEq0SXuQh3A3UWa1dGXRLlKGMt6evB5YqwFJRyPvIE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uugggZv5gxeHU2FxmV1B-bNg7quJtLpNiQUQBY8hEu4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vFUE1soP_KVObc198xdj-M2xLzc7EMSUYeofHUVQaTI.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/wa3qT7SFthsffBhw-xMcFf0y7Jvtpi8OWoTMwIRY6kc.cache +0 -0
- metadata +94 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43ad85bf95f3ef785d593f9126d9bd045a6d84ae
|
|
4
|
+
data.tar.gz: 3085037f8db87969ac528c1c67c1a5ef0936386e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c4c02b63f38241d0d333e2cbf8c1c71cedfc336f10a4a31cf50338c21d5a2c4dac188d4196e7dc227a464859e1f49709257c22cedefe25312325b7c143f5632
|
|
7
|
+
data.tar.gz: 91ea6f153b4e180976ed79732bfefbdcefe71a167428dd3949ac2bb0ee4958bcd4dddc60b5e55529d9478f257664abec0641dc58eb4396af422a245e07d46c82
|
data/README.rdoc
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
{<img src="https://codeclimate.com/github/igorkasyanchuk/any_login/badges/gpa.svg" />}[https://codeclimate.com/github/igorkasyanchuk/any_login]
|
|
4
4
|
|
|
5
5
|
== Description
|
|
6
|
+
{<img src="https://i.ytimg.com/vi/978DlHvufSY/hqdefault.jpg" />}[https://youtu.be/978DlHvufSY]
|
|
7
|
+
|
|
6
8
|
AnyLogin is created to speedup development process and allow developer's quickly login as any user in DB.
|
|
7
9
|
|
|
10
|
+
Demo available on: https://any-login.herokuapp.com (source code for demo https://github.com/igorkasyanchuk/any_login_test)
|
|
11
|
+
|
|
12
|
+
Video demo: https://youtu.be/978DlHvufSY
|
|
13
|
+
|
|
8
14
|
== Requirements
|
|
9
15
|
Ruby: 1.9.3, 2.X, Rails: >= 4.0. Right now works only in pair with Devise gem.
|
|
10
16
|
|
|
@@ -22,6 +28,14 @@ If you want to customize gem run in console:
|
|
|
22
28
|
rails g any_login initializer
|
|
23
29
|
If will create file config/initializers/any_login.rb.
|
|
24
30
|
|
|
31
|
+
== Production
|
|
32
|
+
If you want to disable gem in production add following code in your config/environments/production.rb file.
|
|
33
|
+
AnyLogin.setup do |config|
|
|
34
|
+
config.enabled = false
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
25
39
|
== Future Plans
|
|
26
40
|
1. Add more tests.
|
|
27
41
|
2. Add support for more authentication gems like Devise.
|
|
@@ -2,16 +2,14 @@ module AnyLogin
|
|
|
2
2
|
module ApplicationHelper
|
|
3
3
|
extend ActiveSupport::Concern
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
def any_login_here
|
|
6
|
+
render 'any_login/any_login' if AnyLogin.enabled
|
|
7
|
+
end
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
if AnyLogin.enabled
|
|
9
|
-
render 'any_login/any_login'
|
|
10
|
-
end
|
|
11
|
-
end
|
|
9
|
+
if AnyLogin.enabled
|
|
12
10
|
|
|
13
11
|
def any_login_id_input
|
|
14
|
-
text_field_tag :id, '', :placeholder =>
|
|
12
|
+
text_field_tag :id, '', :placeholder => 'ID', :id => 'any_login_id_input'
|
|
15
13
|
end
|
|
16
14
|
|
|
17
15
|
def any_login_submit
|
|
@@ -47,7 +45,7 @@ module AnyLogin
|
|
|
47
45
|
def current_user_information
|
|
48
46
|
if respond_to?(AnyLogin.current_user_method) && user = send(AnyLogin.current_user_method)
|
|
49
47
|
content_tag :span, :class => 'any_login_user_information' do
|
|
50
|
-
raw("Current #{AnyLogin.klass_name}: #{h(AnyLogin.
|
|
48
|
+
raw("Current #{AnyLogin.klass_name}: #{h(AnyLogin.name_method.call(user)[0])} — ID: #{user.id}")
|
|
51
49
|
end
|
|
52
50
|
end
|
|
53
51
|
end
|
|
@@ -62,9 +62,16 @@
|
|
|
62
62
|
color: white;
|
|
63
63
|
font-size: 16px;
|
|
64
64
|
line-height: 20px;
|
|
65
|
+
z-index: 10000;
|
|
66
|
+
}
|
|
67
|
+
#any_login form {
|
|
68
|
+
padding: 0;
|
|
69
|
+
margin: 0;
|
|
65
70
|
}
|
|
66
71
|
#any_login input, #any_login select {
|
|
67
72
|
color: black;
|
|
73
|
+
padding: 0;
|
|
74
|
+
margin: 0;
|
|
68
75
|
}
|
|
69
76
|
#any_login .hidden_box {
|
|
70
77
|
display: none;
|
data/lib/any_login/engine.rb
CHANGED
|
@@ -3,7 +3,7 @@ module AnyLogin
|
|
|
3
3
|
isolate_namespace AnyLogin
|
|
4
4
|
|
|
5
5
|
initializer 'any_login.assets_precompile', :group => :all do |app|
|
|
6
|
-
app.config.assets.precompile +=
|
|
6
|
+
app.config.assets.precompile += ['any_login/person.png']
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
initializer 'any_login.helpers' do
|
data/lib/any_login/version.rb
CHANGED
data/lib/any_login.rb
CHANGED
|
@@ -6,46 +6,58 @@ module AnyLogin
|
|
|
6
6
|
autoload :Devise, 'any_login/strategy/devise'
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
# enable in development mode only
|
|
9
10
|
mattr_accessor :enabled
|
|
10
|
-
@@enabled =
|
|
11
|
+
@@enabled = Rails.env.to_s == 'development'
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
# current strategy, depends on auth gem
|
|
14
|
+
mattr_accessor :strategy
|
|
13
15
|
@@strategy = nil
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
mattr_accessor :klass_name # Account, User, Person, etc
|
|
17
|
+
# Account, User, Person, etc
|
|
18
|
+
mattr_accessor :klass_name
|
|
19
19
|
@@klass_name = 'User'
|
|
20
20
|
|
|
21
21
|
# .all, .active, .admins, .groped_collection, etc ... need to return an array (or hash with arrays) of users
|
|
22
22
|
mattr_accessor :collection_method
|
|
23
23
|
@@collection_method = :all
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
# to format user name in dropdown list
|
|
26
|
+
mattr_accessor :name_method
|
|
27
|
+
@@name_method = proc { |e| [e.email, e.id] }
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
# after logging in redirect user to path
|
|
30
|
+
mattr_accessor :redirect_path_after_login
|
|
29
31
|
@@redirect_path_after_login = :root_path
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
# login on select change event OR click on button, or BOTH
|
|
34
|
+
mattr_accessor :login_on
|
|
32
35
|
@@login_on = :both
|
|
33
36
|
|
|
37
|
+
# position of any_login box top_left, top_right, bottom_left, bottom_right
|
|
34
38
|
mattr_accessor :position
|
|
35
|
-
@@position = :bottom_left
|
|
39
|
+
@@position = :bottom_left
|
|
36
40
|
|
|
41
|
+
# label on Login button
|
|
37
42
|
mattr_accessor :login_button_label
|
|
38
|
-
@@login_button_label = 'Login'
|
|
43
|
+
@@login_button_label = 'Login'
|
|
39
44
|
|
|
45
|
+
# prompt message in select
|
|
40
46
|
mattr_accessor :select_prompt
|
|
41
|
-
@@select_prompt = "Select #{AnyLogin.klass_name}"
|
|
47
|
+
@@select_prompt = "Select #{AnyLogin.klass_name}"
|
|
42
48
|
|
|
49
|
+
# method to return current_user logged in
|
|
43
50
|
mattr_accessor :current_user_method
|
|
44
|
-
@@current_user_method = :current_user
|
|
51
|
+
@@current_user_method = :current_user
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
# show any_login box by default
|
|
54
|
+
mattr_accessor :auto_show
|
|
47
55
|
@@auto_show = false
|
|
48
56
|
|
|
57
|
+
# limit, integer or :none
|
|
58
|
+
mattr_accessor :limit
|
|
59
|
+
@@limit = 10
|
|
60
|
+
|
|
49
61
|
def self.setup
|
|
50
62
|
yield(self)
|
|
51
63
|
end
|
|
@@ -68,18 +80,21 @@ module AnyLogin
|
|
|
68
80
|
@@klass ||= AnyLogin.klass_name.constantize
|
|
69
81
|
end
|
|
70
82
|
|
|
71
|
-
def self.assets
|
|
72
|
-
@@assets ||= ['any_login/person.png']
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def self.format(user)
|
|
76
|
-
user.email
|
|
77
|
-
end
|
|
78
|
-
|
|
79
83
|
private
|
|
80
84
|
|
|
81
85
|
def self.collection_raw
|
|
82
|
-
@@collection_raw ||=
|
|
86
|
+
@@collection_raw ||= begin
|
|
87
|
+
result = AnyLogin.klass.send(AnyLogin.collection_method)
|
|
88
|
+
if limit == :none
|
|
89
|
+
result
|
|
90
|
+
elsif result.is_a?(ActiveRecord::Relation)
|
|
91
|
+
result.limit(limit)
|
|
92
|
+
elsif result.is_a?(Array)
|
|
93
|
+
result.take(limit)
|
|
94
|
+
else
|
|
95
|
+
result
|
|
96
|
+
end
|
|
97
|
+
end
|
|
83
98
|
end
|
|
84
99
|
|
|
85
100
|
def self.collection_type
|
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
AnyLogin.setup do |config|
|
|
2
|
-
|
|
3
|
-
config.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
config.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
config.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
config.
|
|
2
|
+
# # enabled or not
|
|
3
|
+
# config.enabled = Rails.env.to_s == 'development'
|
|
4
|
+
|
|
5
|
+
# # Account, User, Person, etc
|
|
6
|
+
# config.klass_name = 'User'
|
|
7
|
+
|
|
8
|
+
# # .all, .active, .admins, .groped_collection, etc ... need to return an array (or hash with arrays) of users
|
|
9
|
+
# config.collection_method = :all
|
|
10
|
+
|
|
11
|
+
# # to format user name in dropdown list
|
|
12
|
+
# config.name_method = proc { |e| [e.email, e.id] }
|
|
13
|
+
|
|
14
|
+
# # after logging in redirect user to path
|
|
15
|
+
# config.redirect_path_after_login = :root_path
|
|
16
|
+
|
|
17
|
+
# # login on select change event OR click on button, or BOTH
|
|
18
|
+
# config.login_on = :both
|
|
19
|
+
|
|
20
|
+
# # position of any_login box top_left, top_right, bottom_left, bottom_right
|
|
21
|
+
# config.position = :bottom_left
|
|
22
|
+
|
|
23
|
+
# # label on Login button
|
|
24
|
+
# config.login_button_label = 'Login'
|
|
25
|
+
|
|
26
|
+
# # prompt message in select
|
|
27
|
+
# config.select_prompt = "Select #{AnyLogin.klass_name}"
|
|
28
|
+
|
|
29
|
+
# # method to return current_user logged in
|
|
30
|
+
# config.current_user_method = :current_user
|
|
31
|
+
|
|
32
|
+
# # show any_login box by default
|
|
33
|
+
# config.auto_show = false
|
|
34
|
+
|
|
35
|
+
# # limit, integer or :none
|
|
36
|
+
# mattr_accessor :limit
|
|
37
|
+
# @@limit = 10
|
|
13
38
|
end
|
|
Binary file
|
|
@@ -1126,3 +1126,245 @@ Processing by HomeController#index as HTML
|
|
|
1126
1126
|
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (9.5ms)
|
|
1127
1127
|
Rendered shared/_footer.html.erb (10.9ms)
|
|
1128
1128
|
Completed 200 OK in 62ms (Views: 61.1ms | ActiveRecord: 0.2ms)
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:32:50 -0700
|
|
1132
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1133
|
+
Processing by HomeController#index as HTML
|
|
1134
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1135
|
+
Rendered home/index.html.erb within layouts/application (28.8ms)
|
|
1136
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1137
|
+
Rendered shared/_footer.html.erb (15.9ms)
|
|
1138
|
+
Completed 500 Internal Server Error in 366ms (ActiveRecord: 0.7ms)
|
|
1139
|
+
|
|
1140
|
+
ActionView::Template::Error (undefined local variable or method `any_login_here' for #<#<Class:0x00000005335040>:0x00000005334078>):
|
|
1141
|
+
12: <%= link_to 'Sign in', new_user_session_path %>
|
|
1142
|
+
13: <% end %>
|
|
1143
|
+
14:
|
|
1144
|
+
15: <%= any_login_here %>
|
|
1145
|
+
16: </div>
|
|
1146
|
+
app/views/shared/_footer.html.erb:15:in `_app_views_shared__footer_html_erb__3015844797471412359_34651260'
|
|
1147
|
+
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___1245146754190177258_43142620'
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (6.7ms)
|
|
1151
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.6ms)
|
|
1152
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms)
|
|
1153
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (19.0ms)
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:32:50 -0700
|
|
1157
|
+
Processing by HomeController#index as HTML
|
|
1158
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["id", 40]]
|
|
1159
|
+
Rendered home/index.html.erb within layouts/application (1.8ms)
|
|
1160
|
+
Rendered shared/_header.html.erb (0.0ms)
|
|
1161
|
+
Rendered shared/_footer.html.erb (12.7ms)
|
|
1162
|
+
Completed 500 Internal Server Error in 45ms (ActiveRecord: 0.1ms)
|
|
1163
|
+
|
|
1164
|
+
ActionView::Template::Error (undefined local variable or method `any_login_here' for #<#<Class:0x00000005335040>:0x007f1e7001c558>):
|
|
1165
|
+
12: <%= link_to 'Sign in', new_user_session_path %>
|
|
1166
|
+
13: <% end %>
|
|
1167
|
+
14:
|
|
1168
|
+
15: <%= any_login_here %>
|
|
1169
|
+
16: </div>
|
|
1170
|
+
app/views/shared/_footer.html.erb:15:in `_app_views_shared__footer_html_erb__3015844797471412359_34651260'
|
|
1171
|
+
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___1245146754190177258_43142620'
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (7.7ms)
|
|
1175
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.9ms)
|
|
1176
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
|
|
1177
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (21.3ms)
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:33:16 -0700
|
|
1181
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1182
|
+
Processing by HomeController#index as HTML
|
|
1183
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1184
|
+
Rendered home/index.html.erb within layouts/application (29.5ms)
|
|
1185
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1186
|
+
Rendered shared/_footer.html.erb (13.7ms)
|
|
1187
|
+
Completed 500 Internal Server Error in 281ms (ActiveRecord: 0.8ms)
|
|
1188
|
+
|
|
1189
|
+
ActionView::Template::Error (undefined local variable or method `any_login_here' for #<#<Class:0x000000043ccd10>:0x000000043aff08>):
|
|
1190
|
+
12: <%= link_to 'Sign in', new_user_session_path %>
|
|
1191
|
+
13: <% end %>
|
|
1192
|
+
14:
|
|
1193
|
+
15: <%= any_login_here %>
|
|
1194
|
+
16: </div>
|
|
1195
|
+
app/views/shared/_footer.html.erb:15:in `_app_views_shared__footer_html_erb___3018989629324594198_38149960'
|
|
1196
|
+
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___557626311001893951_35054840'
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (13.5ms)
|
|
1200
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (5.6ms)
|
|
1201
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.0ms)
|
|
1202
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (30.0ms)
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:34:44 -0700
|
|
1206
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1207
|
+
Processing by HomeController#index as HTML
|
|
1208
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1209
|
+
Rendered home/index.html.erb within layouts/application (28.6ms)
|
|
1210
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1211
|
+
Rendered shared/_footer.html.erb (14.7ms)
|
|
1212
|
+
Completed 500 Internal Server Error in 241ms (ActiveRecord: 0.9ms)
|
|
1213
|
+
|
|
1214
|
+
ActionView::Template::Error (undefined local variable or method `any_login_here' for #<#<Class:0x00000004080fa8>:0x00000004080558>):
|
|
1215
|
+
12: <%= link_to 'Sign in', new_user_session_path %>
|
|
1216
|
+
13: <% end %>
|
|
1217
|
+
14:
|
|
1218
|
+
15: <%= any_login_here %>
|
|
1219
|
+
16: </div>
|
|
1220
|
+
app/views/shared/_footer.html.erb:15:in `_app_views_shared__footer_html_erb__4494019066742868573_70123803598900'
|
|
1221
|
+
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___1034419997365460230_33310560'
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (5.9ms)
|
|
1225
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.4ms)
|
|
1226
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
|
|
1227
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (18.3ms)
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:35:58 -0700
|
|
1231
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1232
|
+
Processing by HomeController#index as HTML
|
|
1233
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1234
|
+
Rendered home/index.html.erb within layouts/application (29.7ms)
|
|
1235
|
+
Rendered shared/_header.html.erb (0.4ms)
|
|
1236
|
+
Rendered shared/_footer.html.erb (0.9ms)
|
|
1237
|
+
Completed 200 OK in 195ms (Views: 194.1ms | ActiveRecord: 0.6ms)
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:37:10 -0700
|
|
1241
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1242
|
+
Processing by HomeController#index as HTML
|
|
1243
|
+
[1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1244
|
+
Rendered home/index.html.erb within layouts/application (29.0ms)
|
|
1245
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1246
|
+
[1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
|
|
1247
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (11.7ms)
|
|
1248
|
+
Rendered shared/_footer.html.erb (13.3ms)
|
|
1249
|
+
Completed 500 Internal Server Error in 280ms (ActiveRecord: 1.7ms)
|
|
1250
|
+
|
|
1251
|
+
ActionView::Template::Error (private method `format' called for AnyLogin:Module):
|
|
1252
|
+
6: or by
|
|
1253
|
+
7: <%= any_login_id_input %>
|
|
1254
|
+
8: <%= any_login_submit %>
|
|
1255
|
+
9: <span id='current_user_information'><%= current_user_information %></span>
|
|
1256
|
+
10: </span>
|
|
1257
|
+
11: <% end %>
|
|
1258
|
+
12: </div>
|
|
1259
|
+
app/views/shared/_footer.html.erb:15:in `_app_views_shared__footer_html_erb___3264724362868146009_70223467431840'
|
|
1260
|
+
app/views/layouts/application.html.erb:20:in `_app_views_layouts_application_html_erb___4160253846088136044_37387100'
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (13.5ms)
|
|
1264
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (6.6ms)
|
|
1265
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.0ms)
|
|
1266
|
+
Rendered /usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (34.2ms)
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:38:11 -0700
|
|
1270
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1271
|
+
Processing by HomeController#index as HTML
|
|
1272
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1273
|
+
Rendered home/index.html.erb within layouts/application (27.8ms)
|
|
1274
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1275
|
+
[1m[36mUser Load (0.8ms)[0m [1mSELECT "users".* FROM "users"[0m
|
|
1276
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (9.0ms)
|
|
1277
|
+
Rendered shared/_footer.html.erb (10.3ms)
|
|
1278
|
+
Completed 200 OK in 281ms (Views: 279.4ms | ActiveRecord: 1.4ms)
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:38:39 -0700
|
|
1282
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1283
|
+
Processing by HomeController#index as HTML
|
|
1284
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 40]]
|
|
1285
|
+
Rendered home/index.html.erb within layouts/application (28.7ms)
|
|
1286
|
+
Rendered shared/_header.html.erb (0.5ms)
|
|
1287
|
+
[1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
|
|
1288
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (9.0ms)
|
|
1289
|
+
Rendered shared/_footer.html.erb (10.5ms)
|
|
1290
|
+
Completed 200 OK in 285ms (Views: 283.1ms | ActiveRecord: 1.4ms)
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
Started POST "/any_login/any_login/sign_in" for 192.168.217.1 at 2015-09-22 01:38:45 -0700
|
|
1294
|
+
Processing by AnyLogin::ApplicationController#any_login as HTML
|
|
1295
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"nDfWKDw7sAMYTUtFQnXbpiCZbdwXe3e5naXHc2bq0ocHLZt0eJdXF3ksHWOTbvLAfLYFy4cSGWHSfRy5OpYhjw==", "selected_id"=>"18", "id"=>""}
|
|
1296
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 18]]
|
|
1297
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["id", 40]]
|
|
1298
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
1299
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["last_sign_in_at", "2015-09-22 08:38:45.731166"], ["current_sign_in_at", "2015-09-22 08:38:45.731166"], ["last_sign_in_ip", "192.168.217.1"], ["current_sign_in_ip", "192.168.217.1"], ["sign_in_count", 1], ["updated_at", "2015-09-22 08:38:45.732248"], ["id", 18]]
|
|
1300
|
+
[1m[35m (4.2ms)[0m commit transaction
|
|
1301
|
+
Redirected to http://cn.com:3000/
|
|
1302
|
+
Completed 302 Found in 13ms (ActiveRecord: 4.9ms)
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:38:45 -0700
|
|
1306
|
+
Processing by HomeController#index as HTML
|
|
1307
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["id", 18]]
|
|
1308
|
+
Rendered home/index.html.erb within layouts/application (1.5ms)
|
|
1309
|
+
Rendered shared/_header.html.erb (0.0ms)
|
|
1310
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (6.7ms)
|
|
1311
|
+
Rendered shared/_footer.html.erb (7.9ms)
|
|
1312
|
+
Completed 200 OK in 42ms (Views: 41.3ms | ActiveRecord: 0.2ms)
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:39:24 -0700
|
|
1316
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1317
|
+
Processing by HomeController#index as HTML
|
|
1318
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 18]]
|
|
1319
|
+
Rendered home/index.html.erb within layouts/application (28.9ms)
|
|
1320
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1321
|
+
[1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
|
|
1322
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (12.7ms)
|
|
1323
|
+
Rendered shared/_footer.html.erb (14.2ms)
|
|
1324
|
+
Completed 200 OK in 283ms (Views: 281.2ms | ActiveRecord: 1.5ms)
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:40:51 -0700
|
|
1328
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1329
|
+
Processing by HomeController#index as HTML
|
|
1330
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 18]]
|
|
1331
|
+
Rendered home/index.html.erb within layouts/application (27.7ms)
|
|
1332
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1333
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" LIMIT 10[0m
|
|
1334
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (5.5ms)
|
|
1335
|
+
Rendered shared/_footer.html.erb (7.1ms)
|
|
1336
|
+
Completed 200 OK in 273ms (Views: 271.7ms | ActiveRecord: 1.0ms)
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
Started POST "/any_login/any_login/sign_in" for 192.168.217.1 at 2015-09-22 01:40:56 -0700
|
|
1340
|
+
Processing by AnyLogin::ApplicationController#any_login as HTML
|
|
1341
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"dWeQ59GsgZG43nkqd6XoVvlKRc0OBI0RokeAiFjEPgTufd27lQBmhdm/LwymvsEwpWUt2p5t48ntn1tCBLjNDA==", "selected_id"=>"7", "id"=>""}
|
|
1342
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 7]]
|
|
1343
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["id", 18]]
|
|
1344
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
1345
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["last_sign_in_at", "2015-09-22 08:40:56.139800"], ["current_sign_in_at", "2015-09-22 08:40:56.139800"], ["last_sign_in_ip", "192.168.217.1"], ["current_sign_in_ip", "192.168.217.1"], ["sign_in_count", 1], ["updated_at", "2015-09-22 08:40:56.140908"], ["id", 7]]
|
|
1346
|
+
[1m[35m (6.3ms)[0m commit transaction
|
|
1347
|
+
Redirected to http://cn.com:3000/
|
|
1348
|
+
Completed 302 Found in 16ms (ActiveRecord: 7.0ms)
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:40:56 -0700
|
|
1352
|
+
Processing by HomeController#index as HTML
|
|
1353
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1[0m [["id", 7]]
|
|
1354
|
+
Rendered home/index.html.erb within layouts/application (1.3ms)
|
|
1355
|
+
Rendered shared/_header.html.erb (0.0ms)
|
|
1356
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (2.9ms)
|
|
1357
|
+
Rendered shared/_footer.html.erb (3.8ms)
|
|
1358
|
+
Completed 200 OK in 33ms (Views: 32.9ms | ActiveRecord: 0.1ms)
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
Started GET "/" for 192.168.217.1 at 2015-09-22 01:41:11 -0700
|
|
1362
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1363
|
+
Processing by HomeController#index as HTML
|
|
1364
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 7]]
|
|
1365
|
+
Rendered home/index.html.erb within layouts/application (26.4ms)
|
|
1366
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
1367
|
+
[1m[36mUser Load (0.8ms)[0m [1mSELECT "users".* FROM "users"[0m
|
|
1368
|
+
Rendered /root/projects/any_login/app/views/any_login/_any_login.html.erb (10.5ms)
|
|
1369
|
+
Rendered shared/_footer.html.erb (12.3ms)
|
|
1370
|
+
Completed 200 OK in 257ms (Views: 255.1ms | ActiveRecord: 1.5ms)
|
data/test/dummy/log/test.log
CHANGED
|
@@ -371,3 +371,51 @@ Processing by HomeController#index as HTML
|
|
|
371
371
|
Rendered shared/_footer.html.erb (18.4ms)
|
|
372
372
|
Completed 200 OK in 153ms (Views: 151.3ms | ActiveRecord: 1.0ms)
|
|
373
373
|
[1m[35m (0.1ms)[0m rollback transaction
|
|
374
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
375
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
376
|
+
------------------------
|
|
377
|
+
AnyLoginTest: test_truth
|
|
378
|
+
------------------------
|
|
379
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
380
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
381
|
+
-----------------------------------------
|
|
382
|
+
HomeControllerTest: test_should_get_about
|
|
383
|
+
-----------------------------------------
|
|
384
|
+
Processing by HomeController#about as HTML
|
|
385
|
+
Completed 401 Unauthorized in 6ms (ActiveRecord: 0.0ms)
|
|
386
|
+
Rendered text template (0.0ms)
|
|
387
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
388
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
389
|
+
-----------------------------------------
|
|
390
|
+
HomeControllerTest: test_should_get_index
|
|
391
|
+
-----------------------------------------
|
|
392
|
+
Processing by HomeController#index as HTML
|
|
393
|
+
Rendered home/index.html.erb within layouts/application (2.6ms)
|
|
394
|
+
Rendered shared/_header.html.erb (0.4ms)
|
|
395
|
+
Rendered shared/_footer.html.erb (0.9ms)
|
|
396
|
+
Completed 200 OK in 242ms (Views: 241.9ms | ActiveRecord: 0.0ms)
|
|
397
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
398
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
399
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
400
|
+
------------------------
|
|
401
|
+
AnyLoginTest: test_truth
|
|
402
|
+
------------------------
|
|
403
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
404
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
405
|
+
-----------------------------------------
|
|
406
|
+
HomeControllerTest: test_should_get_about
|
|
407
|
+
-----------------------------------------
|
|
408
|
+
Processing by HomeController#about as HTML
|
|
409
|
+
Completed 401 Unauthorized in 7ms (ActiveRecord: 0.0ms)
|
|
410
|
+
Rendered text template (0.0ms)
|
|
411
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
|
412
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
413
|
+
-----------------------------------------
|
|
414
|
+
HomeControllerTest: test_should_get_index
|
|
415
|
+
-----------------------------------------
|
|
416
|
+
Processing by HomeController#index as HTML
|
|
417
|
+
Rendered home/index.html.erb within layouts/application (3.0ms)
|
|
418
|
+
Rendered shared/_header.html.erb (0.3ms)
|
|
419
|
+
Rendered shared/_footer.html.erb (0.8ms)
|
|
420
|
+
Completed 200 OK in 131ms (Views: 130.6ms | ActiveRecord: 0.0ms)
|
|
421
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�/usr/local/rvm/gems/ruby-2.2.2/gems/jquery-rails-4.0.5/vendor/assets/javascripts/jquery_ujs.js?type=application/javascript&pipeline=self&id=b5dc6a459e7c534699b855d28ca657ec4f387bf6f906941f4f6262746cf18cb0:ET
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�app/assets/javascripts/application.js?type=application/javascript&id=e40fbbaa81025802e026a19c687f4349265453327460b830d81ada03e230beef:ET
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"app/assets/stylesheets/home.css?type=text/css&pipeline=self&id=b49762b994cf4ee2f1c479f83d95dcefecf182cd85efe9798a1c91cd5705c727:ET
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�app/assets/stylesheets/bootstrap.min.css?type=text/css&pipeline=self&id=14a655ea101eef913347a9a358ddfb4ae83d14e234f443f6b5b2c5701d393ea3:ET
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"}app/assets/stylesheets/application.css?type=text/css&id=45782a20c5a30e064cfb314cf221a73d2b524cbcea7dc7896d0eaf55a1a6851f:ET
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�app/assets/stylesheets/bootstrap-theme.min.css?type=text/css&pipeline=self&id=7c323618b6cc18cbd6a8fc17679cf8800926d79ba508fc2a268b4f987c5a27f7:ET
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=995b4f06bf71bef2c13dd0fb1d95f89546ffae8cdeaa6f580bab714d79b511ca:ET
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�/root/projects/any_login/app/assets/images/any_login/person.png?type=image/png&id=05d5c4c192a7019c944389904b662109b6f1bda6c4694f30c1053fd880c617e5:ET
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
I"�app/assets/javascripts/home.js?type=application/javascript&pipeline=self&id=fe78c7969f95ce298c2bd327347500204f7f8f7ba79f79b864aa9838ca3a977e:ET
|
|
Binary file
|