corraios 0.0.1 → 0.0.2

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: 2dc25cea9a5e60dde42ce515603aec5bba1f5fb7
4
- data.tar.gz: 9d93c867ec259333d5d903d00cb623e9dfd6fe2c
3
+ metadata.gz: 196ee11a69202ae51f04d9efeec75e0cf4067161
4
+ data.tar.gz: 955e149bb04da4c60e41ef1124623d83280f8410
5
5
  SHA512:
6
- metadata.gz: 6c8da3d01efd11ccc24374cc9fbd177ed4b5f7aaaaafdf8b05f171876395316469c70886b8c71528fa217ee0cf642c234b94b7676e267423ea633c2305291971
7
- data.tar.gz: bf379ef78277aaeae26d891430b78b58ed5ac898fe2f855b93a911749d5a9f44d24cb6b457c363a8e73017cb1cdbf773a09405bac5bd412bd7457905fc8f1a12
6
+ metadata.gz: aad9202ca9285bedfaf5e548959be8c127adc4c1584445435ce480dcc4bc3a183febaa36bd9be119fbf140b61d6b8901e7f174813961323d2fe96ac7eaddb5d1
7
+ data.tar.gz: cf74d20b36ba8499c04b5f68e1cf6c28072e0fb34c5870fe4f8b08f45cb280566a2c2990ee9bd793d4141971d1a4393b986b7a608b4dc68fc023dc7e08039b0e
data/.gitignore CHANGED
@@ -12,4 +12,5 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
- .ruby-*
15
+ .ruby-*
16
+ corraios-*.gem
@@ -11,7 +11,7 @@ module Corraios
11
11
  end
12
12
 
13
13
  def is_a?(type)
14
- self.class.name.split('::').last.underscore.to_sym == type
14
+ self.class.name.split('::').last.downcase.to_sym == type
15
15
  end
16
16
 
17
17
  def to_package
@@ -20,7 +20,7 @@ module Corraios
20
20
 
21
21
  def to_query_params
22
22
  attributes_names.map do |attr|
23
- "#{self.class.query_attribute_name(attr)}=#{send(attr)}"
23
+ "#{self.class.query_attribute_name(attr)}=#{send(attr).round(2).to_s.gsub('.', ',')}"
24
24
  end.join('&') + "&nCdFormato=#{format}"
25
25
  end
26
26
 
@@ -34,7 +34,7 @@ module Corraios
34
34
 
35
35
  class << self
36
36
 
37
- def add_attribute name, restrictions, query_attribute_name = nil
37
+ def add_attribute name, restrictions, query_attribute_name = nil, round_value = true
38
38
  attributes_restrictions[name] = restrictions
39
39
  query_attribute_names[name] = query_attribute_name
40
40
  attr_accessor name
@@ -1,3 +1,3 @@
1
1
  module Corraios
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corraios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Ra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty