app_report 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app_report.gemspec +2 -2
- data/test/app_report/client_test.rb +4 -4
- metadata +7 -7
data/app_report.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "app_report"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.3"
|
4
4
|
s.description = "Ruby client to AppReport API!"
|
5
5
|
s.summary = "App Report!"
|
6
6
|
s.author = "Lucas D'Avila"
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.add_development_dependency 'minitest-colorize', '~> 0.0.5'
|
13
13
|
s.add_development_dependency 'webmock', '~> 1.10.0'
|
14
14
|
|
15
|
-
s.add_dependency '
|
15
|
+
s.add_dependency 'activesupport'
|
16
16
|
s.add_dependency 'simple_signer', '~> 0.0.1'
|
17
17
|
s.add_dependency 'faraday', '~> 0.8.6'
|
18
18
|
s.add_dependency 'multi_json', '~> 1.0'
|
@@ -4,19 +4,19 @@ class ClientTest < MiniTest::Unit::TestCase
|
|
4
4
|
|
5
5
|
def test_default_endpoint
|
6
6
|
assert_equal \
|
7
|
-
'http://reports.simpleservic.es',
|
7
|
+
'http://reports.simpleservic.es',
|
8
8
|
AppReport::Client.endpoint
|
9
9
|
end
|
10
10
|
|
11
11
|
def test_connection_return_faraday_connection
|
12
|
-
assert_kind_of Faraday::Connection, AppReport::Client.connection
|
12
|
+
assert_kind_of Faraday::Connection, AppReport::Client.connection
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_post_return_faraday_response
|
16
16
|
path = '/faraday_response.json'
|
17
17
|
|
18
18
|
stub_post(path).to_return \
|
19
|
-
:body => {},
|
19
|
+
:body => MultiJson.dump({}),
|
20
20
|
:headers => { :content_type => "application/json; charset=utf-8" }
|
21
21
|
|
22
22
|
assert_kind_of Faraday::Response, AppReport::Client.post(path, {})
|
@@ -32,7 +32,7 @@ class ClientTest < MiniTest::Unit::TestCase
|
|
32
32
|
path = '/error_messages.json'
|
33
33
|
|
34
34
|
stub_post(path).to_return \
|
35
|
-
:body => fixture('error_messages.json'),
|
35
|
+
:body => fixture('error_messages.json'),
|
36
36
|
:headers => { :content_type => "application/json; charset=utf-8" }
|
37
37
|
|
38
38
|
assert_raises AppReport::Errors::APIError do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -60,21 +60,21 @@ dependencies:
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.10.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: activesupport
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: '0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: simple_signer
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|