paypal-frete-facil 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/Rakefile +2 -2
- data/lib/paypal/fretefacil/parser.rb +2 -1
- data/lib/paypal/fretefacil/version.rb +1 -1
- data/lib/paypal/fretefacil/web_service.rb +3 -2
- data/paypal-frete-facil.gemspec +3 -3
- metadata +3 -3
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -18,8 +18,8 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.name = "paypal-frete-facil"
|
19
19
|
gem.homepage = "http://github.com/prodis/paypal-frete-facil"
|
20
20
|
gem.license = "MIT"
|
21
|
-
gem.summary = %Q{Cálculo de frete do Frete Fácil
|
22
|
-
gem.description = %Q{Cálculo de frete
|
21
|
+
gem.summary = %Q{Cálculo de frete do PayPal Frete Fácil.}
|
22
|
+
gem.description = %Q{Cálculo de frete através do PayPal Frete Fácil (http://www.paypal-brasil.com.br/fretefacil).}
|
23
23
|
gem.email = "prodis@gmail.com"
|
24
24
|
gem.authors = ["Prodis a.k.a. Fernando Hamasaki"]
|
25
25
|
gem.version = PayPal::FreteFacil::Version::VERSION
|
@@ -5,7 +5,8 @@ module PayPal
|
|
5
5
|
module FreteFacil
|
6
6
|
class Parser
|
7
7
|
def parse(xml)
|
8
|
-
Nokogiri::XML(xml).xpath("//return").text.to_f
|
8
|
+
value = Nokogiri::XML(xml).xpath("//return").text.to_f
|
9
|
+
Float.instance_method(:round).arity.zero? ? value : value.round(2)
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -6,7 +6,7 @@ module PayPal
|
|
6
6
|
module FreteFacil
|
7
7
|
class WebService
|
8
8
|
URL = "https://ff.paypal-brasil.com.br/FretesPayPalWS/WSFretesPayPal"
|
9
|
-
|
9
|
+
|
10
10
|
def initialize
|
11
11
|
@uri = URI.parse(URL)
|
12
12
|
end
|
@@ -64,7 +64,8 @@ module PayPal
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def format_headers_for(http)
|
67
|
-
|
67
|
+
# I'm using an empty block in each_header method for Ruby 1.8.7 compatibility.
|
68
|
+
http.each_header{}.map { |name, values| "#{name}: #{values.first}" }.join("\n")
|
68
69
|
end
|
69
70
|
|
70
71
|
def with_line_break
|
data/paypal-frete-facil.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{paypal-frete-facil}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Prodis a.k.a. Fernando Hamasaki"]
|
12
12
|
s.date = %q{2011-08-29}
|
13
|
-
s.description = %q{Cálculo de frete
|
13
|
+
s.description = %q{Cálculo de frete através do PayPal Frete Fácil (http://www.paypal-brasil.com.br/fretefacil).}
|
14
14
|
s.email = %q{prodis@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.require_paths = ["lib"]
|
39
39
|
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
40
40
|
s.rubygems_version = %q{1.6.1}
|
41
|
-
s.summary = %q{Cálculo de frete do Frete Fácil
|
41
|
+
s.summary = %q{Cálculo de frete do PayPal Frete Fácil.}
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
44
44
|
s.specification_version = 3
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: paypal-frete-facil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Prodis a.k.a. Fernando Hamasaki
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: *id006
|
82
|
-
description: "C\xC3\xA1lculo de frete
|
82
|
+
description: "C\xC3\xA1lculo de frete atrav\xC3\xA9s do PayPal Frete F\xC3\xA1cil (http://www.paypal-brasil.com.br/fretefacil)."
|
83
83
|
email: prodis@gmail.com
|
84
84
|
executables: []
|
85
85
|
|
@@ -131,6 +131,6 @@ rubyforge_project:
|
|
131
131
|
rubygems_version: 1.6.1
|
132
132
|
signing_key:
|
133
133
|
specification_version: 3
|
134
|
-
summary: "C\xC3\xA1lculo de frete do Frete F\xC3\xA1cil
|
134
|
+
summary: "C\xC3\xA1lculo de frete do PayPal Frete F\xC3\xA1cil."
|
135
135
|
test_files: []
|
136
136
|
|