sixarm_ruby_sign_out_simple 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +11 -0
- data/lib/sixarm_ruby_sign_out_simple.rb +47 -0
- data/test/sixarm_ruby_sign_out_simple_test.rb +50 -0
- metadata +202 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dcfec717b65fe274ff1f503372e5d67809f19896
|
4
|
+
data.tar.gz: '09572cd21e830eabbcfb3e2232b65db08d684925'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ecbd1af2d1859d0a38db7b56a64b00c906ec4c861b61a136879e30b7ad9f8f303de85bb26f7abe91244be36d2f8415a0761993d475ae8b3918ee73dca4f2bfa
|
7
|
+
data.tar.gz: 7cb137a129779021e3c27fa249de92d615bbe1ad9ab702a06503ce5e923dba94d587b309692e050c1b8f1df9e5f1585c1b40c05c0f0d4d8344a7e7c8402f8999
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/Rakefile
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin rdoc
|
3
|
+
Please see README
|
4
|
+
=end
|
5
|
+
|
6
|
+
require "sixarm_ruby_sign_out"
|
7
|
+
|
8
|
+
module SignOutSimple
|
9
|
+
|
10
|
+
####################################################################
|
11
|
+
#
|
12
|
+
# Implement interface of SignInSignOut
|
13
|
+
#
|
14
|
+
####################################################################
|
15
|
+
|
16
|
+
include SignOut
|
17
|
+
|
18
|
+
def sign_out_attempt(options=nil)
|
19
|
+
current_user=nil
|
20
|
+
end
|
21
|
+
|
22
|
+
def sign_out_success(options=nil)
|
23
|
+
flash[:notice]=sign_out_success_message(options)
|
24
|
+
redirect_to :sign_out_success
|
25
|
+
end
|
26
|
+
|
27
|
+
def sign_out_failure(options=nil)
|
28
|
+
flash[:warning]=sign_out_failure_message(options)
|
29
|
+
redirect_to :sign_out_failure
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
####################################################################
|
34
|
+
#
|
35
|
+
# Helpers
|
36
|
+
#
|
37
|
+
####################################################################
|
38
|
+
|
39
|
+
def sign_out_success_message(options=nil)
|
40
|
+
"Sign Out Successful"
|
41
|
+
end
|
42
|
+
|
43
|
+
def sign_out_failure_message(options=nil)
|
44
|
+
"Sorry, your sign out failed." + ($! ? " #{$!}" : '')
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "minitest/autorun"
|
3
|
+
require "simplecov"
|
4
|
+
SimpleCov.start
|
5
|
+
require "sixarm_ruby_sign_out_simple"
|
6
|
+
|
7
|
+
class SignOutSimpleTest < Minitest::Test
|
8
|
+
|
9
|
+
include SignOutSimple
|
10
|
+
|
11
|
+
def initialize(ops)
|
12
|
+
super(ops)
|
13
|
+
@flash={}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Mock application controller flash hash
|
17
|
+
attr_accessor :flash
|
18
|
+
|
19
|
+
# Mock application controller method
|
20
|
+
def redirect_to(method)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_sign_out
|
24
|
+
assert_nil(@user,'user before sign in')
|
25
|
+
current_user='foo'
|
26
|
+
assert_equal('foo',current_user,'user after sign in')
|
27
|
+
sign_out
|
28
|
+
assert_nil(@user,'user after sign out')
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_sign_out_success_message
|
32
|
+
s=sign_out_success_message
|
33
|
+
assert_kind_of(String,s)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_sign_out_failure_message
|
37
|
+
s=sign_out_failure_message
|
38
|
+
assert_kind_of(String,s)
|
39
|
+
end
|
40
|
+
|
41
|
+
def current_user
|
42
|
+
@user
|
43
|
+
end
|
44
|
+
|
45
|
+
def current_user=(user)
|
46
|
+
@user=user
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sixarm_ruby_sign_out_simple
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- SixArm
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIGCTCCA/GgAwIBAgIJAK3igyLv2hNNMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
|
14
|
+
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
|
15
|
+
c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTUw
|
16
|
+
MzE0MjA0MTE5WhcNMTcxMjA4MjA0MTE5WjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
|
17
|
+
CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
|
18
|
+
U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIICIjANBgkqhkiG9w0BAQEFAAOC
|
19
|
+
Ag8AMIICCgKCAgEA4et7SlePzuE46eK5BAVVGg+yWt6FkX7xcLt3Uun9RntKPSuR
|
20
|
+
TbS/+KBqbja5reZD64hdQ9npxpQPKafxUm+RlCd9F5KFxwi8G9usKzCTPOwUeDI2
|
21
|
+
TNEfC+1eRU19QuEW58ZC0pC/bx5Zmp6/DTD6VV+qxKEE9U1M5P85LNkwnxqmRIMR
|
22
|
+
AN8VKOG+GRGOMNDGZ8Kp4h5V3Wyu0N7anY8AUveIx1SyLrEbAhcWp1asLs+/H22q
|
23
|
+
92YFgnw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LffsfG
|
38
|
+
E3hvCg4C5viEkPY0YdC0KMSqs5kIA2nCUiqpkwIOa36rVEwiKiU7OCfE3u3baDpL
|
39
|
+
FlfMBznZKOdxDFAmNaxvXBe2XeTzrZPvJtnNLWL6K4LaBHhq3bBdh1Hge0iMkpQ7
|
40
|
+
RTIGlfhlIFkMV3wT0LTsNznUPsoo6e+IW/tDrk23mrNRY6QynTETb+QVIevuzD9m
|
41
|
+
Drcxp/zlVhud+a0ezdnyNvF520arJWvqA4GrOo8F+TT2vVrjscgYjiVGdSq+8wQv
|
42
|
+
Efa5jhe8QwG7R1rdpMMP5yBSAqWuFBczMveX5j4rp9Ifw5/XsZbgwcmdm26bjhzh
|
43
|
+
w2grAHIhvR9mztm6uXQlZhv1fu3P+RWHDSYhnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
|
44
|
+
2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
|
45
|
+
n+ES/gQPOnvmVkLDGw==
|
46
|
+
-----END CERTIFICATE-----
|
47
|
+
date: 2017-08-13 00:00:00.000000000 Z
|
48
|
+
dependencies:
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: sixarm_ruby_sign_out
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.2.0
|
56
|
+
- - "<"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '2'
|
59
|
+
type: :runtime
|
60
|
+
prerelease: false
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 1.2.0
|
66
|
+
- - "<"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 5.7.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '6'
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 5.7.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '6'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: sixarm_ruby_minitest_extensions
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - '='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.0.5
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - '='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.0.5
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rake
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 10.4.2
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '11'
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 10.4.2
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '11'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: simplecov
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: 0.10.0
|
130
|
+
- - "<"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '2'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.10.0
|
140
|
+
- - "<"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '2'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: coveralls
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 0.8.2
|
150
|
+
- - "<"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '2'
|
153
|
+
type: :development
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.8.2
|
160
|
+
- - "<"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '2'
|
163
|
+
description: Sign Out methods for a a simple session in a Rails application
|
164
|
+
email: sixarm@sixarm.com
|
165
|
+
executables: []
|
166
|
+
extensions: []
|
167
|
+
extra_rdoc_files: []
|
168
|
+
files:
|
169
|
+
- Rakefile
|
170
|
+
- lib/sixarm_ruby_sign_out_simple.rb
|
171
|
+
- test/sixarm_ruby_sign_out_simple_test.rb
|
172
|
+
homepage: http://sixarm.com/
|
173
|
+
licenses:
|
174
|
+
- Apache-2.0
|
175
|
+
- Artistic-2.0
|
176
|
+
- BSD-3-Clause
|
177
|
+
- GPL-3.0
|
178
|
+
- MIT
|
179
|
+
- MPL-2.0
|
180
|
+
metadata: {}
|
181
|
+
post_install_message:
|
182
|
+
rdoc_options: []
|
183
|
+
require_paths:
|
184
|
+
- lib
|
185
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
requirements: []
|
196
|
+
rubyforge_project:
|
197
|
+
rubygems_version: 2.6.12
|
198
|
+
signing_key:
|
199
|
+
specification_version: 4
|
200
|
+
summary: SixArm.com → Ruby → Sign Out Simple
|
201
|
+
test_files:
|
202
|
+
- test/sixarm_ruby_sign_out_simple_test.rb
|
metadata.gz.sig
ADDED
Binary file
|