uncharted 0.0.7.beta1 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/uncharted/country.rb +9 -6
- data/lib/uncharted/territory.rb +2 -2
- data/lib/uncharted/version.rb +1 -1
- data/test/country_test.rb +1 -0
- data/test/test_helper.rb +3 -3
- data/uncharted.gemspec +5 -3
- metadata +35 -12
data/lib/uncharted/country.rb
CHANGED
@@ -19,21 +19,24 @@ module Uncharted
|
|
19
19
|
countries.count
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.find(
|
23
|
-
|
24
|
-
|
22
|
+
def self.find(objects)
|
23
|
+
case objects
|
24
|
+
when Array
|
25
|
+
objects.collect {|c| data[c]}
|
26
|
+
when Country
|
27
|
+
objects
|
28
|
+
else
|
29
|
+
data[objects]
|
25
30
|
end
|
26
|
-
data[codes]
|
27
31
|
end
|
28
32
|
|
29
33
|
def self.countries
|
30
34
|
@data.values
|
31
35
|
end
|
32
|
-
|
36
|
+
|
33
37
|
def self.data
|
34
38
|
@data ||= {}
|
35
39
|
end
|
36
|
-
|
37
40
|
|
38
41
|
end
|
39
42
|
|
data/lib/uncharted/territory.rb
CHANGED
data/lib/uncharted/version.rb
CHANGED
data/test/country_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
gem 'minitest'
|
3
3
|
|
4
4
|
require 'simplecov' # Must be included 1st
|
5
|
+
|
5
6
|
require 'minitest/autorun'
|
6
7
|
require 'purdytest'
|
7
|
-
|
8
|
-
require 'simplecov-rcov-text'
|
8
|
+
require 'simplecov-rcov'
|
9
9
|
|
10
10
|
class SimpleCov::Formatter::MergedFormatter
|
11
11
|
def format(result)
|
12
12
|
SimpleCov::Formatter::HTMLFormatter.new.format(result)
|
13
|
-
SimpleCov::Formatter::
|
13
|
+
SimpleCov::Formatter::RcovFormatter.new.format(result)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
data/uncharted.gemspec
CHANGED
@@ -21,8 +21,10 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.required_ruby_version = '>= 1.9'
|
23
23
|
|
24
|
-
s.add_development_dependency 'minitest'
|
25
|
-
s.add_development_dependency 'purdytest'
|
26
|
-
s.add_development_dependency '
|
24
|
+
s.add_development_dependency 'minitest' # minitest latest gem
|
25
|
+
s.add_development_dependency 'purdytest' # colored tests for minitest https://github.com/tenderlove/purdytest
|
26
|
+
s.add_development_dependency 'simplecov'
|
27
|
+
s.add_development_dependency 'simplecov-rcov'
|
28
|
+
s.add_development_dependency 'yard' # Doc generator
|
27
29
|
|
28
30
|
end
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uncharted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.8
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Gilson Ferraz
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156459540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156459540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: purdytest
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156458620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,32 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156458620
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: simplecov
|
38
|
+
requirement: &2156457820 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *2156457820
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: simplecov-rcov
|
49
|
+
requirement: &2156716040 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *2156716040
|
36
58
|
- !ruby/object:Gem::Dependency
|
37
59
|
name: yard
|
38
|
-
requirement: &
|
60
|
+
requirement: &2156715280 !ruby/object:Gem::Requirement
|
39
61
|
none: false
|
40
62
|
requirements:
|
41
63
|
- - ! '>='
|
@@ -43,7 +65,7 @@ dependencies:
|
|
43
65
|
version: '0'
|
44
66
|
type: :development
|
45
67
|
prerelease: false
|
46
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156715280
|
47
69
|
description: Provide ISO 3166 codes and english name for countries and their political
|
48
70
|
divisions
|
49
71
|
email:
|
@@ -87,12 +109,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
110
|
none: false
|
89
111
|
requirements:
|
90
|
-
- - ! '
|
112
|
+
- - ! '>='
|
91
113
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
114
|
+
version: '0'
|
93
115
|
requirements: []
|
94
116
|
rubyforge_project:
|
95
|
-
rubygems_version: 1.8.
|
117
|
+
rubygems_version: 1.8.6
|
96
118
|
signing_key:
|
97
119
|
specification_version: 3
|
98
120
|
summary: ISO 3166 Countries & territories codes (NOT READY FOR USE YET!)
|
@@ -101,3 +123,4 @@ test_files:
|
|
101
123
|
- test/mongoid_test.rb
|
102
124
|
- test/test_helper.rb
|
103
125
|
- test/uncharted_test.rb
|
126
|
+
has_rdoc:
|