rails_current 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -0
- data/Rakefile +387 -12
- data/lib/rails_current.rb +6 -8
- data/rails_current.gemspec +40 -0
- data/tasks/this.rb +2 -2
- data/test/rails_current_test.rb +5 -3
- data/test/testing.rb +6 -2
- metadata +10 -44
- data/Manifest.txt +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dd096f5c6ef3f51bb7c82d1f66ba813955d641d3781dcffaab6c1ad8dbb7d5b5
|
4
|
+
data.tar.gz: 2d61359d45c4496c30ce0ec87c7f5a5fda1e170003af08e26853b5cb1ff10de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d7211d22661a811d1cfffa16b39333a8ceee0d235372c927804cb8c2a6137fc2b4ebc9a8a1fc80f501ee836bce58f5ccef3a96a3fbeb90ad7ec30acbc96e8bf
|
7
|
+
data.tar.gz: 3707b6e19d80cbca2b9b701cfc01cde7ba1e8d9524229f40a9388f3c39116e9d69dcd4b5c9d2227d1fd4a68eece6677999287f3f6b911f7524b61c99301365fe
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,18 +1,393 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
#This.rubyforge_project = 'codeforpeople'
|
2
|
+
This.author = "Ara T. Howard"
|
3
|
+
This.email = "ara.t.howard@gmail.com"
|
4
|
+
This.homepage = "https://github.com/ahoward/#{ This.lib }"
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
task :license do
|
7
|
+
open('LICENSE', 'w'){|fd| fd.puts "Ruby"}
|
8
|
+
end
|
9
|
+
|
10
|
+
task :default do
|
11
|
+
puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
|
12
|
+
end
|
13
|
+
|
14
|
+
task :test do
|
15
|
+
run_tests!
|
16
|
+
end
|
17
|
+
|
18
|
+
namespace :test do
|
19
|
+
task(:unit){ run_tests!(:unit) }
|
20
|
+
task(:functional){ run_tests!(:functional) }
|
21
|
+
task(:integration){ run_tests!(:integration) }
|
22
|
+
end
|
23
|
+
|
24
|
+
def run_tests!(which = nil)
|
25
|
+
which ||= '**'
|
26
|
+
test_dir = File.join(This.dir, "test")
|
27
|
+
test_glob ||= File.join(test_dir, "#{ which }/**_test.rb")
|
28
|
+
test_rbs = Dir.glob(test_glob).sort
|
29
|
+
|
30
|
+
div = ('=' * 119)
|
31
|
+
line = ('-' * 119)
|
32
|
+
|
33
|
+
test_rbs.each_with_index do |test_rb, index|
|
34
|
+
testno = index + 1
|
35
|
+
command = "#{ This.ruby } -w -I ./lib -I ./test/lib #{ test_rb }"
|
36
|
+
|
37
|
+
puts
|
38
|
+
say(div, :color => :cyan, :bold => true)
|
39
|
+
say("@#{ testno } => ", :bold => true, :method => :print)
|
40
|
+
say(command, :color => :cyan, :bold => true)
|
41
|
+
say(line, :color => :cyan, :bold => true)
|
42
|
+
|
43
|
+
system(command)
|
44
|
+
|
45
|
+
say(line, :color => :cyan, :bold => true)
|
46
|
+
|
47
|
+
status = $?.exitstatus
|
48
|
+
|
49
|
+
if status.zero?
|
50
|
+
say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
|
51
|
+
say("SUCCESS", :color => :green, :bold => true)
|
52
|
+
else
|
53
|
+
say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
|
54
|
+
say("FAILURE", :color => :red, :bold => true)
|
55
|
+
end
|
56
|
+
say(line, :color => :cyan, :bold => true)
|
57
|
+
|
58
|
+
exit(status) unless status.zero?
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
task :gemspec do
|
64
|
+
ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
|
65
|
+
ignore_directories = ['pkg']
|
66
|
+
ignore_files = ['test/log']
|
67
|
+
|
68
|
+
shiteless =
|
69
|
+
lambda do |list|
|
70
|
+
list.delete_if do |entry|
|
71
|
+
next unless test(?e, entry)
|
72
|
+
extension = File.basename(entry).split(%r/[.]/).last
|
73
|
+
ignore_extensions.any?{|ext| ext === extension}
|
74
|
+
end
|
75
|
+
list.delete_if do |entry|
|
76
|
+
next unless test(?d, entry)
|
77
|
+
dirname = File.expand_path(entry)
|
78
|
+
ignore_directories.any?{|dir| File.expand_path(dir) == dirname}
|
79
|
+
end
|
80
|
+
list.delete_if do |entry|
|
81
|
+
next unless test(?f, entry)
|
82
|
+
filename = File.expand_path(entry)
|
83
|
+
ignore_files.any?{|file| File.expand_path(file) == filename}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
lib = This.lib
|
88
|
+
object = This.object
|
89
|
+
version = This.version
|
90
|
+
files = shiteless[Dir::glob("**/**")]
|
91
|
+
executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
|
92
|
+
#has_rdoc = true #File.exist?('doc')
|
93
|
+
test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
|
94
|
+
summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
|
95
|
+
description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
|
96
|
+
license = object.respond_to?(:license) ? object.license : "Ruby"
|
97
|
+
|
98
|
+
if This.extensions.nil?
|
99
|
+
This.extensions = []
|
100
|
+
extensions = This.extensions
|
101
|
+
%w( Makefile configure extconf.rb ).each do |ext|
|
102
|
+
extensions << ext if File.exists?(ext)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
extensions = [extensions].flatten.compact
|
106
|
+
|
107
|
+
if This.dependencies.nil?
|
108
|
+
dependencies = []
|
109
|
+
else
|
110
|
+
case This.dependencies
|
111
|
+
when Hash
|
112
|
+
dependencies = This.dependencies.values
|
113
|
+
when Array
|
114
|
+
dependencies = This.dependencies
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
template =
|
119
|
+
if test(?e, 'gemspec.erb')
|
120
|
+
Template{ IO.read('gemspec.erb') }
|
121
|
+
else
|
122
|
+
Template {
|
123
|
+
<<-__
|
124
|
+
## <%= lib %>.gemspec
|
125
|
+
#
|
126
|
+
|
127
|
+
Gem::Specification::new do |spec|
|
128
|
+
spec.name = <%= lib.inspect %>
|
129
|
+
spec.version = <%= version.inspect %>
|
130
|
+
spec.platform = Gem::Platform::RUBY
|
131
|
+
spec.summary = <%= lib.inspect %>
|
132
|
+
spec.description = <%= description.inspect %>
|
133
|
+
spec.license = <%= license.inspect %>
|
134
|
+
|
135
|
+
spec.files =\n<%= files.sort.pretty_inspect %>
|
136
|
+
spec.executables = <%= executables.inspect %>
|
137
|
+
|
138
|
+
spec.require_path = "lib"
|
139
|
+
|
140
|
+
spec.test_files = <%= test_files.inspect %>
|
141
|
+
|
142
|
+
<% dependencies.each do |lib_version| %>
|
143
|
+
spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
|
144
|
+
<% end %>
|
145
|
+
|
146
|
+
spec.extensions.push(*<%= extensions.inspect %>)
|
147
|
+
|
148
|
+
spec.author = <%= This.author.inspect %>
|
149
|
+
spec.email = <%= This.email.inspect %>
|
150
|
+
spec.homepage = <%= This.homepage.inspect %>
|
151
|
+
end
|
152
|
+
__
|
153
|
+
}
|
154
|
+
end
|
155
|
+
|
156
|
+
Fu.mkdir_p(This.pkgdir)
|
157
|
+
gemspec = "#{ lib }.gemspec"
|
158
|
+
open(gemspec, "w"){|fd| fd.puts(template)}
|
159
|
+
This.gemspec = gemspec
|
160
|
+
end
|
161
|
+
|
162
|
+
task :gem => [:clean, :gemspec] do
|
163
|
+
Fu.mkdir_p(This.pkgdir)
|
164
|
+
before = Dir['*.gem']
|
165
|
+
cmd = "gem build #{ This.gemspec }"
|
166
|
+
`#{ cmd }`
|
167
|
+
after = Dir['*.gem']
|
168
|
+
gem = ((after - before).first || after.first) or abort('no gem!')
|
169
|
+
Fu.mv(gem, This.pkgdir)
|
170
|
+
This.gem = File.join(This.pkgdir, File.basename(gem))
|
171
|
+
end
|
172
|
+
|
173
|
+
task :readme do
|
174
|
+
samples = ''
|
175
|
+
prompt = '~ > '
|
176
|
+
lib = This.lib
|
177
|
+
version = This.version
|
178
|
+
|
179
|
+
Dir['sample*/*'].sort.each do |sample|
|
180
|
+
samples << "\n" << " <========< #{ sample } >========>" << "\n\n"
|
8
181
|
|
9
|
-
|
10
|
-
|
182
|
+
cmd = "cat #{ sample }"
|
183
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
184
|
+
samples << Util.indent(`#{ cmd }`, 4) << "\n"
|
11
185
|
|
12
|
-
|
13
|
-
|
186
|
+
cmd = "ruby #{ sample }"
|
187
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
14
188
|
|
15
|
-
|
189
|
+
cmd = "ruby -e'STDOUT.sync=true; exec %(ruby -I ./lib #{ sample })'"
|
190
|
+
samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
|
191
|
+
end
|
192
|
+
|
193
|
+
template =
|
194
|
+
if test(?e, 'README.erb')
|
195
|
+
Template{ IO.read('README.erb') }
|
196
|
+
else
|
197
|
+
Template {
|
198
|
+
<<-__
|
199
|
+
NAME
|
200
|
+
#{ lib }
|
201
|
+
|
202
|
+
DESCRIPTION
|
203
|
+
|
204
|
+
INSTALL
|
205
|
+
gem install #{ lib }
|
206
|
+
|
207
|
+
SAMPLES
|
208
|
+
#{ samples }
|
209
|
+
__
|
210
|
+
}
|
211
|
+
end
|
212
|
+
|
213
|
+
open("README", "w"){|fd| fd.puts template}
|
214
|
+
end
|
215
|
+
|
216
|
+
|
217
|
+
task :clean do
|
218
|
+
Dir[File.join(This.pkgdir, '**/**')].each{|entry| Fu.rm_rf(entry)}
|
219
|
+
end
|
220
|
+
|
221
|
+
|
222
|
+
task :release => [:clean, :gemspec, :gem] do
|
223
|
+
gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
|
224
|
+
raise "which one? : #{ gems.inspect }" if gems.size > 1
|
225
|
+
raise "no gems?" if gems.size < 1
|
226
|
+
|
227
|
+
cmd = "gem push #{ This.gem }"
|
228
|
+
puts cmd
|
229
|
+
puts
|
230
|
+
system(cmd)
|
231
|
+
abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
|
232
|
+
|
233
|
+
cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
|
234
|
+
puts cmd
|
235
|
+
puts
|
236
|
+
system(cmd)
|
237
|
+
abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
|
16
238
|
end
|
17
239
|
|
18
|
-
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
BEGIN {
|
245
|
+
# support for this rakefile
|
246
|
+
#
|
247
|
+
$VERBOSE = nil
|
248
|
+
|
249
|
+
require 'ostruct'
|
250
|
+
require 'erb'
|
251
|
+
require 'fileutils'
|
252
|
+
require 'rbconfig'
|
253
|
+
require 'pp'
|
254
|
+
|
255
|
+
# fu shortcut
|
256
|
+
#
|
257
|
+
Fu = FileUtils
|
258
|
+
|
259
|
+
# cache a bunch of stuff about this rakefile/environment
|
260
|
+
#
|
261
|
+
This = OpenStruct.new
|
262
|
+
|
263
|
+
This.file = File.expand_path(__FILE__)
|
264
|
+
This.dir = File.dirname(This.file)
|
265
|
+
This.pkgdir = File.join(This.dir, 'pkg')
|
266
|
+
|
267
|
+
# grok lib
|
268
|
+
#
|
269
|
+
lib = ENV['LIB']
|
270
|
+
unless lib
|
271
|
+
lib = File.basename(Dir.pwd).sub(/[-].*$/, '')
|
272
|
+
end
|
273
|
+
This.lib = lib
|
274
|
+
|
275
|
+
# grok version
|
276
|
+
#
|
277
|
+
version = ENV['VERSION']
|
278
|
+
unless version
|
279
|
+
require "./lib/#{ This.lib }"
|
280
|
+
This.name = lib.capitalize
|
281
|
+
This.object = eval(This.name)
|
282
|
+
version = This.object.send(:version)
|
283
|
+
end
|
284
|
+
This.version = version
|
285
|
+
|
286
|
+
# see if dependencies are export by the module
|
287
|
+
#
|
288
|
+
if This.object.respond_to?(:dependencies)
|
289
|
+
This.dependencies = This.object.dependencies
|
290
|
+
end
|
291
|
+
|
292
|
+
# we need to know the name of the lib an it's version
|
293
|
+
#
|
294
|
+
abort('no lib') unless This.lib
|
295
|
+
abort('no version') unless This.version
|
296
|
+
|
297
|
+
# discover full path to this ruby executable
|
298
|
+
#
|
299
|
+
c = RbConfig::CONFIG
|
300
|
+
bindir = c["bindir"] || c['BINDIR']
|
301
|
+
ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
|
302
|
+
ruby_ext = c['EXEEXT'] || ''
|
303
|
+
ruby = File.join(bindir, (ruby_install_name + ruby_ext))
|
304
|
+
This.ruby = ruby
|
305
|
+
|
306
|
+
# some utils
|
307
|
+
#
|
308
|
+
module Util
|
309
|
+
def indent(s, n = 2)
|
310
|
+
s = unindent(s)
|
311
|
+
ws = ' ' * n
|
312
|
+
s.gsub(%r/^/, ws)
|
313
|
+
end
|
314
|
+
|
315
|
+
def unindent(s)
|
316
|
+
indent = nil
|
317
|
+
s.each_line do |line|
|
318
|
+
next if line =~ %r/^\s*$/
|
319
|
+
indent = line[%r/^\s*/] and break
|
320
|
+
end
|
321
|
+
indent ? s.gsub(%r/^#{ indent }/, "") : s
|
322
|
+
end
|
323
|
+
extend self
|
324
|
+
end
|
325
|
+
|
326
|
+
# template support
|
327
|
+
#
|
328
|
+
class Template
|
329
|
+
def initialize(&block)
|
330
|
+
@block = block
|
331
|
+
@template = block.call.to_s
|
332
|
+
end
|
333
|
+
def expand(b=nil)
|
334
|
+
ERB.new(Util.unindent(@template)).result((b||@block).binding)
|
335
|
+
end
|
336
|
+
alias_method 'to_s', 'expand'
|
337
|
+
end
|
338
|
+
def Template(*args, &block) Template.new(*args, &block) end
|
339
|
+
|
340
|
+
# colored console output support
|
341
|
+
#
|
342
|
+
This.ansi = {
|
343
|
+
:clear => "\e[0m",
|
344
|
+
:reset => "\e[0m",
|
345
|
+
:erase_line => "\e[K",
|
346
|
+
:erase_char => "\e[P",
|
347
|
+
:bold => "\e[1m",
|
348
|
+
:dark => "\e[2m",
|
349
|
+
:underline => "\e[4m",
|
350
|
+
:underscore => "\e[4m",
|
351
|
+
:blink => "\e[5m",
|
352
|
+
:reverse => "\e[7m",
|
353
|
+
:concealed => "\e[8m",
|
354
|
+
:black => "\e[30m",
|
355
|
+
:red => "\e[31m",
|
356
|
+
:green => "\e[32m",
|
357
|
+
:yellow => "\e[33m",
|
358
|
+
:blue => "\e[34m",
|
359
|
+
:magenta => "\e[35m",
|
360
|
+
:cyan => "\e[36m",
|
361
|
+
:white => "\e[37m",
|
362
|
+
:on_black => "\e[40m",
|
363
|
+
:on_red => "\e[41m",
|
364
|
+
:on_green => "\e[42m",
|
365
|
+
:on_yellow => "\e[43m",
|
366
|
+
:on_blue => "\e[44m",
|
367
|
+
:on_magenta => "\e[45m",
|
368
|
+
:on_cyan => "\e[46m",
|
369
|
+
:on_white => "\e[47m"
|
370
|
+
}
|
371
|
+
def say(phrase, *args)
|
372
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
373
|
+
options[:color] = args.shift.to_s.to_sym unless args.empty?
|
374
|
+
keys = options.keys
|
375
|
+
keys.each{|key| options[key.to_s.to_sym] = options.delete(key)}
|
376
|
+
|
377
|
+
color = options[:color]
|
378
|
+
bold = options.has_key?(:bold)
|
379
|
+
|
380
|
+
parts = [phrase]
|
381
|
+
parts.unshift(This.ansi[color]) if color
|
382
|
+
parts.unshift(This.ansi[:bold]) if bold
|
383
|
+
parts.push(This.ansi[:clear]) if parts.size > 1
|
384
|
+
|
385
|
+
method = options[:method] || :puts
|
386
|
+
|
387
|
+
Kernel.send(method, parts.join)
|
388
|
+
end
|
389
|
+
|
390
|
+
# always run out of the project dir
|
391
|
+
#
|
392
|
+
Dir.chdir(This.dir)
|
393
|
+
}
|
data/lib/rails_current.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
module Current
|
4
|
-
VERSION = '2.
|
4
|
+
VERSION = '2.2.0'
|
5
|
+
|
5
6
|
def Current.version
|
6
7
|
VERSION
|
7
8
|
end
|
8
9
|
|
9
10
|
def Current.dependencies
|
10
11
|
{
|
11
|
-
'map'
|
12
|
+
'map' => [ 'map', ' ~> 6.0' ]
|
12
13
|
}
|
13
14
|
end
|
14
15
|
|
@@ -172,8 +173,8 @@ module Current
|
|
172
173
|
controller.perform_caching = true
|
173
174
|
controller.cache_store = store
|
174
175
|
|
175
|
-
request = ActionDispatch::TestRequest.create
|
176
|
-
response = ActionDispatch::TestResponse.create
|
176
|
+
request = ActionDispatch::TestRequest.create
|
177
|
+
response = ActionDispatch::TestResponse.create
|
177
178
|
|
178
179
|
controller.request = request
|
179
180
|
controller.response = response
|
@@ -245,10 +246,6 @@ module Current
|
|
245
246
|
end
|
246
247
|
end
|
247
248
|
|
248
|
-
def Current(*args, &block)
|
249
|
-
Current.attribute(*args, &block)
|
250
|
-
end
|
251
|
-
|
252
249
|
if defined?(Rails)
|
253
250
|
|
254
251
|
##
|
@@ -301,3 +298,4 @@ BEGIN {
|
|
301
298
|
Object.send(:remove_const, :Current) if defined?(::Current)
|
302
299
|
Object.send(:remove_const, :Rails_current) if defined?(::Rails_current)
|
303
300
|
}
|
301
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
## rails_current.gemspec
|
2
|
+
#
|
3
|
+
|
4
|
+
Gem::Specification::new do |spec|
|
5
|
+
spec.name = "rails_current"
|
6
|
+
spec.version = "2.2.0"
|
7
|
+
spec.platform = Gem::Platform::RUBY
|
8
|
+
spec.summary = "rails_current"
|
9
|
+
spec.description = "track 'current_user' et all in a tidy, global, and thread-safe fashion for your rails apps"
|
10
|
+
spec.license = "Ruby"
|
11
|
+
|
12
|
+
spec.files =
|
13
|
+
["README.md",
|
14
|
+
"Rakefile",
|
15
|
+
"lib",
|
16
|
+
"lib/rails_current.rb",
|
17
|
+
"rails_current.gemspec",
|
18
|
+
"tasks",
|
19
|
+
"tasks/default.rake",
|
20
|
+
"tasks/this.rb",
|
21
|
+
"test",
|
22
|
+
"test/rails_current_test.rb",
|
23
|
+
"test/testing.rb"]
|
24
|
+
|
25
|
+
spec.executables = []
|
26
|
+
|
27
|
+
spec.require_path = "lib"
|
28
|
+
|
29
|
+
spec.test_files = nil
|
30
|
+
|
31
|
+
|
32
|
+
spec.add_dependency(*["map", " ~> 6.0"])
|
33
|
+
|
34
|
+
|
35
|
+
spec.extensions.push(*[])
|
36
|
+
|
37
|
+
spec.author = "Ara T. Howard"
|
38
|
+
spec.email = "ara.t.howard@gmail.com"
|
39
|
+
spec.homepage = "https://github.com/ahoward/rails_current"
|
40
|
+
end
|
data/tasks/this.rb
CHANGED
@@ -135,8 +135,8 @@ class ThisProject
|
|
135
135
|
spec.email = email
|
136
136
|
spec.homepage = homepage
|
137
137
|
|
138
|
-
spec.summary = summary
|
139
|
-
spec.description = description
|
138
|
+
spec.summary = summary
|
139
|
+
spec.description = description == summary ? "#{ description} " : description
|
140
140
|
spec.license = license
|
141
141
|
|
142
142
|
spec.files = manifest
|
data/test/rails_current_test.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Testing Current do
|
1
|
+
Testing.test Current do
|
4
2
|
|
5
3
|
##
|
6
4
|
#
|
@@ -197,6 +195,10 @@ Testing Current do
|
|
197
195
|
private
|
198
196
|
def mock_rails!
|
199
197
|
Object.module_eval <<-__
|
198
|
+
remove_const :Rails if const_defined? :Rails
|
199
|
+
remove_const :ActionController if const_defined? :ActionController
|
200
|
+
remove_const :ActionView if const_defined? :ActionView
|
201
|
+
|
200
202
|
module Rails
|
201
203
|
end
|
202
204
|
|
data/test/testing.rb
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
gem 'minitest'
|
3
3
|
require 'minitest/autorun'
|
4
4
|
require 'minitest/pride'
|
5
|
-
|
5
|
+
|
6
|
+
|
7
|
+
if defined?(Testing)
|
8
|
+
Object.send(:remove_const, :Testing)
|
9
|
+
end
|
6
10
|
|
7
11
|
class Testing
|
8
12
|
class Slug < ::String
|
@@ -28,7 +32,7 @@ class Testing
|
|
28
32
|
end
|
29
33
|
end
|
30
34
|
|
31
|
-
def Testing(*args, &block)
|
35
|
+
def Testing.test(*args, &block)
|
32
36
|
Class.new(::Minitest::Test) do
|
33
37
|
|
34
38
|
## class methods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_current
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ara T. Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: map
|
@@ -24,46 +24,17 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '6.0'
|
27
|
-
-
|
28
|
-
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.1'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.1'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '5.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '5.0'
|
55
|
-
description: track `current_user` et all in a tidy, global, and thread-safe fashion.
|
27
|
+
description: track 'current_user' et all in a tidy, global, and thread-safe fashion
|
28
|
+
for your rails apps
|
56
29
|
email: ara.t.howard@gmail.com
|
57
30
|
executables: []
|
58
31
|
extensions: []
|
59
|
-
extra_rdoc_files:
|
60
|
-
- Manifest.txt
|
61
|
-
- README.md
|
32
|
+
extra_rdoc_files: []
|
62
33
|
files:
|
63
|
-
- Manifest.txt
|
64
34
|
- README.md
|
65
35
|
- Rakefile
|
66
36
|
- lib/rails_current.rb
|
37
|
+
- rails_current.gemspec
|
67
38
|
- tasks/default.rake
|
68
39
|
- tasks/this.rb
|
69
40
|
- test/rails_current_test.rb
|
@@ -73,27 +44,22 @@ licenses:
|
|
73
44
|
- Ruby
|
74
45
|
metadata: {}
|
75
46
|
post_install_message:
|
76
|
-
rdoc_options:
|
77
|
-
- "--main"
|
78
|
-
- README.md
|
79
|
-
- "--markup"
|
80
|
-
- tomdoc
|
47
|
+
rdoc_options: []
|
81
48
|
require_paths:
|
82
49
|
- lib
|
83
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
51
|
requirements:
|
85
52
|
- - ">="
|
86
53
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
54
|
+
version: '0'
|
88
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
56
|
requirements:
|
90
57
|
- - ">="
|
91
58
|
- !ruby/object:Gem::Version
|
92
59
|
version: '0'
|
93
60
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.8
|
61
|
+
rubygems_version: 3.0.3
|
96
62
|
signing_key:
|
97
63
|
specification_version: 4
|
98
|
-
summary:
|
64
|
+
summary: rails_current
|
99
65
|
test_files: []
|