os_map_ref 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +21 -0
- data/.travis.yml +9 -0
- data/Gemfile +3 -0
- data/README.md +3 -0
- data/lib/os_map_ref/input_processor.rb +6 -6
- data/lib/os_map_ref/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a33b25f6d61b9a602223af6544111add93ea3f42
|
4
|
+
data.tar.gz: 6aa33dbc329b8d26cec8076a48c0066f132338fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f851ca4dc154a1cb4c797059efe5eb80e632c7ed61402b2e6987eae4ec159c2ad904f47c37453a3c8c5ee7b0da497b3790af93d745b58ed68bc0c79769a91afb
|
7
|
+
data.tar.gz: 614d945d264308076a0070d91e5584d4e6d5184c7a5ed6020590be17f766fbb6bd668945da0ca24cd1a590f6742be4e58d5fe8d4e4cb225c86098c9c74836590
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
duplication:
|
4
|
+
enabled: true
|
5
|
+
config:
|
6
|
+
languages:
|
7
|
+
- ruby
|
8
|
+
fixme:
|
9
|
+
enabled: true
|
10
|
+
rubocop:
|
11
|
+
enabled: true
|
12
|
+
brakeman:
|
13
|
+
enabled: false
|
14
|
+
rubymotion:
|
15
|
+
enabled: true
|
16
|
+
ratings:
|
17
|
+
paths:
|
18
|
+
- "**.module"
|
19
|
+
- "**.rb"
|
20
|
+
exclude_paths:
|
21
|
+
- spec/
|
data/.travis.yml
CHANGED
@@ -14,3 +14,12 @@ before_install: gem install bundler -v 1.11.2
|
|
14
14
|
branches:
|
15
15
|
only:
|
16
16
|
- master
|
17
|
+
|
18
|
+
# This section was added as per https://docs.travis-ci.com/user/code-climate/
|
19
|
+
# To protect our codeclimate stats rather than adding the Codeclimate API key for ea-area_lookup
|
20
|
+
# in the open we used this guide https://docs.travis-ci.com/user/encryption-keys/ to encryt the
|
21
|
+
# value. Essentially install travis gem, then run `travis encrypt <my_code_climate_api_key>`
|
22
|
+
addons:
|
23
|
+
code_climate:
|
24
|
+
repo_token:
|
25
|
+
secure: "G1IaZNDiJe95Ng3jvDeg4gToha86SNgDOu7JzNwb9+qV6I0R10vqKEhGwlYQ4eazoO3VE3vzzIWszY1gpbtkgVTkC4mkBawTyiZevhMtFRfXjbz2WTLmMszJf2ysIFaMmlnfNrjLwQWrGx7jhGm/nt7hsrhcg1MkO2EmuOhryKkT7Z9W2lnr1oIu/XwUDbY6ydqCfGq+e/a+bA+4LcQ20PCSGL0KnggcSJKSAX2O51GpeQ5Yofjm2XJ/Hagy3VSj1rGPCMnlEHLwydebqI/lYhQJUcv7rZAIUWDJ3Rg68sVd6WixpnY3n4GcTU+fnSYbUAqtLyNOoKGxBhXhljgoOyx/HjxWe8ymUX35xEswF0aq8Q0PoqUvRVBu50gsla0c7vhCm4sYF3KxxprzjTy5RHEokuow2Fe4Wa4ulM2U2PqQy6LzvFHjJzKMAfhx7thtstTRFF//buL9OBYIAtG/dnD+Jfh2K7zNTjnQf0pYMhTj/VPK78sR2h7SlP1yEYCyy+AqyFiEcq/49giJ/c7yLW16xIVENQsJ8dfR8SXW0d4MGOoVP0pPOh/+OiO3PY2Yb99A6uZAKP9l1+hkyAE6qDhLzoO1WutsKeX2IrZXbPrfi94JifVnqT9wJLpz6e57powESFAp1ROcJChFJfEWL/RKBK7dVzMWFt5WK0AWUIo="
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# OsMapRef
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/EnvironmentAgency/os_map_ref.svg?branch=master)](https://travis-ci.org/EnvironmentAgency/os_map_ref)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/EnvironmentAgency/os_map_ref/badges/gpa.svg)](https://codeclimate.com/github/EnvironmentAgency/os_map_ref)
|
5
|
+
[![Test Coverage](https://codeclimate.com/github/EnvironmentAgency/os_map_ref/badges/coverage.svg)](https://codeclimate.com/github/EnvironmentAgency/os_map_ref/coverage)
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/os_map_ref.svg)](https://badge.fury.io/rb/os_map_ref)
|
4
7
|
|
5
8
|
This gem allows you to gather U.K. Ordnance Survey Eastings, North, and Map
|
6
9
|
References from a range of text inputs.
|
@@ -30,7 +30,7 @@ module OsMapRef
|
|
30
30
|
|
31
31
|
def processed_map_reference
|
32
32
|
[
|
33
|
-
grid_letters,
|
33
|
+
grid_letters.upcase,
|
34
34
|
padded_map_reference_easting,
|
35
35
|
padded_map_reference_northing
|
36
36
|
].join(' ')
|
@@ -88,25 +88,25 @@ module OsMapRef
|
|
88
88
|
northing.ljust(length, padding)
|
89
89
|
]
|
90
90
|
end
|
91
|
-
|
91
|
+
|
92
92
|
def extended_length
|
93
93
|
normal_length + 1
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
def normal_length
|
97
97
|
6
|
98
98
|
end
|
99
|
-
|
99
|
+
|
100
100
|
def padding
|
101
101
|
'0'
|
102
102
|
end
|
103
|
-
|
103
|
+
|
104
104
|
# Matches are:
|
105
105
|
# 1: First digits which may be followed with a decimal point and more digits
|
106
106
|
# 2: The decimal point and trailing digits from first match (if present)
|
107
107
|
# 3: Second digits which may be followed with a decimal point and more digits
|
108
108
|
# 4: The decimal point and trailing digits from second match (if present)
|
109
|
-
# So:
|
109
|
+
# So:
|
110
110
|
# "1234.5, 6789.0" --> 1: "1234.5", 2: ".5", 3: "6789.0", 4: ".0"
|
111
111
|
# "1234 6789" --> 1: "1234", 2: nil, 3: "6789", 4: nil
|
112
112
|
def easting_northing_pattern
|
data/lib/os_map_ref/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: os_map_ref
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nichols
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,6 +74,7 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".codeclimate.yml"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
80
|
- ".travis.yml"
|
@@ -109,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
110
|
version: '0'
|
110
111
|
requirements: []
|
111
112
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.1
|
113
114
|
signing_key:
|
114
115
|
specification_version: 4
|
115
116
|
summary: A tool to help handle UK Ordnance Survey map references, in particular to
|