factbook 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Manifest.txt +34 -22
- data/README.md +8 -3
- data/Rakefile +2 -263
- data/data/codes.csv +262 -0
- data/data/comparisons.csv +75 -0
- data/lib/factbook/builder.rb +214 -0
- data/lib/factbook/builder_item.rb +93 -0
- data/lib/factbook/codes.rb +119 -0
- data/lib/factbook/comparisons.rb +50 -0
- data/lib/factbook/page.rb +103 -303
- data/lib/factbook/sanitizer.rb +214 -0
- data/lib/factbook/sect.rb +29 -196
- data/lib/factbook/subsect.rb +18 -0
- data/lib/factbook/table.rb +52 -0
- data/lib/factbook/utils.rb +85 -0
- data/lib/factbook/utils_info.rb +102 -0
- data/lib/factbook/version.rb +4 -3
- data/lib/factbook.rb +23 -1
- data/test/data/au.html +579 -0
- data/test/data/au.yml +8 -0
- data/test/data/be.html +596 -0
- data/test/data/be.yml +8 -0
- data/test/data/src/au.html +2006 -0
- data/test/data/src/be.html +2011 -0
- data/test/helper.rb +0 -4
- data/test/test_builder.rb +37 -0
- data/test/test_codes.rb +76 -0
- data/test/test_comparisons.rb +19 -0
- data/test/test_fields.rb +21 -18
- data/test/test_item_builder.rb +99 -0
- data/test/test_json.rb +17 -20
- data/test/test_page.rb +18 -10
- data/test/test_sanitizer.rb +35 -0
- metadata +68 -49
- data/.gemtest +0 -0
- data/test/data/countrytemplate_au.html +0 -4179
- data/test/data/countrytemplate_be.html +0 -4260
- data/test/data/countrytemplate_br.html +0 -4366
- data/test/data/countrytemplate_ee.html +0 -2999
- data/test/data/countrytemplate_ls.html +0 -2728
- data/test/data/countrytemplate_mx.html +0 -4397
- data/test/data/countrytemplate_vt.html +0 -1726
- data/test/data/countrytemplate_xx.html +0 -2898
- data/test/test_page_old.rb +0 -478
- data/test/test_strip.rb +0 -66
data/test/helper.rb
CHANGED
@@ -3,13 +3,9 @@
|
|
3
3
|
## $:.unshift(File.dirname(__FILE__))
|
4
4
|
|
5
5
|
## minitest setup
|
6
|
-
|
7
|
-
# require 'minitest/unit'
|
8
6
|
require 'minitest/autorun'
|
9
7
|
|
10
|
-
# include MiniTest::Unit # lets us use TestCase instead of MiniTest::Unit::TestCase
|
11
8
|
|
12
9
|
## our own code
|
13
|
-
|
14
10
|
require 'factbook'
|
15
11
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_builder.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
##
|
12
|
+
## use/fix: ASCII-8BIT (e.g.keep as is)
|
13
|
+
|
14
|
+
|
15
|
+
class TestBuilder < MiniTest::Test
|
16
|
+
|
17
|
+
def test_build
|
18
|
+
|
19
|
+
['au','be'].each do |cc|
|
20
|
+
## use/fix: ASCII-8BIT (e.g.keep as is) -???
|
21
|
+
## fix/todo: use ASCII8BIT/binary reader ??
|
22
|
+
b = Factbook::Builder.from_file( "#{Factbook.root}/test/data/src/#{cc}.html" )
|
23
|
+
|
24
|
+
pp b.page
|
25
|
+
pp b.page.data
|
26
|
+
|
27
|
+
File.open( "./tmp/#{cc}.debug.html", 'w' ) do |f|
|
28
|
+
f.write b.html_debug
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
assert true ## assume everthing ok
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
end # class TestBuilder
|
37
|
+
|
data/test/test_codes.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_codes.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
class TestCodes < MiniTest::Test
|
12
|
+
|
13
|
+
|
14
|
+
def test_codes
|
15
|
+
|
16
|
+
assert_equal 261, Factbook::CODES.size
|
17
|
+
assert_equal 261, Factbook.codes.size
|
18
|
+
assert_equal 261, Factbook.codes.to_a.size
|
19
|
+
|
20
|
+
|
21
|
+
assert_equal 195, Factbook.codes.countries.size
|
22
|
+
assert_equal 52, Factbook.codes.dependencies.size
|
23
|
+
assert_equal 5, Factbook.codes.oceans.size
|
24
|
+
assert_equal 1, Factbook.codes.world.size
|
25
|
+
assert_equal 2, Factbook.codes.others.size
|
26
|
+
assert_equal 6, Factbook.codes.misc.size
|
27
|
+
|
28
|
+
assert_equal 8, Factbook.codes.dependencies_us.size
|
29
|
+
|
30
|
+
|
31
|
+
assert_equal 55, Factbook.codes.europe.size
|
32
|
+
assert_equal 9, Factbook.codes.south_asia.size
|
33
|
+
assert_equal 6, Factbook.codes.central_asia.size
|
34
|
+
assert_equal 22, Factbook.codes.east_n_souteast_asia.size
|
35
|
+
assert_equal 19, Factbook.codes.middle_east.size
|
36
|
+
assert_equal 56, Factbook.codes.africa.size
|
37
|
+
assert_equal 7, Factbook.codes.north_america.size
|
38
|
+
assert_equal 33, Factbook.codes.central_america_n_caribbean.size
|
39
|
+
assert_equal 14, Factbook.codes.south_america.size
|
40
|
+
assert_equal 30, Factbook.codes.australia_oceania.size
|
41
|
+
assert_equal 4, Factbook.codes.antartica.size
|
42
|
+
assert_equal 5, Factbook.codes.region('Oceans').size
|
43
|
+
assert_equal 1, Factbook.codes.region('World').size
|
44
|
+
|
45
|
+
assert_equal 45, Factbook.codes.countries.europe.size
|
46
|
+
|
47
|
+
assert_equal Factbook.codes.category('Oceans').size, Factbook.codes.region('Oceans').size
|
48
|
+
assert_equal Factbook.codes.category('World').size, Factbook.codes.region('World').size
|
49
|
+
|
50
|
+
|
51
|
+
assert_equal 261, Factbook.codes.countries.size +
|
52
|
+
Factbook.codes.others.size +
|
53
|
+
Factbook.codes.dependencies.size +
|
54
|
+
Factbook.codes.misc.size +
|
55
|
+
Factbook.codes.oceans.size +
|
56
|
+
Factbook.codes.world.size
|
57
|
+
|
58
|
+
assert_equal 261, Factbook.codes.europe.size +
|
59
|
+
Factbook.codes.south_asia.size +
|
60
|
+
Factbook.codes.central_asia.size +
|
61
|
+
Factbook.codes.east_n_souteast_asia.size +
|
62
|
+
Factbook.codes.middle_east.size +
|
63
|
+
Factbook.codes.africa.size +
|
64
|
+
Factbook.codes.north_america.size +
|
65
|
+
Factbook.codes.central_america_n_caribbean.size +
|
66
|
+
Factbook.codes.south_america.size +
|
67
|
+
Factbook.codes.australia_oceania.size +
|
68
|
+
Factbook.codes.antartica.size +
|
69
|
+
Factbook.codes.region('Oceans').size +
|
70
|
+
Factbook.codes.region('World').size
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end # class TestCodes
|
75
|
+
|
76
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_comparisons.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
class TestComparisons < MiniTest::Test
|
12
|
+
|
13
|
+
def test_comparisons
|
14
|
+
assert_equal 74, Factbook::COMPARISONS.size
|
15
|
+
assert_equal 74, Factbook.comparisons.size
|
16
|
+
assert_equal 74, Factbook.comparisons.to_a.size
|
17
|
+
end
|
18
|
+
|
19
|
+
end # class TestComparisons
|
data/test/test_fields.rb
CHANGED
@@ -1,44 +1,47 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_fields.rb
|
3
6
|
|
4
7
|
require 'helper'
|
5
8
|
|
6
9
|
|
7
|
-
class TestFields < MiniTest::
|
10
|
+
class TestFields < MiniTest::Test
|
8
11
|
|
9
12
|
def read_test_page( code )
|
10
|
-
|
13
|
+
b = Factbook::Builder.from_file( "#{Factbook.root}/test/data/src/#{code}.html" )
|
14
|
+
b.page
|
11
15
|
end
|
12
16
|
|
13
|
-
def
|
14
|
-
|
15
|
-
page
|
16
|
-
|
17
|
-
assert_equal 'au', page['Header']['code']
|
18
|
-
assert_equal "factbook/#{Factbook::VERSION}", page['Header']['generator']
|
17
|
+
def test_fields_full
|
18
|
+
## Factbook::Page.new( 'au', fields: 'full' )
|
19
|
+
page = read_test_page( 'au' ) # use builtin test page (do NOT fetch via internet)
|
19
20
|
|
20
|
-
assert_equal '-
|
21
|
-
assert_equal '5.5%', page['Economy']['Labor force - by occupation']['agriculture']
|
21
|
+
assert_equal '-2.4% of GDP (2014 est.)', page['Economy']['Budget surplus (+) or deficit (-)']['text']
|
22
|
+
assert_equal '5.5%', page['Economy']['Labor force - by occupation']['agriculture']['text']
|
22
23
|
|
23
|
-
assert_equal 'Enns, Krems, Linz, Vienna (Danube)', page['Transportation']['Ports and terminals']['river port(s)']
|
24
|
+
assert_equal 'Enns, Krems, Linz, Vienna (Danube)', page['Transportation']['Ports and terminals']['river port(s)']['text']
|
24
25
|
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
page = Factbook::Page.new( 'au', fields: 'full' )
|
27
|
+
def fix_xxx_test_fields_full_w_header
|
28
|
+
page = Factbook::OldPage.new( 'au', header: true, fields: 'full' )
|
29
29
|
page.html = read_test_page( 'au' ) # use builtin test page (do NOT fetch via internet)
|
30
30
|
|
31
|
-
assert_equal '
|
31
|
+
assert_equal 'au', page['Header']['code']
|
32
|
+
assert_equal "factbook/#{Factbook::VERSION}", page['Header']['generator']
|
33
|
+
|
34
|
+
assert_equal '-2.4% of GDP (2014 est.)', page['Economy']['Budget surplus (+) or deficit (-)']['text']
|
32
35
|
assert_equal '5.5%', page['Economy']['Labor force - by occupation']['agriculture']
|
33
36
|
|
34
37
|
assert_equal 'Enns, Krems, Linz, Vienna (Danube)', page['Transportation']['Ports and terminals']['river port(s)']
|
35
38
|
end
|
36
39
|
|
37
|
-
def
|
38
|
-
page = Factbook::
|
40
|
+
def fix_xxx_test_fields_std
|
41
|
+
page = Factbook::OldPage.new( 'au' )
|
39
42
|
page.html = read_test_page( 'au' ) # use builtin test page (do NOT fetch via internet)
|
40
43
|
|
41
|
-
assert_equal '-
|
44
|
+
assert_equal '-2.4% of GDP (2014 est.)', page['econ']['budget_surplus_or_deficit']['text']
|
42
45
|
assert_equal '5.5%', page['econ']['labor_force_by_occupation']['agriculture']
|
43
46
|
|
44
47
|
assert_equal 'Enns, Krems, Linz, Vienna (Danube)', page['trans']['ports_and_terminals']['river_ports']
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_item_builder.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
class TestItemBuilder < MiniTest::Test
|
12
|
+
|
13
|
+
def test_location
|
14
|
+
|
15
|
+
html =<<EOS
|
16
|
+
<div class=category_data>Central Europe, north of Italy and Slovenia</div>
|
17
|
+
EOS
|
18
|
+
|
19
|
+
b = Factbook::ItemBuilder.new( html, 'Location' )
|
20
|
+
b.read
|
21
|
+
|
22
|
+
assert true ## assume everthing ok
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_area
|
26
|
+
html =<<EOS
|
27
|
+
<div><span class=category>total: </span><span class=category_data>83,871 sq km</span></div>
|
28
|
+
<div><span class=category>land: </span><span class=category_data>82,445 sq km</span></div>
|
29
|
+
<div><span class=category>water: </span><span class=category_data>1,426 sq km</span></div>
|
30
|
+
EOS
|
31
|
+
|
32
|
+
b = Factbook::ItemBuilder.new( html, 'Area' )
|
33
|
+
b.read
|
34
|
+
|
35
|
+
assert true ## assume everthing ok
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_land_use
|
39
|
+
html =<<EOS
|
40
|
+
<div><span class=category>agricultural land: </span><span class=category_data>38.4%</span></div>
|
41
|
+
<div class=category_data>arable land 16.5%; permanent crops 0.8%; permanent pasture 21.1%</div>
|
42
|
+
<div><span class=category>forest: </span><span class=category_data>47.2%</span></div>
|
43
|
+
<div><span class=category>other: </span><span class=category_data>14.4% (2011 est.)</span></div>
|
44
|
+
EOS
|
45
|
+
|
46
|
+
b = Factbook::ItemBuilder.new( html, 'Land use' )
|
47
|
+
b.read
|
48
|
+
|
49
|
+
assert true ## assume everthing ok
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_contraceptive_prevalence_rate
|
53
|
+
html =<<EOS
|
54
|
+
<div class=category_data>69.6%</div>
|
55
|
+
<div><span class=category>note: </span><span class=category_data>percent of women aged 18-46 (2008/09)</span></div>
|
56
|
+
EOS
|
57
|
+
|
58
|
+
b = Factbook::ItemBuilder.new( html, 'Contraceptive Prevalence Rate' )
|
59
|
+
b.read
|
60
|
+
|
61
|
+
assert true ## assume everthing ok
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_drinking_water_source
|
65
|
+
html =<<EOS
|
66
|
+
<div><span class=category>improved: </span><span class=category_data></span></div>
|
67
|
+
<div class=category_data>urban: 100% of population</div>
|
68
|
+
<div class=category_data>rural: 100% of population</div>
|
69
|
+
<div class=category_data>total: 100% of population</div>
|
70
|
+
<div><span class=category>unimproved: </span><span class=category_data></span></div>
|
71
|
+
<div class=category_data>urban: 0% of population</div>
|
72
|
+
<div class=category_data>rural: 0% of population</div>
|
73
|
+
<div class=category_data>total: 0% of population (2015 est.)</div>
|
74
|
+
EOS
|
75
|
+
|
76
|
+
b = Factbook::ItemBuilder.new( html, 'Drinking Water Source' )
|
77
|
+
b.read
|
78
|
+
|
79
|
+
assert true ## assume everthing ok
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_political_pressure_groups_and_leaders
|
83
|
+
html =<<EOS
|
84
|
+
<div class=category_data>Austrian Trade Union Federation or OeGB (nominally independent but primarily Social Democratic)</div>
|
85
|
+
<div class=category_data>Federal Economic Chamber (OeVP-dominated)</div>
|
86
|
+
<div class=category_data>Labor Chamber or AK (Social Democratic-leaning think tank)</div>
|
87
|
+
<div class=category_data>OeVP-oriented Association of Austrian Industrialists or IV</div>
|
88
|
+
<div class=category_data>Roman Catholic Church, including its chief lay organization, Catholic Action</div>
|
89
|
+
<div><span class=category>other: </span><span class=category_data>three composite leagues of the Austrian People's Party or OeVP representing business, labor, farmers, and other nongovernment organizations in the areas of environment and human rights</span></div>
|
90
|
+
EOS
|
91
|
+
|
92
|
+
b = Factbook::ItemBuilder.new( html, 'Political pressure groups and leaders' )
|
93
|
+
b.read
|
94
|
+
|
95
|
+
assert true ## assume everthing ok
|
96
|
+
end
|
97
|
+
|
98
|
+
end # class TestItemBuilder
|
99
|
+
|
data/test/test_json.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_json.rb
|
6
|
+
|
3
7
|
|
4
8
|
require 'helper'
|
5
9
|
|
6
10
|
|
7
|
-
class TestJson < MiniTest::
|
11
|
+
class TestJson < MiniTest::Test
|
8
12
|
|
9
13
|
|
10
14
|
def test_json
|
@@ -12,27 +16,20 @@ class TestJson < MiniTest::Unit::TestCase
|
|
12
16
|
|
13
17
|
codes = [ 'au',
|
14
18
|
'be',
|
15
|
-
'br',
|
16
|
-
'mx',
|
17
|
-
'ls',
|
18
|
-
'vt',
|
19
|
-
'ee',
|
20
|
-
'xx'
|
19
|
+
#'br',
|
20
|
+
#'mx',
|
21
|
+
#'ls',
|
22
|
+
#'vt',
|
23
|
+
#'ee',
|
24
|
+
#'xx'
|
25
|
+
]
|
21
26
|
|
22
27
|
codes.each do |code|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
## print first 600 chars
|
27
|
-
pp page.html[0..600]
|
28
|
-
|
29
|
-
## save for debuging
|
30
|
-
|
31
|
-
puts "saving a copy to #{code}.html for debugging"
|
32
|
-
File.open( "tmp/#{code}.html", 'w' ) do |f|
|
33
|
-
f.write page.html
|
34
|
-
end
|
28
|
+
|
29
|
+
b = Factbook::Builder.from_file( "#{Factbook.root}/test/data/src/#{code}.html" )
|
35
30
|
|
31
|
+
page = b.page
|
32
|
+
|
36
33
|
h = page.data
|
37
34
|
pp h
|
38
35
|
|
@@ -44,4 +41,4 @@ class TestJson < MiniTest::Unit::TestCase
|
|
44
41
|
end
|
45
42
|
end
|
46
43
|
|
47
|
-
end # class
|
44
|
+
end # class TestOldJson
|
data/test/test_page.rb
CHANGED
@@ -1,32 +1,40 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_page.rb
|
6
|
+
|
3
7
|
|
4
8
|
require 'helper'
|
5
9
|
|
6
10
|
|
7
|
-
class TestPage < MiniTest::
|
11
|
+
class TestPage < MiniTest::Test
|
8
12
|
|
9
13
|
|
10
14
|
def test_sects
|
11
15
|
pages = [
|
12
16
|
[ 'au', 10 ],
|
13
17
|
[ 'be', 10 ],
|
14
|
-
[ 'br', 10 ],
|
15
|
-
[ 'ee', 10 ],
|
16
|
-
[ 'mx', 10 ],
|
17
|
-
[ 'xx', 10 ],
|
18
|
-
[ 'ls', 9 ],
|
19
|
-
[ 'vt', 8 ]
|
18
|
+
# [ 'br', 10 ],
|
19
|
+
# [ 'ee', 10 ],
|
20
|
+
# [ 'mx', 10 ],
|
21
|
+
# [ 'xx', 10 ],
|
22
|
+
# [ 'ls', 9 ],
|
23
|
+
# [ 'vt', 8 ],
|
24
|
+
]
|
20
25
|
|
21
26
|
pages.each do |rec|
|
22
27
|
code = rec[0]
|
23
28
|
sects_size = rec[1]
|
24
29
|
|
25
|
-
|
26
|
-
page
|
30
|
+
b = Factbook::Builder.from_file( "#{Factbook.root}/test/data/src/#{code}.html" )
|
31
|
+
page = b.page
|
32
|
+
|
33
|
+
## page = Factbook::OldPage.new( code )
|
34
|
+
## page.html = File.read( "#{Factbook.root}/test/data/old/countrytemplate_#{code}.html" )
|
27
35
|
|
28
36
|
## print first 600 chars
|
29
|
-
pp page.html[0..600]
|
37
|
+
## pp page.html[0..600]
|
30
38
|
|
31
39
|
assert_equal sects_size, page.sects.size
|
32
40
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_sanitizer.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
|
11
|
+
class TestSanitizer < MiniTest::Test
|
12
|
+
|
13
|
+
def test_sanitize
|
14
|
+
|
15
|
+
['au','be'].each do |cc|
|
16
|
+
## use/fix: ASCII-8BIT (e.g.keep as is) -???
|
17
|
+
html_ascii = File.read( "#{Factbook.root}/test/data/src/#{cc}.html" ) ## fix/todo: use ASCII8BIT/binary reader ??
|
18
|
+
|
19
|
+
html, info, errors = Factbook::Sanitizer.new.sanitize( html_ascii )
|
20
|
+
|
21
|
+
File.open( "./tmp/#{cc}.profile.html", 'w' ) do |f|
|
22
|
+
f.write "** info:\n"
|
23
|
+
f.write info.inspect + "\n\n"
|
24
|
+
f.write "** errors:\n"
|
25
|
+
f.write errors.inspect + "\n\n"
|
26
|
+
f.write "** html:\n"
|
27
|
+
f.write html
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
assert true ## assume everthing ok
|
32
|
+
end
|
33
|
+
|
34
|
+
end # class TestSanitizer
|
35
|
+
|
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factbook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gerald Bauer
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: logutils
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: fetcher
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: nokogiri
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - ">="
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :runtime
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: rdoc
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
|
-
- - ~>
|
59
|
+
- - "~>"
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '4.0'
|
55
62
|
type: :development
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.0'
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: hoe
|
60
|
-
requirement:
|
61
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
|
-
- - ~>
|
73
|
+
- - "~>"
|
64
74
|
- !ruby/object:Gem::Version
|
65
|
-
version: '3.
|
75
|
+
version: '3.14'
|
66
76
|
type: :development
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.14'
|
69
83
|
description: factbook - scripts for the world factbook (get open structured data e.g
|
70
84
|
JSON etc.)
|
71
85
|
email: openmundi@googlegroups.com
|
@@ -80,56 +94,61 @@ files:
|
|
80
94
|
- Manifest.txt
|
81
95
|
- README.md
|
82
96
|
- Rakefile
|
97
|
+
- data/codes.csv
|
98
|
+
- data/comparisons.csv
|
83
99
|
- lib/factbook.rb
|
100
|
+
- lib/factbook/builder.rb
|
101
|
+
- lib/factbook/builder_item.rb
|
102
|
+
- lib/factbook/codes.rb
|
103
|
+
- lib/factbook/comparisons.rb
|
84
104
|
- lib/factbook/page.rb
|
105
|
+
- lib/factbook/sanitizer.rb
|
85
106
|
- lib/factbook/sect.rb
|
107
|
+
- lib/factbook/subsect.rb
|
108
|
+
- lib/factbook/table.rb
|
109
|
+
- lib/factbook/utils.rb
|
110
|
+
- lib/factbook/utils_info.rb
|
86
111
|
- lib/factbook/version.rb
|
87
|
-
- test/data/
|
88
|
-
- test/data/
|
89
|
-
- test/data/
|
90
|
-
- test/data/
|
91
|
-
- test/data/
|
92
|
-
- test/data/
|
93
|
-
- test/data/countrytemplate_vt.html
|
94
|
-
- test/data/countrytemplate_xx.html
|
112
|
+
- test/data/au.html
|
113
|
+
- test/data/au.yml
|
114
|
+
- test/data/be.html
|
115
|
+
- test/data/be.yml
|
116
|
+
- test/data/src/au.html
|
117
|
+
- test/data/src/be.html
|
95
118
|
- test/helper.rb
|
119
|
+
- test/test_builder.rb
|
120
|
+
- test/test_codes.rb
|
121
|
+
- test/test_comparisons.rb
|
96
122
|
- test/test_fields.rb
|
123
|
+
- test/test_item_builder.rb
|
97
124
|
- test/test_json.rb
|
98
125
|
- test/test_page.rb
|
99
|
-
- test/
|
100
|
-
|
101
|
-
- .gemtest
|
102
|
-
homepage: https://github.com/worlddb/factbook.ruby
|
126
|
+
- test/test_sanitizer.rb
|
127
|
+
homepage: https://github.com/worlddb/factbook
|
103
128
|
licenses:
|
104
129
|
- Public Domain
|
130
|
+
metadata: {}
|
105
131
|
post_install_message:
|
106
132
|
rdoc_options:
|
107
|
-
- --main
|
133
|
+
- "--main"
|
108
134
|
- README.md
|
109
135
|
require_paths:
|
110
136
|
- lib
|
111
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
-
none: false
|
113
138
|
requirements:
|
114
|
-
- -
|
139
|
+
- - ">="
|
115
140
|
- !ruby/object:Gem::Version
|
116
141
|
version: 1.9.2
|
117
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
-
none: false
|
119
143
|
requirements:
|
120
|
-
- -
|
144
|
+
- - ">="
|
121
145
|
- !ruby/object:Gem::Version
|
122
146
|
version: '0'
|
123
147
|
requirements: []
|
124
148
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
149
|
+
rubygems_version: 2.2.3
|
126
150
|
signing_key:
|
127
|
-
specification_version:
|
151
|
+
specification_version: 4
|
128
152
|
summary: factbook - scripts for the world factbook (get open structured data e.g JSON
|
129
153
|
etc.)
|
130
|
-
test_files:
|
131
|
-
- test/test_page_old.rb
|
132
|
-
- test/test_strip.rb
|
133
|
-
- test/test_fields.rb
|
134
|
-
- test/test_json.rb
|
135
|
-
- test/test_page.rb
|
154
|
+
test_files: []
|
data/.gemtest
DELETED
File without changes
|