mortar 0.15.34 → 0.15.35

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: eb704f9777ead4b5d30e637fb29c2cd5a26c9db5
4
- data.tar.gz: 9f9a43b74563afc9e65496e6e7c68d26c9f267db
3
+ metadata.gz: f1af4bac377a7a95eefec47faae9b406272ef148
4
+ data.tar.gz: 8d608eb27fdaff84f95c40b5f3cfc95cf66ccd1c
5
5
  SHA512:
6
- metadata.gz: dcae6766059d62a1a003b63d1c7b8d79a8c1dcad06e6a4392584901fd164dc353484bf959be88098d57c64133664ed779d3f87caf3de185adc734563d45b3b18
7
- data.tar.gz: 7f779a2568eccce1cf0fe5bb9679a8fbc38d2d13bdbbddce002d3a57657072e468ebe0f139ae258c49895777cfc76f0e6baf2c1d0df4a00c8c33c87460ce7f7f
6
+ metadata.gz: b0de0a07fb008803c5e9cb3a29f1f7e12be45071273cf406d68b1b82904d83020eec692611c9e0285be6014b15f8cf2c5790b9458ea5701844469f05207a8eb7
7
+ data.tar.gz: ee45681c4d2f0fc5bef2e22607ef1e29dbc37360edcf40e96bd9cabb56b9d2124ae69fe0e27f53ea559d47ea87dd32837c74f54140f9cd38f2ecbb5a66567067
@@ -28,7 +28,7 @@ class Mortar::Auth
28
28
  include Mortar::Helpers
29
29
 
30
30
  attr_accessor :credentials
31
-
31
+
32
32
  def api
33
33
  @api ||= begin
34
34
  require("mortar-api-ruby")
@@ -50,11 +50,11 @@ class Mortar::Auth
50
50
  delete_credentials
51
51
  get_credentials
52
52
  end
53
-
53
+
54
54
  def logout
55
55
  delete_credentials
56
56
  end
57
-
57
+
58
58
  def check
59
59
  @mortar_user = api.get_user.body
60
60
  #Need to ensure user has a github_username
@@ -67,7 +67,7 @@ class Mortar::Auth
67
67
  end
68
68
  end
69
69
  end
70
-
70
+
71
71
  def reauthorize
72
72
  @credentials = ask_for_and_save_credentials
73
73
  end
@@ -267,7 +267,7 @@ class Mortar::Auth
267
267
  user_result = api.get_user().body
268
268
  end
269
269
 
270
- redisplay("Setting github username: %s" %
270
+ redisplay("Setting github username: %s" %
271
271
  [is_finished ? " Done!" : spinner(ticks)],
272
272
  is_finished) # only display newline on last message
273
273
  if is_finished
@@ -283,7 +283,7 @@ class Mortar::Auth
283
283
  output_with_bang error_message
284
284
  raise Mortar::CLI::Errors::InvalidGithubUsername.new
285
285
  when Mortar::API::Task::STATUS_SUCCESS
286
- display "Successfully set github username."
286
+ display "Successfully set github username."
287
287
 
288
288
  if user_result['github_team_state'] == 'pending'
289
289
  display pending_github_team_state_message(user_result['github_accept_invite_url'])
@@ -294,7 +294,7 @@ class Mortar::Auth
294
294
  end
295
295
  end
296
296
 
297
-
297
+
298
298
  def retry_login?
299
299
  @login_attempts ||= 0
300
300
  @login_attempts += 1
@@ -310,12 +310,11 @@ class Mortar::Auth
310
310
  def polling_interval
311
311
  (2.0).to_f
312
312
  end
313
-
313
+
314
314
 
315
315
  protected
316
316
 
317
317
  def default_params
318
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
319
318
  verify_ssl = ENV['MORTAR_SSL_VERIFY'] != 'disable' && full_host =~ %r|^https://mdog.datadoghq.com|
320
319
  uri = URI(full_host)
321
320
  {
@@ -7,6 +7,7 @@ module Mortar::Command
7
7
 
8
8
  # manage plugins to the mortar gem
9
9
  class Plugins < Base
10
+ include Mortar::Helpers
10
11
 
11
12
  # plugins
12
13
  #
@@ -123,7 +124,6 @@ module Mortar::Command
123
124
  private
124
125
 
125
126
  def record_usage(usage_type, plugin_name)
126
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
127
127
  url = full_host + "/usage/#{usage_type}"
128
128
 
129
129
  headers = {'User-Agent' => Mortar::USER_AGENT}
@@ -39,19 +39,23 @@ module Mortar
39
39
  end
40
40
 
41
41
  def default_host
42
- "mortardata.com"
42
+ "mdog.datadoghq.com"
43
43
  end
44
-
44
+
45
45
  def host
46
46
  ENV['MORTAR_HOST'] || default_host
47
47
  end
48
48
 
49
+ def full_host
50
+ (host =~ /^http/) ? host : "https://#{host}"
51
+ end
52
+
49
53
  def test_name
50
54
  ENV['MORTAR_TEST_NAME']
51
55
  end
52
-
56
+
53
57
  def installed_with_omnibus?
54
- File.exists?('/opt/mortar/install/version-manifest.txt')
58
+ File.exists?('/opt/mortar/install/version-manifest.txt')
55
59
  end
56
60
 
57
61
  def write_to_file(str_data, path, mkdir_p=true)
@@ -63,20 +67,20 @@ module Mortar
63
67
 
64
68
  def download_to_file(url, path, mkdir_p=true)
65
69
  content_length = 0
66
-
70
+
67
71
  set_content_length = lambda do |l|
68
72
  content_length = l
69
73
  end
70
74
  set_progress = lambda do |p|
71
75
  redisplay("Downloading #{path}: #{p.to_i} of #{content_length.to_i}")
72
76
  end
73
-
77
+
74
78
  open(url,
75
79
  :content_length_proc => set_content_length,
76
80
  :progress_proc => set_progress) do |f|
77
81
  write_to_file(f.read, path, mkdir_p)
78
82
  end
79
-
83
+
80
84
  end
81
85
 
82
86
  def display(msg="", new_line=true)
@@ -15,9 +15,11 @@
15
15
  #
16
16
 
17
17
  require "mortar/local/installutil"
18
+ require "mortar/helpers"
18
19
 
19
20
  class Mortar::Local::Jython
20
21
  include Mortar::Local::InstallUtil
22
+ include Mortar::Helpers
21
23
 
22
24
  JYTHON_VERSION = '2.5.2'
23
25
  JYTHON_JAR_NAME = 'jython_installer-' + JYTHON_VERSION + '.jar'
@@ -63,8 +65,7 @@ class Mortar::Local::Jython
63
65
  end
64
66
 
65
67
  def jython_jar_url
66
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
67
68
  default_url = full_host + "/" + JYTHON_JAR_DEFAULT_URL_PATH
68
69
  ENV.fetch('JYTHON_JAR_URL', default_url)
69
70
  end
70
- end
71
+ end
@@ -23,6 +23,7 @@ require "mortar/local/params"
23
23
  class Mortar::Local::Pig
24
24
  include Mortar::Local::InstallUtil
25
25
  include Mortar::Local::Params
26
+ include Mortar::Helpers
26
27
 
27
28
  PIG_LOG_FORMAT = "humanreadable"
28
29
  LIB_TGZ_NAME = "lib-common.tar.gz"
@@ -55,7 +56,7 @@ class Mortar::Local::Pig
55
56
  def initialize
56
57
  @temp_file_objects = []
57
58
 
58
- @resource_locations = {
59
+ @resource_locations = {
59
60
  "illustrate_template" => File.expand_path("../../templates/report/illustrate-report.html", __FILE__),
60
61
  "illustrate_css" => File.expand_path("../../../../css/illustrate.css", __FILE__),
61
62
  "jquery" => File.expand_path("../../../../js/jquery-1.7.1.min.js", __FILE__),
@@ -91,13 +92,11 @@ class Mortar::Local::Pig
91
92
  end
92
93
 
93
94
  def pig_archive_url(pig_version)
94
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
95
95
  default_url = full_host + "/" + pig_version.tgz_default_url_path
96
96
  ENV.fetch('PIG_DISTRO_URL', default_url)
97
97
  end
98
98
 
99
99
  def lib_archive_url
100
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
101
100
  default_url = full_host + "/" + PIG_COMMON_LIB_URL_PATH
102
101
  ENV.fetch('COMMON_LIB_DISTRO_URL', default_url)
103
102
  end
@@ -282,7 +281,7 @@ class Mortar::Local::Pig
282
281
  # Now point us at the script/alias to illustrate
283
282
  illustrate_outpath = create_illustrate_output_path()
284
283
  cmd += "-script #{pig_script.path} -out #{illustrate_outpath} "
285
-
284
+
286
285
  if skip_pruning
287
286
  cmd += " -skipPruning "
288
287
  end
@@ -425,5 +424,5 @@ class Mortar::Local::Pig
425
424
  warn "[DEPRECATION] Please call automatic_parameters instead"
426
425
  automatic_parameters
427
426
  end
428
-
427
+
429
428
  end
@@ -14,12 +14,14 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
+ require "mortar/helpers"
17
18
  require "mortar/local/installutil"
18
19
  require "mortar/local/params"
19
20
 
20
21
  class Mortar::Local::Python
21
22
  include Mortar::Local::InstallUtil
22
23
  include Mortar::Local::Params
24
+ include Mortar::Helpers
23
25
 
24
26
  PYTHON_OSX_TGZ_NAME = "mortar-python-osx.tgz"
25
27
  PYTHON_OSX_TGZ_DEFAULT_URL_PATH = "resource/python_osx"
@@ -164,7 +166,6 @@ class Mortar::Local::Python
164
166
  end
165
167
 
166
168
  def python_archive_url
167
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
168
169
  default_url = full_host + "/" + PYTHON_OSX_TGZ_DEFAULT_URL_PATH
169
170
  return ENV.fetch('PYTHON_DISTRO_URL', default_url)
170
171
  end
@@ -235,7 +236,6 @@ class Mortar::Local::Python
235
236
  end
236
237
 
237
238
  def mortar_package_url(package)
238
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
239
239
  default_url = full_host + "/" + PYPI_URL_PATH
240
240
  "#{ENV.fetch('MORTAR_PACKAGE_URL', default_url)}/#{package}"
241
241
  end
@@ -324,7 +324,7 @@ class Mortar::Local::Python
324
324
  end
325
325
 
326
326
  def run_stillson_luigi_client_cfg_expansion(luigi_script, project_config_parameters)
327
- # combine automatic mortar parameters with
327
+ # combine automatic mortar parameters with
328
328
  # parameters provided in the project config
329
329
  auto_params = automatic_parameters()
330
330
  parameters = merge_parameters(auto_params, project_config_parameters)
@@ -21,6 +21,7 @@ require "mortar/local/installutil"
21
21
 
22
22
  class Mortar::Local::Sqoop
23
23
  include Mortar::Local::InstallUtil
24
+ include Mortar::Helpers
24
25
 
25
26
  def install_or_update
26
27
  @command = "#{local_install_directory}/python/bin/python"
@@ -37,7 +38,6 @@ class Mortar::Local::Sqoop
37
38
  end
38
39
 
39
40
  def sqoop_url
40
- full_host = (host =~ /^http/) ? host : "https://api.#{host}"
41
41
  default_url = full_host + "/" + "resource/sqoop"
42
42
  return ENV.fetch('SQOOP_DISTRO_URL', default_url)
43
43
  end
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Mortar
18
18
  # see http://semver.org/
19
- VERSION = "0.15.34"
19
+ VERSION = "0.15.35"
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mortar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.34
4
+ version: 0.15.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mortar Data
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -365,8 +365,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
365
  version: '0'
366
366
  requirements: []
367
367
  rubyforge_project:
368
- rubygems_version: 2.4.6
368
+ rubygems_version: 2.4.4
369
369
  signing_key:
370
370
  specification_version: 4
371
371
  summary: Client library and CLI to interact with the Mortar service.
372
372
  test_files: []
373
+ has_rdoc: