gooddata-bricks 0.6.0 → 0.7.0

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
2
  SHA1:
3
- metadata.gz: 1bbf4e721ee07561d0a148a71a03be11adbdc43f
4
- data.tar.gz: 05d5f2febf699e6a10113c500ae83d1c396789e3
3
+ metadata.gz: da3e64cedbf60891bbc0b2495b348f699d95bd7f
4
+ data.tar.gz: 3c5ca10e13645cda123ebcbd8dea9eb2ed480168
5
5
  SHA512:
6
- metadata.gz: 90a7c09c10fcad5d51419f2a16f056a2843b3b2524ff00e4bba5ef7487879b4c07b48dbee76d31953f7d6e0355acc6783cec43b4bf5d1be80e52e56358f30bbd
7
- data.tar.gz: 515f0a2473d13895cab46eee334422b4e9af19282f69201613fb14c099c2f30bc062cea3704d388a044093309ecd937293cd2d88bbf496d9eb201eea97a8a2a7
6
+ metadata.gz: 1fbc41076702fdcc7d659b0e46cc43f57c01f466380c65d222d82b2602a09fc1bde98945d4b0a11bd0ddab130c2d31b38faaf5acbaed4d2297cc68190db359d7
7
+ data.tar.gz: 236411cdd63a585202c12e4f44aaffe4c5b15685753e5f3d714d3ffc7290e082e351b95a3a9470a18bf27c6b0df44ad2cbed1e1e21ea26ca6e0be9799a0b405d
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gooddata-bricks.gemspec
4
4
  gemspec
5
+
6
+ gem 'gooddata', git: 'https://github.com/gooddata/gooddata-ruby.git', ref: 'a716539'
@@ -23,27 +23,31 @@ module GoodData
23
23
  # Set logger
24
24
  logger = params['GDC_LOGGER']
25
25
  GoodData.logger = logger
26
-
26
+ server = "#{params['CLIENT_GDC_PROTOCOL'] || DEFAULT_PROTOCOL}://#{params['CLIENT_GDC_HOSTNAME'] || DEFAULT_HOSTNAME}"
27
+ opts = {
28
+ server: server,
29
+ verify_ssl: params['GDC_VERIFY_SSL'].to_b,
30
+ username: params['GDC_USERNAME'],
31
+ password: params['GDC_PASSWORD'],
32
+ sst_token: params['GDC_SST']
33
+ }
27
34
  # Connect Client
28
- client = GoodDataMiddleware.connect(
29
- params['CLIENT_GDC_PROTOCOL'] || DEFAULT_PROTOCOL,
30
- params['CLIENT_GDC_HOSTNAME'] || DEFAULT_HOSTNAME,
31
- params['GDC_VERIFY_SSL'].to_b,
32
- params['GDC_USERNAME'],
33
- params['GDC_PASSWORD'],
34
- params['GDC_SST']
35
- )
35
+ client = GoodData.connect(opts)
36
36
 
37
37
  opts = params['development_client']
38
38
  if opts
39
- development_client = GoodDataMiddleware.connect(
40
- opts['protocol'] || DEFAULT_PROTOCOL,
41
- opts['hostname'] || DEFAULT_HOSTNAME,
42
- opts['verify_ssl'].to_b,
43
- opts['username'],
44
- opts['password'],
45
- opts['sst']
46
- )
39
+ new_opts = {
40
+ verify_ssl: opts['verify_ssl'].to_b || opts[:verify_ssl].to_b,
41
+ username: opts['username'] || opts[:username],
42
+ password: opts['password'] || opts[:password],
43
+ sst_token: opts['sst_token'] || opts[:sst_token]
44
+ }
45
+
46
+ if opts[:sever].nil?
47
+ new_opts[:server] = "#{opts['protocol'] || opts[:protocol] || DEFAULT_PROTOCOL}://#{opts['hostname'] || opts[:hostname] || DEFAULT_HOSTNAME}"
48
+ end
49
+
50
+ development_client = GoodData.connect(new_opts)
47
51
  else
48
52
  development_client = client
49
53
  end
@@ -65,21 +69,6 @@ module GoodData
65
69
  end
66
70
  returning_value
67
71
  end
68
-
69
- class << self
70
- def connect(protocol, hostname, verify_ssl, username, password, sst_token)
71
- server = "#{protocol}://#{hostname}" if protocol && hostname
72
-
73
- if username.nil? || password.nil?
74
- puts "Connecting with SST to server #{server}"
75
- raise 'SST (SuperSecureToken) not present in params' if sst_token.nil?
76
- GoodData.connect(sst_token: sst_token, server: server, verify_ssl: verify_ssl)
77
- else
78
- puts "Connecting as #{username} to server #{server}"
79
- GoodData.connect(username, password, server: server, verify_ssl: verify_ssl)
80
- end
81
- end
82
- end
83
72
  end
84
73
  end
85
74
  end
@@ -6,6 +6,6 @@
6
6
 
7
7
  module GoodData
8
8
  module Bricks
9
- VERSION = '0.6.0'.freeze
9
+ VERSION = '0.7.0'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata-bricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Svarovsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement