correios-sro-xml 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/.gitignore +25 -0
  2. data/CHANGELOG.rdoc +14 -8
  3. data/Gemfile +1 -12
  4. data/README.rdoc +181 -35
  5. data/Rakefile +13 -35
  6. data/correios-sro-xml.gemspec +24 -80
  7. data/lib/correios-sro-xml.rb +4 -4
  8. data/lib/correios/sro.rb +11 -0
  9. data/lib/correios/sro/destination.rb +16 -0
  10. data/lib/correios/sro/event.rb +31 -0
  11. data/lib/correios/sro/object.rb +13 -0
  12. data/lib/correios/sro/parser.rb +5 -5
  13. data/lib/correios/sro/tracker.rb +43 -0
  14. data/lib/correios/sro/version.rb +1 -6
  15. data/lib/correios/sro/web_service.rb +64 -11
  16. data/misc/correios_sro_xml_manual_v1.5.pdf +0 -0
  17. data/spec/correios/sro/event_spec.rb +15 -0
  18. data/spec/correios/sro/parser_spec.rb +44 -44
  19. data/spec/correios/sro/tracker_spec.rb +116 -0
  20. data/spec/correios/sro/web_service_spec.rb +10 -4
  21. data/spec/correios/sro_spec.rb +22 -0
  22. data/spec/spec_helper.rb +3 -5
  23. data/spec/support/mock_request.rb +22 -0
  24. data/spec/support/responses/failure_response_not_found.xml +6 -0
  25. data/spec/support/responses/{success-response-many-objects.xml → success_response_many_objects.xml} +0 -0
  26. data/spec/support/responses/{success-response-many-objects-international.xml → success_response_many_objects_international.xml} +0 -0
  27. data/spec/support/responses/{success-response-one-object.xml → success_response_one_object.xml} +0 -0
  28. metadata +54 -59
  29. data/Gemfile.lock +0 -62
  30. data/lib/correios/sro/destino.rb +0 -16
  31. data/lib/correios/sro/evento.rb +0 -31
  32. data/lib/correios/sro/objeto.rb +0 -13
  33. data/lib/correios/sro/rastreador.rb +0 -43
  34. data/spec/correios/sro/evento_spec.rb +0 -15
  35. data/spec/correios/sro/rastreador_spec.rb +0 -53
  36. data/spec/support/fake_request.rb +0 -21
data/.gitignore ADDED
@@ -0,0 +1,25 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ TODO
19
+
20
+ # For MacOS:
21
+ .DS_Store
22
+
23
+ # For vim:
24
+ *.swp
25
+ *.swo
data/CHANGELOG.rdoc CHANGED
@@ -1,11 +1,17 @@
1
- == Versão 0.0.4
2
- - Correção: Lugar de encode é no Parser e não no WebService.
1
+ == Version 0.1.0
2
+ - Warning: Compatibility break with version 0.0.4.
3
+ - New: Public interface only in English language.
4
+ - New: Log support.
5
+ - New: Request timeout configuration.
3
6
 
4
- == Versão 0.0.3
5
- - Correção: {Issue #2: Problema de encoding}[https://github.com/prodis/correios-sro-xml/pull/2].
7
+ == Version 0.0.4
8
+ - Fix: The correct place to encode is in Parser, not WebService.
6
9
 
7
- == Versão 0.0.2
8
- - Melhoria: {Issue #1: Incluindo campo hora}[https://github.com/prodis/correios-sro-xml/pull/1].
10
+ == Version 0.0.3
11
+ - Fix: {Issue #2: Problema de encoding}[https://github.com/prodis/correios-sro-xml/pull/2].
9
12
 
10
- == Versão 0.0.1
11
- - Primeira versão funcional, mas ainda instável.
13
+ == Version 0.0.2
14
+ - Improvement: {Issue #1: Incluindo campo hora}[https://github.com/prodis/correios-sro-xml/pull/1].
15
+
16
+ == Version 0.0.1
17
+ - First version, unstable yet.
data/Gemfile CHANGED
@@ -1,13 +1,2 @@
1
1
  source "http://rubygems.org"
2
-
3
- gem "log-me", "~> 0.0.2"
4
- gem "nokogiri", "~> 1.5"
5
- gem "sax-machine", "~> 0.1"
6
-
7
- group :development do
8
- gem "fakeweb", "~> 1.3"
9
- gem "jeweler", "~> 1.8"
10
- gem "rspec", "~> 2.9"
11
- gem "ruby-debug", :platforms => :ruby_18
12
- gem "ruby-debug19", :require => "ruby-debug", :platforms => :ruby_19
13
- end
2
+ gemspec
data/README.rdoc CHANGED
@@ -1,62 +1,206 @@
1
1
  = correios-sro-xml
2
2
 
3
- Sistema de Rastreamento de Objetos dos Correios (SRO) utilizando o Web Service SRO XML, que permite a consulta de ate 50 encomendas simultaneamente.
3
+ Tracking Objects System from Correios - SRO (Sistema de Rastreamento de Objetos dos Correios), using SRO XML Web Service, that allows to query up to 50 orders simultaneously.
4
4
 
5
- <b>Atenção:</b> esta gem já está funcional, mas ainda não é uma versão estável.
5
+ http://prodis.net.br/images/ruby/2011/correios_logo.png
6
6
 
7
- == Instalando
7
+ In order to use SRO XML in production environment, it is necessary to request to Correios access data (user and password) for your company, as described in {Correios' Blog}[http://blog.correios.com.br/comercioeletronico/?p=218].
8
+
9
+ For development environment you can use follow access data:
10
+ user: ECT
11
+ password: SRO
12
+
13
+ == Installing
8
14
 
9
15
  === Gemfile
10
16
  gem 'correios-sro-xml'
11
17
 
12
- === Instalação direta
18
+ === Direct installation
13
19
  $ gem install correios-sro-xml
14
20
 
15
21
 
16
- == Usando
22
+ == Using
17
23
 
18
24
  require 'correios-sro-xml'
19
25
 
20
- sro = Correios::SRO::Rastreador.new :usuario => "ECT", :senha => "SRO"
21
-
22
- Rastreamento de um objeto:
23
-
24
- objeto = sro.consultar("SI047624825BR")
25
- objeto.numero # => "SI047624825BR"
26
- objeto.eventos.first.data # => "26/12/2011"
27
- objeto.eventos.first.hora # => "15:22"
28
- objeto.eventos.first.local # => "AC CENTRAL DE SAO PAULO"
29
- objeto.eventos.first.descricao # => "Entregue"
30
-
31
- Rastreamento de vários objetos:
32
- objetos = sro.consultar("SI047624825BR", "SX104110463BR")
33
-
34
- objetos["SI047624825BR"].numero # => "SI047624825BR"
35
- objetos["SI047624825BR"].eventos.first.data # => "26/12/2011"
36
- objetos["SI047624825BR"].eventos.first.hora # => "15:22"
37
- objetos["SI047624825BR"].eventos.first.local # => "AC CENTRAL DE SAO PAULO"
38
- objetos["SI047624825BR"].eventos.first.descricao # => "Entregue"
39
-
40
- objetos["SX104110463BR"].numero # => "SX104110463BR"
41
- objetos["SX104110463BR"].eventos.first.data # => "08/12/2011"
42
- objetos["SX104110463BR"].eventos.first.hora # => "09:30"
43
- objetos["SX104110463BR"].eventos.first.local # => "CEE JUNDIAI"
44
- objetos["SX104110463BR"].eventos.first.descricao # => "Entregue"
45
-
46
-
47
- == Autor
26
+ sro = Correios::SRO::Tracker.new(:user => "ECT", :password => "SRO")
27
+
28
+ Tracking a single object:
29
+ object = sro.get("SI047624825BR")
30
+ object.number # => "SI047624825BR"
31
+ object.events.first.date # => "26/12/2011"
32
+ object.events.first.hour # => "15:22"
33
+ object.events.first.place # => "AC CENTRAL DE SAO PAULO"
34
+ object.events.first.description # => "Entregue"
35
+
36
+ Tracking many objects:
37
+ objects = sro.get("SI047624825BR", "SX104110463BR")
38
+
39
+ objects["SI047624825BR"].number # => "SI047624825BR"
40
+ objects["SI047624825BR"].events.first.date # => "26/12/2011"
41
+ objects["SI047624825BR"].events.first.hour # => "15:22"
42
+ objects["SI047624825BR"].events.first.place # => "AC CENTRAL DE SAO PAULO"
43
+ objects["SI047624825BR"].events.first.description # => "Entregue"
44
+
45
+ objects["SX104110463BR"].number # => "SX104110463BR"
46
+ objects["SX104110463BR"].events.first.date # => "08/12/2011"
47
+ objects["SX104110463BR"].events.first.hour # => "09:30"
48
+ objects["SX104110463BR"].events.first.place # => "CEE JUNDIAI"
49
+ objects["SX104110463BR"].events.first.description # => "Entregue"
50
+
51
+ === Tracker result mode
52
+
53
+ One object can have one or more events.
54
+ For <b>default</b>, the tracker result mode will be return the <b>last object event</b>.
55
+ sro.result_mode # => :last
56
+
57
+ object = sro.get("SI047624825BR")
58
+ object.events.size # => 1
59
+
60
+ You can configure to return <b>all</b> events in the object.
61
+ sro.result_mode = :all
62
+
63
+ object = sro.get("SI047624825BR")
64
+ object.events.size # => 5
65
+
66
+ === Tracker query type
67
+
68
+ There are two ways to query objects in tracker:
69
+
70
+ ==== List of objects
71
+ Where all the object numbers will be requested (the default).
72
+ sro.query_type # => :list
73
+
74
+ objects = sro.get("PB996681660BR", "PB996681700BR")
75
+ objects.keys # => ["PB996681660BR", "PB996681700BR"]
76
+
77
+ ==== Range of objects
78
+ In which you supplie the first and last objects numbers of an interval.
79
+ sro.query_type = :range
80
+
81
+ objects = sro.get("PB996681660BR", "PB996681700BR")
82
+ objects.keys # => ["PB996681660BR", "PB996681673BR", "PB996681687BR", "PB996681695BR", "PB996681700BR"]
83
+
84
+ == Configurations
85
+
86
+ === Timeout
87
+
88
+ For default, the timeout for a request to SRO XML Web Service is <b>5 seconds</b>. If SRO XML Web Service does not respond, a <b>Timeout::Error</b> exception will be raised.
89
+ You can configure this timeout using <b>Correios::SRO</b> module.
90
+
91
+ Correios::SRO.configure do |config|
92
+ config.request_timeout = 3 # It configures timeout to 3 seconds
93
+ end
94
+
95
+ === Log
96
+
97
+ For default, each request to SRO XML Web service is logged to STDOUT, with <b>:info</b> log level, using the gem {LogMe}[http://github.com/prodis/log-me].
98
+
99
+ Log example:
100
+ I, [2012-08-17T00:55:10.531780 #22692] INFO -- : Correios-SRO-XML Request:
101
+ POST http://websro.correios.com.br/sro_bin/sroii_xml.eventos
102
+ Usuario=ECT&Senha=SRO&Tipo=L&Resultado=U&Objetos=PB996681660BR
103
+
104
+ I, [2012-08-17T00:55:10.750308 #22692] INFO -- : Correios-SRO-XML Response:
105
+ HTTP/1.1 200 OK
106
+ <?xml version="1.0" encoding="iso-8859-1" ?>
107
+ <sroxml>
108
+ <versao>1.0</versao>
109
+ <qtd>1</qtd>
110
+ <TipoPesquisa>Lista de Objetos</TipoPesquisa>
111
+ <TipoResultado>Último evento</TipoResultado>
112
+ <objeto>
113
+ <numero>PB996681660BR</numero>
114
+ <evento>
115
+ <tipo>BDE</tipo>
116
+ <status>01</status>
117
+ <data>05/07/2012</data>
118
+ <hora>21:11</hora>
119
+ <descricao>Entregue</descricao>
120
+ <recebedor> </recebedor>
121
+ <documento> </documento>
122
+ <comentario> </comentario>
123
+ <local>CDD VILA ANDRADE</local>
124
+ <codigo>05724970</codigo>
125
+ <cidade>SAO PAULO</cidade>
126
+ <uf>SP</uf>
127
+ <sto>72824000</sto>
128
+ </evento>
129
+ </objeto>
130
+ </sroxml>
131
+
132
+ If you configure log level to <b>:debug</b>, request and response HTTP headers will be logged too.
133
+ D, [2012-08-17T00:58:56.226742 #22692] DEBUG -- : Correios-SRO-XML Request:
134
+ POST http://websro.correios.com.br/sro_bin/sroii_xml.eventos
135
+ accept: */*
136
+ user-agent: Ruby
137
+ content-type: application/x-www-form-urlencoded
138
+ Usuario=ECT&Senha=SRO&Tipo=L&Resultado=U&Objetos=PB996681660BR
139
+
140
+ D, [2012-08-17T00:58:56.495131 #22692] DEBUG -- : Correios-SRO-XML Response:
141
+ HTTP/1.1 200 OK
142
+ date: Fri, 17 Aug 2012 03:58:56 GMT
143
+ server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
144
+ content-length: 855
145
+ content-type: text/html; charset=ISO-8859-1
146
+ x-cache: MISS from 127.0.0.1
147
+ connection: close
148
+ <?xml version="1.0" encoding="iso-8859-1" ?>
149
+ <sroxml>
150
+ <versao>1.0</versao>
151
+ <qtd>1</qtd>
152
+ <TipoPesquisa>Lista de Objetos</TipoPesquisa>
153
+ <TipoResultado>?ltimo evento</TipoResultado>
154
+ <objeto>
155
+ <numero>PB996681660BR</numero>
156
+ <evento>
157
+ <tipo>BDE</tipo>
158
+ <status>01</status>
159
+ <data>05/07/2012</data>
160
+ <hora>21:11</hora>
161
+ <descricao>Entregue</descricao>
162
+ <recebedor> </recebedor>
163
+ <documento> </documento>
164
+ <comentario> </comentario>
165
+ <local>CDD VILA ANDRADE</local>
166
+ <codigo>05724970</codigo>
167
+ <cidade>SAO PAULO</cidade>
168
+ <uf>SP</uf>
169
+ <sto>72824000</sto>
170
+ </evento>
171
+ </objeto>
172
+ </sroxml>
173
+
174
+ To disable the log, change log level and configure other log output, use <b>Correios::SRO</b> module:
175
+
176
+ Correios::SRO.configure do |config|
177
+ config.log_enabled = false # It disables the log
178
+ config.log_level = :debug # It changes log level
179
+ config.logger = Rails.logger # It uses Rails logger
180
+ end
181
+
182
+ === Configuration example
183
+
184
+ Correios::SRO.configure do |config|
185
+ config.log_level = :debug
186
+ config.logger = Rails.logger
187
+ config.request_timeout = 3
188
+ end
189
+
190
+ == Author
48
191
  - {Fernando Hamasaki (prodis)}[http://prodis.blog.br]
49
192
 
50
- == Colaboradores
193
+ == Collaborators
51
194
  - {Thiago Ganzarolli (tganzarolli)}[https://github.com/tganzarolli]
52
195
 
53
196
  == Contributing to correios-sro-xml
54
-
197
+
55
198
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
56
199
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
57
200
  * Fork the project.
58
201
  * Start a feature/bugfix branch.
59
202
  * Commit and push until you are happy with your contribution.
203
+ * Don't forget to rebase with branch master in main project before submit the pull request.
60
204
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
61
205
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
62
206
 
@@ -67,6 +211,8 @@ Rastreamento de vários objetos:
67
211
 
68
212
  {Prodis a.k.a. Fernando Hamasaki}[http://prodis.blog.br]
69
213
 
214
+ http://prodis.net.br/images/prodis_150.gif
215
+
70
216
  Copyright (c) 2012 Prodis
71
217
 
72
218
  Permission is hereby granted, free of charge, to any person obtaining
data/Rakefile CHANGED
@@ -1,47 +1,25 @@
1
- # encoding: UTF-8
2
- require 'rubygems'
3
- require 'bundler'
4
- begin
5
- Bundler.setup(:default, :development)
6
- rescue Bundler::BundlerError => e
7
- $stderr.puts e.message
8
- $stderr.puts "Run `bundle install` to install missing gems"
9
- exit e.status_code
10
- end
11
- require 'rake'
12
-
13
- require 'jeweler'
14
- require './lib/correios/sro/version'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "correios-sro-xml"
18
- gem.homepage = "http://github.com/prodis/correios-sro-xml"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Sistema de Rastreamento de Objetos dos Correios (SRO).}
21
- gem.description = %Q{Sistema de Rastreamento de Objetos dos Correios (SRO) utilizando o Web Service SRO XML, que permite a consulta de ate 50 encomendas simultaneamente.}
22
- gem.email = "prodis@gmail.com"
23
- gem.authors = ["Prodis a.k.a. Fernando Hamasaki"]
24
- gem.version = Correios::SRO::Version::VERSION
25
- gem.required_ruby_version = ">= 1.8.7"
26
- # dependencies defined in Gemfile
27
- end
28
- Jeweler::RubygemsDotOrgTasks.new
1
+ #!/usr/bin/env rake
2
+ require 'bundler/gem_tasks'
29
3
 
30
- require 'rspec/core'
31
4
  require 'rspec/core/rake_task'
32
5
  RSpec::Core::RakeTask.new(:spec) do |spec|
33
- spec.pattern = FileList['spec/**/*_spec.rb']
6
+ spec.pattern = FileList["spec/**/*_spec.rb"]
7
+ end
8
+
9
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
10
+ spec.pattern = "spec/**/*_spec.rb"
11
+ spec.rcov = true
34
12
  end
35
13
 
36
14
  task :default => :spec
37
15
 
38
16
  require 'rdoc/task'
39
17
  Rake::RDocTask.new do |rdoc|
40
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
18
+ version = File.exist?("VERSION") ? File.read("VERSION") : ""
41
19
 
42
- rdoc.rdoc_dir = 'rdoc'
20
+ rdoc.rdoc_dir = "rdoc"
43
21
  rdoc.title = "correios-sro-xml #{version}"
44
- rdoc.rdoc_files.include('README*')
45
- rdoc.rdoc_files.include('CHANGELOG*')
46
- rdoc.rdoc_files.include('lib/**/*.rb')
22
+ rdoc.rdoc_files.include("README*")
23
+ rdoc.rdoc_files.include("CHANGELOG*")
24
+ rdoc.rdoc_files.include("lib/**/*.rb")
47
25
  end
@@ -1,86 +1,30 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'correios/sro/version'
5
4
 
6
- Gem::Specification.new do |s|
7
- s.name = "correios-sro-xml"
8
- s.version = "0.0.4"
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "correios-sro-xml"
7
+ gem.version = Correios::SRO::VERSION
8
+ gem.authors = ["Prodis a.k.a. Fernando Hamasaki"]
9
+ gem.email = ["prodis@gmail.com"]
10
+ gem.summary = "Sistema de Rastreamento de Objetos dos Correios (SRO)."
11
+ gem.description = "Sistema de Rastreamento de Objetos dos Correios (SRO) utilizando o Web Service SRO XML, que permite a consulta de ate 50 encomendas simultaneamente."
12
+ gem.homepage = "http://github.com/prodis/correios-sro-xml"
13
+ gem.licenses = ["MIT"]
9
14
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Prodis a.k.a. Fernando Hamasaki"]
12
- s.date = "2012-04-18"
13
- s.description = "Sistema de Rastreamento de Objetos dos Correios (SRO) utilizando o Web Service SRO XML, que permite a consulta de ate 50 encomendas simultaneamente."
14
- s.email = "prodis@gmail.com"
15
- s.extra_rdoc_files = [
16
- "README.rdoc"
17
- ]
18
- s.files = [
19
- ".rspec",
20
- "CHANGELOG.rdoc",
21
- "Gemfile",
22
- "Gemfile.lock",
23
- "README.rdoc",
24
- "Rakefile",
25
- "correios-sro-xml.gemspec",
26
- "lib/correios-sro-xml.rb",
27
- "lib/correios/sro.rb",
28
- "lib/correios/sro/destino.rb",
29
- "lib/correios/sro/evento.rb",
30
- "lib/correios/sro/objeto.rb",
31
- "lib/correios/sro/parser.rb",
32
- "lib/correios/sro/rastreador.rb",
33
- "lib/correios/sro/string.rb",
34
- "lib/correios/sro/version.rb",
35
- "lib/correios/sro/web_service.rb",
36
- "spec/correios/sro/evento_spec.rb",
37
- "spec/correios/sro/parser_spec.rb",
38
- "spec/correios/sro/rastreador_spec.rb",
39
- "spec/correios/sro/web_service_spec.rb",
40
- "spec/spec_helper.rb",
41
- "spec/support/fake_request.rb",
42
- "spec/support/responses/success-response-many-objects-international.xml",
43
- "spec/support/responses/success-response-many-objects.xml",
44
- "spec/support/responses/success-response-one-object.xml"
45
- ]
46
- s.homepage = "http://github.com/prodis/correios-sro-xml"
47
- s.licenses = ["MIT"]
48
- s.require_paths = ["lib"]
49
- s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
50
- s.rubygems_version = "1.8.16"
51
- s.summary = "Sistema de Rastreamento de Objetos dos Correios (SRO)."
15
+ gem.files = `git ls-files`.split($\)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
52
19
 
53
- if s.respond_to? :specification_version then
54
- s.specification_version = 3
20
+ gem.platform = Gem::Platform::RUBY
21
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
55
22
 
56
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
57
- s.add_runtime_dependency(%q<log-me>, ["~> 0.0.2"])
58
- s.add_runtime_dependency(%q<nokogiri>, ["~> 1.5"])
59
- s.add_runtime_dependency(%q<sax-machine>, ["~> 0.1"])
60
- s.add_development_dependency(%q<fakeweb>, ["~> 1.3"])
61
- s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
62
- s.add_development_dependency(%q<rspec>, ["~> 2.9"])
63
- s.add_development_dependency(%q<ruby-debug>, [">= 0"])
64
- s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
65
- else
66
- s.add_dependency(%q<log-me>, ["~> 0.0.2"])
67
- s.add_dependency(%q<nokogiri>, ["~> 1.5"])
68
- s.add_dependency(%q<sax-machine>, ["~> 0.1"])
69
- s.add_dependency(%q<fakeweb>, ["~> 1.3"])
70
- s.add_dependency(%q<jeweler>, ["~> 1.8"])
71
- s.add_dependency(%q<rspec>, ["~> 2.9"])
72
- s.add_dependency(%q<ruby-debug>, [">= 0"])
73
- s.add_dependency(%q<ruby-debug19>, [">= 0"])
74
- end
75
- else
76
- s.add_dependency(%q<log-me>, ["~> 0.0.2"])
77
- s.add_dependency(%q<nokogiri>, ["~> 1.5"])
78
- s.add_dependency(%q<sax-machine>, ["~> 0.1"])
79
- s.add_dependency(%q<fakeweb>, ["~> 1.3"])
80
- s.add_dependency(%q<jeweler>, ["~> 1.8"])
81
- s.add_dependency(%q<rspec>, ["~> 2.9"])
82
- s.add_dependency(%q<ruby-debug>, [">= 0"])
83
- s.add_dependency(%q<ruby-debug19>, [">= 0"])
84
- end
85
- end
23
+ gem.add_dependency "log-me", "~> 0.0.4"
24
+ gem.add_dependency "nokogiri", "~> 1.5"
25
+ gem.add_dependency "sax-machine", "~> 0.1"
86
26
 
27
+ gem.add_development_dependency "rake"
28
+ gem.add_development_dependency "rspec", "~> 2.11"
29
+ gem.add_development_dependency "webmock", "~> 1.8"
30
+ end