friendly_id 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 2.1.5 2011-02-22
2
+
3
+ * 1 major bugfix
4
+ * Fixed compatibility with Rails 2.1 multibyte
5
+
1
6
  == 2.1.4 2009-09-01
2
7
 
3
8
  * 1 minor enhancement:
data/friendly_id.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{friendly_id}
5
- s.version = "2.1.4"
5
+ s.version = "2.1.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Norman Clarke", "Adrian Mugnolo", "Emilio Tagua"]
9
- s.date = %q{2009-09-01}
9
+ s.date = %q{2011-02-22}
10
10
  s.description = %q{A comprehensive slugging and pretty-URL plugin for ActiveRecord.}
11
- s.email = ["norman@rubysouth.com", "adrian@rubysouth.com", "miloops@gmail.com"]
11
+ s.email = ["norman@njclarke.com", "adrian@mugnolo.com", "miloops@gmail.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
13
13
  s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "config/website.yml", "friendly_id.gemspec", "generators/friendly_id/friendly_id_generator.rb", "generators/friendly_id/templates/create_slugs.rb", "generators/friendly_id_20_upgrade/friendly_id_20_upgrade_generator.rb", "generators/friendly_id_20_upgrade/templates/upgrade_friendly_id_to_20.rb", "init.rb", "lib/friendly_id.rb", "lib/friendly_id/helpers.rb", "lib/friendly_id/non_sluggable_class_methods.rb", "lib/friendly_id/non_sluggable_instance_methods.rb", "lib/friendly_id/slug.rb", "lib/friendly_id/sluggable_class_methods.rb", "lib/friendly_id/sluggable_instance_methods.rb", "lib/friendly_id/version.rb", "lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rb", "test/contest.rb", "test/custom_slug_normalizer_test.rb", "test/models/book.rb", "test/models/country.rb", "test/models/event.rb", "test/models/novel.rb", "test/models/person.rb", "test/models/post.rb", "test/models/thing.rb", "test/models/user.rb", "test/non_slugged_test.rb", "test/schema.rb", "test/scoped_model_test.rb", "test/slug_test.rb", "test/slugged_model_test.rb", "test/sti_test.rb", "test/test_helper.rb"]
14
- s.homepage = %q{http://friendly-id.rubyforge.org/}
14
+ s.homepage = %q{http://norman.github.com/friendly_id/}
15
15
  s.rdoc_options = ["--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{friendly-id}
@@ -5,8 +5,8 @@ class Slug < ActiveRecord::Base
5
5
 
6
6
  belongs_to :sluggable, :polymorphic => true
7
7
  before_save :check_for_blank_name, :set_sequence
8
-
9
-
8
+
9
+
10
10
  ASCII_APPROXIMATIONS = {
11
11
  198 => "AE",
12
12
  208 => "D",
@@ -34,7 +34,7 @@ class Slug < ActiveRecord::Base
34
34
  # better urls in your application.
35
35
  def normalize(slug_text)
36
36
  return "" if slug_text.nil? || slug_text == ""
37
- ActiveSupport::Multibyte.proxy_class.new(slug_text.to_s).normalize(:kc).
37
+ ActiveSupport::Multibyte::Chars.new(slug_text.to_s).normalize(:kc).
38
38
  gsub(/[\W]/u, ' ').
39
39
  strip.
40
40
  gsub(/\s+/u, '-').
@@ -42,7 +42,7 @@ class Slug < ActiveRecord::Base
42
42
  downcase.
43
43
  to_s
44
44
  end
45
-
45
+
46
46
  def parse(friendly_id)
47
47
  name, sequence = friendly_id.split('--')
48
48
  sequence ||= "1"
@@ -52,7 +52,7 @@ class Slug < ActiveRecord::Base
52
52
  # Remove diacritics (accents, umlauts, etc.) from the string. Borrowed
53
53
  # from "The Ruby Way."
54
54
  def strip_diacritics(string)
55
- ActiveSupport::Multibyte.proxy_class.new(string).normalize(:kd).unpack('U*').inject([]) { |a, u|
55
+ ActiveSupport::Multibyte::Chars.new(string).normalize(:kd).unpack('U*').inject([]) { |a, u|
56
56
  if ASCII_APPROXIMATIONS[u]
57
57
  a += ASCII_APPROXIMATIONS[u].unpack('U*')
58
58
  elsif (u < 0x300 || u > 0x036F)
@@ -63,7 +63,7 @@ class Slug < ActiveRecord::Base
63
63
  end
64
64
 
65
65
 
66
-
66
+
67
67
  # Remove non-ascii characters from the string.
68
68
  def strip_non_ascii(string)
69
69
  strip_diacritics(string).gsub(/[^a-z0-9]+/i, ' ')
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendly_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ prerelease:
5
+ version: 2.1.5
5
6
  platform: ruby
6
7
  authors:
7
8
  - Norman Clarke
@@ -9,86 +10,70 @@ authors:
9
10
  - Emilio Tagua
10
11
  autorequire:
11
12
  bindir: bin
12
- cert_chain:
13
- - |
14
- -----BEGIN CERTIFICATE-----
15
- MIIDNDCCAhygAwIBAgIBADANBgkqhkiG9w0BAQUFADBAMQ8wDQYDVQQDDAZub3Jt
16
- YW4xGDAWBgoJkiaJk/IsZAEZFghyYW5kb21iYTETMBEGCgmSJomT8ixkARkWA29y
17
- ZzAeFw0wODA3MjUxOTEyMDJaFw0wOTA3MjUxOTEyMDJaMEAxDzANBgNVBAMMBm5v
18
- cm1hbjEYMBYGCgmSJomT8ixkARkWCHJhbmRvbWJhMRMwEQYKCZImiZPyLGQBGRYD
19
- b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0MuX/i3u1A7Gu2pC
20
- y3tUIeGen3nJ8KrMpugJ2bo/VRcOLwo3bQl742idpfUE/Wq3rXexxc0Dg9jKQ8yb
21
- 1vHqM0s29UmC+UJjKG87eqQDXiq8jHgRcvykGmTZE8GBAVYvm0Wsm7aXWW6hMM/z
22
- 9QnhZHmBjCaBb8LXsXCgNHFctKkbtxmEXQk2j9pfWuMVSWVVXJR8Nd03u8G2k4RS
23
- DhvPTP0eAsWRda/6oxGm+QDYv1tfwDVtqUEgD0zFFlpqJcJiKjn/vquJc8tPMYwK
24
- E7eh4J9cT83sgTGs65l9e2Z9cF920DQMJmkzSAVpm7LKSglfO+WWGQlpagZbcC3J
25
- hoR5WQIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU
26
- axQXpjRK4llQWMZYVQvaZIJ7/a0wDQYJKoZIhvcNAQEFBQADggEBABappQnc8jtY
27
- ZjbWN1Ya8emsRx2w//Z0LElusQ4PjBfWOzDjQ/BM6JjBA0tC1UyDISpTxD507lZ8
28
- ydTETFAbzTrjJwBwwc1fxwgNm6MZQkZ/7A6WO7OfQw+nkiEaDw7fa10Gd4DBCqhY
29
- Ot72besSspWtxuzTkpl/9YjbUk/XGL2ZjONUUsdzig12eGA659E0AM7LreIiLvSu
30
- EI6rjC8mzEcTVXpeZKtVL5Ba7JSpWT5ojVXF8b4+5o3W5iSH2s4vWeRCS3KK3cww
31
- sJ9/D9IfrPBgbrLYAldiZhGbSxBmwc6mbpPxWaT7SKRbw+XhSGhEeYbBcJs+8gvo
32
- h7fbBRfStxI=
33
- -----END CERTIFICATE-----
13
+ cert_chain: []
34
14
 
35
- date: 2009-09-01 00:00:00 -03:00
15
+ date: 2011-02-22 00:00:00 -03:00
36
16
  default_executable:
37
17
  dependencies:
38
18
  - !ruby/object:Gem::Dependency
39
19
  name: activerecord
40
- type: :runtime
41
- version_requirement:
42
- version_requirements: !ruby/object:Gem::Requirement
20
+ prerelease: false
21
+ requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
43
23
  requirements:
44
24
  - - ">="
45
25
  - !ruby/object:Gem::Version
46
26
  version: 2.0.0
47
- version:
27
+ type: :runtime
28
+ version_requirements: *id001
48
29
  - !ruby/object:Gem::Dependency
49
30
  name: activesupport
50
- type: :runtime
51
- version_requirement:
52
- version_requirements: !ruby/object:Gem::Requirement
31
+ prerelease: false
32
+ requirement: &id002 !ruby/object:Gem::Requirement
33
+ none: false
53
34
  requirements:
54
35
  - - ">="
55
36
  - !ruby/object:Gem::Version
56
37
  version: 2.0.0
57
- version:
38
+ type: :runtime
39
+ version_requirements: *id002
58
40
  - !ruby/object:Gem::Dependency
59
41
  name: newgem
60
- type: :development
61
- version_requirement:
62
- version_requirements: !ruby/object:Gem::Requirement
42
+ prerelease: false
43
+ requirement: &id003 !ruby/object:Gem::Requirement
44
+ none: false
63
45
  requirements:
64
46
  - - ">="
65
47
  - !ruby/object:Gem::Version
66
48
  version: 1.4.1
67
- version:
49
+ type: :development
50
+ version_requirements: *id003
68
51
  - !ruby/object:Gem::Dependency
69
52
  name: sqlite3-ruby
70
- type: :development
71
- version_requirement:
72
- version_requirements: !ruby/object:Gem::Requirement
53
+ prerelease: false
54
+ requirement: &id004 !ruby/object:Gem::Requirement
55
+ none: false
73
56
  requirements:
74
57
  - - ">="
75
58
  - !ruby/object:Gem::Version
76
59
  version: "0"
77
- version:
60
+ type: :development
61
+ version_requirements: *id004
78
62
  - !ruby/object:Gem::Dependency
79
63
  name: hoe
80
- type: :development
81
- version_requirement:
82
- version_requirements: !ruby/object:Gem::Requirement
64
+ prerelease: false
65
+ requirement: &id005 !ruby/object:Gem::Requirement
66
+ none: false
83
67
  requirements:
84
68
  - - ">="
85
69
  - !ruby/object:Gem::Version
86
70
  version: 1.8.0
87
- version:
71
+ type: :development
72
+ version_requirements: *id005
88
73
  description: A comprehensive slugging and pretty-URL plugin for ActiveRecord.
89
74
  email:
90
- - norman@rubysouth.com
91
- - adrian@rubysouth.com
75
+ - norman@njclarke.com
76
+ - adrian@mugnolo.com
92
77
  - miloops@gmail.com
93
78
  executables: []
94
79
 
@@ -139,7 +124,7 @@ files:
139
124
  - test/sti_test.rb
140
125
  - test/test_helper.rb
141
126
  has_rdoc: true
142
- homepage: http://friendly-id.rubyforge.org/
127
+ homepage: http://norman.github.com/friendly_id/
143
128
  licenses: []
144
129
 
145
130
  post_install_message:
@@ -149,21 +134,21 @@ rdoc_options:
149
134
  require_paths:
150
135
  - lib
151
136
  required_ruby_version: !ruby/object:Gem::Requirement
137
+ none: false
152
138
  requirements:
153
139
  - - ">="
154
140
  - !ruby/object:Gem::Version
155
141
  version: "0"
156
- version:
157
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
+ none: false
158
144
  requirements:
159
145
  - - ">="
160
146
  - !ruby/object:Gem::Version
161
147
  version: "0"
162
- version:
163
148
  requirements: []
164
149
 
165
150
  rubyforge_project: friendly-id
166
- rubygems_version: 1.3.4
151
+ rubygems_version: 1.5.0
167
152
  signing_key:
168
153
  specification_version: 3
169
154
  summary: A comprehensive slugging and pretty-URL plugin for ActiveRecord.
data.tar.gz.sig DELETED
@@ -1 +0,0 @@
1
- o���Z����u����i(v�U�>��= PA)Fj�1��b?9�W^e��B��#+�6�j< g�.�B��.S�*��E�iR�s����#���"�x`�������� ��gV�Lyx�H�w!T������Xz�A���qЏ��d�<=R�2圲@�<���X#�I��p�!�QĪ�nK������� �>q���Y���#M�����\������5C<E��4�Bpd�!?����g�#/����6s�#$>ן�
metadata.gz.sig DELETED
Binary file