fedex-web-services 1.1.42 → 1.1.44

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fedex.rb CHANGED
@@ -2,5 +2,5 @@ require "fedex/version"
2
2
  require "fedex/web_services"
3
3
 
4
4
  module Fedex
5
- require 'fedex/railtie' if defined?(Rails)
5
+ require 'fedex/railtie'
6
6
  end
data/lib/fedex/railtie.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  module Fedex
2
2
  class Railtie < Rails::Railtie
3
- railtie_name :fedex
4
-
5
3
  rake_tasks do
6
4
  load "fedex/tasks/fedex.rake"
7
5
  end
data/lib/fedex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fedex
2
- VERSION = "1.1.42"
2
+ VERSION = "1.1.44"
3
3
  end
@@ -25,6 +25,12 @@ module Fedex::WebServices
25
25
  raise "service_id must be implemented by subclasses of Service"
26
26
  end
27
27
 
28
+ def service_url
29
+ (@credentials.environment.to_sym == :production) ?
30
+ 'https://ws.fedex.com:443/web-services' :
31
+ 'https://wsbeta.fedex.com:443/web-services'
32
+ end
33
+
28
34
  protected
29
35
  def port
30
36
  raise "port must be implemented by subclasses of Service"
@@ -4,12 +4,12 @@ module Fedex::WebServices
4
4
  module Service
5
5
  class Rate < Base
6
6
 
7
- def get_rates(service_type, rate_request_type, shipper, recipient, weight, &process_contents)
7
+ def get_rates(service_type, rate_request_type, from, to, weight, &process_contents)
8
8
  request = GetRates.new(self,
9
9
  service_type,
10
10
  rate_request_type,
11
- shipper,
12
- recipient,
11
+ from,
12
+ to,
13
13
  weight
14
14
  )
15
15
 
@@ -33,7 +33,7 @@ module Fedex::WebServices
33
33
 
34
34
  protected
35
35
  def port
36
- RatePortType.new('https://wsbeta.fedex.com:443/web-services')
36
+ RatePortType.new(service_url)
37
37
  end
38
38
  end
39
39
  end
@@ -76,7 +76,7 @@ module Fedex::WebServices
76
76
 
77
77
  protected
78
78
  def port
79
- ShipPortType.new('https://wsbeta.fedex.com:443/web-services')
79
+ ShipPortType.new(service_url)
80
80
  end
81
81
  end
82
82
  end
metadata CHANGED
@@ -1,37 +1,48 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fedex-web-services
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.42
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 75
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 44
10
+ version: 1.1.44
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Brian Abreu
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-04-18 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: soap4r-ruby19
16
- requirement: &70234741411120 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
22
33
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70234741411120
25
- description: Interfaces with the FedEx web services API to look up shipping rates,
26
- generate labels, and cancel shipments
27
- email:
34
+ version_requirements: *id001
35
+ description: Interfaces with the FedEx web services API to look up shipping rates, generate labels, and cancel shipments
36
+ email:
28
37
  - brian@nut.com
29
38
  executables: []
39
+
30
40
  extensions: []
41
+
31
42
  extra_rdoc_files: []
32
- files:
43
+
44
+ files:
33
45
  - lib/fedex/railtie.rb
34
- - lib/fedex/tasks/fedex.rake
35
46
  - lib/fedex/version.rb
36
47
  - lib/fedex/web_services/definitions.rb
37
48
  - lib/fedex/web_services/request/base.rb
@@ -43,28 +54,41 @@ files:
43
54
  - lib/fedex/web_services/service/ship.rb
44
55
  - lib/fedex/web_services.rb
45
56
  - lib/fedex.rb
57
+ has_rdoc: true
46
58
  homepage: https://github.com/brewski/fedex-web-services
47
59
  licenses: []
60
+
48
61
  post_install_message:
49
62
  rdoc_options: []
50
- require_paths:
63
+
64
+ require_paths:
51
65
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
66
+ required_ruby_version: !ruby/object:Gem::Requirement
53
67
  none: false
54
- requirements:
55
- - - ! '>='
56
- - !ruby/object:Gem::Version
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 51
72
+ segments:
73
+ - 1
74
+ - 9
75
+ - 0
57
76
  version: 1.9.0
58
- required_rubygems_version: !ruby/object:Gem::Requirement
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
78
  none: false
60
- requirements:
61
- - - ! '>='
62
- - !ruby/object:Gem::Version
63
- version: '0'
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
64
86
  requirements: []
87
+
65
88
  rubyforge_project: fedex-web-services
66
- rubygems_version: 1.8.10
89
+ rubygems_version: 1.3.7
67
90
  signing_key:
68
91
  specification_version: 3
69
92
  summary: Provies an interface to the FedEx web services API (version 10)
70
93
  test_files: []
94
+
@@ -1,21 +0,0 @@
1
- namespace :fedex do
2
- desc "Generate the ruby definition files from the FedEx wsdl files"
3
- task :generate_definitions do
4
- wsdl_dir = ENV['WSDL_DIR']
5
- if (!Dir.exist?(wsdl_dir || ""))
6
- puts "Set the WSDL_DIR environment variable to location of the Fedex wsdl files"
7
- else
8
- Fedex::WebServices::Definitions.generate_definitions(
9
- File.join(Rails.root, 'lib'),
10
- *Dir.glob(File.join(ENV['WSDL_DIR'], '*.wsdl'))
11
- )
12
-
13
- File.open(File.join(Rails.root, 'config', 'initializers', 'fedex.rb'), "w") do |file|
14
- file.puts "Fedex::WebServices::Definitions.load_definitions('lib')"
15
- end
16
-
17
- puts "Added lib/fedex/web_services/definitions/"
18
- puts "Added config/initializers/fedex.rb"
19
- end
20
- end
21
- end