inherited_resources 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -10,23 +10,18 @@ a screencast made by Fabio Akita about its features:
10
10
 
11
11
  http://akitaonrails.com/2009/09/01/screencast-real-thin-restful-controllers-with-inherited-resources
12
12
 
13
- Inherited Resources is tested and compatible with Rails 2.3.x.
13
+ This Inherited Resources branch is tested and compatible with Rails 2.3.x.
14
14
 
15
15
  == Installation
16
16
 
17
17
  Inherited Resources is available as gem on Gemcutter, so just run the following:
18
18
 
19
- sudo gem install inherited_resources
19
+ sudo gem install inherited_resources --version=1.0
20
20
 
21
21
  If you want it as plugin, just do:
22
22
 
23
23
  script/plugin install git://github.com/josevalim/inherited_resources.git
24
24
 
25
- == Upgrading to Inherited Resources 1.0
26
-
27
- Inherited Resources finally reached 1.0 version. A couple things changed,
28
- so be sure to read the following sections:
29
-
30
25
  === HasScope
31
26
 
32
27
  Since Inherited Resources 1.0, has_scope is not part of its core anymore.
data/Rakefile CHANGED
@@ -17,8 +17,8 @@ begin
17
17
  s.description = "Inherited Resources speeds up development by making your controllers inherit all restful actions so you just have to focus on what is important."
18
18
  s.authors = ['José Valim']
19
19
  s.files = FileList["[A-Z]*", "init.rb", "{lib}/**/*"]
20
- s.add_dependency("responders", ">= 0.4.2")
21
- s.add_dependency("has_scope", ">= 0.4")
20
+ s.add_dependency("responders", "~> 0.4.3")
21
+ s.add_dependency("has_scope", "~> 0.4.2")
22
22
  end
23
23
 
24
24
  Jeweler::GemcutterTasks.new
@@ -161,8 +161,10 @@ module InheritedResources
161
161
  config = self.resources_configuration[symbol] = {}
162
162
 
163
163
  config[:parent_class] = options.delete(:parent_class) || begin
164
- (options.delete(:class_name) || symbol).to_s.pluralize.classify.constantize
165
- rescue NameError
164
+ class_name = (options.delete(:class_name) || symbol).to_s.pluralize.classify
165
+ class_name.constantize
166
+ rescue NameError => e
167
+ raise unless e.message.include?(class_name)
166
168
  nil
167
169
  end
168
170
 
@@ -227,8 +229,10 @@ module InheritedResources
227
229
  def initialize_resources_class_accessors! #:nodoc:
228
230
  # Initialize resource class
229
231
  self.resource_class = begin
230
- self.controller_name.classify.constantize
231
- rescue NameError
232
+ class_name = self.controller_name.classify
233
+ class_name.constantize
234
+ rescue NameError => e
235
+ raise unless e.message.include?(class_name)
232
236
  nil
233
237
  end
234
238
 
@@ -1,3 +1,3 @@
1
1
  module InheritedResources
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
data/test/test_helper.rb CHANGED
@@ -17,10 +17,11 @@ require 'mocha'
17
17
  ENV["RAILS_ENV"] = "test"
18
18
  RAILS_ROOT = "anywhere"
19
19
 
20
+ gem 'activesupport', '= 2.3.5'
20
21
  require 'active_support'
22
+
23
+ gem 'actionpack', '= 2.3.5'
21
24
  require 'action_controller'
22
- require 'action_controller/test_case'
23
- require 'action_controller/test_process'
24
25
 
25
26
  I18n.load_path << File.join(File.dirname(__FILE__), 'locales', 'en.yml')
26
27
  I18n.reload!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inherited_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jos\xC3\xA9 Valim"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-11 00:00:00 +01:00
12
+ date: 2010-02-06 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,9 +18,9 @@ dependencies:
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ">="
21
+ - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.4.2
23
+ version: 0.4.3
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: has_scope
@@ -28,9 +28,9 @@ dependencies:
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: "0.4"
33
+ version: 0.4.2
34
34
  version:
35
35
  description: Inherited Resources speeds up development by making your controllers inherit all restful actions so you just have to focus on what is important.
36
36
  email: jose.valim@gmail.com