gooddata 0.6.48 → 0.6.49

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: 07dcdf56c37810095901a52f0dac2891fa6d570c
4
- data.tar.gz: 238d327bd0860c217f8136c1f606dc4d794c1e5b
3
+ metadata.gz: 1bddc2fd79a5350888ed45b7a9b41577bd5a10f7
4
+ data.tar.gz: cb24afd31911d5182b30b3019754358b25b55344
5
5
  SHA512:
6
- metadata.gz: 88a26278e7077ffc0116bebdfd7eee41200bb5fa6ac76c447e5f081a17941eadd08d211b5812b5aeadce6c83feaae74558358dfd8bc81761167b00a7380127bf
7
- data.tar.gz: 47dce72a5d6318b446c4593781ad9db279ef6ef858f92d36f059cd7a288d838467833b97fc13be0e461a4eb7b9dbb895c47ee07248f860c51ab49d55ee22d819
6
+ metadata.gz: 8fc27eaa0a3f69a556e485cbe28029f1c7e2e58532db245be1ea2bfad2832cbc700b74d0bd8b20075266b5185fd7cd2d77202b32733cb4e0d01027e1687935e0
7
+ data.tar.gz: c4039b6857eb23c43689979a3797da00c1268ac6d932761834a07d76a68b9bcbcf57c3ace6e83cd24b02ae79ae05406008b087f392fe70ceba6abadf0897ac6c
@@ -13,6 +13,9 @@ Metrics/BlockLength:
13
13
  ModuleLength:
14
14
  Enabled: false
15
15
 
16
+ Style/EmptyMethod:
17
+ Enabled: false
18
+
16
19
  CyclomaticComplexity:
17
20
  Enabled: false
18
21
 
@@ -1,5 +1,8 @@
1
1
  # GoodData Ruby SDK Changelog
2
2
 
3
+ ## 0.6.49
4
+ - Implement Helpers::GD_MAX_RETRY to allow max retries override
5
+
3
6
  ## 0.6.48
4
7
  - Fix jruby issue with uninitialized constant GoodData::Rest::Connection::ConnectionHelper
5
8
 
@@ -27,13 +27,13 @@ Gem::Specification.new do |s|
27
27
  s.homepage = 'http://github.com/gooddata/gooddata-ruby'
28
28
  s.require_paths = ['lib']
29
29
 
30
- s.add_development_dependency 'bundler'
31
- # s.add_development_dependency 'debase', '~> 0.1', '>= 0.1.7' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
30
+ s.add_development_dependency 'bundler', "~> 1.13", '>= 1.13.6'
31
+ s.add_development_dependency 'debase', '~> 0.1', '>= 0.1.7' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
32
32
  s.add_development_dependency 'license_finder', '~> 2.0', '>= 2.0.4'
33
33
  s.add_development_dependency 'rake', '~> 11.1', '>= 11.1.1'
34
34
  s.add_development_dependency 'rake-notes', '~> 0.2', '>= 0.2.0'
35
35
  s.add_development_dependency 'redcarpet', '~> 3.1', '>= 3.1.1' if RUBY_PLATFORM != 'java'
36
- s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
36
+ s.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
37
37
  s.add_development_dependency 'rspec-expectations', '~> 3.4', '>= 3.4.0'
38
38
  s.add_development_dependency 'rubocop', '~> 0.45', '>= 0.45.0'
39
39
  s.add_development_dependency 'ruby-debug-ide', '~> 0.4' if !ENV['TRAVIS_BUILD'] && RUBY_VERSION >= '2.0.0'
@@ -9,6 +9,7 @@ require 'pathname'
9
9
  require 'hashie'
10
10
  require 'openssl'
11
11
 
12
+ require_relative '../extensions/object'
12
13
  require_relative 'global_helpers_params'
13
14
 
14
15
  module GoodData
@@ -17,6 +18,8 @@ module GoodData
17
18
  include Hashie::Extensions::DeepMerge
18
19
  end
19
20
 
21
+ set_const :GD_MAX_RETRY, (ENV['GD_MAX_RETRY'] && ENV['GD_MAX_RETRY'].to_i) || 3
22
+
20
23
  class << self
21
24
  def error(msg)
22
25
  STDERR.puts(msg)
@@ -7,6 +7,7 @@
7
7
  require 'rest-client'
8
8
 
9
9
  require_relative '../helpers/auth_helpers'
10
+ require_relative '../helpers/global_helpers'
10
11
 
11
12
  require_relative 'connection'
12
13
  require_relative 'object_factory'
@@ -329,7 +330,7 @@ module GoodData
329
330
  fail ExecutionLimitExceeded, "The time limit #{time_limit} secs for polling on #{link} is over"
330
331
  end
331
332
  sleep sleep_interval
332
- GoodData::Rest::Client.retryable(:tries => ConnectionHelper::GD_MAX_RETRY, :refresh_token => proc { connection.refresh_token }) do
333
+ GoodData::Rest::Client.retryable(:tries => Helpers::GD_MAX_RETRY, :refresh_token => proc { connection.refresh_token }) do
333
334
  response = get(link, process: process)
334
335
  end
335
336
  end
@@ -13,6 +13,8 @@ require 'rest-client'
13
13
  require_relative '../version'
14
14
  require_relative '../exceptions/exceptions'
15
15
 
16
+ require_relative '../helpers/global_helpers'
17
+
16
18
  module RestClient
17
19
  module AbstractResponse
18
20
  alias_method :old_follow_redirection, :follow_redirection
@@ -288,7 +290,7 @@ module GoodData
288
290
  end
289
291
  end
290
292
 
291
- GoodData::Rest::Connection.retryable(:tries => ConnectionHelper::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
293
+ GoodData::Rest::Connection.retryable(:tries => Helpers::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
292
294
  if where.is_a?(IO) || where.is_a?(StringIO)
293
295
  b.call(where)
294
296
  else
@@ -486,7 +488,7 @@ module GoodData
486
488
  RestClient::Request.execute(raw)
487
489
  end
488
490
 
489
- GoodData::Rest::Connection.retryable(:tries => ConnectionHelper::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
491
+ GoodData::Rest::Connection.retryable(:tries => Helpers::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
490
492
  b.call
491
493
  end
492
494
  end
@@ -543,7 +545,7 @@ module GoodData
543
545
  end
544
546
 
545
547
  def process_response(options = {}, &block)
546
- retries = options[:tries] || 3 # ConnectionHelper::GD_MAX_RETRY
548
+ retries = options[:tries] || Helpers::GD_MAX_RETRY
547
549
  process = options[:process]
548
550
  dont_reauth = options[:dont_reauth]
549
551
  options = options.reject { |k, _| [:process, :dont_reauth].include?(k) }
@@ -700,7 +702,7 @@ module GoodData
700
702
  method = :get
701
703
  GoodData.logger.debug "#{method}: #{url}"
702
704
 
703
- GoodData::Rest::Connection.retryable(:tries => ConnectionHelper::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
705
+ GoodData::Rest::Connection.retryable(:tries => Helpers::GD_MAX_RETRY, :refresh_token => proc { refresh_token }) do
704
706
  raw = {
705
707
  :method => method,
706
708
  :url => url,
@@ -6,7 +6,7 @@
6
6
 
7
7
  # GoodData Module
8
8
  module GoodData
9
- VERSION = '0.6.48'
9
+ VERSION = '0.6.49'
10
10
 
11
11
  class << self
12
12
  # Version
@@ -12,7 +12,7 @@ module GoodData
12
12
  module Environment
13
13
  module ConnectionHelper
14
14
  set_const :GD_PROJECT_TOKEN, ENV["GD_PROJECT_TOKEN"]
15
- set_const :GD_MAX_RETRY, (ENV["GD_MAX_RETRY"] && ENV["GD_MAX_RETRY"].to_i) || 3
15
+ set_const :GD_MAX_RETRY, Helpers::GD_MAX_RETRY
16
16
 
17
17
  set_const :DEFAULT_USERNAME, "tomas.korcak+gem_tester@gooddata.com"
18
18
  set_const :TEST_USERNAME, "john.doe@gooddata.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.48
4
+ version: 0.6.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kolesnikov
@@ -11,22 +11,48 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-11-30 00:00:00.000000000 Z
14
+ date: 2016-12-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.13'
20
23
  - - ">="
21
24
  - !ruby/object:Gem::Version
22
- version: '0'
25
+ version: 1.13.6
23
26
  type: :development
24
27
  prerelease: false
25
28
  version_requirements: !ruby/object:Gem::Requirement
26
29
  requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.13'
27
33
  - - ">="
28
34
  - !ruby/object:Gem::Version
29
- version: '0'
35
+ version: 1.13.6
36
+ - !ruby/object:Gem::Dependency
37
+ name: debase
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.1'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.7
46
+ type: :development
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.1'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.1.7
30
56
  - !ruby/object:Gem::Dependency
31
57
  name: license_finder
32
58
  requirement: !ruby/object:Gem::Requirement
@@ -113,20 +139,20 @@ dependencies:
113
139
  requirements:
114
140
  - - "~>"
115
141
  - !ruby/object:Gem::Version
116
- version: '3.4'
142
+ version: '3.5'
117
143
  - - ">="
118
144
  - !ruby/object:Gem::Version
119
- version: 3.4.0
145
+ version: 3.5.0
120
146
  type: :development
121
147
  prerelease: false
122
148
  version_requirements: !ruby/object:Gem::Requirement
123
149
  requirements:
124
150
  - - "~>"
125
151
  - !ruby/object:Gem::Version
126
- version: '3.4'
152
+ version: '3.5'
127
153
  - - ">="
128
154
  - !ruby/object:Gem::Version
129
- version: 3.4.0
155
+ version: 3.5.0
130
156
  - !ruby/object:Gem::Dependency
131
157
  name: rspec-expectations
132
158
  requirement: !ruby/object:Gem::Requirement