norman-friendly_id 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,20 +2,50 @@ require File.dirname(__FILE__) + '/test_helper'
2
2
 
3
3
  class ScopedModelTest < Test::Unit::TestCase
4
4
 
5
- fixtures :people, :countries, :slugs
6
-
7
- def test_should_find_scoped_records_without_scope
8
- assert_equal 2, Person.find(:all, "john-smith").size
9
- end
5
+ context "A slugged model that uses a scope" do
6
+
7
+ setup do
8
+ Person.delete_all
9
+ Country.delete_all
10
+ Slug.delete_all
11
+ @usa = Country.create!(:name => "USA")
12
+ @canada = Country.create!(:name => "Canada")
13
+ @person = Person.create!(:name => "John Smith", :country => @usa)
14
+ @person2 = Person.create!(:name => "John Smith", :country => @canada)
15
+ end
16
+
17
+ should "find all scoped records without scope" do
18
+ assert_equal 2, Person.find(:all, @person.friendly_id).size
19
+ end
20
+
21
+ should "find a single scoped records with a scope" do
22
+ assert Person.find(@person.friendly_id, :scope => @person.country.to_param)
23
+ end
24
+
25
+ should "raise an error when finding a single scoped record with no scope" do
26
+ assert_raises ActiveRecord::RecordNotFound do
27
+ Person.find(@person.friendly_id)
28
+ end
29
+ end
30
+
31
+ should "append scope error info when missing scope causes a find to fail" do
32
+ begin
33
+ Person.find(@person.friendly_id)
34
+ fail "The find should not have succeeded"
35
+ rescue ActiveRecord::RecordNotFound => e
36
+ assert_match /expected scope/, e.message
37
+ end
38
+ end
39
+
40
+ should "append scope error info when the scope value causes a find to fail" do
41
+ begin
42
+ Person.find(@person.friendly_id, :scope => "badscope")
43
+ fail "The find should not have succeeded"
44
+ rescue ActiveRecord::RecordNotFound => e
45
+ assert_match /scope=badscope/, e.message
46
+ end
47
+ end
10
48
 
11
- def test_should_find_scoped_records_with_scope
12
- assert_equal people(:john_smith), Person.find("john-smith", :scope => "argentina")
13
- assert_equal people(:john_smith2), Person.find("john-smith", :scope => "usa")
14
- end
15
-
16
- def test_should_create_scoped_records_with_scope
17
- person = Person.create!(:name => "Joe Schmoe", :country => countries(:usa))
18
- assert_equal "usa", person.slug.scope
19
49
  end
20
50
 
21
51
  end
data/test/slug_test.rb CHANGED
@@ -1,87 +1,106 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.dirname(__FILE__) + '/test_helper'
2
4
 
3
5
  class SlugTest < Test::Unit::TestCase
4
6
 
5
- fixtures :posts, :slugs
6
-
7
- def test_should_indicate_if_it_is_the_most_recent
8
- assert slugs(:two_new).is_most_recent?
9
- assert !slugs(:two_old).is_most_recent?
10
- end
11
-
12
- def test_parse_should_return_slug_name_and_sequence
13
- assert_equal ["test", "2"], Slug::parse("test--2")
14
- end
15
-
16
- def test_parse_should_return_a_default_sequnce_of_1
17
- assert_equal ["test", "1"], Slug::parse("test")
18
- end
19
-
20
- def test_strip_diacritics_should_strip_diacritics
21
- assert_equal "acai", Slug::strip_diacritics("açaí")
22
- end
23
-
24
- def test_to_friendly_id_should_include_sequence_if_its_greater_than_1
25
- slug = Slug.new(:name => "test", :sequence => 2)
26
- assert_equal "test--2", slug.to_friendly_id
27
- end
28
-
29
- def test_to_friendly_id_should_include_sequence_if_its_than_1
30
- slug = Slug.new(:name => "test", :sequence => 1)
31
- assert_equal "test", slug.to_friendly_id
32
- end
33
-
34
- def test_normalize_should_lowercase_strings
35
- assert_match /abc/, Slug::normalize("ABC")
36
- end
37
-
38
- def test_normalize_should_replace_whitespace_with_dashes
39
- assert_match /a-b/, Slug::normalize("a b")
40
- end
41
-
42
- def test_normalize_should_replace_2spaces_with_1dash
43
- assert_match /a-b/, Slug::normalize("a b")
44
- end
45
-
46
- def test_normalize_should_remove_punctuation
47
- assert_match /abc/, Slug::normalize('abc!@#$%^&*•¶§∞¢££¡¿()><?"":;][]\.,/')
48
- end
49
-
50
- def test_normalize_should_strip_trailing_space
51
- assert_match /ab/, Slug::normalize("ab ")
52
- end
53
-
54
- def test_normalize_should_strip_leading_space
55
- assert_match /ab/, Slug::normalize(" ab")
56
- end
57
-
58
- def test_normalize_should_strip_trailing_slashes
59
- assert_match /ab/, Slug::normalize("ab-")
60
- end
7
+ context "a slug" do
8
+
9
+ setup do
10
+ Slug.delete_all
11
+ Post.delete_all
12
+ end
61
13
 
62
- def test_normalize_should_strip_leading_slashes
63
- assert_match /ab/, Slug::normalize("-ab")
64
- end
14
+ should "indicate if it is the most recent slug" do
15
+ @post = Post.create!(:title => "test title", :content => "test content")
16
+ @post.title = "a new title"
17
+ @post.save!
18
+ assert @post.slugs.last.is_most_recent?
19
+ assert !@post.slugs.first.is_most_recent?
20
+ end
65
21
 
66
- def test_normalize_should_not_modify_valid_name_strings
67
- assert_match /a-b-c-d/, Slug::normalize("a-b-c-d")
68
22
  end
23
+
24
+ context "the Slug class" do
25
+
26
+ should "parse the slug name and sequence" do
27
+ assert_equal ["test", "2"], Slug::parse("test--2")
28
+ end
29
+
30
+ should "parse with a default sequence of 1" do
31
+ assert_equal ["test", "1"], Slug::parse("test")
32
+ end
69
33
 
70
- # These strings are taken from various international Google homepages. I
71
- # would be most grateful if a fluent speaker of any language that uses a
72
- # writing system other than the Roman alphabet could help me make some
73
- # better tests to ensure this is working correctly.
74
- def test_normalize_works_with_non_roman_chars
75
- assert_equal "検-索", Slug::normalize("検 索")
34
+ should "should strip diacritics" do
35
+ assert_equal "acai", Slug::strip_diacritics("açaí")
36
+ end
37
+
38
+ should "strip diacritics correctly " do
39
+ input = "ÀÁÂÃÄÅÆÇÈÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"
40
+ output = Slug::strip_diacritics(input).split(//)
41
+ expected = "AAAAAAAECEEEIIIIDNOOOOOOUUUUYThssaaaaaaaeceeeeiiiidnoooooouuuuythy".split(//)
42
+ output.split.each_index do |i|
43
+ assert_equal output[i], expected[i]
44
+ end
45
+ end
46
+
76
47
  end
77
-
78
- def test_strip_diactics_correctly_strips_diacritics
79
- input = "ÀÁÂÃÄÅÆÇÈÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"
80
- output = Slug::strip_diacritics(input).split(//)
81
- expected = "AAAAAAAECEEEIIIIDNOOOOOOUUUUYThssaaaaaaaeceeeeiiiidnoooooouuuuythy".split(//)
82
- output.split.each_index do |i|
83
- assert_equal output[i], expected[i]
48
+
49
+ context "the Slug class's to_friendly_id method" do
50
+
51
+ should "include the sequence if the sequence is greater than 1" do
52
+ slug = Slug.new(:name => "test", :sequence => 2)
53
+ assert_equal "test--2", slug.to_friendly_id
84
54
  end
55
+
56
+ should "not include the sequence if the sequence is 1" do
57
+ slug = Slug.new(:name => "test", :sequence => 1)
58
+ assert_equal "test", slug.to_friendly_id
59
+ end
60
+
85
61
  end
86
62
 
63
+ context "the Slug class's normalize method" do
64
+
65
+ should "should lowercase strings" do
66
+ assert_match /abc/, Slug::normalize("ABC")
67
+ end
68
+
69
+ should "should replace whitespace with dashes" do
70
+ assert_match /a-b/, Slug::normalize("a b")
71
+ end
72
+
73
+ should "should replace 2spaces with 1dash" do
74
+ assert_match /a-b/, Slug::normalize("a b")
75
+ end
76
+
77
+ should "should remove punctuation" do
78
+ assert_match /abc/, Slug::normalize('abc!@#$%^&*•¶§∞¢££¡¿()><?"":;][]\.,/')
79
+ end
80
+
81
+ should "should strip trailing space" do
82
+ assert_match /ab/, Slug::normalize("ab ")
83
+ end
84
+
85
+ should "should strip leading space" do
86
+ assert_match /ab/, Slug::normalize(" ab")
87
+ end
88
+
89
+ should "should strip trailing slashes" do
90
+ assert_match /ab/, Slug::normalize("ab-")
91
+ end
92
+
93
+ should "should strip leading slashes" do
94
+ assert_match /ab/, Slug::normalize("-ab")
95
+ end
96
+
97
+ should "should not modify valid name strings" do
98
+ assert_match /a-b-c-d/, Slug::normalize("a-b-c-d")
99
+ end
100
+
101
+ should "work with non roman chars" do
102
+ assert_equal "検-索", Slug::normalize("検 索")
103
+ end
104
+
105
+ end
87
106
  end
@@ -0,0 +1,263 @@
1
+ # encoding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '/test_helper'
4
+
5
+ class SluggedModelTest < Test::Unit::TestCase
6
+
7
+ context "A slugged model with default FriendlyId options" do
8
+
9
+ setup do
10
+ Post.friendly_id_options = FriendlyId::DEFAULT_FRIENDLY_ID_OPTIONS.merge(:column => :title, :use_slug => true)
11
+ Post.delete_all
12
+ Person.delete_all
13
+ Slug.delete_all
14
+ @post = Post.new :title => "Test post", :content => "Test content"
15
+ @post.save!
16
+ end
17
+
18
+ should "have friendly_id options" do
19
+ assert_not_nil Post.friendly_id_options
20
+ end
21
+
22
+ should "have a slug" do
23
+ assert_not_nil @post.slug
24
+ end
25
+
26
+ should "be findable by its friendly_id" do
27
+ assert Post.find(@post.friendly_id)
28
+ end
29
+
30
+ should "be findable by its regular id" do
31
+ assert Post.find(@post.id)
32
+ end
33
+
34
+ should "generate slug text" do
35
+ post = Post.new :title => "Test post", :content => "Test content"
36
+ assert_not_nil @post.slug_text
37
+ end
38
+
39
+ should "respect finder conditions" do
40
+ assert_raises ActiveRecord::RecordNotFound do
41
+ Post.find(@post.friendly_id, :conditions => "1 = 2")
42
+ end
43
+ end
44
+
45
+ should "raise an error if the friendly_id text is reserved" do
46
+ assert_raises(FriendlyId::SlugGenerationError) do
47
+ Post.create!(:title => "new")
48
+ end
49
+ end
50
+
51
+ should "raise an error if the friendly_id text is blank" do
52
+ assert_raises(FriendlyId::SlugGenerationError) do
53
+ Post.create(:title => "")
54
+ end
55
+ end
56
+
57
+ should "raise an error if the normalized friendly id becomes blank" do
58
+ assert_raises(FriendlyId::SlugGenerationError) do
59
+ post = Post.create!(:title => "-.-")
60
+ end
61
+ end
62
+
63
+ should "not make a new slug unless the friendly_id method value has changed" do
64
+ @post.content = "Changed content"
65
+ @post.save!
66
+ assert_equal 1, @post.slugs.size
67
+ end
68
+
69
+ should "make a new slug if the friendly_id method value has changed" do
70
+ @post.title = "Changed title"
71
+ @post.save!
72
+ assert_equal 2, @post.slugs.size
73
+ end
74
+
75
+ should "have a slug sequence of 1 by default" do
76
+ assert_equal 1, @post.slug.sequence
77
+ end
78
+
79
+ should "increment sequence for duplicate slug names" do
80
+ @post2 = Post.create! :title => @post.title, :content => "Test content for post2"
81
+ assert_equal 2, @post2.slug.sequence
82
+ end
83
+
84
+ should "have a friendly_id that terminates with -- and the slug sequence if the sequence is greater than 1" do
85
+ @post2 = Post.create! :title => @post.title, :content => "Test content for post2"
86
+ assert_match(/--2\z/, @post2.friendly_id)
87
+ end
88
+
89
+ should "not strip diacritics" do
90
+ @post = Post.new(:title => "¡Feliz año!")
91
+ assert_match(/#{'ñ'}/, @post.slug_text)
92
+ end
93
+
94
+ should "not convert to ASCII" do
95
+ @post = Post.new(:title => "katakana: ゲコゴサザシジ")
96
+ assert_equal "katakana-ゲコゴサザシジ", @post.slug_text
97
+ end
98
+
99
+ should "allow the same friendly_id across models" do
100
+ @person = Person.create!(:name => @post.title)
101
+ assert_equal @person.friendly_id, @post.friendly_id
102
+ end
103
+
104
+ should "truncate slug text longer than the max length" do
105
+ @post = Post.new(:title => "a" * (Post.friendly_id_options[:max_length] + 1))
106
+ assert_equal @post.slug_text.length, Post.friendly_id_options[:max_length]
107
+ end
108
+
109
+ should "be able to reuse an old friendly_id without incrementing the sequence" do
110
+ old_title = @post.title
111
+ old_friendly_id = @post.friendly_id
112
+ @post.title = "A changed title"
113
+ @post.save!
114
+ @post.title = old_title
115
+ @post.save!
116
+ assert_equal old_friendly_id, @post.friendly_id
117
+ end
118
+
119
+ should "allow eager loading of slugs" do
120
+ assert_nothing_raised do
121
+ Post.find(@post.friendly_id, :include => :slugs)
122
+ end
123
+ end
124
+
125
+ context "and configured to strip diacritics" do
126
+ setup do
127
+ Post.friendly_id_options = Post.friendly_id_options.merge(:strip_diacritics => true)
128
+ end
129
+
130
+ should "strip diacritics from Roman alphabet based characters" do
131
+ @post = Post.new(:title => "¡Feliz año!")
132
+ assert_no_match(/#{'ñ'}/, @post.slug_text)
133
+ end
134
+ end
135
+
136
+ context "and configured to convert to ASCII" do
137
+ setup do
138
+ Post.friendly_id_options = Post.friendly_id_options.merge(:strip_non_ascii => true)
139
+ end
140
+
141
+ should "strip non-ascii characters" do
142
+ @post = Post.new(:title => "katakana: ゲコゴサザシジ")
143
+ assert_equal "katakana", @post.slug_text
144
+ end
145
+ end
146
+
147
+ context "that doesn't have a slug" do
148
+
149
+ setup do
150
+ @post.slug.destroy
151
+ @post = Post.find(@post.id)
152
+ end
153
+
154
+ should "have a to_param method that returns the id cast to a string" do
155
+ assert_equal @post.id.to_s, @post.to_param
156
+ end
157
+
158
+ end
159
+
160
+ context "when found using its friendly_id" do
161
+ setup do
162
+ @post = Post.find(@post.friendly_id)
163
+ end
164
+
165
+ should "indicate that it was found using the friendly_id" do
166
+ assert @post.found_using_friendly_id?
167
+ end
168
+
169
+ should "not indicate that it has a better id" do
170
+ assert !@post.has_better_id?
171
+ end
172
+
173
+ should "not indicate that it was found using its numeric id" do
174
+ assert !@post.found_using_numeric_id?
175
+ end
176
+
177
+ should "have a finder slug" do
178
+ assert_not_nil @post.finder_slug
179
+ end
180
+
181
+ end
182
+
183
+ context "when found using its regular id" do
184
+ setup do
185
+ @post = Post.find(@post.id)
186
+ end
187
+
188
+ should "indicate that it was not found using the friendly id" do
189
+ assert !@post.found_using_friendly_id?
190
+ end
191
+
192
+ should "indicate that it has a better id" do
193
+ assert @post.has_better_id?
194
+ end
195
+
196
+ should "indicate that it was found using its numeric id" do
197
+ assert @post.found_using_numeric_id?
198
+ end
199
+
200
+ should "not have a finder slug" do
201
+ assert_nil @post.finder_slug
202
+ end
203
+
204
+ end
205
+
206
+ context "when found using an outdated friendly id" do
207
+ setup do
208
+ old_id = @post.friendly_id
209
+ @post.title = "Title changed"
210
+ @post.save!
211
+ @post = Post.find(old_id)
212
+ end
213
+
214
+ should "indicate that it was found using a friendly_id" do
215
+ assert @post.found_using_friendly_id?
216
+ end
217
+
218
+ should "indicate that it has a better id" do
219
+ assert @post.has_better_id?
220
+ end
221
+
222
+ should "not indicate that it was found using its numeric id" do
223
+ assert !@post.found_using_numeric_id?
224
+ end
225
+
226
+ should "should have a finder slug different from its default slug" do
227
+ assert_not_equal @post.slug, @post.finder_slug
228
+ end
229
+
230
+ end
231
+
232
+ context "when using an array as the find argument" do
233
+
234
+ setup do
235
+ @post2 = Post.create!(:title => "another post", :content => "more content")
236
+ end
237
+
238
+ should "return results" do
239
+ assert_equal 2, Post.find([@post.friendly_id, @post2.friendly_id]).size
240
+ end
241
+
242
+ should "indicate that the results were found using a friendly_id" do
243
+ @posts = Post.find [@post.friendly_id, @post2.friendly_id]
244
+ @posts.each { |p| assert p.found_using_friendly_id? }
245
+ end
246
+
247
+ should "raise an error when all records are not found" do
248
+ assert_raises(ActiveRecord::RecordNotFound) do
249
+ Post.find([@post.friendly_id, 'non-existant-slug-record'])
250
+ end
251
+ end
252
+
253
+ should "allow eager loading of slugs" do
254
+ assert_nothing_raised do
255
+ Post.find([@post.friendly_id, @post2.friendly_id], :include => :slugs)
256
+ end
257
+ end
258
+
259
+ end
260
+
261
+ end
262
+
263
+ end
data/test/test_helper.rb CHANGED
@@ -1,35 +1,35 @@
1
1
  $:.unshift(File.dirname(__FILE__) + '/../lib')
2
- $VERBOSE = false
3
-
4
- ENV['RAILS_ENV'] = 'test'
5
- require File.dirname(__FILE__) + '/rails/2.x/config/environment.rb'
6
- ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
7
-
2
+ $:.unshift(File.dirname(__FILE__))
3
+ $VERBOSE=false
4
+ require 'rubygems'
8
5
  require 'test/unit'
9
- require 'active_record/fixtures'
10
- require 'action_controller/test_process'
11
- require 'sqlite3'
12
- require 'friendly_id/slug'
13
-
14
- config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
15
- ActiveRecord::Base.establish_connection
16
-
17
- silence_stream(STDOUT) do
18
- load(File.dirname(__FILE__) + "/schema.rb")
6
+ require 'shoulda'
7
+ # You can use "rake test AR_VERSION=2.0.5" to test against 2.0.5, for example.
8
+ # The default is to use the latest installed ActiveRecord.
9
+ if ENV["AR_VERSION"]
10
+ gem 'activerecord', "#{ENV["AR_VERSION"]}"
19
11
  end
12
+ require 'active_record'
20
13
 
21
- Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures"
22
- $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)
14
+ require 'friendly_id'
15
+ require 'models/post'
16
+ require 'models/person'
17
+ require 'models/user'
18
+ require 'models/country'
19
+ require 'models/book'
20
+ require 'models/novel'
23
21
 
24
- class Test::Unit::TestCase #:nodoc:
25
- include ActionController::TestProcess
26
- def create_fixtures(*table_names)
27
- if block_given?
28
- Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names) { yield }
29
- else
30
- Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names)
31
- end
32
- end
33
- self.use_transactional_fixtures = true
34
- self.use_instantiated_fixtures = false
22
+ # Borrowed from ActiveSupport
23
+ def silence_stream(stream)
24
+ old_stream = stream.dup
25
+ stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
26
+ stream.sync = true
27
+ yield
28
+ ensure
29
+ stream.reopen(old_stream)
35
30
  end
31
+
32
+ ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"
33
+ silence_stream(STDOUT) do
34
+ load(File.dirname(__FILE__) + "/schema.rb")
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: norman-friendly_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-02-07 00:00:00 -08:00
14
+ date: 2009-02-11 00:00:00 -08:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -23,6 +23,15 @@ dependencies:
23
23
  - !ruby/object:Gem::Version
24
24
  version: "0.1"
25
25
  version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: activerecord
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.0
34
+ version:
26
35
  - !ruby/object:Gem::Dependency
27
36
  name: newgem
28
37
  version_requirement:
@@ -32,6 +41,24 @@ dependencies:
32
41
  - !ruby/object:Gem::Version
33
42
  version: 1.2.3
34
43
  version:
44
+ - !ruby/object:Gem::Dependency
45
+ name: Shoulda
46
+ version_requirement:
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 1.2.0
52
+ version:
53
+ - !ruby/object:Gem::Dependency
54
+ name: sqlite3-ruby
55
+ version_requirement:
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: "0"
61
+ version:
35
62
  - !ruby/object:Gem::Dependency
36
63
  name: hoe
37
64
  version_requirement:
@@ -41,7 +68,7 @@ dependencies:
41
68
  - !ruby/object:Gem::Version
42
69
  version: 1.8.0
43
70
  version:
44
- description: A comprehensive slugging and pretty-URL plugin for Ruby on Rails.
71
+ description: A comprehensive slugging and pretty-URL plugin for ActiveRecord.
45
72
  email:
46
73
  - norman@randomba.org
47
74
  - adrian@randomba.org
@@ -71,37 +98,24 @@ files:
71
98
  - lib/friendly_id/helpers.rb
72
99
  - lib/friendly_id/non_sluggable_class_methods.rb
73
100
  - lib/friendly_id/non_sluggable_instance_methods.rb
74
- - lib/friendly_id/shoulda_macros.rb
75
101
  - lib/friendly_id/slug.rb
76
102
  - lib/friendly_id/sluggable_class_methods.rb
77
103
  - lib/friendly_id/sluggable_instance_methods.rb
78
104
  - lib/friendly_id/version.rb
79
105
  - lib/tasks/friendly_id.rake
80
106
  - lib/tasks/friendly_id.rb
81
- - test/database.yml
82
- - test/fixtures/countries.yml
83
- - test/fixtures/country.rb
84
- - test/fixtures/people.yml
85
- - test/fixtures/person.rb
86
- - test/fixtures/post.rb
87
- - test/fixtures/posts.yml
88
- - test/fixtures/slugs.yml
89
- - test/fixtures/user.rb
90
- - test/fixtures/users.yml
107
+ - test/models/country.rb
108
+ - test/models/person.rb
109
+ - test/models/post.rb
110
+ - test/models/user.rb
91
111
  - test/non_slugged_test.rb
92
- - test/rails/2.x/app/controllers/application.rb
93
- - test/rails/2.x/config/boot.rb
94
- - test/rails/2.x/config/database.yml
95
- - test/rails/2.x/config/environment.rb
96
- - test/rails/2.x/config/environments/test.rb
97
- - test/rails/2.x/config/routes.rb
98
112
  - test/schema.rb
99
113
  - test/scoped_model_test.rb
100
114
  - test/slug_test.rb
101
- - test/sluggable_test.rb
115
+ - test/slugged_model_test.rb
102
116
  - test/test_helper.rb
103
117
  has_rdoc: true
104
- homepage: http://randomba.org
118
+ homepage: http://friendly-id.rubyforge.org/
105
119
  post_install_message:
106
120
  rdoc_options:
107
121
  - --main
@@ -126,9 +140,9 @@ rubyforge_project: friendly-id
126
140
  rubygems_version: 1.2.0
127
141
  signing_key:
128
142
  specification_version: 2
129
- summary: A comprehensive slugging and pretty-URL plugin for Ruby on Rails.
143
+ summary: A comprehensive slugging and pretty-URL plugin for ActiveRecord.
130
144
  test_files:
131
145
  - test/non_slugged_test.rb
132
146
  - test/scoped_model_test.rb
133
147
  - test/slug_test.rb
134
- - test/sluggable_test.rb
148
+ - test/slugged_model_test.rb