rails_action_args 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +3 -1
- data/VERSION +1 -1
- data/lib/rails_action_args/get_args.rb +3 -1
- data/lib/rails_action_args/native.rb +17 -0
- data/rails_action_args.gemspec +4 -3
- metadata +37 -17
data/README.markdown
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
It's time for action arguments in Rails3.
|
2
2
|
|
3
|
+
Big thanks go out to: ezmobius, mattetti, maiha, Yehuda Katz, Andy Delcambre, Janne Asmala. Did I miss any merb-action-args contributors?
|
4
|
+
|
3
5
|
# rails_action_args
|
4
6
|
|
5
7
|
A plugin for the Rails framework that provides support for arguments to actions that
|
@@ -13,7 +15,7 @@ As a system gem:
|
|
13
15
|
|
14
16
|
Or in a gemfile:
|
15
17
|
|
16
|
-
gem "rails_action_args", "0.1.
|
18
|
+
gem "rails_action_args", "0.1.5"
|
17
19
|
|
18
20
|
When installed as a gem:
|
19
21
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -1,4 +1,6 @@
|
|
1
|
-
if
|
1
|
+
if Method.instance_methods.include?(:parameters)
|
2
|
+
require File.join(File.dirname(__FILE__), "native")
|
3
|
+
elsif RUBY_PLATFORM == "java"
|
2
4
|
require File.join(File.dirname(__FILE__), "jruby_args")
|
3
5
|
elsif RUBY_VERSION < "1.9"
|
4
6
|
require File.join(File.dirname(__FILE__), "mri_args")
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module GetArgs
|
2
|
+
def get_args
|
3
|
+
required = []
|
4
|
+
optional = []
|
5
|
+
|
6
|
+
parameters.each do |(type, name)|
|
7
|
+
if type == :opt
|
8
|
+
required << [name, nil]
|
9
|
+
optional << name
|
10
|
+
else
|
11
|
+
required << [name]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
return [required, optional]
|
16
|
+
end
|
17
|
+
end
|
data/rails_action_args.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_action_args}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ezmobius", "mattetti", "maiha", "Yehuda Katz", "Andy Delcambre", "Janne Asmala", "Collin Miller"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-23}
|
13
13
|
s.description = %q{Big thanks to the original authors. Let me know if I missed you. Action args rocks and you deserve the credit :)}
|
14
14
|
s.email = %q{collintmiller@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
"lib/rails_action_args/get_args.rb",
|
34
34
|
"lib/rails_action_args/jruby_args.rb",
|
35
35
|
"lib/rails_action_args/mri_args.rb",
|
36
|
+
"lib/rails_action_args/native.rb",
|
36
37
|
"lib/rails_action_args/plugin.rb",
|
37
38
|
"lib/rails_action_args/vm_args.rb",
|
38
39
|
"rails_action_args.gemspec",
|
@@ -41,7 +42,7 @@ Gem::Specification.new do |s|
|
|
41
42
|
s.homepage = %q{http://github.com/collin/rails_action_args}
|
42
43
|
s.rdoc_options = ["--charset=UTF-8"]
|
43
44
|
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version = %q{1.3.
|
45
|
+
s.rubygems_version = %q{1.3.6}
|
45
46
|
s.summary = %q{A port of merb-action-args to rails}
|
46
47
|
s.test_files = [
|
47
48
|
"test/test_rails_action_args.rb"
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_action_args
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- ezmobius
|
@@ -15,39 +20,51 @@ autorequire:
|
|
15
20
|
bindir: bin
|
16
21
|
cert_chain: []
|
17
22
|
|
18
|
-
date: 2010-
|
23
|
+
date: 2010-04-23 00:00:00 -04:00
|
19
24
|
default_executable:
|
20
25
|
dependencies:
|
21
26
|
- !ruby/object:Gem::Dependency
|
22
27
|
name: actionpack
|
23
|
-
|
24
|
-
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
30
|
requirements:
|
27
31
|
- - ">="
|
28
32
|
- !ruby/object:Gem::Version
|
33
|
+
segments:
|
34
|
+
- 3
|
35
|
+
- 0
|
36
|
+
- pre
|
29
37
|
version: 3.0.pre
|
30
|
-
|
38
|
+
type: :runtime
|
39
|
+
version_requirements: *id001
|
31
40
|
- !ruby/object:Gem::Dependency
|
32
41
|
name: ParseTree
|
33
|
-
|
34
|
-
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
prerelease: false
|
43
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
36
44
|
requirements:
|
37
45
|
- - ">="
|
38
46
|
- !ruby/object:Gem::Version
|
47
|
+
segments:
|
48
|
+
- 3
|
49
|
+
- 0
|
50
|
+
- 4
|
39
51
|
version: 3.0.4
|
40
|
-
|
52
|
+
type: :runtime
|
53
|
+
version_requirements: *id002
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: ruby2ruby
|
43
|
-
|
44
|
-
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
46
58
|
requirements:
|
47
59
|
- - ">="
|
48
60
|
- !ruby/object:Gem::Version
|
61
|
+
segments:
|
62
|
+
- 1
|
63
|
+
- 2
|
64
|
+
- 4
|
49
65
|
version: 1.2.4
|
50
|
-
|
66
|
+
type: :runtime
|
67
|
+
version_requirements: *id003
|
51
68
|
description: Big thanks to the original authors. Let me know if I missed you. Action args rocks and you deserve the credit :)
|
52
69
|
email: collintmiller@gmail.com
|
53
70
|
executables: []
|
@@ -74,6 +91,7 @@ files:
|
|
74
91
|
- lib/rails_action_args/get_args.rb
|
75
92
|
- lib/rails_action_args/jruby_args.rb
|
76
93
|
- lib/rails_action_args/mri_args.rb
|
94
|
+
- lib/rails_action_args/native.rb
|
77
95
|
- lib/rails_action_args/plugin.rb
|
78
96
|
- lib/rails_action_args/vm_args.rb
|
79
97
|
- rails_action_args.gemspec
|
@@ -91,18 +109,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
109
|
requirements:
|
92
110
|
- - ">="
|
93
111
|
- !ruby/object:Gem::Version
|
112
|
+
segments:
|
113
|
+
- 0
|
94
114
|
version: "0"
|
95
|
-
version:
|
96
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
116
|
requirements:
|
98
117
|
- - ">="
|
99
118
|
- !ruby/object:Gem::Version
|
119
|
+
segments:
|
120
|
+
- 0
|
100
121
|
version: "0"
|
101
|
-
version:
|
102
122
|
requirements: []
|
103
123
|
|
104
124
|
rubyforge_project:
|
105
|
-
rubygems_version: 1.3.
|
125
|
+
rubygems_version: 1.3.6
|
106
126
|
signing_key:
|
107
127
|
specification_version: 3
|
108
128
|
summary: A port of merb-action-args to rails
|