seofy 0.0.1 → 0.0.2

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/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - ree
data/README.md CHANGED
@@ -5,6 +5,7 @@ A simple plugin make permalink for you records.
5
5
 
6
6
  Note: only supprt Rails 3
7
7
 
8
+ ![travis-ci](http://travis-ci.org/allenwei/seofy.png)
8
9
 
9
10
  Installation
10
11
  -----
@@ -29,7 +30,7 @@ Usage
29
30
  seofy :source => :title, :adapter => :base36, :adapter_option => {:length => 3, :column => :slug }
30
31
  end
31
32
 
32
- User.for_slug("SLUG")
33
+ User.for_seofy("SLUG")
33
34
 
34
35
 
35
36
  Rake task
@@ -17,7 +17,7 @@ module Seofy
17
17
  self.seofy_config.adapter
18
18
  end
19
19
 
20
- def for_slug(param)
20
+ def for_seofy(param)
21
21
  self.send("find_by_#{seofy_adapter.column}", param.split("-").last)
22
22
  end
23
23
  end
data/lib/seofy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Seofy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -11,7 +11,7 @@ describe "slug use base36", :integration => true do
11
11
 
12
12
  describe "for_slug" do
13
13
  it "should find the record" do
14
- Store.for_slug(@store.to_param).should == @store
14
+ Store.for_seofy(@store.to_param).should == @store
15
15
  end
16
16
  end
17
17
 
@@ -13,7 +13,7 @@ describe "slug for existing_column", :integration => true do
13
13
 
14
14
  describe "for_slug" do
15
15
  it "should find the record" do
16
- User.for_slug(@user.to_param).should == @user
16
+ User.for_seofy(@user.to_param).should == @user
17
17
  end
18
18
  end
19
19
  end
@@ -31,7 +31,7 @@ describe Seofy::ActiveRecord do
31
31
  it "should get slug from id and find record use it" do
32
32
  @klass.should_receive(:seofy_adapter).and_return double(:column => "id")
33
33
  @klass.should_receive("find_by_id").with("123")
34
- @klass.for_slug("a-b-c-123")
34
+ @klass.for_seofy("a-b-c-123")
35
35
  end
36
36
  end
37
37
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seofy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Allen Wei
@@ -135,6 +135,7 @@ extra_rdoc_files: []
135
135
 
136
136
  files:
137
137
  - .gitignore
138
+ - .travis.yml
138
139
  - Gemfile
139
140
  - Gemfile.lock
140
141
  - Guardfile
@@ -157,7 +158,6 @@ files:
157
158
  - spec/integration/base36_spec.rb
158
159
  - spec/integration/existing_column_spec.rb
159
160
  - spec/lib/seofy/active_record_spec.rb
160
- - spec/lib/seofy/adapters/.base_spec.rb.swo
161
161
  - spec/lib/seofy/adapters/base36_spec.rb
162
162
  - spec/lib/seofy/adapters/base_spec.rb
163
163
  - spec/lib/seofy/adapters/exiting_column_spec.rb
@@ -206,7 +206,6 @@ test_files:
206
206
  - spec/integration/base36_spec.rb
207
207
  - spec/integration/existing_column_spec.rb
208
208
  - spec/lib/seofy/active_record_spec.rb
209
- - spec/lib/seofy/adapters/.base_spec.rb.swo
210
209
  - spec/lib/seofy/adapters/base36_spec.rb
211
210
  - spec/lib/seofy/adapters/base_spec.rb
212
211
  - spec/lib/seofy/adapters/exiting_column_spec.rb