sixarm_ruby_current_user_id 1.4.2 → 1.4.5

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9192947ff8dd87319ebe439416bcaa8c6efc6308
4
+ data.tar.gz: d4800021f13ede33fa2ac56d0d65d6c0e164ff1c
5
+ SHA512:
6
+ metadata.gz: 253fd244c11ddb4f2e318b911df3175e1ace9e9947bf204d5e04a07b4fc2a6c51b43a2f2ca7f547f04156c18c2124404a7b12916da0a3be42748fe744cf2ce7a
7
+ data.tar.gz: 652c9e47382df6dc6cb9d6ccf504aeae253857f8c74456617033b26ac6b96bb1d793a49343d9ddb1220715535cb572f06d221cd5bdd3f35914f04c76b171b375
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -1,8 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rake'
3
- require 'rake/testtask'
2
+ require "rake"
3
+ require "rake/testtask"
4
+
5
+ task :default => :test
4
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
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  =begin rdoc
3
- Please see README.rdoc
3
+ Please see README
4
4
  =end
5
5
 
6
6
  module CurrentUserId
@@ -1,10 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'test/unit'
3
- require 'sixarm_ruby_current_user_id'
4
- #require 'simplecov'
5
- #SimpleCov.start
2
+ require "minitest/autorun"
3
+ require "simplecov"
4
+ SimpleCov.start
5
+ require "sixarm_ruby_current_user_id"
6
6
 
7
- class Testing < Test::Unit::TestCase
7
+
8
+ class Testing < Minitest::Test
8
9
 
9
10
  # Mock session
10
11
  def session
metadata CHANGED
@@ -1,84 +1,182 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_current_user_id
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.4.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.4.5
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - SixArm
9
8
  autorequire:
10
9
  bindir: bin
11
- cert_chain:
10
+ cert_chain:
12
11
  - |
13
12
  -----BEGIN CERTIFICATE-----
14
- MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
13
+ MIIGCTCCA/GgAwIBAgIJAK3igyLv2hNNMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
15
14
  BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
16
- c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
17
- MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
15
+ c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTUw
16
+ MzE0MjA0MTE5WhcNMTcxMjA4MjA0MTE5WjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
18
17
  CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
19
- U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
20
- ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
21
- QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
22
- eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHV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TT2vVrjscgYjiVGdSq+8wQv
42
+ Efa5jhe8QwG7R1rdpMMP5yBSAqWuFBczMveX5j4rp9Ifw5/XsZbgwcmdm26bjhzh
43
+ w2grAHIhvR9mztm6uXQlZhv1fu3P+RWHDSYhnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
44
+ 2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
+ n+ES/gQPOnvmVkLDGw==
31
46
  -----END CERTIFICATE-----
32
-
33
- date: 2011-04-26 00:00:00 -07:00
34
- default_executable:
35
- dependencies: []
36
-
37
- description:
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'
143
+ description: CurrentUserId module to get and set the current user in a Rails session
38
144
  email: sixarm@sixarm.com
39
145
  executables: []
40
-
41
146
  extensions: []
42
-
43
147
  extra_rdoc_files: []
44
-
45
- files:
46
- - .gemtest
47
- - CHANGELOG.txt
48
- - INSTALL.txt
49
- - LICENSE.txt
148
+ files:
50
149
  - Rakefile
51
- - README.rdoc
52
- - VERSION
53
150
  - lib/sixarm_ruby_current_user_id.rb
54
151
  - test/sixarm_ruby_current_user_id_test.rb
55
- has_rdoc: true
56
152
  homepage: http://sixarm.com/
57
- licenses: []
58
-
153
+ licenses:
154
+ - Apache-2.0
155
+ - Artistic-2.0
156
+ - BSD-3-Clause
157
+ - GPL-3.0
158
+ - MIT
159
+ - MPL-2.0
160
+ metadata: {}
59
161
  post_install_message:
60
162
  rdoc_options: []
61
-
62
- require_paths:
163
+ require_paths:
63
164
  - lib
64
- required_ruby_version: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
67
167
  - - ">="
68
- - !ruby/object:Gem::Version
69
- version: "0"
70
- required_rubygems_version: !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
73
172
  - - ">="
74
- - !ruby/object:Gem::Version
75
- version: "0"
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
76
175
  requirements: []
77
-
78
176
  rubyforge_project:
79
- rubygems_version: 1.6.2
177
+ rubygems_version: 2.6.12
80
178
  signing_key:
81
- specification_version: 3
82
- summary: "SixArm.com \xC2\xBB Ruby \xC2\xBB CurrentUserId module for Rails sessions"
83
- test_files:
179
+ specification_version: 4
180
+ summary: SixArm.com Ruby CurrentUserId
181
+ test_files:
84
182
  - test/sixarm_ruby_current_user_id_test.rb
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes
@@ -1,7 +0,0 @@
1
- CHANGELOG
2
-
3
- 2011-04-25 1.4.2 Add better memoize and fix bug in current_user_id text
4
- 2011-04-25 1.4.0 Add memoize and :reload => true
5
- 2011-04-22 1.3.4 Add self to protect from local variable masking
6
- 2011-04-19 1.3.2 Bump to match sixarm_ruby_current_user gem
7
- 2011-04-18 1.3.0 Public release of version for Ruby 1.9.2 and Rails 3.0.5
@@ -1,31 +0,0 @@
1
- = SixArm.com Ruby Gem Install
2
-
3
-
4
- First-time users: add our gem certificate and source.
5
- When you do this once, it works for all our gems.
6
-
7
- sudo wget http://sixarm.com/sixarm.pem
8
- sudo gem cert --add sixarm.pem
9
- sudo gem sources --add http://sixarm.com
10
-
11
- Install the gem with advanced options.
12
-
13
- sudo gem install sixarm_ruby_current_user_id --test --trust-policy HighSecurity
14
-
15
-
16
- == Notes
17
-
18
- Do you have any questions, comments, suggestions, or feedback?
19
- Let us know, we're happy to help. Our email is sixarm@sixarm.com
20
-
21
- Do you want to create your own high security gems?
22
- Learn how at http://www.rubygems.org/read/chapter/21
23
-
24
- To see your current gem certificate list:
25
-
26
- sudo gem cert --list
27
-
28
- Our cert looks like this:
29
-
30
- /C=US/ST=California/L=San Francisco/O=SixArm/CN=sixarm.com
31
-
@@ -1,12 +0,0 @@
1
- LICENSE
2
-
3
- You may choose any of these licenses:
4
-
5
- - CreativeCommons License, Non-commercial Share Alike
6
- - LGPL, GNU Lesser General Public License
7
- - MIT License
8
- - Ruby License
9
-
10
- THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -1,67 +0,0 @@
1
- = SixArm.com » Ruby » CurrentUserId module for Rails sessions
2
-
3
- Author:: Joel Parker Henderson, joel@joelparkerhenderson.com
4
- Copyright:: Copyright (c) 2006-2011 Joel Parker Henderson
5
- License:: See LICENSE.txt file
6
-
7
- Get and set the current user id in the Rails session array.
8
-
9
- When you set the current user id:
10
- - this sets session[:current_user_id] to the id
11
- - this sets @current_user_id to the id
12
-
13
-
14
- == Example code
15
-
16
- self.current_user_id = 1
17
- => @current_user_id = session[:current_user_id] = 1
18
-
19
-
20
- == Example controller
21
-
22
- class MyController < ApplicationController
23
-
24
- def sign_in(user)
25
- self.current_user_id = user.id
26
- end
27
-
28
- def sign_out
29
- self.current_user_id = nil
30
- end
31
-
32
- def is_anyone_using_this?
33
- current_user_id?
34
- end
35
-
36
- end
37
-
38
-
39
- == Example of reloading
40
-
41
- For fast speed, we memoize the current_user_id:
42
- we use the fast instance variable @current_user_id
43
- rather than the slower session[:current_user_id].
44
-
45
- To reload @current_user_id from session[:current_user_id],
46
- we use the :reload parameter like this:
47
-
48
- current_user_id(:reload => true)
49
-
50
-
51
- == Why use the self prefix?
52
-
53
- When we set variables, we must use the "self" prefix because Ruby uses this to do method dispatch.
54
-
55
- Right:
56
- self.current_user_id = 1
57
-
58
- Wrong:
59
- current_user_id = 1
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.4.2