marathon-api 1.3.0 → 1.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3921a3fe5bd4c9ad4c204cdc19817507e74bfd4
4
- data.tar.gz: fa9a7edb2421055296268c1675a6a1af4a164e2d
3
+ metadata.gz: d8120f444ee6b770c56bbeee8147f12d5ed12592
4
+ data.tar.gz: 902fbb08a032d180c327829a9cba312990132bfb
5
5
  SHA512:
6
- metadata.gz: 64b24ff2efea7b645643255e82da98d8fb28d73a69ac1f3a7034de3fcaca1960c9c354ee9faf877b145758637caaea975c5b7e3715cd06d67fbf0b4107fad8e0
7
- data.tar.gz: b8f95656fe4c1dda9eddb51adea9ec0d7137dc437d9cc17aee50406a87c21e0bee0bd2e913c938080e0eb830a16917da3442288253154266b1c6d81503012258
6
+ metadata.gz: 0a7df8a3e78af7863a074fe83d8481fea105033a47d4e15de8aa74b112d40346503e78ab6cde0ff7264b0b6b9214a70bcc8e7a4a8e7ffee9827a674860101f25
7
+ data.tar.gz: 83ee36b57d5760db1c0fd5e963a2cea31daddb916c0206e8c1e72e5e96f290393617299538c2ddce98df6756299b27960080fbfe8e412fc45e6d7a1ceab46967
data/README.md CHANGED
@@ -3,7 +3,7 @@ marathon-api
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/marathon-api.svg)](http://badge.fury.io/rb/marathon-api) [![travis-ci](https://travis-ci.org/otto-de/marathon-api.png?branch=master)](https://travis-ci.org/otto-de/marathon-api) [![Code Climate](https://codeclimate.com/github/otto-de/marathon-api/badges/gpa.svg)](https://codeclimate.com/github/otto-de/marathon-api) [![Test Coverage](https://codeclimate.com/github/otto-de/marathon-api/badges/coverage.svg)](https://codeclimate.com/github/otto-de/marathon-api)
5
5
 
6
- This gem provides an object oriented interface to the [Marathon Remote API][1]. At the time if this writing, marathon-api is meant to interface with Marathon version 0.8.1.
6
+ This gem provides an object oriented interface to the [Marathon Remote API][1]. At the time if this writing, marathon-api is meant to interface with Marathon version 0.10.1.
7
7
 
8
8
  Installation
9
9
  ------------
@@ -141,11 +141,13 @@ Global options:
141
141
  EOS
142
142
 
143
143
  opt :url, 'Marathon host (default http://localhost:8080, or MARATHON_URL)',
144
- :short => '-M', :type => String
144
+ :short => '-M', :type => String, :default => Marathon.url
145
145
  opt :username, 'User name to authenticate against Marathon (optional, default unset, or MARATHON_USER).',
146
- :short => '-U', :type => String
146
+ :short => '-U', :type => String, :default => Marathon.options[:username]
147
147
  opt :password, 'Password to authenticate against Marathon (optional, default unset, or MARATHON_PASSWORD).',
148
- :short => '-P', :type => String
148
+ :short => '-P', :type => String, :default => Marathon.options[:password]
149
+ opt :insecure, 'Ignore certificate verification failure (optional, default false, or MARATHON_INSECURE).',
150
+ :short => '-I', :default => Marathon.options[:insecure]
149
151
  stop_on SUB_COMMANDS
150
152
  end
151
153
  return global_opts
@@ -2,6 +2,7 @@ require 'rubygems/package'
2
2
  require 'httparty'
3
3
  require 'json'
4
4
  require 'uri'
5
+ require 'timeout'
5
6
 
6
7
  # The top-level module for this gem. It's purpose is to hold global
7
8
  # configuration variables that are used as defaults in other classes.
@@ -91,6 +92,7 @@ module Marathon
91
92
  opts = {}
92
93
  opts[:username] = ENV['MARATHON_USER'] if ENV['MARATHON_USER']
93
94
  opts[:password] = ENV['MARATHON_PASSWORD'] if ENV['MARATHON_PASSWORD']
95
+ opts[:insecure] = ENV['MARATHON_INSECURE'] == 'true' if ENV['MARATHON_INSECURE']
94
96
  opts
95
97
  end
96
98
 
@@ -29,6 +29,13 @@ class Marathon::Connection
29
29
  @options.delete(:username)
30
30
  @options.delete(:password)
31
31
  end
32
+
33
+ # The insecure option allows ignoring bad (or self-signed) SSL
34
+ # certificates.
35
+ if @options[:insecure]
36
+ @options[:verify] = false
37
+ @options.delete(:insecure)
38
+ end
32
39
  end
33
40
 
34
41
  # Delegate all HTTP methods to the #request.
@@ -1,5 +1,3 @@
1
- require 'timeout'
2
-
3
1
  # This class represents a Marathon Deployment information.
4
2
  # It is returned by asynchronious deployment calls.
5
3
  class Marathon::DeploymentInfo < Marathon::Base
@@ -1,3 +1,3 @@
1
1
  module Marathon
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marathon-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Bechstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json