rats 0.4.0 → 0.4.1

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.
@@ -71,7 +71,8 @@ from above example: [= NSE]
71
71
 
72
72
  The Multi Quarter Section represents a 1/2 x 1 mile + 1/2 x 1/2 mile area within the
73
73
  1x1 mile Section (or basically 3 of the 4 quarters).
74
- They are identified by "NSE", "NSW", "ENW", "ESW", "SNE", "SNW", "WNE" and "WSE".
74
+ They are identified by "NSE", "NSW", "ENW", "ESW", "SNE", "SNW", "WNE" and "WSE",
75
+ "NWS", "NES", "SEN", "SWN", "NWE", "NEW", "SEW", "SWE".
75
76
 
76
77
  === Quarter
77
78
  a.k.a. Quarter Section
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -199,6 +199,22 @@ module Rats
199
199
  ['NW','SE','SW']
200
200
  when 'wne'
201
201
  ['NE','NW','SW']
202
+ when 'nws'
203
+ ['NW','SE','SW']
204
+ when 'nes'
205
+ ['NE','SE','SW']
206
+ when 'sen'
207
+ ['NE','NW','SE']
208
+ when 'swn'
209
+ ['NE','NW','SW']
210
+ when 'nwe'
211
+ ['NE','NW','SE']
212
+ when 'new'
213
+ ['NE','NW','SW']
214
+ when 'sew'
215
+ ['NW','SE','SW']
216
+ when 'swe'
217
+ ['NE','SE','SW']
202
218
  end
203
219
 
204
220
  # create the required locations
@@ -1,7 +1,13 @@
1
1
  module Rats
2
2
  class Quarter < Data
3
3
 
4
- VALID_QUARTERS = [:all, :nse, :nsw, :enw, :esw, :sne, :snw, :wse, :wne, :ne, :nw, :se, :sw, :n, :e, :s, :w]
4
+ VALID_QUARTERS = [
5
+ :all,
6
+ :nse, :nsw, :enw, :esw, :sne, :snw, :wse, :wne,
7
+ :nws, :nes, :sen, :swn, :nwe, :new, :sew, :swe,
8
+ :ne, :nw, :se, :sw,
9
+ :n, :e, :s, :w
10
+ ]
5
11
 
6
12
  def self.padding_width; 2; end
7
13
  def self.padding_value; " "; end
@@ -48,13 +54,29 @@ module Rats
48
54
  sprintf(template, 'West Half and', 'Southeast Quarter')
49
55
  when :wne
50
56
  sprintf(template, 'West Half and', 'Northeast Quarter')
57
+ when :nws
58
+ sprintf(template, 'South Half and', 'Northwest Quarter')
59
+ when :nes
60
+ sprintf(template, 'South Half and', 'Northeast Quarter')
61
+ when :sen
62
+ sprintf(template, 'North Half and', 'Southeast Quarter')
63
+ when :swn
64
+ sprintf(template, 'North Half and', 'Southwest Quarter')
65
+ when :nwe
66
+ sprintf(template, 'East Half and', 'Northwest Quarter')
67
+ when :new
68
+ sprintf(template, 'West Half and', 'Northeast Quarter')
69
+ when :sew
70
+ sprintf(template, 'West Half and', 'Southeast Quarter')
71
+ when :swe
72
+ sprintf(template, 'East Half and', 'Southwest Quarter')
51
73
  else
52
74
  ''
53
75
  end
54
76
  end
55
77
 
56
78
  def self.half?(value)
57
- %w(all nse nsw enw esw sne snw wse wne north n south s east e west w).include?(value.to_s.downcase)
79
+ %w(all nse nsw enw esw sne snw wse wne nws nes sen swn nwe new sew swe north n south s east e west w).include?(value.to_s.downcase)
58
80
  end
59
81
 
60
82
  def self.transform(value)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rats}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark G"]
12
- s.date = %q{2010-11-30}
12
+ s.date = %q{2011-01-26}
13
13
  s.description = %q{A ruby class to help with using the Alberta Township System}
14
14
  s.email = %q{rats@attackcorp.com}
15
15
  s.extra_rdoc_files = [
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
47
47
  s.homepage = %q{http://github.com/attack/rats}
48
48
  s.rdoc_options = ["--charset=UTF-8"]
49
49
  s.require_paths = ["lib"]
50
- s.rubygems_version = %q{1.3.6}
50
+ s.rubygems_version = %q{1.3.5}
51
51
  s.summary = %q{A ruby class to help with using the Alberta Township System}
52
52
  s.test_files = [
53
53
  "spec/data/data_spec.rb",
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rats
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 0
9
- version: 0.4.0
4
+ version: 0.4.1
10
5
  platform: ruby
11
6
  authors:
12
7
  - Mark G
@@ -14,7 +9,7 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2010-11-30 00:00:00 -05:00
12
+ date: 2011-01-26 00:00:00 -05:00
18
13
  default_executable:
19
14
  dependencies: []
20
15
 
@@ -67,20 +62,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
62
  requirements:
68
63
  - - ">="
69
64
  - !ruby/object:Gem::Version
70
- segments:
71
- - 0
72
65
  version: "0"
66
+ version:
73
67
  required_rubygems_version: !ruby/object:Gem::Requirement
74
68
  requirements:
75
69
  - - ">="
76
70
  - !ruby/object:Gem::Version
77
- segments:
78
- - 0
79
71
  version: "0"
72
+ version:
80
73
  requirements: []
81
74
 
82
75
  rubyforge_project:
83
- rubygems_version: 1.3.6
76
+ rubygems_version: 1.3.5
84
77
  signing_key:
85
78
  specification_version: 3
86
79
  summary: A ruby class to help with using the Alberta Township System