sixarm_ruby_sign_in 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f659858417539c4678e22ecba4172b21bbd4a0a
4
- data.tar.gz: bd618ffe352b1a7629ae0c668e56c2f5ee242d61
3
+ metadata.gz: 3968c09a165adc31fb600f39b344674646f899ac
4
+ data.tar.gz: 40a11ccc85d83bd3305c5b72e4a799a58b629e5b
5
5
  SHA512:
6
- metadata.gz: 52cf29c31bf1418d9bf6e83eb8e483264d65cf1d3cc438477d3b8fbcb3bc0ea3e9e98cc71923d2a8911f06c4596fd618d2c72314cf3b1401d490b985232aa7b9
7
- data.tar.gz: 96807e46ca5cdafd51bd7e40e9ac5efe8e47fee4530163d8ae5b78b3473f3ebeb57245a43345d08a0e92f629dbd3df6c22882a5b03ba0438cff2fba5c2effb17
6
+ metadata.gz: 16ff782f768156825b57d4974edd1f2d4ef2df7a688d627857ce3c6faa55f370b38e903130af825da4a654e77f5603307ecc2ba8a33d95a392f144f069416f6b
7
+ data.tar.gz: 3da5163c904cbef35aff432f1ad4b3d55a0c20ee2a1dc4013287b4d3ec6d48e234784f35c456d1f689a118cc5c3f75082934fffa9c14054fde9bd9c7a5fdacef
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -2,7 +2,11 @@
2
2
  require "rake"
3
3
  require "rake/testtask"
4
4
 
5
+ task :default => [:test]
6
+
5
7
  Rake::TestTask.new(:test) do |t|
6
- t.libs << 'lib' << 'test'
7
- t.pattern = 'test/*.rb'
8
+ t.libs.push("lib", "test")
9
+ t.pattern = "test/**/*.rb"
8
10
  end
11
+
12
+ task :default => [:test]
@@ -4,19 +4,19 @@ require "simplecov"
4
4
  SimpleCov.start
5
5
  require "sixarm_ruby_sign_in"
6
6
 
7
- class SignInTest < Test::Unit::TestCase
8
-
7
+ class SignInTest < Minitest::Test
8
+
9
9
  include SignIn
10
-
10
+
11
11
  RIGHT=:foo
12
12
  WRONG=:bar
13
-
13
+
14
14
  def setup
15
15
  @sign_in_attempt_seen=nil
16
16
  @sign_in_success_seen=nil
17
17
  @sign_in_failure_seen=nil
18
18
  end
19
-
19
+
20
20
  def test_sign_in_right
21
21
  user=RIGHT
22
22
  x=sign_in(user)
@@ -25,7 +25,7 @@ class SignInTest < Test::Unit::TestCase
25
25
  assert(!@sign_in_failure_seen,"sign_in_failure_seen user:#{user}")
26
26
  assert_equal(true,x,"sign_in x:#{x}")
27
27
  end
28
-
28
+
29
29
  def test_sign_in_wrong
30
30
  user=WRONG
31
31
  x=sign_in(user)
@@ -34,7 +34,7 @@ class SignInTest < Test::Unit::TestCase
34
34
  assert( @sign_in_failure_seen,"sign_in_failure_seen user:#{user}")
35
35
  assert_equal(false,x,"sign_in user:#{x}")
36
36
  end
37
-
37
+
38
38
  def sign_in_attempt(options=nil)
39
39
  @sign_in_attempt_seen=true
40
40
  if options==WRONG then raise SecurityError end
@@ -44,7 +44,7 @@ class SignInTest < Test::Unit::TestCase
44
44
  def sign_in_success(options=nil)
45
45
  @sign_in_success_seen=true
46
46
  end
47
-
47
+
48
48
  def sign_in_failure(options=nil)
49
49
  @sign_in_failure_seen=true
50
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_sign_in
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SixArm
@@ -44,29 +44,119 @@ cert_chain:
44
44
  2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
45
  n+ES/gQPOnvmVkLDGw==
46
46
  -----END CERTIFICATE-----
47
- date: 2015-07-08 00:00:00.000000000 Z
48
- dependencies: []
47
+ date: 2017-08-13 00:00:00.000000000 Z
48
+ dependencies:
49
+ - !ruby/object:Gem::Dependency
50
+ name: minitest
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 5.7.0
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: '6'
59
+ type: :development
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 5.7.0
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: '6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sixarm_ruby_minitest_extensions
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.5
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.5
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">"
88
+ - !ruby/object:Gem::Version
89
+ version: 10.4.2
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '11'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">"
98
+ - !ruby/object:Gem::Version
99
+ version: 10.4.2
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: '11'
103
+ - !ruby/object:Gem::Dependency
104
+ name: simplecov
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 0.10.0
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: '2'
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 0.10.0
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '2'
123
+ - !ruby/object:Gem::Dependency
124
+ name: coveralls
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 0.8.2
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.8.2
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '2'
49
143
  description: Sign In abstraction for a typical web app user
50
144
  email: sixarm@sixarm.com
51
145
  executables: []
52
146
  extensions: []
53
147
  extra_rdoc_files: []
54
148
  files:
55
- - ".gemtest"
56
- - CHANGES.md
57
- - LICENSE.md
58
- - README.md
59
149
  - Rakefile
60
- - VERSION
61
150
  - lib/sixarm_ruby_sign_in.rb
62
151
  - test/sixarm_ruby_sign_in_test.rb
63
152
  homepage: http://sixarm.com/
64
153
  licenses:
65
- - BSD
66
- - GPL
154
+ - Apache-2.0
155
+ - Artistic-2.0
156
+ - BSD-3-Clause
157
+ - GPL-3.0
67
158
  - MIT
68
- - PAL
69
- - Various
159
+ - MPL-2.0
70
160
  metadata: {}
71
161
  post_install_message:
72
162
  rdoc_options: []
@@ -84,9 +174,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
174
  version: '0'
85
175
  requirements: []
86
176
  rubyforge_project:
87
- rubygems_version: 2.4.8
177
+ rubygems_version: 2.6.12
88
178
  signing_key:
89
179
  specification_version: 4
90
- summary: SixArm.com » Ruby » Sign In
180
+ summary: SixArm.com Ruby Sign In
91
181
  test_files:
92
182
  - test/sixarm_ruby_sign_in_test.rb
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes
data/CHANGES.md DELETED
@@ -1,5 +0,0 @@
1
- # Changes
2
-
3
- * 2015-07-07 1.1.6 Update gemspec to use file manifest
4
- * 2012-03-14 1.1.5 Update docs, tests
5
- * 2010-10-02 1.1.4 Update for Ruby 1.9
data/LICENSE.md DELETED
@@ -1,28 +0,0 @@
1
- # License
2
-
3
- You may choose any of these open source licenses:
4
-
5
- * Apache License
6
- * BSD License
7
- * CreativeCommons License, Non-commercial Share Alike
8
- * GNU Affero General Public License (AGPL)
9
- * GNU General Public License Version (GPL)
10
- * GNU Lesser General Public License (LGPL)
11
- * MIT License
12
- * Perl Artistic License
13
- * Ruby License
14
-
15
- The software is provided "as is", without warranty of any kind,
16
- express or implied, including but not limited to the warranties of
17
- merchantability, fitness for a particular purpose and noninfringement.
18
-
19
- In no event shall the authors or copyright holders be liable for any
20
- claim, damages or other liability, whether in an action of contract,
21
- tort or otherwise, arising from, out of or in connection with the
22
- software or the use or other dealings in the software.
23
-
24
- This license is for the included software that is created by SixArm.
25
- Some of the included software may have its own licenses, copyrights,
26
- authors, etc. and these may take precedence over the SixArm license.
27
-
28
- Copyright (c) Joel Parker Henderson
data/README.md DELETED
@@ -1,94 +0,0 @@
1
- # Ruby » <br> SignIn interface for typical Rails user sign in
2
-
3
- * Doc: <http://sixarm.com/sixarm_ruby_sign_in/doc>
4
- * Gem: <http://rubygems.org/gems/sixarm_ruby_sign_in>
5
- * Repo: <http://github.com/sixarm/sixarm_ruby_sign_in>
6
- * Email: Joel Parker Henderson, <joel@sixarm.com>
7
-
8
-
9
- ## Introduction
10
-
11
- Sign In simple abstract framework.
12
-
13
- You can include this module in your application controller,
14
- then your controller can define any of these concrete methods.
15
-
16
- For docs go to <http://sixarm.com/sixarm_ruby_sign_in/doc>
17
-
18
- Want to help? We're happy to get pull requests.
19
-
20
-
21
- ## Install quickstart
22
-
23
- Install:
24
-
25
- gem install sixarm_ruby_sign_in
26
-
27
- Bundler:
28
-
29
- gem "sixarm_ruby_sign_in", "~>1.1.4"
30
-
31
- Require:
32
-
33
- require "sixarm_ruby_sign_in"
34
-
35
-
36
- ## Install with security (optional)
37
-
38
- To enable high security for all our gems:
39
-
40
- wget http://sixarm.com/sixarm.pem
41
- gem cert --add sixarm.pem
42
- gem sources --add http://sixarm.com
43
-
44
- To install with high security:
45
-
46
- gem install sixarm_ruby_sign_in --trust-policy HighSecurity
47
-
48
-
49
- ## Details
50
-
51
- This provides one top-level method:
52
-
53
- sign_in(options=nil) => true for success, false for failure
54
-
55
- The top level method will call mid-level methods
56
- that you will define in your own controller.
57
-
58
- sign_in calls:
59
-
60
- sign_in_attempt(options=nil), e.g. authenticate and set current user
61
- sign_in_success(options=nil), e.g. redirect to a welcome page
62
- sign_in_failure(options=nil), e.g. flash notice help messesage
63
-
64
-
65
- ## AuthLogic Example
66
-
67
- AuthLogic provides this example:
68
-
69
- def create
70
- # sign in attempt
71
- @user_session = UserSession.new(params[:user_session])
72
- if @user_session.save
73
- # sign in success
74
- redirect_to account_url
75
- else
76
- # sign in failure
77
- render :action => :new
78
- end
79
- end
80
-
81
- AuthLogic example refactored for improved security and structure:
82
-
83
- def sign_in_attempt
84
- @user_session = UserSession.new(params[:user_session])
85
- @user_session.save
86
- end
87
-
88
- def sign_in_success
89
- redirect_to account_url
90
- end
91
-
92
- def sign_in_failure
93
- render :action => :new
94
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.1.4