ismasan-sluggable_finder 2.0.0 → 2.0.1

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.markdown CHANGED
@@ -75,17 +75,17 @@ ActiveRecord, ActiveSupport
75
75
 
76
76
  ## INSTALL:
77
77
 
78
- At the moment this is not available in Github's gem repository, so you'll need to install manually:
78
+ If you haven't yet, add github.com to your gem sources (you only need to do that once):
79
79
 
80
- git clone git://github.com/ismasan/sluggable-finder.git
81
- cd sluggable_finder
82
- gem build sluggable_finder.gemspec
83
- sudo gem install sluggable_finder.gem
80
+ gem sources -a http://gems.github.com
84
81
 
82
+ Now you can install the normal way:
83
+
84
+ sudo gem install ismasan-sluggable_finder
85
85
 
86
86
  Then, in your Rails app's environment:
87
87
 
88
- config.gem 'sluggable_finder'
88
+ config.gem "ismasan-sluggable_finder", :lib => 'sluggable_finder'
89
89
 
90
90
  If you wan to unpack the gem to you app's "vendor" directory:
91
91
 
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module SluggableFinder
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.1'
6
6
 
7
7
  class << self
8
8
 
@@ -26,8 +26,12 @@ module SluggableFinder
26
26
  end
27
27
 
28
28
  def self.encode(str)
29
- ActiveSupport::Multibyte::Handlers::UTF8Handler.
30
- normalize(str,:d).split(//u).reject { |e| e.length > 1 }.join.strip.gsub(/[^a-z0-9]+/i, '-').downcase
29
+ if defined?(ActiveSupport::Inflector.parameterize)
30
+ ActiveSupport::Inflector.parameterize(str).to_s
31
+ else
32
+ ActiveSupport::Multibyte::Handlers::UTF8Handler.
33
+ normalize(str,:d).split(//u).reject { |e| e.length > 1 }.join.strip.gsub(/[^a-z0-9]+/i, '-').downcase
34
+ end
31
35
  end
32
36
 
33
37
  end
@@ -39,4 +43,4 @@ Dir.glob('lib/sluggable_finder/*.rb').each do |file|
39
43
  require file
40
44
  end
41
45
 
42
- SluggableFinder.enable_activerecord if (defined?(ActiveRecord) && !ActiveRecord::Base.respond_to?(:sluggable_finder))
46
+ SluggableFinder.enable_activerecord if (defined?(ActiveRecord) && !ActiveRecord::Base.respond_to?(:sluggable_finder))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ismasan-sluggable_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ismael Celis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-04 00:00:00 -08:00
12
+ date: 2008-11-15 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -41,7 +41,6 @@ extra_rdoc_files:
41
41
  - History.txt
42
42
  - Manifest.txt
43
43
  - PostInstall.txt
44
- - README.markdown
45
44
  files:
46
45
  - History.txt
47
46
  - Manifest.txt
@@ -59,7 +58,7 @@ files:
59
58
  - spec/spec_helper.rb
60
59
  - tasks/rspec.rake
61
60
  - tasks/db.rake
62
- has_rdoc: false
61
+ has_rdoc: true
63
62
  homepage:
64
63
  post_install_message: PostInstall.txt
65
64
  rdoc_options:
@@ -85,6 +84,6 @@ rubyforge_project: sluggable_finder
85
84
  rubygems_version: 1.2.0
86
85
  signing_key:
87
86
  specification_version: 2
88
- summary: Automatically create SEO friendly, unique permalinks for your ActiveRecord objects. Behaves exactly as ActiveRecord#find
87
+ summary: SEO friendly permalinks for active record
89
88
  test_files: []
90
89