too_short 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -30,7 +30,7 @@ In your models:
30
30
  end
31
31
 
32
32
  class Bar < ActiveRecord::Base
33
- has_as_short_url :scope => 'b'
33
+ has_a_short_url :scope => 'b'
34
34
  end
35
35
 
36
36
  @foo.short_url # => http://2sh.de/f/2n9c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -38,7 +38,10 @@ module TooShort
38
38
  def require_all_model_classes
39
39
  # Rails only loads classes when they are used
40
40
  # To populate our registry we require each file in app/models
41
- Dir.glob(RAILS_ROOT + '/app/models/*.rb').each { |file| require file } if defined?(RAILS_ROOT)
41
+ Dir.glob(RAILS_ROOT + '/app/models/*.rb').each do |file|
42
+ model_name = file.sub(/.rb$/, '')
43
+ model_name.classify.constantize
44
+ end if defined?(RAILS_ROOT)
42
45
  end
43
46
 
44
47
  end
data/too_short.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{too_short}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Simon Baumgartner"]
12
- s.date = %q{2011-01-31}
12
+ s.date = %q{2011-02-02}
13
13
  s.description = %q{TooShort allows you to create persistent short URLs for your resources, without any additional storage.}
14
14
  s.email = %q{makesens3@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: too_short
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Simon Baumgartner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-31 00:00:00 +01:00
18
+ date: 2011-02-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency