rails_action_args 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -1,5 +1,3 @@
1
1
  README.rdoc
2
2
  lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
3
  LICENSE
data/README.markdown CHANGED
@@ -1,35 +1,47 @@
1
- Not working yet, but close :) Four failing tests.
1
+ It's time for action arguments in Rails3.
2
2
 
3
- rails-action-args
4
- ================
3
+ # rails_action_args
5
4
 
6
5
  A plugin for the Rails framework that provides support for arguments to actions that
7
6
  come in from the query.
8
7
 
9
- ==== Basics
8
+ ### Install
10
9
 
11
- {{[
12
- class Foo < ApplicationController::Base
13
- def bar(baz)
14
- bar
15
- end
16
- end
17
- ]}}
10
+ As a system gem:
11
+
12
+ gem install rails_action_args
13
+
14
+ Or in a gemfile:
15
+
16
+ gem "rails_action_args", "0.1.2"
17
+
18
+ When installed as a gem:
19
+
20
+ require "rails_action_args/plugin"
21
+
22
+ Or as a plugin
23
+
24
+ script/plugin install git://github.com/collin/rails_action_args.git
25
+
26
+ ### Basics
27
+
28
+ class Foo < ApplicationController::Base
29
+ def bar(baz)
30
+ bar
31
+ end
32
+ end
18
33
 
19
34
  Hitting "/foo/bar?baz=bat" will call foo("bat").
20
35
 
21
- Hitting "/foo/bar" will raise a BadRequest (Status 400) error.
36
+ Hitting "/foo/bar" will raise an AbstractController::ActionArgs::InvalidActionArgs exception
22
37
 
23
- ==== Defaults
38
+ ### Defaults
24
39
 
25
- {{[
26
- class Foo < ApplicationController::Base
27
- include AbstractController::ActionArgs
28
- def bar(baz, bat = "hola")
29
- "#{baz} #{bat}"
30
- end
31
- end
32
- ]}}
40
+ class Foo < ApplicationController::Base
41
+ def bar(baz, bat = "hola")
42
+ "#{baz} #{bat}"
43
+ end
44
+ end
33
45
 
34
46
  Hitting "/foo/bar?baz=bat" will call foo("bat", "hola")
35
47
 
@@ -37,17 +49,14 @@ Hitting "/foo/bar?baz=bat&bat=whaa" will call foo("bat", "whaa")
37
49
 
38
50
  Hitting "/foo/bar" will still raise a BadRequest.
39
51
 
40
- ==== Out of order defaults
52
+ #### Out of order defaults
41
53
 
42
- {{[
43
- class Foo < ApplicationController::Base
44
- include AbstractController::ActionArgs
45
- def bar(one, two = "dos", three = "tres")
46
- "#{one} #{two} #{three}"
47
- end
48
- end
49
- ]}}
54
+ class Foo < ApplicationController::Base
55
+ def bar(one, two = "dos", three = "tres")
56
+ "#{one} #{two} #{three}"
57
+ end
58
+ end
50
59
 
51
60
  The interesting thing here is that hitting "/foo/bar?one=uno&three=three" will call
52
61
  foo("uno", "dos", "three"). In other words, the defaults can be in any order, and
53
- rails-action-args will figure out where to fill in the holes.
62
+ rails_action_args will figure out where to fill in the holes.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -0,0 +1,70 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails_action_args}
8
+ s.version = "0.1.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["ezmobius", "mattetti", "maiha", "Yehuda Katz", "Andy Delcambre", "Janne Asmala", "Collin Miller"]
12
+ s.date = %q{2010-02-05}
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
+ s.email = %q{collintmiller@gmail.com}
15
+ s.executables = ["autotest", "convert_to_should_syntax", "erubis", "multigem", "multiruby", "multiruby_setup", "parse_tree_abc", "parse_tree_audit", "parse_tree_deps", "parse_tree_show", "r2r_show", "rackup", "rake", "ruby_parse", "unit_diff", "zentest"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE",
18
+ "README.markdown",
19
+ "TODO"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".gitignore",
24
+ "Gemfile",
25
+ "LICENSE",
26
+ "README.markdown",
27
+ "Rakefile",
28
+ "TODO",
29
+ "ThankYou",
30
+ "VERSION",
31
+ "init.rb",
32
+ "lib/rails_action_args.rb",
33
+ "lib/rails_action_args/abstract_controller.rb",
34
+ "lib/rails_action_args/get_args.rb",
35
+ "lib/rails_action_args/jruby_args.rb",
36
+ "lib/rails_action_args/mri_args.rb",
37
+ "lib/rails_action_args/plugin.rb",
38
+ "lib/rails_action_args/vm_args.rb",
39
+ "rails_action_args.gemspec",
40
+ "test/test_rails_action_args.rb"
41
+ ]
42
+ s.homepage = %q{http://github.com/collin/rails_action_args}
43
+ s.rdoc_options = ["--charset=UTF-8"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = %q{1.3.5}
46
+ s.summary = %q{A port of merb-action-args to rails}
47
+ s.test_files = [
48
+ "test/test_rails_action_args.rb"
49
+ ]
50
+
51
+ if s.respond_to? :specification_version then
52
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
+ s.specification_version = 3
54
+
55
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<actionpack>, [">= 3.0.pre"])
57
+ s.add_runtime_dependency(%q<ParseTree>, [">= 3.0.4"])
58
+ s.add_runtime_dependency(%q<ruby2ruby>, [">= 1.2.4"])
59
+ else
60
+ s.add_dependency(%q<actionpack>, [">= 3.0.pre"])
61
+ s.add_dependency(%q<ParseTree>, [">= 3.0.4"])
62
+ s.add_dependency(%q<ruby2ruby>, [">= 1.2.4"])
63
+ end
64
+ else
65
+ s.add_dependency(%q<actionpack>, [">= 3.0.pre"])
66
+ s.add_dependency(%q<ParseTree>, [">= 3.0.4"])
67
+ s.add_dependency(%q<ruby2ruby>, [">= 1.2.4"])
68
+ end
69
+ end
70
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_action_args
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezmobius
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-01-31 00:00:00 -05:00
18
+ date: 2010-02-05 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -91,6 +91,7 @@ files:
91
91
  - lib/rails_action_args/mri_args.rb
92
92
  - lib/rails_action_args/plugin.rb
93
93
  - lib/rails_action_args/vm_args.rb
94
+ - rails_action_args.gemspec
94
95
  - test/test_rails_action_args.rb
95
96
  has_rdoc: true
96
97
  homepage: http://github.com/collin/rails_action_args