cargowise-ts 1.0.5 → 1.0.6

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: ee36bddb2993e96151d49ce47ace951e14a72d15
4
- data.tar.gz: 5b1d701bff4aeb1cf819b4fbe8d25a209b80e8d7
3
+ metadata.gz: 9c3576fc83f5d8c42c94b26ad50b1c202ffbf3cb
4
+ data.tar.gz: 3222372862e95bab188a2eb47fc96afa89679ad4
5
5
  SHA512:
6
- metadata.gz: dde7aa8dca38b462722465da2798d330d9345de95626139dbe1cb70a1a17f3a0d8c38ee2aba1de7d6e66258161646feddd39e45cf1727ff17e2dd62b52e48854
7
- data.tar.gz: 593f99f405557ec391bb9f768ce1b7fd8112c76264bf7c0ee89bda1eef5613350de1610df2686755a4f5e627f5f3a5452c1611657095915397863fd135d4bbc4
6
+ metadata.gz: 144f7761f209aafb94ea17b708954038ddb5ab03925b650f37920a61b696b2c7c9e966dd791a675893886674daae166e7ed939cb20e3415644e7ddc40c8c50f0
7
+ data.tar.gz: 9446f502dc09e75afd0570ad864b7157a61352f446545ea6aa77ab9861844e4261034ac8336bc3002ebd31031866ba58f49a958a236fa40b943aede4c405d130
@@ -27,17 +27,17 @@ module CargowiseTS
27
27
 
28
28
  def node_array(path)
29
29
  path = path.gsub("/","/tns:")
30
- node.xpath("#{path}", "tns" => Cargowise::DEFAULT_NS)
30
+ node.xpath("#{path}", "tns" => CargowiseTS::DEFAULT_NS)
31
31
  end
32
32
 
33
33
  def text_value(path)
34
34
  path = path.gsub("/","/tns:")
35
- node.xpath("#{path}/text()", "tns" => Cargowise::DEFAULT_NS).to_s
35
+ node.xpath("#{path}/text()", "tns" => CargowiseTS::DEFAULT_NS).to_s
36
36
  end
37
37
 
38
38
  def attribute_value(path)
39
39
  path = path.gsub(/\/([^@])/u,'/tns:\1')
40
- node.xpath(path, "tns" => Cargowise::DEFAULT_NS).to_s
40
+ node.xpath(path, "tns" => CargowiseTS::DEFAULT_NS).to_s
41
41
  end
42
42
 
43
43
  def time_value(path)
@@ -22,13 +22,13 @@ module CargowiseTS
22
22
  @password = opts[:password]
23
23
  end
24
24
 
25
- # begin an order search. See the docs for Cargowise::OrderSearch for info
25
+ # begin an order search. See the docs for CargowiseTS::OrderSearch for info
26
26
  # on what you can do with the object returned from this method.
27
27
  def orders
28
28
  OrderSearch.new(orders_client)
29
29
  end
30
30
 
31
- # begin a shipment search. See the docs for Cargowise::ShipmentSearch for
31
+ # begin a shipment search. See the docs for CargowiseTS::ShipmentSearch for
32
32
  # info on what you can do with the object returned from this method.
33
33
  def shipments
34
34
  ShipmentSearch.new(shipments_client)
@@ -36,12 +36,12 @@ module CargowiseTS
36
36
 
37
37
  def orders_hello
38
38
  response = orders_client.call(:hello)
39
- response.xpath("//tns:HelloResponse/tns:HelloResult/text()", {"tns" => Cargowise::DEFAULT_NS}).to_s
39
+ response.xpath("//tns:HelloResponse/tns:HelloResult/text()", {"tns" => CargowiseTS::DEFAULT_NS}).to_s
40
40
  end
41
41
 
42
42
  def shipments_hello
43
43
  response = shipments_client.call(:hello)
44
- response.xpath("//tns:HelloResponse/tns:HelloResult/text()", {"tns" => Cargowise::DEFAULT_NS}).to_s
44
+ response.xpath("//tns:HelloResponse/tns:HelloResult/text()", {"tns" => CargowiseTS::DEFAULT_NS}).to_s
45
45
  end
46
46
 
47
47
  # Find the base URI for the web interface at this client
@@ -75,7 +75,7 @@ module CargowiseTS
75
75
  )
76
76
  end
77
77
 
78
- # TODO: make some of these configurable via the initialize to Cargowise::Client. Will enable
78
+ # TODO: make some of these configurable via the initialize to CargowiseTS::Client. Will enable
79
79
  # providers that need special treatment to work (like OHL) to be configured differently
80
80
  # by the calling code
81
81
  def build_client(wsdl_path, endpoint_uri)
@@ -92,19 +92,19 @@ module CargowiseTS
92
92
  @consols.map { |con| con.transport_mode }.uniq.sort.join(" ")
93
93
  end
94
94
 
95
- # lookup full Cargowise::Order objects for each order on this shipment.
95
+ # lookup full CargowiseTS::Order objects for each order on this shipment.
96
96
  #
97
- # client is a Cargowise::Client instance to look for the related shipments on
97
+ # client is a CargowiseTS::Client instance to look for the related shipments on
98
98
  #
99
99
  def orders(client)
100
100
  @orders ||= client.orders.by_shipment_number(self.number)
101
101
  end
102
102
 
103
- # lookup related Cargowise::Shipment objects. These are usually "child" shipments
103
+ # lookup related CargowiseTS::Shipment objects. These are usually "child" shipments
104
104
  # grouped under a parent. Think a consolidated pallet (the parent) with cartons from
105
105
  # multiple suppliers (the children).
106
106
  #
107
- # client is a Cargowise::Client instance to look for the related shipments on
107
+ # client is a CargowiseTS::Client instance to look for the related shipments on
108
108
  #
109
109
  def related_shipments(client)
110
110
  @related ||= @consols.map { |consol|
@@ -121,7 +121,7 @@ module CargowiseTS
121
121
  # This data isn't available via the API, so we need to screen scrape the
122
122
  # website to get it.
123
123
  #
124
- # client is a Cargowise::Client instance to look for the related shipments on
124
+ # client is a CargowiseTS::Client instance to look for the related shipments on
125
125
  #
126
126
  def order_ref(client)
127
127
  if client.base_uri
@@ -142,7 +142,7 @@ module CargowiseTS
142
142
  login_uri = client.base_uri + "/Login/Login.aspx"
143
143
  agent = Mechanize.new
144
144
  agent.agent.http.ssl_version = :TLSv1
145
- if File.file?(Cargowise::CA_CERT_FILE)
145
+ if File.file?(CargowiseTS::CA_CERT_FILE)
146
146
  agent.agent.http.ca_file = CA_CERT_FILE
147
147
  end
148
148
  page = agent.get(login_uri)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cargowise-ts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy