processo_utilities 0.0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 20e8b740bb96677918d0d137d087f2a2e928d907
4
+ data.tar.gz: 2a0bc46cf8fe9f6d498ce6fc7feedbf92c8fd6d9
5
+ SHA512:
6
+ metadata.gz: f48f83255a596a421b354d264f98c4e3ad0a1417870027d5d89c11e5fcff29b841090f0e757c78f37249bc75466ae174a69017196e059e7b1dddd5732d72ccda
7
+ data.tar.gz: 73891ccfb57039436ec01a9a73b984053a5c162fb7569c5ddbb418e6469b7e374d0e2fb7744b2df388b2527413b7ab2fc554e10dad77e51df2f9143f2cb3e906
data/README.rdoc ADDED
File without changes
@@ -0,0 +1,12 @@
1
+ module ProcessoUtilities
2
+ class ProcessoFormatter
3
+ def self.remove_formatacao(processo)
4
+ processo.gsub(/[-\. ]/, '')
5
+ end
6
+
7
+ def self.insere_formatacao(processo)
8
+ processo.insert(16, '.').insert(14, '.').insert(13, '.').insert(9, '.').insert(7, '-')
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1 @@
1
+ require 'processo/processo_formatter'
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'processo/processo_formatter'
3
+
4
+
5
+ describe ProcessoUtilities::ProcessoFormatter do
6
+ it "remove a formatação do processo" do
7
+ expect(ProcessoUtilities::ProcessoFormatter.remove_formatacao("080 00.123-50.76-43")).to eql("08000123507643")
8
+ end
9
+
10
+ it "insere a formatação do processo" do
11
+ expect(ProcessoUtilities::ProcessoFormatter.insere_formatacao("00088903820135040000")).to eql("0008890-38.2013.5.04.0000")
12
+ end
13
+
14
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: processo_utilities
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - João Adolfo Froede Lutz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Processo Utilities
14
+ email: jaflutz@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - README.rdoc
20
+ - lib/processo_utilities.rb
21
+ - lib/processo/processo_formatter.rb
22
+ - spec/processo/processo_formatter_spec.rb
23
+ homepage: http://github.com/jaflutz
24
+ licenses: []
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.1.3
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Processo Utilities
46
+ test_files: []