worlddb-models 2.3.4 → 2.3.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03a22edaff5cdbe119a10429130a8465dcc5a59c
4
- data.tar.gz: c3c71f45eebfbbd56c1a9675838803674050252e
3
+ metadata.gz: d06a2518a318298eff8f73429f1749a7fbf34ecd
4
+ data.tar.gz: b7a44ae9fe82a65bbd07850be27f3c39dea61ebf
5
5
  SHA512:
6
- metadata.gz: 0a5b509f87918c6032a1185b5c0d7f349c2abf013e5c6125f1556d455108349dec022b76f05ae92667c822e7bf71409a74c3f120f935a19fa15bf58eef9727c6
7
- data.tar.gz: 180eb5093b77c214acdccb0aa9d1ee4c5f699f75cfc0c5d6b4f51c576ec697a14a052135744bc16a44d447b7f3be3009b1abc7abc2bca9e3fd9528e421ec6864
6
+ metadata.gz: 32c39e3a9e4125d73ff577bab22c77f4de3f0a23c412ba63eb0d071fc9b2f6efefed1d4ee9ee3b04766cb02200068b94bc3381d172be747ffdaf12f4d6ac655b
7
+ data.tar.gz: 5ce179dc7f659933102c05de9dd9a475c072e0a46a1194f1998344abd4bb02c0afeffd51fdd39b6526b3e87a03d820043fe394d8305603b52bb9e1cd5e899e7f
data/Manifest.txt CHANGED
@@ -1,77 +1,78 @@
1
- HISTORY.md
2
- Manifest.txt
3
- README.md
4
- Rakefile
5
- lib/worlddb/deleter.rb
6
- lib/worlddb/helpers/value_helper.rb
7
- lib/worlddb/matcher.rb
8
- lib/worlddb/matcher_adm.rb
9
- lib/worlddb/models.rb
10
- lib/worlddb/models/city.rb
11
- lib/worlddb/models/city_base.rb
12
- lib/worlddb/models/continent.rb
13
- lib/worlddb/models/country.rb
14
- lib/worlddb/models/country_code.rb
15
- lib/worlddb/models/forward.rb
16
- lib/worlddb/models/lang.rb
17
- lib/worlddb/models/name.rb
18
- lib/worlddb/models/place.rb
19
- lib/worlddb/models/state.rb
20
- lib/worlddb/models/state_base.rb
21
- lib/worlddb/models/tagdb/tag.rb
22
- lib/worlddb/models/tagdb/tagging.rb
23
- lib/worlddb/models/usage.rb
24
- lib/worlddb/patterns.rb
25
- lib/worlddb/reader.rb
26
- lib/worlddb/reader_file.rb
27
- lib/worlddb/reader_zip.rb
28
- lib/worlddb/readers/base.rb
29
- lib/worlddb/readers/city.rb
30
- lib/worlddb/readers/country.rb
31
- lib/worlddb/readers/lang.rb
32
- lib/worlddb/readers/state.rb
33
- lib/worlddb/readers/state_tree.rb
34
- lib/worlddb/readers/usage.rb
35
- lib/worlddb/reports/country_report.rb
36
- lib/worlddb/schema.rb
37
- lib/worlddb/stats.rb
38
- lib/worlddb/version.rb
39
- test/adm/test_fixture_matcher_adm2.rb
40
- test/adm/test_fixture_matcher_adm3.rb
41
- test/adm/test_fixture_matcher_tree.rb
42
- test/adm/test_read_adm.rb
43
- test/adm/test_read_tree.rb
44
- test/data/at-austria/1--b-burgenland/counties.txt
45
- test/data/at-austria/2--n-niederoesterreich/counties.txt
46
- test/data/at-austria/3--w-wien/districts.txt
47
- test/data/at-austria/orte.txt
48
- test/data/at-austria/setups/adm.txt
49
- test/data/at-austria/setups/tree.txt
50
- test/data/at-austria/states.txt
51
- test/data/de-deutschland/3--by-bayern/1--oberbayern/counties.txt
52
- test/data/de-deutschland/3--by-bayern/4--oberfranken/counties.txt
53
- test/data/de-deutschland/3--by-bayern/4--oberfranken/orte.txt
54
- test/data/de-deutschland/3--by-bayern/4--oberfranken/orte_ii.txt
55
- test/data/de-deutschland/3--by-bayern/parts.txt
56
- test/data/de-deutschland/orte.txt
57
- test/data/de-deutschland/setups/adm.txt
58
- test/data/de-deutschland/setups/tree.txt
59
- test/data/de-deutschland/states.txt
60
- test/helper.rb
61
- test/test_fixture_matchers.rb
62
- test/test_fixture_matchers_ii.rb
63
- test/test_model_city.rb
64
- test/test_model_compat.rb
65
- test/test_model_country.rb
66
- test/test_model_state.rb
67
- test/test_model_states_at.rb
68
- test/test_model_states_de.rb
69
- test/test_models.rb
70
- test/test_name_finders.rb
71
- test/test_name_parser.rb
72
- test/test_parse_city.rb
73
- test/test_parse_country.rb
74
- test/test_parse_state.rb
75
- test/test_report_country.rb
76
- test/test_state_tree_reader_at.rb
77
- test/test_state_tree_reader_de.rb
1
+ HISTORY.md
2
+ Manifest.txt
3
+ README.md
4
+ Rakefile
5
+ lib/worlddb/deleter.rb
6
+ lib/worlddb/helpers/value_helper.rb
7
+ lib/worlddb/matcher.rb
8
+ lib/worlddb/matcher_adm.rb
9
+ lib/worlddb/models.rb
10
+ lib/worlddb/models/city.rb
11
+ lib/worlddb/models/city_base.rb
12
+ lib/worlddb/models/continent.rb
13
+ lib/worlddb/models/country.rb
14
+ lib/worlddb/models/country_code.rb
15
+ lib/worlddb/models/forward.rb
16
+ lib/worlddb/models/lang.rb
17
+ lib/worlddb/models/name.rb
18
+ lib/worlddb/models/place.rb
19
+ lib/worlddb/models/state.rb
20
+ lib/worlddb/models/state_base.rb
21
+ lib/worlddb/models/tagdb/tag.rb
22
+ lib/worlddb/models/tagdb/tagging.rb
23
+ lib/worlddb/models/usage.rb
24
+ lib/worlddb/patterns.rb
25
+ lib/worlddb/reader.rb
26
+ lib/worlddb/reader_file.rb
27
+ lib/worlddb/reader_zip.rb
28
+ lib/worlddb/readers/base.rb
29
+ lib/worlddb/readers/city.rb
30
+ lib/worlddb/readers/country.rb
31
+ lib/worlddb/readers/lang.rb
32
+ lib/worlddb/readers/state.rb
33
+ lib/worlddb/readers/state_tree.rb
34
+ lib/worlddb/readers/usage.rb
35
+ lib/worlddb/reports/country_report.rb
36
+ lib/worlddb/schema.rb
37
+ lib/worlddb/serializers/city.rb
38
+ lib/worlddb/serializers/country.rb
39
+ lib/worlddb/stats.rb
40
+ lib/worlddb/version.rb
41
+ test/adm/test_fixture_matcher_adm2.rb
42
+ test/adm/test_fixture_matcher_adm3.rb
43
+ test/adm/test_fixture_matcher_tree.rb
44
+ test/adm/test_read_adm.rb
45
+ test/adm/test_read_tree.rb
46
+ test/data/at-austria/1--b-burgenland/counties.txt
47
+ test/data/at-austria/2--n-niederoesterreich/counties.txt
48
+ test/data/at-austria/3--w-wien/districts.txt
49
+ test/data/at-austria/orte.txt
50
+ test/data/at-austria/setups/adm.txt
51
+ test/data/at-austria/setups/tree.txt
52
+ test/data/at-austria/states.txt
53
+ test/data/de-deutschland/3--by-bayern/1--oberbayern/counties.txt
54
+ test/data/de-deutschland/3--by-bayern/4--oberfranken/counties.txt
55
+ test/data/de-deutschland/3--by-bayern/4--oberfranken/orte.txt
56
+ test/data/de-deutschland/3--by-bayern/4--oberfranken/orte_ii.txt
57
+ test/data/de-deutschland/3--by-bayern/parts.txt
58
+ test/data/de-deutschland/orte.txt
59
+ test/data/de-deutschland/setups/adm.txt
60
+ test/data/de-deutschland/setups/tree.txt
61
+ test/data/de-deutschland/states.txt
62
+ test/helper.rb
63
+ test/test_fixture_matchers.rb
64
+ test/test_fixture_matchers_ii.rb
65
+ test/test_model_city.rb
66
+ test/test_model_compat.rb
67
+ test/test_model_country.rb
68
+ test/test_model_state.rb
69
+ test/test_model_states_at.rb
70
+ test/test_model_states_de.rb
71
+ test/test_models.rb
72
+ test/test_name_finders.rb
73
+ test/test_name_parser.rb
74
+ test/test_parse_city.rb
75
+ test/test_parse_country.rb
76
+ test/test_parse_state.rb
77
+ test/test_state_tree_reader_at.rb
78
+ test/test_state_tree_reader_de.rb
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  worlddb-models gem - world.db schema 'n' models for easy (re)use
4
4
 
5
- * home :: [github.com/worlddb/world.db.models](https://github.com/worlddb/world.db.models)
6
- * bugs :: [github.com/worlddb/world.db.models/issues](https://github.com/worlddb/world.db.models/issues)
5
+ * home :: [github.com/worlddb/world.db](https://github.com/worlddb/world.db)
6
+ * bugs :: [github.com/worlddb/world.db/issues](https://github.com/worlddb/world.db/issues)
7
7
  * gem :: [rubygems.org/gems/worlddb-models](https://rubygems.org/gems/worlddb-models)
8
8
  * rdoc :: [rubydoc.info/gems/worlddb-models](http://rubydoc.info/gems/worlddb-models)
9
9
  * forum :: [groups.google.com/group/openmundi](https://groups.google.com/group/openmundi)
@@ -29,7 +29,7 @@ Everything is a place.
29
29
  # => 8_414_638
30
30
  at.area
31
31
  # => 83_871
32
-
32
+
33
33
  at.states.count
34
34
  # => 9
35
35
  at.states
@@ -71,7 +71,7 @@ Everything is a place.
71
71
  # => 17
72
72
  euro.countries
73
73
  # => ['Austria, 'Belgium', 'Cyprus', ... ]
74
-
74
+
75
75
  flanders = Tag.find_by! key: 'flanders'
76
76
  flanders.states.count
77
77
  # => 5
@@ -85,6 +85,8 @@ and so on.
85
85
 
86
86
  ## License
87
87
 
88
+ ![](https://publicdomainworks.github.io/buttons/zero88x31.png)
89
+
88
90
  The `worlddb-models` scripts are dedicated to the public domain.
89
91
  Use it as you please with no restrictions whatsoever.
90
92
 
@@ -57,6 +57,10 @@ require 'worlddb/models/tagdb/tagging'
57
57
  require 'worlddb/helpers/value_helper' # Note: extends module TextUtils(!!)::ValueHelper
58
58
 
59
59
 
60
+ require 'worlddb/serializers/city'
61
+ require 'worlddb/serializers/country'
62
+
63
+
60
64
  require 'worlddb/schema' # Note: requires worlddb/models (include WorldDB::Models)
61
65
  require 'worlddb/matcher'
62
66
  require 'worlddb/matcher_adm'
@@ -163,7 +167,7 @@ module WorldDb
163
167
  end
164
168
 
165
169
  ## todo/check: use if defined?( JRUBY_VERSION ) instead ??
166
- if RUBY_PLATFORM =~ /java/ && config[:adapter] == 'sqlite3'
170
+ if RUBY_PLATFORM =~ /java/ && config[:adapter] == 'sqlite3'
167
171
  # quick hack for JRuby sqlite3 support via jdbc
168
172
  puts "jruby quick hack - adding jdbc libs for jruby sqlite3 database support"
169
173
  require 'jdbc/sqlite3'
@@ -19,6 +19,11 @@ class City < CityBase
19
19
  'CITY'
20
20
  end
21
21
 
22
+
23
+ def as_tab( opts={} )
24
+ CitySerializer.new( self ).as_tab
25
+ end
26
+
22
27
  end # class City
23
28
 
24
29
 
@@ -4,7 +4,7 @@ module WorldDb
4
4
  module Model
5
5
 
6
6
  ########
7
- # Country / Supra (e.g. European Union) / Territory (e.g. Puerto Rico) or Dependency (e.g. Dependent territory)
7
+ # Country / Supra (e.g. European Union) / Territory (e.g. Puerto Rico) or Dependency (e.g. Dependent territory)
8
8
 
9
9
  class Country < ActiveRecord::Base
10
10
 
@@ -62,10 +62,14 @@ class Country < ActiveRecord::Base
62
62
  scope :by_net, ->{ order( 'net asc' ) } # internet cc top level domain; ccTLD
63
63
 
64
64
 
65
+ def as_tab( opts={} )
66
+ CountrySerializer.new( self ).as_tab
67
+ end
68
+
69
+
65
70
  before_create :on_create
66
71
  before_update :on_update
67
72
 
68
-
69
73
  def on_create
70
74
  place_rec = Place.create!( name: name, kind: place_kind )
71
75
  self.place_id = place_rec.id
@@ -94,7 +98,7 @@ class Country < ActiveRecord::Base
94
98
  'TERR'
95
99
  elsif is_misc? ## misc(ellaneous) country or dependent territory
96
100
  # todo: use different marker?
97
- # territory w/ shared or disputes claims e.g Antartica/Western Sahara/Paracel Islands pg Spratly Islands/etc.
101
+ # territory w/ shared or disputes claims e.g Antartica/Western Sahara/Paracel Islands pg Spratly Islands/etc.
98
102
  'MISC'
99
103
  else
100
104
  'CNTY'
@@ -103,8 +107,8 @@ class Country < ActiveRecord::Base
103
107
 
104
108
 
105
109
  ###
106
- # NB: use is_ for flags to avoid conflict w/ assocs
107
-
110
+ # NB: use is_ for flags to avoid conflict w/ assocs
111
+
108
112
  def is_supra?() s? == true; end
109
113
  def is_country?() c? == true; end
110
114
  def is_dependency?() d? == true; end
@@ -116,7 +120,7 @@ class Country < ActiveRecord::Base
116
120
  ## allow to passing in sep or separator e.g. | or other
117
121
 
118
122
  return name if alt_names.blank?
119
-
123
+
120
124
  buf = ''
121
125
  buf << name
122
126
  buf << ' | '
@@ -149,7 +153,7 @@ class Country < ActiveRecord::Base
149
153
 
150
154
  ### NOTE: escape ' for sql like clause
151
155
  ## for now use '' for escapes, that is, double quotes
152
- ## check - working for postgresql n sqlite??
156
+ ## check - working for postgresql n sqlite??
153
157
  name_esc = name.gsub( /'/, "''" )
154
158
 
155
159
  ## 3) retry: use SQL like match
@@ -180,7 +184,7 @@ class Country < ActiveRecord::Base
180
184
  ## remove (extract) attribs hash (if last arg is a hash n present)
181
185
  more_attribs = args.last.is_a?(Hash) ? args.pop : {} ## extract_options!
182
186
  values = args
183
-
187
+
184
188
  self.create_or_update_from_values( values, more_attribs )
185
189
  end
186
190
 
@@ -236,13 +240,13 @@ class Country < ActiveRecord::Base
236
240
  elsif match_number( value ) do |num| # numeric (nb: can use any _ or spaces inside digits e.g. 1_000_000 or 1 000 000)
237
241
  value_numbers << num
238
242
  end
239
- elsif value =~ /#{COUNTRY_CODE_PATTERN}/ ## three letter code
243
+ elsif value =~ /#{COUNTRY_CODE_PATTERN}/ ## three letter code
240
244
  new_attributes[ :code ] = value
241
245
  elsif (values.size==(index+1)) && is_taglist?( value ) # tags must be last entry
242
246
  logger.debug " found tags: >>#{value}<<"
243
247
  value_tag_keys += find_tags( value )
244
248
  else
245
-
249
+
246
250
  ### assume it is the capital city - mark it for auto add
247
251
  value_cities << value
248
252
  next
@@ -261,7 +265,7 @@ class Country < ActiveRecord::Base
261
265
  # auto-add tags
262
266
  area = value_numbers[0]
263
267
  pop = value_numbers[1]
264
-
268
+
265
269
  # categorize into brackets
266
270
  if area >= 1_000_000
267
271
  value_tag_keys << 'area_1_000_000_n_up'
@@ -277,7 +281,7 @@ class Country < ActiveRecord::Base
277
281
  value_tag_keys << 'area_100_000_n_up' if area >= 100_000
278
282
  value_tag_keys << 'area_1_000_n_up' if area >= 1_000
279
283
 
280
-
284
+
281
285
  # categorize into brackets
282
286
  if pop >= 100_000_000
283
287
  value_tag_keys << 'pop_100m_n_up'
@@ -288,7 +292,7 @@ class Country < ActiveRecord::Base
288
292
  else
289
293
  value_tag_keys << 'pop_1m_n_less'
290
294
  end
291
-
295
+
292
296
  # include all
293
297
  value_tag_keys << 'pop_10m_n_up' if pop >= 10_000_000
294
298
  value_tag_keys << 'pop_1m_n_up' if pop >= 1_000_000
@@ -303,9 +307,9 @@ class Country < ActiveRecord::Base
303
307
  logger.debug "create Country:"
304
308
  rec = Country.new
305
309
  end
306
-
310
+
307
311
  logger.debug new_attributes.to_json
308
-
312
+
309
313
  rec.update_attributes!( new_attributes )
310
314
 
311
315
  #################
@@ -314,10 +318,10 @@ class Country < ActiveRecord::Base
314
318
  City.parse( value_cities, country_id: rec.id )
315
319
 
316
320
  ##################
317
- ## add taggings
321
+ ## add taggings
318
322
 
319
323
  if value_tag_keys.size > 0
320
-
324
+
321
325
  if opts[:skip_tags].present?
322
326
  logger.debug " skipping add taggings (flag skip_tag)"
323
327
  else
@@ -0,0 +1,36 @@
1
+ # encoding: UTF-8
2
+
3
+ module WorldDb::Model
4
+
5
+
6
+ ## todo/check:
7
+ ## add as_tab(ular) to CityBase for all classes - why? why not??
8
+
9
+ class CitySerializer
10
+
11
+ def initialize( city )
12
+ @city = city
13
+ end
14
+
15
+ attr_reader :city
16
+
17
+ def as_tab # as_tabular (returns an array of records/hashes)
18
+
19
+ ## add virtual column like kind for metro, metro|city, city, district
20
+
21
+ ## todo add region.title if present
22
+
23
+ data = { key: city.key,
24
+ title: city.title,
25
+ code: city.code,
26
+ pop: city.pop,
27
+ popm: city.popm,
28
+ area: city.area,
29
+ synonyms: city.synonyms,
30
+ country: city.country.title }
31
+ data
32
+ end
33
+
34
+ end # class CitySerializer
35
+
36
+ end # module WorldDb::Model
@@ -0,0 +1,30 @@
1
+ # encoding: UTF-8
2
+
3
+ module WorldDb::Model
4
+
5
+
6
+ ## todo/check:
7
+ ## add as_tab(ular) to CityBase for all classes - why? why not??
8
+
9
+ class CountrySerializer
10
+
11
+ def initialize( country )
12
+ @country = country
13
+ end
14
+
15
+ attr_reader :country
16
+
17
+ def as_tab # as_tabular (returns an array of records/hashes)
18
+
19
+ ## todo: add tags too??
20
+ data = { key: country.key,
21
+ title: country.title,
22
+ code: country.code,
23
+ pop: country.pop,
24
+ area: country.area,
25
+ synonyms: country.synonyms }
26
+ data
27
+ end
28
+ end # class CountrySerializer
29
+
30
+ end # module WorldDb::Model
@@ -5,7 +5,7 @@ module WorldDb
5
5
  # sync version w/ sport.db n friends - why? why not?
6
6
  MAJOR = 2 ## todo: namespace inside version or something - why? why not??
7
7
  MINOR = 3
8
- PATCH = 4
8
+ PATCH = 5
9
9
  VERSION = [MAJOR,MINOR,PATCH].join('.')
10
10
 
11
11
  def self.version
@@ -21,4 +21,3 @@ module WorldDb
21
21
  end
22
22
 
23
23
  end
24
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worlddb-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-20 00:00:00.000000000 Z
11
+ date: 2017-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: props
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '3.13'
159
+ version: '3.16'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '3.13'
166
+ version: '3.16'
167
167
  description: worlddb - world.db schema 'n' models for easy (re)use
168
168
  email: openmundi@googlegroups.com
169
169
  executables: []
@@ -173,7 +173,6 @@ extra_rdoc_files:
173
173
  - Manifest.txt
174
174
  - README.md
175
175
  files:
176
- - ".gemtest"
177
176
  - HISTORY.md
178
177
  - Manifest.txt
179
178
  - README.md
@@ -210,6 +209,8 @@ files:
210
209
  - lib/worlddb/readers/usage.rb
211
210
  - lib/worlddb/reports/country_report.rb
212
211
  - lib/worlddb/schema.rb
212
+ - lib/worlddb/serializers/city.rb
213
+ - lib/worlddb/serializers/country.rb
213
214
  - lib/worlddb/stats.rb
214
215
  - lib/worlddb/version.rb
215
216
  - test/adm/test_fixture_matcher_adm2.rb
@@ -248,7 +249,6 @@ files:
248
249
  - test/test_parse_city.rb
249
250
  - test/test_parse_country.rb
250
251
  - test/test_parse_state.rb
251
- - test/test_report_country.rb
252
252
  - test/test_state_tree_reader_at.rb
253
253
  - test/test_state_tree_reader_de.rb
254
254
  homepage: https://github.com/worlddb/world.db.models
@@ -273,30 +273,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
273
  version: '0'
274
274
  requirements: []
275
275
  rubyforge_project:
276
- rubygems_version: 2.4.2
276
+ rubygems_version: 2.5.2
277
277
  signing_key:
278
278
  specification_version: 4
279
279
  summary: worlddb - world.db schema 'n' models for easy (re)use
280
- test_files:
281
- - test/test_name_parser.rb
282
- - test/test_models.rb
283
- - test/adm/test_read_tree.rb
284
- - test/adm/test_fixture_matcher_tree.rb
285
- - test/adm/test_read_adm.rb
286
- - test/adm/test_fixture_matcher_adm2.rb
287
- - test/adm/test_fixture_matcher_adm3.rb
288
- - test/test_parse_country.rb
289
- - test/test_model_state.rb
290
- - test/test_model_city.rb
291
- - test/test_fixture_matchers.rb
292
- - test/test_model_country.rb
293
- - test/test_name_finders.rb
294
- - test/test_parse_city.rb
295
- - test/test_report_country.rb
296
- - test/test_model_compat.rb
297
- - test/test_model_states_de.rb
298
- - test/test_state_tree_reader_at.rb
299
- - test/test_state_tree_reader_de.rb
300
- - test/test_parse_state.rb
301
- - test/test_fixture_matchers_ii.rb
302
- - test/test_model_states_at.rb
280
+ test_files: []
data/.gemtest DELETED
File without changes
@@ -1,34 +0,0 @@
1
- # encoding: utf-8
2
-
3
- ###
4
- # to run use
5
- # ruby -I ./lib -I ./test test/test_report_country.rb
6
-
7
-
8
- require 'helper'
9
-
10
- class TestReportCountry < MiniTest::Test
11
-
12
- ## note: special tests
13
- ## run on its own - will NOT run with test suite
14
- ## requires its own connection
15
-
16
- def xxx_test_at
17
-
18
- ## connect to ./austria.db
19
- WorldDb.connect( adapter: 'sqlite3', database: './austria.db' )
20
-
21
- r = WorldDb::CountryReport.new( 'at' )
22
- r.report
23
- end
24
-
25
- def xxx_test_de
26
- ## connect to ./deutschland.db
27
- WorldDb.connect( adapter: 'sqlite3', database: './deutschland.db' )
28
-
29
- r = WorldDb::CountryReport.new( 'de' )
30
- r.report
31
- end
32
-
33
-
34
- end # class TestReportCountry