corraios 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/corraios/containers/base.rb +3 -3
- data/lib/corraios/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 196ee11a69202ae51f04d9efeec75e0cf4067161
|
|
4
|
+
data.tar.gz: 955e149bb04da4c60e41ef1124623d83280f8410
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aad9202ca9285bedfaf5e548959be8c127adc4c1584445435ce480dcc4bc3a183febaa36bd9be119fbf140b61d6b8901e7f174813961323d2fe96ac7eaddb5d1
|
|
7
|
+
data.tar.gz: cf74d20b36ba8499c04b5f68e1cf6c28072e0fb34c5870fe4f8b08f45cb280566a2c2990ee9bd793d4141971d1a4393b986b7a608b4dc68fc023dc7e08039b0e
|
data/.gitignore
CHANGED
|
@@ -11,7 +11,7 @@ module Corraios
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def is_a?(type)
|
|
14
|
-
self.class.name.split('::').last.
|
|
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
|
data/lib/corraios/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|