mondrian-rest 0.7.0-java → 0.7.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9884ded4baf72e8778db0f38bd66689a098ba4c1
4
- data.tar.gz: 41004cd22953933eb63c74f335c2ee55b9dfea1b
2
+ SHA256:
3
+ metadata.gz: 0226d216ac38421203f90d11844887ffc2070fd3683afa867d8df8204fbc932f
4
+ data.tar.gz: 7e802242a410efcb28018191c255d8508635117b3c4472dac452c68b4658d01c
5
5
  SHA512:
6
- metadata.gz: 7af0aa6def1e41782c5b517cef5199545a0be1f69baff8400499b5d5f1231f3f5a93d2bfec6a5c8f6f98c83c421ebada332b5e798a8104158721a7430a38ba7f
7
- data.tar.gz: 8280d75f3484daba329486853a32aa306ec6b3935511345ad3887405de0b50c1879470e26e4aa2ded4d57426a9744c4cb84aab6d4cf945189294869cd2d0afa2
6
+ metadata.gz: c8e362c9aab9cd50df5dab2b1ecb808ba94dc60b0c80087d97a0d65be80cfe266f0e311fbe2f5ddbccad877ebf1a78c37d1908c9fae4babed1445a3444dc1f3d
7
+ data.tar.gz: 33173f228cc7151a9a4b39dd78a943cbfe36de11e3b5ada4f2f3fbd4a0711d3f4624e1f095ba22164e75b281e40b7ed2d209d2bc61e39a99c25b888d759834f6
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'http://rubygems.org'
2
2
  gem 'coveralls', require: false
3
- gem 'ruby-debug'
4
- gem 'mondrian-olap', :path => '/Users/manuel/Work/code/mondrian-olap', :require => 'mondrian-olap'
5
3
 
6
4
  gemspec
@@ -33,10 +33,18 @@ module Mondrian::REST
33
33
 
34
34
  desc "Execute an MDX query against a cube"
35
35
  content_type :txt, "text/plain"
36
+
37
+ params do
38
+ optional :parents, type: Boolean, desc: "Include members' ancestors"
39
+ optional :debug, type: Boolean, desc: "Include generated MDX", default: false
40
+ optional :properties, type: Array, desc: "Include member properties"
41
+ optional :caption, type: Array, desc: "Replace caption with property", default: []
42
+ end
43
+
36
44
  post do
37
45
  status 200
38
46
 
39
- rbody = env['api.request.body'].force_encoding('utf-8')
47
+ rbody = request.body.read.force_encoding('utf-8')
40
48
  mdx(rbody)
41
49
  end
42
50
  end
@@ -198,7 +206,6 @@ module Mondrian::REST
198
206
  end
199
207
 
200
208
  get do
201
- puts params.inspect
202
209
  cube = get_cube_or_404(params[:cube_name])
203
210
  dimension = cube.dimension(params[:dimension_name])
204
211
  level = dimension.hierarchies[0].level(params[:level_name])
@@ -44,6 +44,11 @@ module Mondrian::REST
44
44
  logger.info("Executing MDX query #{query}")
45
45
  begin
46
46
  result = olap.execute query
47
+ result.mdx = query if params[:debug]
48
+ result.properties = params[:properties]
49
+ result.caption_properties = params[:caption]
50
+ result.cube = Mondrian::OLAP::Cube.new(olap,
51
+ olap.raw_connection.prepareOlapStatement(query).getCube)
47
52
  return result
48
53
  rescue Mondrian::OLAP::Error => st
49
54
  error!({error: st.backtrace}, 400)
@@ -56,11 +61,7 @@ module Mondrian::REST
56
61
  mdx_query = query.to_mdx
57
62
 
58
63
  result = mdx(query.to_mdx)
59
- result.mdx = mdx_query if params[:debug]
60
- result.properties = params[:properties]
61
- result.caption_properties = params[:caption]
62
64
  result.cube = cube
63
-
64
65
  result
65
66
  end
66
67
 
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "mondrian-rest"
4
- s.version = '0.7.0'
4
+ s.version = '0.7.1'
5
5
  s.authors = ["Manuel Aristarán"]
6
6
  s.email = ["manuel@jazzido.com"]
7
7
  s.homepage = "https://github.com/jazzido/mondrian-rest"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mondrian-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: java
6
6
  authors:
7
7
  - Manuel Aristarán
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  requirements:
216
216
  - jar no.ssb.jsonstat:json-stat-java, 0.2.2
217
217
  rubyforge_project:
218
- rubygems_version: 2.6.8
218
+ rubygems_version: 2.6.11
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: A REST interface for Mondrian ROLAP server