vacuum 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/README.md +11 -113
  2. data/lib/vacuum/request.rb +66 -0
  3. data/lib/vacuum/version.rb +1 -1
  4. data/lib/vacuum.rb +5 -38
  5. data/test/request_test.rb +18 -0
  6. metadata +24 -96
  7. data/lib/vacuum/endpoint/base.rb +0 -58
  8. data/lib/vacuum/endpoint/mws.rb +0 -59
  9. data/lib/vacuum/endpoint/product_advertising.rb +0 -34
  10. data/lib/vacuum/mws.rb +0 -8
  11. data/lib/vacuum/product_advertising.rb +0 -7
  12. data/lib/vacuum/request/base.rb +0 -109
  13. data/lib/vacuum/request/mws.rb +0 -24
  14. data/lib/vacuum/request/product_advertising.rb +0 -101
  15. data/lib/vacuum/request/signature/authentication.rb +0 -32
  16. data/lib/vacuum/request/signature/builder.rb +0 -70
  17. data/lib/vacuum/request/utils.rb +0 -24
  18. data/lib/vacuum/response/base.rb +0 -57
  19. data/lib/vacuum/response/mws.rb +0 -7
  20. data/lib/vacuum/response/product_advertising.rb +0 -19
  21. data/lib/vacuum/response/utils.rb +0 -48
  22. data/spec/fixtures/product_advertising +0 -1
  23. data/spec/spec_helper.rb +0 -15
  24. data/spec/support/shared_examples/endpoint.rb +0 -43
  25. data/spec/support/shared_examples/request.rb +0 -142
  26. data/spec/support/shared_examples/response.rb +0 -51
  27. data/spec/vacuum/endpoint/base_spec.rb +0 -19
  28. data/spec/vacuum/endpoint/mws_spec.rb +0 -47
  29. data/spec/vacuum/endpoint/product_advertising_spec.rb +0 -25
  30. data/spec/vacuum/request/base_spec.rb +0 -22
  31. data/spec/vacuum/request/mws_spec.rb +0 -26
  32. data/spec/vacuum/request/product_advertising_spec.rb +0 -118
  33. data/spec/vacuum/request/signature/authentication_spec.rb +0 -30
  34. data/spec/vacuum/request/signature/builder_spec.rb +0 -76
  35. data/spec/vacuum/request/utils_spec.rb +0 -23
  36. data/spec/vacuum/response/base_spec.rb +0 -38
  37. data/spec/vacuum/response/product_advertising_spec.rb +0 -57
  38. data/spec/vacuum/response/utils_spec.rb +0 -42
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Vacuum
4
- module Response
5
- describe Utils do
6
- describe '.xml_to_hash' do
7
- let(:hash) do
8
- str = <<-XML.gsub!(/>\s+</, '><').strip!
9
- <?xml version=\"1.0\" ?>
10
- <ItemAttributes>
11
- <Title>Anti-Oedipus</Title>
12
- <Author>Gilles Deleuze</Author>
13
- <Author>Felix Guattari</Author>
14
- <Creator Role="Translator">Robert Hurley</Creator>
15
- </ItemAttributes>
16
- XML
17
- xml = Nokogiri::XML.parse str
18
-
19
- Utils.xml_to_hash xml
20
- end
21
-
22
- it 'returns a hash' do
23
- hash.should be_an_instance_of Hash
24
- end
25
-
26
- it 'handles only childs' do
27
- hash['Title'].should eql 'Anti-Oedipus'
28
- end
29
-
30
- it 'handles arrays' do
31
- hash['Author'].should be_a Array
32
- end
33
-
34
- it 'handles attributes' do
35
- node = hash['Creator']
36
- node['Role'].should eql 'Translator'
37
- node['__content__'].should eql 'Robert Hurley'
38
- end
39
- end
40
- end
41
- end
42
- end