spix_parser 1.7.1 → 1.7.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.
@@ -4,7 +4,7 @@ module Spix
4
4
  module Version
5
5
  MAJOR = 1
6
6
  MINOR = 7
7
- TINY = 1
7
+ TINY = 2
8
8
 
9
9
  def self.current_version
10
10
  "#{MAJOR}.#{MINOR}.#{TINY}"
@@ -47,8 +47,8 @@ module Spix
47
47
 
48
48
  def uid
49
49
  uid = self.url || ""
50
- uid += self.title.downcase.busk_normalize
51
- uid += self.striped_content.downcase.busk_normalize[0..25]
50
+ uid += self.encoded_raw_content_for :title
51
+ uid += self.encoded_raw_content[0..25]
52
52
  uid.to_sha1
53
53
  end
54
54
  memoize(:uid)
@@ -79,6 +79,11 @@ module Spix
79
79
  end
80
80
 
81
81
  private
82
+
83
+ def encoded_raw_content_for field
84
+ @entry.send("entry_#{field}").to_s.busk_normalize
85
+ end
86
+
82
87
  def encoded_raw_content
83
88
  text = content_in?(@entry.entry_content) || content_in?(@entry.entry_summary) || ""
84
89
  text.busk_normalize
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: spix_parser
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.7.1
5
+ version: 1.7.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcio Lopes de Faria
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-07-01 00:00:00 -03:00
14
+ date: 2011-07-11 00:00:00 -03:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency