worlddb-models 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +5 -5
- data/README.md +1 -1
- data/Rakefile +10 -10
- data/lib/worlddb/models.rb +11 -16
- data/lib/worlddb/models/{city_comp.rb → city_compat.rb} +0 -0
- data/lib/worlddb/models/{continent_comp.rb → continent_compat.rb} +0 -0
- data/lib/worlddb/models/{country_comp.rb → country_compat.rb} +0 -0
- data/lib/worlddb/models/{lang_comp.rb → lang_compat.rb} +0 -0
- data/lib/worlddb/models/{region_comp.rb → region_compat.rb} +0 -0
- data/lib/worlddb/version.rb +2 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 085e42158476f2f859016c01201f21833b8e18ab
|
4
|
+
data.tar.gz: 727bf2b5fc3e74034128984a808e87f81d032680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 946a9dea95eccfa4ade780bf4164dbf7cbcfdd32ba3ac04d59d9524debef91185f6b6d187d4de7585ade785cf713a1bf7119b6e36bcf53f62d8dbd995b789eed
|
7
|
+
data.tar.gz: 206c286650fda59da6f5f33bca634e6e2998c0cac8e83ec20976d2a25113197c0f9f327d01aae85f6635576859892fbb2b9059c304904ca6362774a85c11fa75
|
data/Manifest.txt
CHANGED
@@ -6,19 +6,19 @@ lib/worlddb/deleter.rb
|
|
6
6
|
lib/worlddb/matcher.rb
|
7
7
|
lib/worlddb/models.rb
|
8
8
|
lib/worlddb/models/city.rb
|
9
|
-
lib/worlddb/models/
|
9
|
+
lib/worlddb/models/city_compat.rb
|
10
10
|
lib/worlddb/models/continent.rb
|
11
|
-
lib/worlddb/models/
|
11
|
+
lib/worlddb/models/continent_compat.rb
|
12
12
|
lib/worlddb/models/country.rb
|
13
13
|
lib/worlddb/models/country_code.rb
|
14
|
-
lib/worlddb/models/
|
14
|
+
lib/worlddb/models/country_compat.rb
|
15
15
|
lib/worlddb/models/forward.rb
|
16
16
|
lib/worlddb/models/lang.rb
|
17
|
-
lib/worlddb/models/
|
17
|
+
lib/worlddb/models/lang_compat.rb
|
18
18
|
lib/worlddb/models/name.rb
|
19
19
|
lib/worlddb/models/place.rb
|
20
20
|
lib/worlddb/models/region.rb
|
21
|
-
lib/worlddb/models/
|
21
|
+
lib/worlddb/models/region_compat.rb
|
22
22
|
lib/worlddb/models/tagdb/tag.rb
|
23
23
|
lib/worlddb/models/tagdb/tagging.rb
|
24
24
|
lib/worlddb/models/usage.rb
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# worlddb-models
|
2
2
|
|
3
|
-
worlddb-models gem - world.db schema
|
3
|
+
worlddb-models gem - world.db schema 'n' models for easy (re)use
|
4
4
|
|
5
5
|
* home :: [github.com/worlddb/world.db.models](https://github.com/worlddb/world.db.models)
|
6
6
|
* bugs :: [github.com/worlddb/world.db.models/issues](https://github.com/worlddb/world.db.models/issues)
|
data/Rakefile
CHANGED
@@ -3,10 +3,10 @@ require './lib/worlddb/version.rb'
|
|
3
3
|
|
4
4
|
|
5
5
|
Hoe.spec 'worlddb-models' do
|
6
|
-
|
6
|
+
|
7
7
|
self.version = WorldDb::VERSION
|
8
8
|
|
9
|
-
self.summary = "worlddb - world.db schema
|
9
|
+
self.summary = "worlddb - world.db schema 'n' models for easy (re)use"
|
10
10
|
self.description = summary
|
11
11
|
|
12
12
|
self.urls = ['https://github.com/worlddb/world.db.models']
|
@@ -15,14 +15,14 @@ Hoe.spec 'worlddb-models' do
|
|
15
15
|
self.email = 'openmundi@googlegroups.com'
|
16
16
|
|
17
17
|
self.extra_deps = [
|
18
|
-
['props'], # settings / prop(ertie)s / env / INI
|
19
|
-
['logutils'], # logging
|
20
|
-
['textutils', '>= 0.
|
21
|
-
|
22
|
-
['tagutils'],
|
23
|
-
['activerecord-utils'],
|
24
|
-
['props-activerecord'],
|
25
|
-
['logutils-activerecord'],
|
18
|
+
['props', '>= 1.1.2'], # settings / prop(ertie)s / env / INI
|
19
|
+
['logutils', '>= 0.6.1'], # logging
|
20
|
+
['textutils', '>= 0.10.0'],
|
21
|
+
|
22
|
+
['tagutils', '>= 0.3.0'], # tags n categories for activerecord
|
23
|
+
['activerecord-utils', '>= 0.2.0'],
|
24
|
+
['props-activerecord', '>= 0.1.0'],
|
25
|
+
['logutils-activerecord', '>= 0.2.0'],
|
26
26
|
|
27
27
|
## 3rd party
|
28
28
|
['rubyzip'], ## todo: pull in via textutils ??
|
data/lib/worlddb/models.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# encoding:
|
1
|
+
# encoding: utf-8
|
2
|
+
|
2
3
|
|
3
4
|
# core and stlibs
|
4
5
|
|
@@ -9,6 +10,8 @@ require 'erb'
|
|
9
10
|
require 'json'
|
10
11
|
require 'yaml'
|
11
12
|
|
13
|
+
require 'logger' # Note: use for ActiveRecord::Base.logger -- remove/replace later w/ LogUtils::Logger ???
|
14
|
+
|
12
15
|
|
13
16
|
# 3rd party gems / libs
|
14
17
|
|
@@ -39,16 +42,16 @@ require 'worlddb/models/forward'
|
|
39
42
|
require 'worlddb/models/name'
|
40
43
|
require 'worlddb/models/place'
|
41
44
|
require 'worlddb/models/continent'
|
42
|
-
require 'worlddb/models/
|
45
|
+
require 'worlddb/models/continent_compat' # todo: move to compat gem
|
43
46
|
require 'worlddb/models/country'
|
44
|
-
require 'worlddb/models/
|
47
|
+
require 'worlddb/models/country_compat' # todo: move to compat gem
|
45
48
|
require 'worlddb/models/country_code'
|
46
49
|
require 'worlddb/models/region'
|
47
|
-
require 'worlddb/models/
|
50
|
+
require 'worlddb/models/region_compat' # todo: move to compat gem
|
48
51
|
require 'worlddb/models/city'
|
49
|
-
require 'worlddb/models/
|
52
|
+
require 'worlddb/models/city_compat' # todo: move to compat gem
|
50
53
|
require 'worlddb/models/lang'
|
51
|
-
require 'worlddb/models/
|
54
|
+
require 'worlddb/models/lang_compat' # todo: move to compat gem
|
52
55
|
require 'worlddb/models/usage'
|
53
56
|
|
54
57
|
require 'worlddb/models/tagdb/tag'
|
@@ -125,20 +128,14 @@ module WorldDb
|
|
125
128
|
end
|
126
129
|
|
127
130
|
|
128
|
-
####
|
129
|
-
## todo: remove stats ??? why? why not? better use .tables
|
130
|
-
def self.stats
|
131
|
-
Stats.new.tables
|
132
|
-
end
|
133
|
-
|
134
131
|
def self.tables
|
135
132
|
Stats.new.tables
|
136
133
|
end
|
137
134
|
|
138
135
|
|
139
|
-
def self.connect(
|
136
|
+
def self.connect( config={} )
|
140
137
|
|
141
|
-
if
|
138
|
+
if config.empty?
|
142
139
|
puts "ENV['DATBASE_URL'] - >#{ENV['DATABASE_URL']}<"
|
143
140
|
|
144
141
|
### change default to ./sport.db ?? why? why not?
|
@@ -160,8 +157,6 @@ module WorldDb
|
|
160
157
|
database: db.path[1..-1] # world.db (NB: cut off leading /, thus 1..-1)
|
161
158
|
}
|
162
159
|
end
|
163
|
-
else
|
164
|
-
config = db_config # use passed in config hash
|
165
160
|
end
|
166
161
|
|
167
162
|
## todo/check: use if defined?( JRUBY_VERSION ) instead ??
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/worlddb/version.rb
CHANGED
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.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.1.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: logutils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.6.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: textutils
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.10.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.10.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: tagutils
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.3.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.3.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activerecord-utils
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.2.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.2.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: props-activerecord
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 0.1.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 0.1.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: logutils-activerecord
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.2.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.2.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubyzip
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '3.13'
|
167
|
-
description: worlddb - world.db schema
|
167
|
+
description: worlddb - world.db schema 'n' models for easy (re)use
|
168
168
|
email: openmundi@googlegroups.com
|
169
169
|
executables: []
|
170
170
|
extensions: []
|
@@ -182,19 +182,19 @@ files:
|
|
182
182
|
- lib/worlddb/matcher.rb
|
183
183
|
- lib/worlddb/models.rb
|
184
184
|
- lib/worlddb/models/city.rb
|
185
|
-
- lib/worlddb/models/
|
185
|
+
- lib/worlddb/models/city_compat.rb
|
186
186
|
- lib/worlddb/models/continent.rb
|
187
|
-
- lib/worlddb/models/
|
187
|
+
- lib/worlddb/models/continent_compat.rb
|
188
188
|
- lib/worlddb/models/country.rb
|
189
189
|
- lib/worlddb/models/country_code.rb
|
190
|
-
- lib/worlddb/models/
|
190
|
+
- lib/worlddb/models/country_compat.rb
|
191
191
|
- lib/worlddb/models/forward.rb
|
192
192
|
- lib/worlddb/models/lang.rb
|
193
|
-
- lib/worlddb/models/
|
193
|
+
- lib/worlddb/models/lang_compat.rb
|
194
194
|
- lib/worlddb/models/name.rb
|
195
195
|
- lib/worlddb/models/place.rb
|
196
196
|
- lib/worlddb/models/region.rb
|
197
|
-
- lib/worlddb/models/
|
197
|
+
- lib/worlddb/models/region_compat.rb
|
198
198
|
- lib/worlddb/models/tagdb/tag.rb
|
199
199
|
- lib/worlddb/models/tagdb/tagging.rb
|
200
200
|
- lib/worlddb/models/usage.rb
|
@@ -242,7 +242,7 @@ rubyforge_project:
|
|
242
242
|
rubygems_version: 2.4.2
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
|
-
summary: worlddb - world.db schema
|
245
|
+
summary: worlddb - world.db schema 'n' models for easy (re)use
|
246
246
|
test_files:
|
247
247
|
- test/test_model_comp.rb
|
248
248
|
- test/test_models.rb
|