lcbo 1.0.0beta1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/LICENSE +1 -1
- data/lib/lcbo/crawlkit/titlecase_helper.rb +1 -1
- data/lib/lcbo/version.rb +1 -1
- data/spec/crawlkit/titlecase_helper_spec.rb +2 -0
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
@@ -34,7 +34,7 @@ module LCBO
|
|
34
34
|
def self.titlecase(string)
|
35
35
|
preclean = lambda { |s|
|
36
36
|
# Strip bracketed stuff and trailing junk: Product (Junk)**
|
37
|
-
s.gsub(/\(
|
37
|
+
s.gsub(/\((.+?)\)|\*+|\((.+?)\Z/, '').strip
|
38
38
|
}
|
39
39
|
count = 0 # Ewwww
|
40
40
|
capitalize(preclean.(string)).split.map do |word|
|
data/lib/lcbo/version.rb
CHANGED
@@ -13,6 +13,8 @@ describe LCBO::CrawlKit::TitleCaseHelper do
|
|
13
13
|
'SOME NICE VQA WINE' => 'Some Nice VQA Wine',
|
14
14
|
'A PRODUCT NAME (WITH STUPID CRAP' => 'A Product Name',
|
15
15
|
'A PRODUCT NAME (FROM FRANCE)' => 'A Product Name',
|
16
|
+
'(V) SOME PRODUCT (FROM FRANCE' => 'Some Product',
|
17
|
+
'(V) A PRODUCT ** (FROM FRANCE)' => 'A Product',
|
16
18
|
'SOMEONE\'S PRODUCT' => 'Someone\'s Product',
|
17
19
|
'CUVÉE DE L\'ÉCUSSON BRUT' => 'Cuvée de L\'Écusson Brut' }
|
18
20
|
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lcbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 0
|
9
|
+
version: 1.0.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Carsten Nielsen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-17 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|