imasei 0.1.6 → 0.1.7

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: d98cb3ac2fe36f637b25223033707fc8396df6d0
4
- data.tar.gz: 0db31f0c0a94f184cbdcc7ed08df279f9c075ff7
3
+ metadata.gz: 1416ee05354605149be4b5066a0b98839a1b04e4
4
+ data.tar.gz: 01288baa47645ae510d171d49f1ae9e77279053f
5
5
  SHA512:
6
- metadata.gz: 366b9432c37e27a4c4db8b3497221fab92dfd3697e754c9a9471be30c007320231d3d8d6cde14dcd7adaddf2481c8bbce49f6cca42ea43f46fd6e2a0e0cd42a5
7
- data.tar.gz: 59c07dbdbf9f0b92b1fa6cd1b374f9d69d30c867bf9745739f0172b6d2393e72e6ec72131e69d1b7a981f052a7d612e90d94b699a83090594124726906783ad1
6
+ metadata.gz: dcdfd4bebfc544b567eacb93a927c0d66f0000b5167517669dbf17b6a3a3874439eb6c65200ae4604c97b31936a3012f9d45092827488feecd0410839982899e
7
+ data.tar.gz: e7a8d32d2a327e52c2e66368002e9c76074e4eb92505cc3862f8e8bf225d94acbc7a56bcc09fb87fab267f08e52b499e32d73a7117d8dacbe3f86c06c30ffd12
data/README.md CHANGED
@@ -7,7 +7,7 @@ Esta gem facilita o acesso ao webservice do SEI!. Ela possui a implementação d
7
7
  Adicione esta linha no Gemfile da sua aplicação:
8
8
 
9
9
  ```ruby
10
- gem 'wssei'
10
+ gem 'imasei'
11
11
  ```
12
12
 
13
13
  E execute:
@@ -16,7 +16,7 @@ E execute:
16
16
 
17
17
  Ou instale através do seguinte comando:
18
18
 
19
- $ gem install wssei
19
+ $ gem install imasei
20
20
 
21
21
  ## Uso
22
22
 
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "wssei"
4
+ require "imasei"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -25,7 +25,8 @@ module Imasei
25
25
  end
26
26
 
27
27
  def data(data)
28
- @data = data.strftime('%d/%m/%Y') rescue nil
28
+ #@data = data.strftime('%d/%m/%Y') rescue nil
29
+ @data = data.to_datetime.strftime('%d/%m/%Y') rescue nil
29
30
  self
30
31
  end
31
32
 
@@ -72,15 +73,27 @@ module Imasei
72
73
  end
73
74
 
74
75
  def conteudo(conteudo)
75
- @conteudo = Base64.strict_encode64(conteudo)
76
+ if conteudo.nil?
77
+ conteudo = ''
78
+ end
79
+ if @tipo == 'R' && @conteudo_raw.present?
80
+ @conteudo = @conteudo_raw
81
+ else
82
+ @conteudo = Base64.strict_encode64(conteudo)
83
+ end
76
84
  self
77
85
  end
78
86
 
79
87
  def conteudo_mtom(conteudo_mtom)
80
- @conteudo_mtom = File.read(conteudo_mtom)
88
+ @conteudo_mtom = Base64.strict_encode64(File.read(conteudo_mtom))
81
89
  self
82
90
  end
83
91
 
92
+ def conteudo_raw(conteudo_raw)
93
+ @conteudo_raw = conteudo_raw
94
+ self
95
+ end
96
+
84
97
  def nivel_de_acesso(nivel_de_acesso)
85
98
  @nivel_de_acesso = nivel_de_acesso
86
99
  self
@@ -1,3 +1,3 @@
1
1
  module Imasei
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imasei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Soares feat Leandro Telles
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-20 00:00:00.000000000 Z
11
+ date: 2017-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler