call_with_params 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +89 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +56 -0
- data/Rakefile +45 -0
- data/VERSION +1 -0
- data/call_with_params.gemspec +70 -0
- data/lib/call_with_params.rb +18 -0
- data/test/helper.rb +19 -0
- data/test/test_call_with_params.rb +85 -0
- metadata +176 -0
data/.document
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
call_with_params
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.0.0)
|
5
|
+
i18n (~> 0.6, >= 0.6.4)
|
6
|
+
minitest (~> 4.2)
|
7
|
+
multi_json (~> 1.3)
|
8
|
+
thread_safe (~> 0.1)
|
9
|
+
tzinfo (~> 0.3.37)
|
10
|
+
addressable (2.3.5)
|
11
|
+
atomic (1.1.13)
|
12
|
+
builder (3.2.2)
|
13
|
+
columnize (0.3.6)
|
14
|
+
debugger (1.6.1)
|
15
|
+
columnize (>= 0.3.1)
|
16
|
+
debugger-linecache (~> 1.2.0)
|
17
|
+
debugger-ruby_core_source (~> 1.2.3)
|
18
|
+
debugger-linecache (1.2.0)
|
19
|
+
debugger-ruby_core_source (1.2.3)
|
20
|
+
faraday (0.8.8)
|
21
|
+
multipart-post (~> 1.2.0)
|
22
|
+
git (1.2.6)
|
23
|
+
github_api (0.10.1)
|
24
|
+
addressable
|
25
|
+
faraday (~> 0.8.1)
|
26
|
+
hashie (>= 1.2)
|
27
|
+
multi_json (~> 1.4)
|
28
|
+
nokogiri (~> 1.5.2)
|
29
|
+
oauth2
|
30
|
+
hashie (2.0.5)
|
31
|
+
highline (1.6.19)
|
32
|
+
httpauth (0.2.0)
|
33
|
+
i18n (0.6.5)
|
34
|
+
jeweler (1.8.7)
|
35
|
+
builder
|
36
|
+
bundler (~> 1.0)
|
37
|
+
git (>= 1.2.5)
|
38
|
+
github_api (= 0.10.1)
|
39
|
+
highline (>= 1.6.15)
|
40
|
+
nokogiri (= 1.5.10)
|
41
|
+
rake
|
42
|
+
rdoc
|
43
|
+
json (1.8.0)
|
44
|
+
jwt (0.1.8)
|
45
|
+
multi_json (>= 1.5)
|
46
|
+
metaclass (0.0.1)
|
47
|
+
minitest (4.7.5)
|
48
|
+
mocha (0.14.0)
|
49
|
+
metaclass (~> 0.0.1)
|
50
|
+
multi_json (1.7.9)
|
51
|
+
multi_xml (0.5.5)
|
52
|
+
multipart-post (1.2.0)
|
53
|
+
nokogiri (1.5.10)
|
54
|
+
oauth2 (0.9.2)
|
55
|
+
faraday (~> 0.8)
|
56
|
+
httpauth (~> 0.2)
|
57
|
+
jwt (~> 0.1.4)
|
58
|
+
multi_json (~> 1.0)
|
59
|
+
multi_xml (~> 0.5)
|
60
|
+
rack (~> 1.2)
|
61
|
+
rack (1.5.2)
|
62
|
+
rake (10.1.0)
|
63
|
+
rdoc (3.12.2)
|
64
|
+
json (~> 1.4)
|
65
|
+
shoulda (3.5.0)
|
66
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
67
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
68
|
+
shoulda-context (1.1.5)
|
69
|
+
shoulda-matchers (2.3.0)
|
70
|
+
activesupport (>= 3.0.0)
|
71
|
+
simplecov (0.7.1)
|
72
|
+
multi_json (~> 1.0)
|
73
|
+
simplecov-html (~> 0.7.1)
|
74
|
+
simplecov-html (0.7.1)
|
75
|
+
thread_safe (0.1.2)
|
76
|
+
atomic
|
77
|
+
tzinfo (0.3.37)
|
78
|
+
|
79
|
+
PLATFORMS
|
80
|
+
ruby
|
81
|
+
|
82
|
+
DEPENDENCIES
|
83
|
+
activesupport (>= 3.0.0)
|
84
|
+
debugger
|
85
|
+
jeweler (~> 1.8.4)
|
86
|
+
mocha
|
87
|
+
rdoc (~> 3.12)
|
88
|
+
shoulda
|
89
|
+
simplecov
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Andrew Hunter
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
= call_with_params
|
2
|
+
|
3
|
+
Call a Proc with an arbitrary number of params. The Proc will only be passed the number of arguments that it takes. If a Proc is not passed in as an argument, the first argument will simply be returned.
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
Add the following to your Gemfile:
|
7
|
+
gem 'call_with_procs'
|
8
|
+
|
9
|
+
CallWithProcs can be mixed into any class by adding a line:
|
10
|
+
include CallWithProcs
|
11
|
+
|
12
|
+
It is likely you will want to include CallWithProcs in your views. This can best be accomplished by adding in an initializer:
|
13
|
+
ActionView::Base.send :include, CallWithProcs
|
14
|
+
|
15
|
+
== Sample Usage
|
16
|
+
The best place to demonstrate the usage for CallWithParams is in the view:
|
17
|
+
link_to "My URL", call_with_params(my_url, user)
|
18
|
+
|
19
|
+
If url is not a Proc, the link will simply be to the specified "my_url" param. However, if it is a Proc, it will call that Proc with any additional params passed into the call_with_params method.
|
20
|
+
|
21
|
+
Suppose, for example, that my_url is a locally defined Proc, such as:
|
22
|
+
<% my_url = Proc.new {|user| admin_user_path(user) } %>
|
23
|
+
<%= link_to "My URL", call_with_params(my_url, user) %>
|
24
|
+
|
25
|
+
The Proc can also choose to not take all the parameters that are passed in:
|
26
|
+
<% my_url = Proc.new {|user, order_field| admin_user_path(user, :order => order_field) } %>
|
27
|
+
<%= link_to "My URL", call_with_params(my_url, user, "name", 1, 2, 3, 4, 5) %>
|
28
|
+
|
29
|
+
Notice the Proc only takes the first two arguments that are passed in.
|
30
|
+
|
31
|
+
|
32
|
+
Additionally, there is another method in CallWithParams called call_each_hash_value_with_params which can take hash of Procs, and invoke each Procs with the additional params passed into the call_each_hash_value_with_params method.
|
33
|
+
|
34
|
+
For example:
|
35
|
+
<%= content_tag :tr, call_each_hash_value_with_params(:id => Proc.new {|user| "user-#{user.id}"}, :class => Proc.new { cycle("even", "odd") }) %>
|
36
|
+
|
37
|
+
Any hash values that are not Procs will not be evaluated as Procs:
|
38
|
+
<%= content_tag :tr, call_each_hash_value_with_params(:id => Proc.new {|user| "user-#{user.id}"},
|
39
|
+
:class => Proc.new { cycle("even", "odd") },
|
40
|
+
:style => "color: red") %>
|
41
|
+
|
42
|
+
== Contributing to call_with_params
|
43
|
+
|
44
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
45
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
46
|
+
* Fork the project.
|
47
|
+
* Start a feature/bugfix branch.
|
48
|
+
* Commit and push until you are happy with your contribution.
|
49
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
50
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
51
|
+
|
52
|
+
== Copyright
|
53
|
+
|
54
|
+
Copyright (c) 2013 Andrew Hunter. See LICENSE.txt for
|
55
|
+
further details.
|
56
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "call_with_params"
|
18
|
+
gem.homepage = "http://github.com/hunterae/call_with_params"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Call a Proc with an arbitrary number of params}
|
21
|
+
gem.description = %Q{Call a Proc with an arbitrary number of params. The Proc will only be passed the number of arguments that it takes.}
|
22
|
+
gem.email = "hunterae@gmail.com"
|
23
|
+
gem.authors = ["Andrew Hunter"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => :test
|
36
|
+
|
37
|
+
require 'rdoc/task'
|
38
|
+
Rake::RDocTask.new do |rdoc|
|
39
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
+
|
41
|
+
rdoc.rdoc_dir = 'rdoc'
|
42
|
+
rdoc.title = "call_with_params #{version}"
|
43
|
+
rdoc.rdoc_files.include('README*')
|
44
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "call_with_params"
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andrew Hunter"]
|
12
|
+
s.date = "2013-08-27"
|
13
|
+
s.description = "Call a Proc with an arbitrary number of params. The Proc will only be passed the number of arguments that it takes."
|
14
|
+
s.email = "hunterae@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".ruby-gemset",
|
22
|
+
".ruby-version",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"call_with_params.gemspec",
|
30
|
+
"lib/call_with_params.rb",
|
31
|
+
"test/helper.rb",
|
32
|
+
"test/test_call_with_params.rb"
|
33
|
+
]
|
34
|
+
s.homepage = "http://github.com/hunterae/call_with_params"
|
35
|
+
s.licenses = ["MIT"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = "1.8.25"
|
38
|
+
s.summary = "Call a Proc with an arbitrary number of params"
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
s.specification_version = 3
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
|
45
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
46
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
47
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
48
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
49
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<debugger>, [">= 0"])
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
53
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
55
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
56
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
57
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
58
|
+
s.add_dependency(%q<debugger>, [">= 0"])
|
59
|
+
end
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
62
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
63
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
65
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
66
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
67
|
+
s.add_dependency(%q<debugger>, [">= 0"])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module CallWithParams
|
2
|
+
def call_with_params(*args)
|
3
|
+
return nil if args.empty?
|
4
|
+
v = args.shift
|
5
|
+
v.is_a?(Proc) ? v.call(*(args[0, v.arity])) : v
|
6
|
+
end
|
7
|
+
|
8
|
+
def call_each_hash_value_with_params(*args)
|
9
|
+
return {} if args.empty?
|
10
|
+
|
11
|
+
options = args.shift || {}
|
12
|
+
if options.is_a?(Proc)
|
13
|
+
call_with_params(options, *args)
|
14
|
+
else
|
15
|
+
options.inject({}) { |hash, (k, v)| hash[k] = call_with_params(v, *args); hash}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require "mocha/setup"
|
12
|
+
require 'shoulda'
|
13
|
+
|
14
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
15
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
16
|
+
require 'call_with_params'
|
17
|
+
|
18
|
+
class Test::Unit::TestCase
|
19
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestCallWithParams < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
@klass = Class.new
|
6
|
+
@klass.send(:include, CallWithParams)
|
7
|
+
@call_with_params = @klass.new
|
8
|
+
end
|
9
|
+
|
10
|
+
context "call_with_params" do
|
11
|
+
context "when no arguments are passed in" do
|
12
|
+
should "return nil" do
|
13
|
+
assert_equal nil, @call_with_params.call_with_params
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context "when the first arugment is nil" do
|
18
|
+
should "return nil" do
|
19
|
+
assert_equal nil, @call_with_params.call_with_params(nil, 1, 2)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "when the first argument is not a Proc" do
|
24
|
+
should "return the first parameter regardless of how many additional params are passed" do
|
25
|
+
assert_equal "first param", @call_with_params.call_with_params("first param")
|
26
|
+
assert_equal "first param", @call_with_params.call_with_params("first param", 2, 3, "fourth param")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with the first argument as a Proc" do
|
31
|
+
should "call the Proc" do
|
32
|
+
assert_equal "result of proc", @call_with_params.call_with_params(Proc.new { "result of proc" })
|
33
|
+
end
|
34
|
+
|
35
|
+
should "pass arguments to the Proc" do
|
36
|
+
assert_equal "result of proc 1 2", @call_with_params.call_with_params(Proc.new {|param1, param2| "result of proc #{param1} #{param2}" }, 1, 2)
|
37
|
+
end
|
38
|
+
|
39
|
+
should "pass only the number of arguments that the Proc takes" do
|
40
|
+
assert_equal "result of proc 1", @call_with_params.call_with_params(Proc.new {|param1| "result of proc #{param1}" }, 1, 2, 3, 4)
|
41
|
+
assert_equal "result of proc", @call_with_params.call_with_params(Proc.new {"result of proc" }, 1, 2, 3, 4)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "call_each_hash_value_with_params" do
|
47
|
+
context "when no arguments are passed in" do
|
48
|
+
should "return an empty hash" do
|
49
|
+
assert_equal({}, @call_with_params.call_each_hash_value_with_params)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "when the first argument is nil" do
|
54
|
+
should "return an empty hash" do
|
55
|
+
assert_equal({}, @call_with_params.call_each_hash_value_with_params(nil))
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context "when the first argument is a Proc" do
|
60
|
+
should "delegate to the call_with_params method" do
|
61
|
+
proc = Proc.new {}
|
62
|
+
@call_with_params.expects(:call_with_params).with(proc, 1, 2, 3).returns("delegated result")
|
63
|
+
assert_equal "delegated result", @call_with_params.call_each_hash_value_with_params(proc, 1, 2, 3)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "when the first argument is a hash" do
|
68
|
+
should "call each value in the hash if it is a Proc" do
|
69
|
+
assert_equal({:id => "my-id", :class => "my-class"},
|
70
|
+
@call_with_params.call_each_hash_value_with_params(:id => Proc.new{ "my-id" }, :class => Proc.new { "my-class" }))
|
71
|
+
end
|
72
|
+
|
73
|
+
should "be able to take a mixture of Procs and non-Procs as hash values" do
|
74
|
+
assert_equal({:id => "my-id", :class => "my-class"},
|
75
|
+
@call_with_params.call_each_hash_value_with_params(:id => "my-id", :class => Proc.new { "my-class" }))
|
76
|
+
end
|
77
|
+
|
78
|
+
should "be able to pass any additional arguments into each proc" do
|
79
|
+
assert_equal({:id => "object-45", :class => "row-13"},
|
80
|
+
@call_with_params.call_each_hash_value_with_params(
|
81
|
+
{:id => Proc.new{|id| "object-#{id}" }, :class => Proc.new { |id, row_number| "row-#{row_number}" }}, 45, 13))
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
metadata
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: call_with_params
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Andrew Hunter
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-08-27 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.0.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.0.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: shoulda
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mocha
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rdoc
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.12'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '3.12'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: jeweler
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.8.4
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.8.4
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: simplecov
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: debugger
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
description: Call a Proc with an arbitrary number of params. The Proc will only be
|
127
|
+
passed the number of arguments that it takes.
|
128
|
+
email: hunterae@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files:
|
132
|
+
- LICENSE.txt
|
133
|
+
- README.rdoc
|
134
|
+
files:
|
135
|
+
- .document
|
136
|
+
- .ruby-gemset
|
137
|
+
- .ruby-version
|
138
|
+
- Gemfile
|
139
|
+
- Gemfile.lock
|
140
|
+
- LICENSE.txt
|
141
|
+
- README.rdoc
|
142
|
+
- Rakefile
|
143
|
+
- VERSION
|
144
|
+
- call_with_params.gemspec
|
145
|
+
- lib/call_with_params.rb
|
146
|
+
- test/helper.rb
|
147
|
+
- test/test_call_with_params.rb
|
148
|
+
homepage: http://github.com/hunterae/call_with_params
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
post_install_message:
|
152
|
+
rdoc_options: []
|
153
|
+
require_paths:
|
154
|
+
- lib
|
155
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
157
|
+
requirements:
|
158
|
+
- - ! '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
segments:
|
162
|
+
- 0
|
163
|
+
hash: -2869851844355724304
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
166
|
+
requirements:
|
167
|
+
- - ! '>='
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
requirements: []
|
171
|
+
rubyforge_project:
|
172
|
+
rubygems_version: 1.8.25
|
173
|
+
signing_key:
|
174
|
+
specification_version: 3
|
175
|
+
summary: Call a Proc with an arbitrary number of params
|
176
|
+
test_files: []
|