binarylogic-shippinglogic 1.0.5 → 1.0.6
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.
- data/CHANGELOG.rdoc +4 -0
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/shippinglogic/fedex/attributes.rb +1 -0
- data/lib/shippinglogic/fedex/service.rb +5 -0
- data/shippinglogic.gemspec +3 -3
- data/spec/fedex/attributes_spec.rb +17 -0
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "shippinglogic"
|
8
8
|
gem.summary = "A simple and clean library to interface with shipping carriers"
|
9
|
-
gem.description = "
|
9
|
+
gem.description = "Easily use FedEx, UPS, USPS web services with an elegant and simple syntax."
|
10
10
|
gem.email = "bjohnson@binarylogic.com"
|
11
11
|
gem.homepage = "http://github.com/binarylogic/shippinglogic"
|
12
12
|
gem.authors = ["Ben Johnson of Binary Logic"]
|
data/VERSION.yml
CHANGED
@@ -31,6 +31,11 @@ module Shippinglogic
|
|
31
31
|
target.send(name, *args, &block)
|
32
32
|
end
|
33
33
|
|
34
|
+
# Allows the cached response to be reset, specifically when an attribute changes
|
35
|
+
def reset_target
|
36
|
+
@target = nil
|
37
|
+
end
|
38
|
+
|
34
39
|
# For each service you need to overwrite this method. This is where you make the call to fedex
|
35
40
|
# and do your magic. See the child classes for examples on how to define this method. It is very
|
36
41
|
# important that you cache the result into a variable to avoid uneccessary requests.
|
data/shippinglogic.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{shippinglogic}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Johnson of Binary Logic"]
|
12
|
-
s.date = %q{2009-08-
|
13
|
-
s.description = %q{
|
12
|
+
s.date = %q{2009-08-09}
|
13
|
+
s.description = %q{Easily use FedEx, UPS, USPS web services with an elegant and simple syntax.}
|
14
14
|
s.email = %q{bjohnson@binarylogic.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
@@ -38,4 +38,21 @@ describe "FedEx Attributes" do
|
|
38
38
|
rates = new_fedex.rate
|
39
39
|
rates.ship_time.to_s.should == Time.now.to_s
|
40
40
|
end
|
41
|
+
|
42
|
+
it "should reset the cached response if an attribute changes" do
|
43
|
+
use_response(:rate_defaults)
|
44
|
+
|
45
|
+
fedex = new_fedex
|
46
|
+
rates = fedex.rate
|
47
|
+
rates.attributes = fedex_shipper
|
48
|
+
rates.attributes = fedex_recipient
|
49
|
+
rates.attributes = fedex_package
|
50
|
+
rates.size.should == 6
|
51
|
+
|
52
|
+
use_response(:rate_non_custom_packaging)
|
53
|
+
|
54
|
+
rates.packaging_type = "FEDEX_ENVELOPE"
|
55
|
+
rates.package_weight = 0.1
|
56
|
+
rates.size.should == 5
|
57
|
+
end
|
41
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binarylogic-shippinglogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 0.4.4
|
44
44
|
version:
|
45
|
-
description:
|
45
|
+
description: Easily use FedEx, UPS, USPS web services with an elegant and simple syntax.
|
46
46
|
email: bjohnson@binarylogic.com
|
47
47
|
executables: []
|
48
48
|
|