paypal-frete-facil 0.1.0 → 0.1.1

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/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = paypal-frete-facil
2
2
 
3
- Cálculo de frete através do PayPal Frete Fácil (http://www.paypal-brasil.com.br/fretefacil/).
3
+ Cálculo de frete através do PayPal Frete Fácil (http://www.paypal-brasil.com.br/fretefacil).
4
4
 
5
5
  == Instalando
6
6
 
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 do PayPal.}
22
- gem.description = %Q{Cálculo de frete utilizando o Web Service do Frete Fácil do PayPal.}
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.round(2)
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
@@ -4,7 +4,7 @@ module PayPal
4
4
  module Version
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
- PATCH = 0
7
+ PATCH = 1
8
8
  VERSION = [MAJOR, MINOR, PATCH].join(".")
9
9
  end
10
10
  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
- http.each_header.map { |name, value| "#{name}: #{value}" }.join("\n")
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
@@ -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.0"
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 utilizando o Web Service do Frete Fácil do PayPal.}
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 do PayPal.}
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.0
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 utilizando o Web Service do Frete F\xC3\xA1cil do PayPal."
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 do PayPal."
134
+ summary: "C\xC3\xA1lculo de frete do PayPal Frete F\xC3\xA1cil."
135
135
  test_files: []
136
136