slugged 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,8 @@ module Slugged
22
22
  module InstanceMethods
23
23
 
24
24
  def to_slug
25
- cached_slug.present? ? cached_slug : id.to_s
25
+ cached_value = send cached_slug_column
26
+ cached_value.present? ? cached_value : id.to_s
26
27
  end
27
28
 
28
29
  def generate_slug
@@ -2,7 +2,7 @@ module Slugged
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 2
5
+ PATCH = 3
6
6
  STRING = [MAJOR, MINOR, PATCH].join(".")
7
7
  end
8
8
  end
@@ -0,0 +1,90 @@
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{slugged}
8
+ s.version = "0.3.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Darcy Laycock"]
12
+ s.date = %q{2010-12-30}
13
+ s.description = %q{Super simple slugs for ActiveRecord 3.0 and higher, with support for slug history}
14
+ s.email = %q{sutto@sutto.net}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE",
26
+ "README.md",
27
+ "Rakefile",
28
+ "lib/generators/slugged/slug_migration/slug_migration_generator.rb",
29
+ "lib/generators/slugged/slug_migration/templates/migration.erb",
30
+ "lib/generators/slugged/slugs/slugs_generator.rb",
31
+ "lib/generators/slugged/slugs/templates/migration.erb",
32
+ "lib/slugged.rb",
33
+ "lib/slugged/active_record_methods.rb",
34
+ "lib/slugged/caching.rb",
35
+ "lib/slugged/finders.rb",
36
+ "lib/slugged/memory_cache.rb",
37
+ "lib/slugged/railtie.rb",
38
+ "lib/slugged/scopes.rb",
39
+ "lib/slugged/slug.rb",
40
+ "lib/slugged/slug_history.rb",
41
+ "lib/slugged/version.rb",
42
+ "metrics/.gitignore",
43
+ "slugged.gemspec",
44
+ "test/caching_test.rb",
45
+ "test/helper.rb",
46
+ "test/is_sluggable_test.rb",
47
+ "test/model_definitions.rb",
48
+ "test/slug_history_test.rb",
49
+ "test/slugged_test.rb"
50
+ ]
51
+ s.homepage = %q{http://github.com/Sutto/slugged}
52
+ s.rdoc_options = ["--charset=UTF-8"]
53
+ s.require_paths = ["lib"]
54
+ s.rubygems_version = %q{1.3.7}
55
+ s.summary = %q{Super simple slugs for ActiveRecord 3.0 and higher, with support for slug history}
56
+ s.test_files = [
57
+ "test/caching_test.rb",
58
+ "test/helper.rb",
59
+ "test/is_sluggable_test.rb",
60
+ "test/model_definitions.rb",
61
+ "test/slug_history_test.rb",
62
+ "test/slugged_test.rb"
63
+ ]
64
+
65
+ if s.respond_to? :specification_version then
66
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
67
+ s.specification_version = 3
68
+
69
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
+ s.add_runtime_dependency(%q<activerecord>, ["~> 3.0.0"])
71
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
72
+ s.add_runtime_dependency(%q<uuid>, [">= 0"])
73
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
74
+ s.add_development_dependency(%q<reversible_data>, [">= 0"])
75
+ else
76
+ s.add_dependency(%q<activerecord>, ["~> 3.0.0"])
77
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
78
+ s.add_dependency(%q<uuid>, [">= 0"])
79
+ s.add_dependency(%q<shoulda>, [">= 0"])
80
+ s.add_dependency(%q<reversible_data>, [">= 0"])
81
+ end
82
+ else
83
+ s.add_dependency(%q<activerecord>, ["~> 3.0.0"])
84
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
85
+ s.add_dependency(%q<uuid>, [">= 0"])
86
+ s.add_dependency(%q<shoulda>, [">= 0"])
87
+ s.add_dependency(%q<reversible_data>, [">= 0"])
88
+ end
89
+ end
90
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slugged
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-30 00:00:00 +08:00
18
+ date: 2010-12-30 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -125,6 +125,7 @@ files:
125
125
  - lib/slugged/slug_history.rb
126
126
  - lib/slugged/version.rb
127
127
  - metrics/.gitignore
128
+ - slugged.gemspec
128
129
  - test/caching_test.rb
129
130
  - test/helper.rb
130
131
  - test/is_sluggable_test.rb