zanders 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdcfd0ece2d13153f3ce02b62cfdf22630851fe7
4
- data.tar.gz: 62c47e6ac2998cb93e32f14b1b09e5b26613d548
3
+ metadata.gz: 269b12e1e124d14cf438fb40a13b30ae9c435eb7
4
+ data.tar.gz: 458ec56b48e881fcae15e08d97fc8701593e6545
5
5
  SHA512:
6
- metadata.gz: c07356d01695da4d69a2b1a9b12868fe18e2390cbb24cfdb824085d411a56c8c5c9fc2242074f4e5711c4a148c4402ba68e2a998ad9663634b0f1309828f66a0
7
- data.tar.gz: 870ff7fce372ac32d394d187982d2287bf747e60ec641360e40155b6beaa80252f50366c9f085fb715b7386422d62c7be4a53517759fc028a77678124a03c690
6
+ metadata.gz: 56afce793cf465d7ca30052688ef44b69f6f13bfe36f02388d656fe6c715976bb7140973614ecd599d7f27d049965f432a62522631fb60536cb9b991c9e009b4
7
+ data.tar.gz: 487a7835f118e60692788d3bd332d2ba4cf2f0988c2333ba2bf6f03709f749c8aa85612d0763f479b9f649f3cebd42b86fc70c3ffb521ed3e5d32e6c83d078d7
@@ -44,7 +44,6 @@ module Zanders
44
44
 
45
45
  # We only need the ship_to_number out of the data received
46
46
  ship_to_number[:ship_to_number] = parts.find { |i| i[:key] == "ShipToNo" }[:value]
47
-
48
47
  ship_to_number[:success] = true
49
48
 
50
49
  ship_to_number
data/lib/zanders/base.rb CHANGED
@@ -6,6 +6,7 @@ module Zanders
6
6
 
7
7
  Net::FTP.open(Zanders.config.ftp_host, options[:username], options[:password]) do |ftp|
8
8
  ftp.passive = true
9
+
9
10
  yield ftp
10
11
  end
11
12
  rescue Net::FTPPermError
@@ -1,8 +1,8 @@
1
1
  module Zanders
2
2
  class Inventory < Base
3
3
 
4
- INVENTORY_FILENAME = "zandersinv.csv"
5
- QUANTITY_FILENAME = "liveinv.csv"
4
+ INVENTORY_FILENAME = "zandersinv.csv"
5
+ QUANTITY_FILENAME = "liveinv.csv"
6
6
 
7
7
  def initialize(options = {})
8
8
  requires!(options, :username, :password)
data/lib/zanders/item.rb CHANGED
@@ -77,8 +77,7 @@ module Zanders
77
77
 
78
78
  # We only need the quantity out of the data received
79
79
  quantity[:quantity] = response.find { |i| i[:key] == "numberAvailable" }[:value]
80
-
81
- quantity[:success] = true
80
+ quantity[:success] = true
82
81
 
83
82
  quantity
84
83
  else
data/lib/zanders/order.rb CHANGED
@@ -169,6 +169,15 @@ module Zanders
169
169
  hash
170
170
  end
171
171
 
172
+ # Private: Formats the name and phone number into a
173
+ # string that is 80 characters long, with the first
174
+ # 40 being the name, and the last being the phone
175
+ # number. (This is the required format from Zanders
176
+ #
177
+ # name - A String of the name
178
+ # phone_number - A string containing the phone number
179
+ #
180
+ # Returns a String(80) of the name and phone number
172
181
  def format_shipping_instructions(name, phone_number)
173
182
  shipping_instructions = "%-40.40s" % name
174
183
  shipping_instructions += phone_number
@@ -1,3 +1,3 @@
1
1
  module Zanders
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
data/lib/zanders.rb CHANGED
@@ -2,8 +2,6 @@ require "zanders/version"
2
2
 
3
3
  require 'net/ftp'
4
4
  require 'savon'
5
- # TODO-david
6
- require 'pp'
7
5
 
8
6
  require 'zanders/base'
9
7
  require 'zanders/soap_client'
@@ -16,7 +14,7 @@ require 'zanders/inventory'
16
14
 
17
15
  module Zanders
18
16
 
19
- DEBUG = true
17
+ DEBUG = false
20
18
 
21
19
  ADDRESS_API_URL = 'https://shop2.gzanders.com/webservice/shiptoaddresses?wsdl'
22
20
  ORDER_API_URL = 'https://shop2.gzanders.com/webservice/orders?wsdl'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zanders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Knight
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-20 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri