textutils 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ module TextUtils
12
12
  def match_country( value )
13
13
  if value =~ /^country:/ # country:
14
14
  country_key = value[8..-1] # cut off country: prefix
15
- country = Country.find_by_key!( country_key )
15
+ country = WorldDb::Models::Country.find_by_key!( country_key )
16
16
  yield( country )
17
17
  true # bingo - match found
18
18
  else
@@ -23,7 +23,7 @@ module TextUtils
23
23
  def match_supra( value )
24
24
  if value =~ /^supra:/ # supra:
25
25
  country_key = value[6..-1] # cut off supra: prefix
26
- country = Country.find_by_key!( country_key )
26
+ country = WorldDb::Models::Country.find_by_key!( country_key )
27
27
  yield( country )
28
28
  true # bingo - match found
29
29
  else
@@ -52,11 +52,11 @@ module TextUtils
52
52
  def match_region_for_country( value, country_id ) ## NB: required country_id
53
53
  if value =~ /^region:/ ## region:
54
54
  region_key = value[7..-1] ## cut off region: prefix
55
- region = Region.find_by_key_and_country_id!( region_key, country_id )
55
+ region = WorldDb::Models::Region.find_by_key_and_country_id!( region_key, country_id )
56
56
  yield( region )
57
57
  true # bingo - match found
58
58
  elsif is_region?( value ) ## assume region code e.g. TX or N
59
- region = Region.find_by_key_and_country_id!( value.downcase, country_id )
59
+ region = WorldDb::Models::Region.find_by_key_and_country_id!( value.downcase, country_id )
60
60
  yield( region )
61
61
  true # bingo - match found
62
62
  else
@@ -68,7 +68,7 @@ module TextUtils
68
68
  def match_city( value ) # NB: might be nil (city not found)
69
69
  if value =~ /^city:/ ## city:
70
70
  city_key = value[5..-1] ## cut off city: prefix
71
- city = City.find_by_key( city_key )
71
+ city = WorldDb::Models::City.find_by_key( city_key )
72
72
  yield( city ) # NB: might be nil (city not found)
73
73
  true # bingo - match found
74
74
  else
@@ -80,7 +80,7 @@ module TextUtils
80
80
  def match_metro( value )
81
81
  if value =~ /^metro:/ ## metro:
82
82
  city_key = value[6..-1] ## cut off metro: prefix
83
- city = City.find_by_key!( city_key ) # NB: parent city/metro required, that is, lookup w/ !
83
+ city = WorldDb::Models::City.find_by_key!( city_key ) # NB: parent city/metro required, that is, lookup w/ !
84
84
  yield( city )
85
85
  true # bingo - match found
86
86
  else
@@ -113,7 +113,7 @@ module TextUtils
113
113
  def match_brewery( value )
114
114
  if value =~ /^by:/ ## by: -brewed by/brewery
115
115
  brewery_key = value[3..-1] ## cut off by: prefix
116
- brewery = Brewery.find_by_key!( brewery_key )
116
+ brewery = BeerDb::Models::Brewery.find_by_key!( brewery_key )
117
117
  yield( brewery )
118
118
  true # bingo - match found
119
119
  else
@@ -1,6 +1,6 @@
1
1
 
2
2
  module TextUtils
3
3
 
4
- VERSION = '0.6.3'
4
+ VERSION = '0.6.4'
5
5
 
6
6
  end # module TextUtils
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logutils
16
- requirement: &77627020 !ruby/object:Gem::Requirement
16
+ requirement: &83222360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.5'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *77627020
24
+ version_requirements: *83222360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &77626800 !ruby/object:Gem::Requirement
27
+ requirement: &83222140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.10'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *77626800
35
+ version_requirements: *83222140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hoe
38
- requirement: &77626580 !ruby/object:Gem::Requirement
38
+ requirement: &83221920 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.3'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *77626580
46
+ version_requirements: *83221920
47
47
  description: textutils - Text Filters, Helpers, Readers and More
48
48
  email: webslideshow@googlegroups.com
49
49
  executables: []