uncharted 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.gitignore +5 -3
  2. data/.metrics +8 -0
  3. data/CHANGELOG.md +8 -0
  4. data/Rakefile +7 -1
  5. data/lib/{version.rb → uncharted/version.rb} +1 -1
  6. data/test/country_test.rb +5 -0
  7. data/test/test_helper.rb +18 -2
  8. data/uncharted.gemspec +7 -7
  9. metadata +11 -48
  10. data/.yardoc/checksums +0 -6
  11. data/.yardoc/objects/root.dat +0 -0
  12. data/.yardoc/proxy_types +0 -0
  13. data/Gemfile.lock +0 -21
  14. data/doc/.yardoc/checksums +0 -0
  15. data/doc/.yardoc/objects/root.dat +0 -0
  16. data/doc/.yardoc/proxy_types +0 -0
  17. data/doc/Uncharted/Country/Field.html +0 -233
  18. data/doc/Uncharted/Country.html +0 -888
  19. data/doc/Uncharted/Territory/Field.html +0 -233
  20. data/doc/Uncharted/Territory.html +0 -809
  21. data/doc/Uncharted.html +0 -108
  22. data/doc/_index.html +0 -158
  23. data/doc/class_list.html +0 -47
  24. data/doc/css/common.css +0 -1
  25. data/doc/css/full_list.css +0 -53
  26. data/doc/css/style.css +0 -320
  27. data/doc/doc/_index.html +0 -84
  28. data/doc/doc/class_list.html +0 -47
  29. data/doc/doc/css/common.css +0 -1
  30. data/doc/doc/css/full_list.css +0 -53
  31. data/doc/doc/css/style.css +0 -320
  32. data/doc/doc/file_list.html +0 -46
  33. data/doc/doc/frames.html +0 -13
  34. data/doc/doc/index.html +0 -84
  35. data/doc/doc/js/app.js +0 -205
  36. data/doc/doc/js/full_list.js +0 -150
  37. data/doc/doc/js/jquery.js +0 -16
  38. data/doc/doc/method_list.html +0 -46
  39. data/doc/doc/top-level-namespace.html +0 -93
  40. data/doc/file.README.html +0 -122
  41. data/doc/file_list.html +0 -49
  42. data/doc/frames.html +0 -13
  43. data/doc/index.html +0 -122
  44. data/doc/js/app.js +0 -205
  45. data/doc/js/full_list.js +0 -150
  46. data/doc/js/jquery.js +0 -16
  47. data/doc/method_list.html +0 -262
  48. data/doc/top-level-namespace.html +0 -120
data/.gitignore CHANGED
@@ -1,7 +1,9 @@
1
1
  .DS_Store
2
2
  .bundle
3
- *.gem
3
+ .yardoc
4
4
  Gemfile.lock
5
- pkg/*
6
- tmp/*
5
+ coverage
6
+ doc
7
+ pkg
8
+ tmp
7
9
 
data/.metrics ADDED
@@ -0,0 +1,8 @@
1
+
2
+ MetricFu::Configuration.run do |config|
3
+ config.graphs = [:flog, :flay, :stats]
4
+ #config.graph_engine = :gchart
5
+ config.metrics = [:churn, :flog, :flay, :rcov, :reek, :roodi]
6
+ config.rcov[:external] = 'coverage/rcov/rcov.txt'
7
+ end
8
+
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ 0.0.5 (2011-08-31)
2
+ ------------------
3
+
4
+ Features:
5
+
6
+ - Country list complete
7
+ - Incomplete Territory list
8
+ - Mongoid Serializers
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'rake/testtask'
3
-
3
+ require 'yard'
4
4
 
5
5
  Rake::TestTask.new do |t|
6
6
  t.libs << "test"
@@ -8,5 +8,11 @@ Rake::TestTask.new do |t|
8
8
  t.verbose = true
9
9
  end
10
10
 
11
+ YARD::Rake::YardocTask.new do |t|
12
+ t.files = ['lib/**/*.rb']
13
+ t.options
14
+ end
15
+
16
+
11
17
  desc "Run tests"
12
18
  task :default => :test
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Uncharted
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
data/test/country_test.rb CHANGED
@@ -19,6 +19,11 @@ class TestCountry < MiniTest::Unit::TestCase
19
19
  def test_to_s
20
20
  assert_equal 'BR', @br.to_s
21
21
  end
22
+
23
+ def test_country_count
24
+ assert_equal 247, Country.count
25
+ assert_equal 27, Country.subdivisions.values.count
26
+ end
22
27
 
23
28
  def test_territories
24
29
  assert_equal 1, @br.districts.count
data/test/test_helper.rb CHANGED
@@ -1,5 +1,21 @@
1
1
 
2
2
  gem 'minitest'
3
3
 
4
- require "minitest/autorun"
5
- require 'purdytest'
4
+ require 'simplecov' # Must be included 1st
5
+ require 'minitest/autorun'
6
+ require 'purdytest'
7
+
8
+ require 'simplecov-rcov-text'
9
+
10
+ class SimpleCov::Formatter::MergedFormatter
11
+ def format(result)
12
+ SimpleCov::Formatter::HTMLFormatter.new.format(result)
13
+ SimpleCov::Formatter::RcovTextFormatter.new.format(result)
14
+ end
15
+ end
16
+
17
+ SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
18
+
19
+ SimpleCov.start do
20
+ add_filter '/test/'
21
+ end
data/uncharted.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  $:.push File.expand_path("../lib", __FILE__)
4
4
 
5
- require 'version'
5
+ require 'uncharted/version'
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "uncharted"
@@ -11,18 +11,18 @@ Gem::Specification.new do |s|
11
11
  s.description = "Provide ISO 3166 codes and english name for countries and their political divisions"
12
12
 
13
13
  s.version = Uncharted::VERSION
14
- s.platform = Gem::Platform::RUBY
14
+ s.platform = Gem::Platform::RUBY
15
15
  s.authors = ["Gilson Ferraz"]
16
16
  s.email = ["gferraz@cenize.com"]
17
17
 
18
- s.files = `git ls-files`.split("\n")
19
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
21
-
21
+
22
22
  s.required_ruby_version = '>= 1.9'
23
-
23
+
24
24
  s.add_development_dependency 'minitest' # minitest latest gem
25
25
  s.add_development_dependency 'purdytest' # colored tests for minitest https://github.com/tenderlove/purdytest
26
- s.add_development_dependency 'ruby-prof'
26
+ s.add_development_dependency 'yard' # Doc generator
27
27
 
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uncharted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-31 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &2152341020 !ruby/object:Gem::Requirement
16
+ requirement: &2168615860 !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: *2152341020
24
+ version_requirements: *2168615860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: purdytest
27
- requirement: &2152338840 !ruby/object:Gem::Requirement
27
+ requirement: &2168615260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2152338840
35
+ version_requirements: *2168615260
36
36
  - !ruby/object:Gem::Dependency
37
- name: ruby-prof
38
- requirement: &2152337320 !ruby/object:Gem::Requirement
37
+ name: yard
38
+ requirement: &2168614640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2152337320
46
+ version_requirements: *2168614640
47
47
  description: Provide ISO 3166 codes and english name for countries and their political
48
48
  divisions
49
49
  email:
@@ -53,56 +53,19 @@ extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
55
  - .gitignore
56
+ - .metrics
56
57
  - .project
57
- - .yardoc/checksums
58
- - .yardoc/objects/root.dat
59
- - .yardoc/proxy_types
58
+ - CHANGELOG.md
60
59
  - Gemfile
61
- - Gemfile.lock
62
60
  - README.md
63
61
  - Rakefile
64
- - doc/.yardoc/checksums
65
- - doc/.yardoc/objects/root.dat
66
- - doc/.yardoc/proxy_types
67
- - doc/Uncharted.html
68
- - doc/Uncharted/Country.html
69
- - doc/Uncharted/Country/Field.html
70
- - doc/Uncharted/Territory.html
71
- - doc/Uncharted/Territory/Field.html
72
- - doc/_index.html
73
- - doc/class_list.html
74
- - doc/css/common.css
75
- - doc/css/full_list.css
76
- - doc/css/style.css
77
- - doc/doc/_index.html
78
- - doc/doc/class_list.html
79
- - doc/doc/css/common.css
80
- - doc/doc/css/full_list.css
81
- - doc/doc/css/style.css
82
- - doc/doc/file_list.html
83
- - doc/doc/frames.html
84
- - doc/doc/index.html
85
- - doc/doc/js/app.js
86
- - doc/doc/js/full_list.js
87
- - doc/doc/js/jquery.js
88
- - doc/doc/method_list.html
89
- - doc/doc/top-level-namespace.html
90
- - doc/file.README.html
91
- - doc/file_list.html
92
- - doc/frames.html
93
- - doc/index.html
94
- - doc/js/app.js
95
- - doc/js/full_list.js
96
- - doc/js/jquery.js
97
- - doc/method_list.html
98
- - doc/top-level-namespace.html
99
62
  - lib/uncharted.rb
100
63
  - lib/uncharted/adapters/mongoid.rb
101
64
  - lib/uncharted/country.rb
102
65
  - lib/uncharted/data/br.rb
103
66
  - lib/uncharted/data/countries.rb
104
67
  - lib/uncharted/territory.rb
105
- - lib/version.rb
68
+ - lib/uncharted/version.rb
106
69
  - test/country_test.rb
107
70
  - test/mongoid_test.rb
108
71
  - test/test_helper.rb
data/.yardoc/checksums DELETED
@@ -1,6 +0,0 @@
1
- lib/uncharted.rb 94fbc7e67fd5fba22494038dde7c6183cfc05f81
2
- lib/uncharted/country.rb 7b20289ab3600fe4182ec07db6863d0d18019a2d
3
- lib/uncharted/data/br.rb b6ebbb0e793d46076295a4924f96f3f99e329b3e
4
- lib/uncharted/territory.rb f0632af7429b5826ef90cdac259b5f9a8a1123c6
5
- lib/uncharted/data/countries.rb 793229a6d0c5e5bf59162a20d64a90ab0e474547
6
- lib/uncharted/adapters/mongoid.rb 3ae56916ae66118f7b09598196bef8f3c5518de7
Binary file
data/.yardoc/proxy_types DELETED
Binary file
data/Gemfile.lock DELETED
@@ -1,21 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- uncharted (0.0.4.alpha6)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- minitest (2.5.1)
10
- purdytest (1.0.0)
11
- minitest (~> 2.2)
12
- ruby-prof (0.10.8)
13
-
14
- PLATFORMS
15
- ruby
16
-
17
- DEPENDENCIES
18
- minitest
19
- purdytest
20
- ruby-prof
21
- uncharted!
File without changes
Binary file
Binary file
@@ -1,233 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Uncharted::Country::Field
8
-
9
- &mdash; Documentation by YARD 0.7.2
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../_index.html">Index (F)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../Uncharted.html" title="Uncharted (module)">Uncharted</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Country.html" title="Uncharted::Country (class)">Country</a></span></span>
38
- &raquo;
39
- <span class="title">Field</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Uncharted::Country::Field
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName">Object</span>
70
-
71
- <ul class="fullTree">
72
- <li>Object</li>
73
-
74
- <li class="next">Uncharted::Country::Field</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
- <dt class="r2">Includes:</dt>
87
- <dd class="r2">Mongoid::Fields::Serializable</dd>
88
-
89
-
90
-
91
-
92
-
93
- <dt class="r1 last">Defined in:</dt>
94
- <dd class="r1 last">lib/uncharted/adapters/mongoid.rb</dd>
95
-
96
- </dl>
97
- <div class="clear"></div>
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <h2>
108
- Instance Method Summary
109
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
110
- </h2>
111
-
112
- <ul class="summary">
113
-
114
- <li class="public ">
115
- <span class="summary_signature">
116
-
117
- <a href="#deserialize-instance_method" title="#deserialize (instance method)">- (Object) <strong>deserialize</strong>(alpha2) </a>
118
-
119
-
120
-
121
- </span>
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
- <span class="summary_desc"><div class='inline'></div></span>
131
-
132
- </li>
133
-
134
-
135
- <li class="public ">
136
- <span class="summary_signature">
137
-
138
- <a href="#serialize-instance_method" title="#serialize (instance method)">- (Object) <strong>serialize</strong>(country) </a>
139
-
140
-
141
-
142
- </span>
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
- <span class="summary_desc"><div class='inline'></div></span>
152
-
153
- </li>
154
-
155
-
156
- </ul>
157
-
158
-
159
-
160
-
161
-
162
- <div id="instance_method_details" class="method_details_list">
163
- <h2>Instance Method Details</h2>
164
-
165
-
166
- <div class="method_details first">
167
- <p class="signature first" id="deserialize-instance_method">
168
-
169
- - (<tt>Object</tt>) <strong>deserialize</strong>(alpha2)
170
-
171
-
172
-
173
- </p><table class="source_code">
174
- <tr>
175
- <td>
176
- <pre class="lines">
177
-
178
-
179
- 10
180
- 11
181
- 12</pre>
182
- </td>
183
- <td>
184
- <pre class="code"><span class="info file"># File 'lib/uncharted/adapters/mongoid.rb', line 10</span>
185
-
186
- <span class='kw'>def</span> <span class='id deserialize'>deserialize</span><span class='lparen'>(</span><span class='id alpha2'>alpha2</span><span class='rparen'>)</span>
187
- <span class='id alpha2'>alpha2</span> <span class='op'>&amp;&amp;</span> <span class='const'>Uncharted</span><span class='op'>::</span><span class='const'>Country</span><span class='period'>.</span><span class='id find'>find</span><span class='lparen'>(</span><span class='id alpha2'>alpha2</span><span class='rparen'>)</span>
188
- <span class='kw'>end</span></pre>
189
- </td>
190
- </tr>
191
- </table>
192
- </div>
193
-
194
- <div class="method_details ">
195
- <p class="signature " id="serialize-instance_method">
196
-
197
- - (<tt>Object</tt>) <strong>serialize</strong>(country)
198
-
199
-
200
-
201
- </p><table class="source_code">
202
- <tr>
203
- <td>
204
- <pre class="lines">
205
-
206
-
207
- 14
208
- 15
209
- 16</pre>
210
- </td>
211
- <td>
212
- <pre class="code"><span class="info file"># File 'lib/uncharted/adapters/mongoid.rb', line 14</span>
213
-
214
- <span class='kw'>def</span> <span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='id country'>country</span><span class='rparen'>)</span>
215
- <span class='id country'>country</span> <span class='op'>&amp;&amp;</span> <span class='id country'>country</span><span class='period'>.</span><span class='id alpha2'>alpha2</span>
216
- <span class='kw'>end</span></pre>
217
- </td>
218
- </tr>
219
- </table>
220
- </div>
221
-
222
- </div>
223
-
224
- </div>
225
-
226
- <div id="footer">
227
- Generated on Tue Aug 30 16:02:30 2011 by
228
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
229
- 0.7.2 (ruby-1.9.2).
230
- </div>
231
-
232
- </body>
233
- </html>