rasper_client 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b16e4020bfba1383418a92a074d986d3b515f92a
4
+ data.tar.gz: 3fc0761ad8b71e90795abf8ef534a1bd4c4cff8d
5
+ SHA512:
6
+ metadata.gz: d798a0473b785f9d1f689d9da66d08064b63dddb31d030a594d18caf700084e0d974154fb60c379e86de14f3a1d0533c9391457d39dafa28c6f1b88fbfcbbc14
7
+ data.tar.gz: 2f135344ad690d5c34a40fa1d9da959e571856b3705a9be0e948ef7255ef32f62c23199f3208cb3190467d1f9a2fc0c449f0fac4946598a4db1ba5c4120703e4
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ gemspec
@@ -19,6 +19,7 @@ module RasperClient
19
19
 
20
20
  def generate(options)
21
21
  symbolize_keys(options)
22
+ options = encode_data(options)
22
23
  response = execute_request(:generate, options)
23
24
  result = JSON.parse(response.body)
24
25
  Base64.decode64(result['content'])
@@ -59,6 +60,10 @@ module RasperClient
59
60
  end
60
61
  end
61
62
 
63
+ def encode_data(options)
64
+ { data: Base64.encode64(options.to_json) }
65
+ end
66
+
62
67
  def uri_for(action)
63
68
  "http://#{@host}:#{@port}/#{action}"
64
69
  end
@@ -31,7 +31,8 @@ module RasperClient
31
31
 
32
32
  post '/generate' do
33
33
  content_type :json
34
- FakeServer.last_generated_report = JSON.parse(request.body.read)
34
+ FakeServer.last_generated_report =
35
+ JSON.parse(Base64.decode64(JSON.parse(request.body.read)['data']))
35
36
  { content: Base64.encode64(File.read(resource('dummy.pdf'))) }.to_json
36
37
  end
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module RasperClient
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,78 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasper_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Rodrigo Manhães
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-01 00:00:00.000000000 Z
11
+ date: 2013-10-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sinatra
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
76
81
  - !ruby/object:Gem::Version
77
82
  version: '0'
78
83
  description: Ruby client to RasperServer.
@@ -82,11 +87,11 @@ executables: []
82
87
  extensions: []
83
88
  extra_rdoc_files: []
84
89
  files:
85
- - lib/rasper_client.rb
86
- - lib/rasper_client/fake_server.rb
87
- - lib/rasper_client/errors.rb
88
90
  - lib/rasper_client/version.rb
89
91
  - lib/rasper_client/client.rb
92
+ - lib/rasper_client/errors.rb
93
+ - lib/rasper_client/fake_server.rb
94
+ - lib/rasper_client.rb
90
95
  - README.rst
91
96
  - LICENSE.txt
92
97
  - Rakefile
@@ -94,26 +99,25 @@ files:
94
99
  homepage: https://github.com/rodrigomanhaes/rasper_client
95
100
  licenses:
96
101
  - MIT
102
+ metadata: {}
97
103
  post_install_message:
98
104
  rdoc_options: []
99
105
  require_paths:
100
106
  - lib
101
107
  required_ruby_version: !ruby/object:Gem::Requirement
102
- none: false
103
108
  requirements:
104
- - - ! '>='
109
+ - - '>='
105
110
  - !ruby/object:Gem::Version
106
111
  version: '0'
107
112
  required_rubygems_version: !ruby/object:Gem::Requirement
108
- none: false
109
113
  requirements:
110
- - - ! '>='
114
+ - - '>='
111
115
  - !ruby/object:Gem::Version
112
116
  version: '0'
113
117
  requirements: []
114
118
  rubyforge_project:
115
- rubygems_version: 1.8.23
119
+ rubygems_version: 2.0.3
116
120
  signing_key:
117
- specification_version: 3
121
+ specification_version: 4
118
122
  summary: JRuby client to RasperServer.
119
123
  test_files: []