what3words 2.0.1 → 2.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8bb59aca6fc868de0c381fdc1985b8f3e8650fe
4
- data.tar.gz: c307fad087e52b9ff5c0db79a76e6e6bccb62ee8
3
+ metadata.gz: d4c22f807a8ebff83ea87e226c85846951199aaa
4
+ data.tar.gz: 8e9faf2c74142a8d30fd7124ec820a4e4b87030c
5
5
  SHA512:
6
- metadata.gz: 213c3045d96f526edd78a59b0edc82cbbaab3a5f8f6549d21d9436c8b8d311dc416f567a91dbc71f42dd69118ca3bf76bf46b56a9e0f86eda407e4800f7c52f6
7
- data.tar.gz: 20b182fadf5e36dde86988a48c81eaec52b1fc1dba6e06bb521c637e40e3882479460f3ba3843f45edf0a87ccf09c1cf2c73fb03975dd24b18be0e8b50a36e65
6
+ metadata.gz: f283b98f80fac9716851c376cb96bfddcb73ade2cfaa56a5650b81f2ebbb504357869a67f6612064fa00bff910926fc94eeab1946b96d08b05dacf6f45a00f6c
7
+ data.tar.gz: d750ac94c3c200a81cde4654a7efc3b63c641afbfdc7599415aeb9def39b07e2a9ffec78ce8b7f39b0fb789eca80638085cc82f3c8f7516f4e0956ec870e864a
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2
4
+ script: rake spec
5
+ notifications:
6
+ slack:
7
+ secure: DvejcrOH6RdAdrGEPLUrnia9cES8iCHVlVSFAMwx2vaR/I3T9bfUiHnb3VHfiqx4cvDL+9wT3opG0sZkUCFJGqzA3E//VObKNXjwUFCUptFG68qgR7LZ3vDatWlUqU+32gWeYaHM3FpNP2E/IARjphaiF3jRUZbronqVzJZN2MbMsUYBeGq7v0AaLkgbxVgOWtBnMVcBPOnarEJqHyJlqQ2unYnIy+GNoOFtPMPNZobYTf0zxrycldYpP937yT4CTsY3I7RxuEtnY2sPYW+eFBESGLg6EfnjeOruROY+b9cSHIh1Qzr7Oup6a+oQ3+vCvLbYsGpEO04RTeTTtOGc7aRlUylmvuFPi7qQwOTZ+4KD5aIBh4p7bQiPfvAeqDU4pVJxPHHZirgjFpUpAvofj48SvDgwX9cFyAhAlDZ9qBOctmhphW9KNkcAW4MY421AdVAjFWwc5CU8G5oPdKcyWam3ZB3nHwKgZm6LLAcZgbG0rjZT+iPeQBvTKH3kPx7E1CkxZNkEralHJ3l+bDwY3GdzsgcMpT3bWNl3pLszFzgXljDScMU8my1+xjDQINEnI3TCJA4MhKkzYkRgfrEBkgPb2SiF7qnhbyMzSFbCU4jsM1MLQZolNG9EsjsxJLuL4YTC2wKOHajViUUeaCNIcNU5UXBQuit93RyMu7RrLRM=
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # ![what3words](https://map.what3words.com/images/map/marker-border.png)what3words Ruby wrapper
2
+ ![Build Status](https://travis-ci.org/what3words/w3w-ruby-wrapper.svg?branch=master)
2
3
 
3
4
  Use the what3words API in your Ruby app (see http://developer.what3words.com/api)
4
5
 
@@ -136,11 +137,14 @@ See http://developer.what3words.com for the original API call documentation
136
137
 
137
138
  ### Testing
138
139
 
139
- Prerequisite : we are using [bundler](https://rubygems.org/gems/bundler)
140
- `$ gem install bundler`
140
+ * Prerequisite : we are using [bundler](https://rubygems.org/gems/bundler) `$ gem install bundler`
141
141
 
142
+ * W3W-API-KEY : For safe storage of your API key on your computer, you can define that API key using your system’s environment variables.
143
+ ```bash
144
+ $ export W3W_API_KEY=<Secret API Key>
145
+ ```
146
+
147
+ * on you cloned folder
142
148
  1. `$ cd w3w-ruby-wrapper`
143
149
  1. `$ bundle update`
144
150
  1. `$ rake spec`
145
- 1. Mock Unit specs require no set up. Look in `spec/mock/`
146
- 1. Integration specs that hit the API directly are in `spec/what3words`, and need the file `spec/config.yaml` to be filled in (using `spec/config.sample.yaml` as a template) with valid details.
@@ -1,3 +1,3 @@
1
1
  module What3Words
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
@@ -1,2 +1 @@
1
- ---
2
- api_key: APIKEY
1
+ # config.sample.yaml
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require "spec_helper"
4
- require "yaml"
5
4
 
6
5
  describe What3Words::API, "integration", :integration => true do
7
6
 
@@ -9,15 +8,7 @@ describe What3Words::API, "integration", :integration => true do
9
8
  WebMock.allow_net_connect!
10
9
  end
11
10
 
12
- let!(:config) do
13
- file = "spec/config.yaml"
14
- if ! File.exist? file
15
- raise "Add a file #{file} (use spec/config.sample.yaml as a template) with correct values to run integration specs"
16
- end
17
- YAML.load_file file
18
- end
19
-
20
- let(:api_key) { config["api_key"] }
11
+ let(:api_key) { ENV["W3W_API_KEY"] }
21
12
 
22
13
  let(:w3w) { described_class.new(:key => api_key) }
23
14
 
@@ -76,35 +67,42 @@ describe What3Words::API, "integration", :integration => true do
76
67
  end
77
68
  describe "autosuggest" do
78
69
  it "simple addr" do
79
- result = w3w.autosuggest "trop.caler.perdre", "fr"
70
+ # result =
71
+ w3w.autosuggest "trop.caler.perdre", "fr"
80
72
  end
81
73
 
82
74
  it "with focus" do
83
- result = w3w.autosuggest "disclose.strain.redefin", "en", [29.567041, 106.587875]
75
+ # result =
76
+ w3w.autosuggest "disclose.strain.redefin", "en", [29.567041, 106.587875]
84
77
  end
85
78
 
86
79
  it "with clipping radius around focus" do
87
- result = w3w.autosuggest "disclose.strain.redefin", "en", [29.567041, 106.587875], "focus(10)"
80
+ # result =
81
+ w3w.autosuggest "disclose.strain.redefin", "en", [29.567041, 106.587875], "focus(10)"
88
82
  end
89
83
 
90
84
  end
91
85
  describe "standardblend" do
92
86
  it "simple addr" do
93
- result = w3w.standardblend "trop.caler.perdre", "fr"
87
+ # result =
88
+ w3w.standardblend "trop.caler.perdre", "fr"
94
89
  end
95
90
 
96
91
  it "with focus" do
97
- result = w3w.standardblend "disclose.strain.redefin", "en", [29.567041, 106.587875]
92
+ # result =
93
+ w3w.standardblend "disclose.strain.redefin", "en", [29.567041, 106.587875]
98
94
  end
99
95
  end
100
96
  describe "grid" do
101
97
  it "string input" do
102
- result = w3w.grid "52.208867,0.117540,52.207988,0.116126"
98
+ # result =
99
+ w3w.grid "52.208867,0.117540,52.207988,0.116126"
103
100
  end
104
101
  end
105
102
  describe "languages" do
106
103
  it "gets all languages" do
107
- result = w3w.languages
104
+ # result =
105
+ w3w.languages
108
106
  end
109
107
  end
110
108
 
data/spec/spec_helper.rb CHANGED
@@ -5,11 +5,3 @@ Bundler.setup
5
5
  require "webmock/rspec"
6
6
 
7
7
  require "what3words"
8
-
9
- # RSpec.configure do |config|
10
- # # config.filter_run_excluding :integration => true
11
- #
12
- # config.before(:all) do
13
- # WebMock.disable_net_connect!
14
- # end
15
- # end
data/what3words.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "rest-client", "~> 1.8"
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.12"
23
+ spec.add_development_dependency "bundler", ">= 1.7.9"
24
24
  spec.add_development_dependency "rake", "~> 11.1"
25
25
  spec.add_development_dependency "rspec", "~> 3.4"
26
26
  spec.add_development_dependency "webmock", "~> 2.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: what3words
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - what3words
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-24 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.12'
33
+ version: 1.7.9
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.12'
40
+ version: 1.7.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".editorconfig"
91
91
  - ".gitignore"
92
+ - ".travis.yml"
92
93
  - Gemfile
93
94
  - LICENSE.txt
94
95
  - README.md