fizx-collapsed_routes 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/collapsed_routes.gemspec +5 -5
- data/lib/collapsed_routes.rb +4 -0
- data/spec/app/app/controllers/application_controller.rb +4 -3
- data/spec/collapsed_routes_spec.rb +1 -3
- metadata +4 -4
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "collapsed_routes"
|
8
|
-
gem.summary = %Q{
|
8
|
+
gem.summary = %Q{Simpler routes for nested resources}
|
9
9
|
gem.email = "kyle@kylemaxwell.com"
|
10
10
|
gem.homepage = "http://github.com/fizx/collapsed_routes"
|
11
11
|
gem.authors = ["Kyle Maxwell"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/collapsed_routes.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{collapsed_routes}
|
5
|
-
s.version = "1.
|
5
|
+
s.version = "1.2.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Kyle Maxwell"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-07-01}
|
10
10
|
s.email = %q{kyle@kylemaxwell.com}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
@@ -91,8 +91,8 @@ Gem::Specification.new do |s|
|
|
91
91
|
s.homepage = %q{http://github.com/fizx/collapsed_routes}
|
92
92
|
s.rdoc_options = ["--charset=UTF-8"]
|
93
93
|
s.require_paths = ["lib"]
|
94
|
-
s.rubygems_version = %q{1.3.
|
95
|
-
s.summary = %q{
|
94
|
+
s.rubygems_version = %q{1.3.1}
|
95
|
+
s.summary = %q{Simpler routes for nested resources}
|
96
96
|
s.test_files = [
|
97
97
|
"spec/app/app/controllers/application_controller.rb",
|
98
98
|
"spec/app/app/controllers/comments_controller.rb",
|
@@ -126,7 +126,7 @@ Gem::Specification.new do |s|
|
|
126
126
|
|
127
127
|
if s.respond_to? :specification_version then
|
128
128
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
129
|
-
s.specification_version =
|
129
|
+
s.specification_version = 2
|
130
130
|
|
131
131
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
132
132
|
else
|
data/lib/collapsed_routes.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
# Likewise, all the methods added will be available for all controllers.
|
3
|
-
|
1
|
+
require File.dirname(__FILE__) + "/../../../../lib/collapsed_routes"
|
4
2
|
class ApplicationController < ActionController::Base
|
3
|
+
include CollapsedRoutes
|
4
|
+
collapsed_routes :users, :posts, :comments
|
5
|
+
|
5
6
|
helper :all # include all helpers, all the time
|
6
7
|
protect_from_forgery # See ActionController::RequestForgeryProtection for details
|
7
8
|
|
@@ -1,8 +1,7 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
|
+
# ActionController::Base.default_url_options[:host] = "localhost"
|
3
4
|
include ActionController::UrlWriter
|
4
|
-
include CollapsedRoutes
|
5
|
-
|
6
5
|
ActionController::Base.default_url_options[:host] = "localhost"
|
7
6
|
|
8
7
|
describe "UrlWriter" do
|
@@ -10,7 +9,6 @@ describe "UrlWriter" do
|
|
10
9
|
@user = User.create :name => "Buddy Holly"
|
11
10
|
@post = @user.posts.create :title => "Hi world", :body => "foo bar"
|
12
11
|
@comment = @post.comments.create :title => "Hello back", :body => "who?"
|
13
|
-
collapsed_routes :users, :posts, :comments
|
14
12
|
end
|
15
13
|
|
16
14
|
it "should have routes already defined" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fizx-collapsed_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Maxwell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-01 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -120,8 +120,8 @@ requirements: []
|
|
120
120
|
rubyforge_project:
|
121
121
|
rubygems_version: 1.2.0
|
122
122
|
signing_key:
|
123
|
-
specification_version:
|
124
|
-
summary:
|
123
|
+
specification_version: 2
|
124
|
+
summary: Simpler routes for nested resources
|
125
125
|
test_files:
|
126
126
|
- spec/app/app/controllers/application_controller.rb
|
127
127
|
- spec/app/app/controllers/comments_controller.rb
|