fedex_location_service 0.2.0 → 0.3.0
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 +4 -4
- data/README.md +14 -2
- data/bin/console +7 -8
- data/fedex_location_service.gemspec +1 -0
- data/lib/fedex_location_service/request.rb +1 -1
- data/lib/fedex_location_service/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 218e8c66cf2caf2aea9d44a75d13009b9d1671d0fc93d29118ae7eea81940ae2
|
4
|
+
data.tar.gz: b707b292cc9e5da7555921371a09733fa1a509e50398d1e01beb0b2112de120a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e33c0bf49982055240980f8a96b5c645c80d18c8bcce5f594626c10b5936637ea9d01118f68f40dc13468d538a8234cb4cd42bcd2b238bf6b9d04300f1d93e16
|
7
|
+
data.tar.gz: 906595cdc98eb8924270d52b928e9d3a7de7d194348465ed37477bbe4c5ecd96e7a49c91d9ee83246e4ce697f2b08dca9738dcfbf5327637739b6ffb5ad882ee
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ In order to build a message to pass to the FedEx API you will need to create an
|
|
42
42
|
* state
|
43
43
|
* postal_code
|
44
44
|
|
45
|
-
This can be done with a Struct or with active_record
|
45
|
+
This can be done with a Struct or with active_record model. This can then be passed to FedexLocationService::Message.build() to generate the proper SOAP message.
|
46
46
|
|
47
47
|
Example:
|
48
48
|
|
@@ -62,6 +62,16 @@ response = FedexLocationService::Request.call(message)
|
|
62
62
|
|
63
63
|
This will return a Savon::Response object that you can parse.
|
64
64
|
|
65
|
+
The FedEx Location Service API will return a status of 'SUCCESS' if locations have been found for the address provided in the message.
|
66
|
+
|
67
|
+
The FedEx Location Service API will return a status of 'ERROR' if no locations have been found for the address provided in the message.
|
68
|
+
|
69
|
+
The method will rescue from any Savon::SOAPFault exception and return a hash that consists of:
|
70
|
+
|
71
|
+
* :cause
|
72
|
+
* :code
|
73
|
+
* :desc
|
74
|
+
|
65
75
|
Included is a FedexLocationService::Locations.call() method that will extract the first 5 closest locations and return the addresses, distance and a map image.
|
66
76
|
|
67
77
|
```ruby
|
@@ -80,6 +90,8 @@ locations.first =
|
|
80
90
|
}
|
81
91
|
```
|
82
92
|
|
93
|
+
For convenience there are both production and test .wsdl files located in the the spec/doc directory for the version of the FedEx Web Services Location Service version (currently Version 7) that this gem is tested against.
|
94
|
+
|
83
95
|
## Development
|
84
96
|
|
85
97
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -88,7 +100,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
88
100
|
|
89
101
|
## Contributing
|
90
102
|
|
91
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/odin/
|
103
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/odin/fedex_location_service/issues.
|
92
104
|
|
93
105
|
## License
|
94
106
|
|
data/bin/console
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
|
-
require "
|
4
|
+
require "fedex_location_service"
|
5
|
+
require 'dotenv/load'
|
5
6
|
|
6
|
-
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
7
|
+
Bundler.require
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
# Pry.start
|
9
|
+
require_relative '../spec/support/address.rb'
|
10
|
+
require_relative '../spec/support/fedex_location_service_config.rb'
|
12
11
|
|
13
|
-
require "
|
14
|
-
|
12
|
+
require "pry"
|
13
|
+
Pry.start
|
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'guard-rspec'
|
40
40
|
spec.add_development_dependency 'webmock'
|
41
41
|
spec.add_development_dependency 'vcr'
|
42
|
+
spec.add_development_dependency 'rubocop'
|
42
43
|
spec.add_development_dependency 'simplecov'
|
43
44
|
|
44
45
|
spec.add_dependency 'savon'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fedex_location_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- odin - (Casey Ellett)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: simplecov
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|