feed_processor_utils 0.0.5 → 0.0.7
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.
@@ -6,9 +6,9 @@ module FeedProcessorUtils
|
|
6
6
|
|
7
7
|
@@config_file = File.join(File.dirname(__FILE__), 'config/feed_post_builder.yml')
|
8
8
|
|
9
|
-
def self.sanitize(text)
|
9
|
+
def self.sanitize(text, options = {})
|
10
10
|
return nil unless text
|
11
|
-
replacements.each do |pattern, replacement|
|
11
|
+
replacements(options).each do |pattern, replacement|
|
12
12
|
text.gsub!(pattern, replacement)
|
13
13
|
end
|
14
14
|
text
|
@@ -119,7 +119,7 @@ module FeedProcessorUtils
|
|
119
119
|
@@config ||= YAML.load(File.read(@@config_file))
|
120
120
|
end
|
121
121
|
|
122
|
-
def self.replacements
|
122
|
+
def self.replacements(options = {})
|
123
123
|
config[:replacements]
|
124
124
|
end
|
125
125
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feed_processor_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -91,8 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 1.8.
|
94
|
+
rubygems_version: 1.8.23
|
95
95
|
signing_key:
|
96
96
|
specification_version: 3
|
97
97
|
summary: Feed Processing toolbox
|
98
98
|
test_files: []
|
99
|
+
has_rdoc:
|