copa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +6 -0
- data/Rakefile +11 -0
- data/copa.gemspec +21 -0
- data/lib/copa.rb +8 -0
- data/lib/copa/action.rb +38 -0
- data/lib/copa/nokogiri.rb +13 -0
- data/lib/copa/version.rb +3 -0
- data/test/fixtures/ola-mundo.html +2200 -0
- data/test/test_action.rb +35 -0
- data/test/test_copa.rb +8 -0
- data/test/test_helper.rb +6 -0
- metadata +82 -0
data/test/test_action.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'test_helper'
|
3
|
+
require 'copa'
|
4
|
+
|
5
|
+
class ActionTest < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
@action = Copa::Action.new("ola-mundo")
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_url
|
11
|
+
assert_equal "http://www.copatransparente.gov.br/portalCopa/acoes/ola-mundo", @action.url
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_type
|
15
|
+
assert_equal "Obras / Serviços de engenharia", @action.type
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_justification
|
19
|
+
assert_equal "Construção de Arena multiuso, voltada à realização dos jogos da Copa das Confederações de 2013 e da Copa do Mundo de 2014, em atendimento aos requisitos técnicos do Caderno de Encargos da FIFA.", @action.justification
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_price
|
23
|
+
assert_equal "R$ 591.711.185,00", @action.price
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_state
|
27
|
+
assert_equal "BA", @action.state
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_city
|
31
|
+
assert_equal "BA", @action.city
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
data/test/test_copa.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: copa
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Duke
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-12-05 00:00:00 -02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: API in Ruby to acess data of copatransparente.org.br
|
23
|
+
email:
|
24
|
+
- duke@uberduke.com
|
25
|
+
executables: []
|
26
|
+
|
27
|
+
extensions: []
|
28
|
+
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- Rakefile
|
35
|
+
- copa.gemspec
|
36
|
+
- lib/copa.rb
|
37
|
+
- lib/copa/action.rb
|
38
|
+
- lib/copa/nokogiri.rb
|
39
|
+
- lib/copa/version.rb
|
40
|
+
- test/fixtures/ola-mundo.html
|
41
|
+
- test/test_action.rb
|
42
|
+
- test/test_copa.rb
|
43
|
+
- test/test_helper.rb
|
44
|
+
has_rdoc: true
|
45
|
+
homepage: https://github.com/emersonvinicius/copa
|
46
|
+
licenses: []
|
47
|
+
|
48
|
+
post_install_message:
|
49
|
+
rdoc_options: []
|
50
|
+
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
hash: 3
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
version: "0"
|
71
|
+
requirements: []
|
72
|
+
|
73
|
+
rubyforge_project: copa
|
74
|
+
rubygems_version: 1.6.2
|
75
|
+
signing_key:
|
76
|
+
specification_version: 3
|
77
|
+
summary: API to copatransparente.org.br
|
78
|
+
test_files:
|
79
|
+
- test/fixtures/ola-mundo.html
|
80
|
+
- test/test_action.rb
|
81
|
+
- test/test_copa.rb
|
82
|
+
- test/test_helper.rb
|