ruby-promobox 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -29,5 +29,5 @@ Tests
29
29
  -----
30
30
 
31
31
  ``` ruby
32
- bundle exec ruby test/promobox_test.rb
32
+ bundle exec rake
33
33
  ```
data/lib/promobox.rb CHANGED
@@ -40,6 +40,8 @@ class Promobox
40
40
  def decode_url(url)
41
41
  response = Kernel.open(url)
42
42
  MultiJson.decode(response)
43
+ rescue
44
+ nil
43
45
  end
44
46
 
45
47
  def build_query(action, params = {})
@@ -16,6 +16,12 @@ describe Promobox do
16
16
  stub(Kernel).open(url) { File.read fixture_file }
17
17
  end
18
18
 
19
+ describe 'Net error' do
20
+ it 'should be nil' do
21
+ @promobox.send(:decode_url, 'af83').must_equal nil
22
+ end
23
+ end
24
+
19
25
  describe 'search' do
20
26
  before do
21
27
  promobox_stub('search')
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-promobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Laurent Arnoud
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-13 00:00:00.000000000 Z
12
+ date: 2013-07-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: multi_json
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,36 +22,57 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
27
46
  - !ruby/object:Gem::Dependency
28
47
  name: minitest
29
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
30
50
  requirements:
31
- - - '>='
51
+ - - ! '>='
32
52
  - !ruby/object:Gem::Version
33
53
  version: '2.0'
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
37
58
  requirements:
38
- - - '>='
59
+ - - ! '>='
39
60
  - !ruby/object:Gem::Version
40
61
  version: '2.0'
41
62
  - !ruby/object:Gem::Dependency
42
63
  name: rr
43
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
44
66
  requirements:
45
- - - '>='
67
+ - - ! '>='
46
68
  - !ruby/object:Gem::Version
47
69
  version: 1.0.5
48
70
  type: :development
49
71
  prerelease: false
50
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
51
74
  requirements:
52
- - - '>='
75
+ - - ! '>='
53
76
  - !ruby/object:Gem::Version
54
77
  version: 1.0.5
55
78
  description: Ruby API promobox
@@ -68,26 +91,27 @@ files:
68
91
  homepage: http://github.com/AF83/ruby-promobox
69
92
  licenses:
70
93
  - MIT
71
- metadata: {}
72
94
  post_install_message:
73
95
  rdoc_options: []
74
96
  require_paths:
75
97
  - lib
76
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
+ none: false
77
100
  requirements:
78
- - - '>='
101
+ - - ! '>='
79
102
  - !ruby/object:Gem::Version
80
103
  version: '0'
81
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
+ none: false
82
106
  requirements:
83
- - - '>='
107
+ - - ! '>='
84
108
  - !ruby/object:Gem::Version
85
109
  version: '0'
86
110
  requirements: []
87
111
  rubyforge_project:
88
- rubygems_version: 2.0.2
112
+ rubygems_version: 1.8.23
89
113
  signing_key:
90
- specification_version: 4
114
+ specification_version: 3
91
115
  summary: Ruby lib for talking with promobox API
92
116
  test_files:
93
117
  - test/promobox_test.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: d4e531ad0f13cc26fa696d41b6f351cb16d7a974
4
- data.tar.gz: ec7d65e6234fe848b7e407ba4610a1cda47ead9e
5
- SHA512:
6
- metadata.gz: 0b36ea840c238919de359b6ca6b63e2634f42bb38ba431c87cf63ea0b5bce980f6d51819ba159bbb37ddcd2ddbf7f07996e2b3e3e2b462f664ea6861b0727b87
7
- data.tar.gz: d74dfa6fbaa1c37f489583ef443f491eba557c6817d42961558f3a978067504cd0090efbbbbe4d3e954a52f7cc6b640680235397b01d2b8cbe73e13bdc65963e