mio-config 2.24.0 → 2.25.0

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: 4049a519bee7277c4ae974c1d1922a692f70f94f
4
- data.tar.gz: f80b1bf04cb039832a05b998eee445948442e537
3
+ metadata.gz: 5384369abd8d92f6d39c422e2d6eeb39957e3e0a
4
+ data.tar.gz: ad1ebe658dff9bd8ae41c4e7df329ec8abb80be0
5
5
  SHA512:
6
- metadata.gz: b6d621796df25ffbe697bf85fb57ee1c61e79cb66240aca0fa392c6b420aa57be5e93878d61677abd16c2bbccc8629ce97f2bf512a53d944cc5f304652c4e48f
7
- data.tar.gz: 656316399ff3022d979c5fab49661819c45a2175985ae18800b8b73cbac2a2dca82d58fde30e4d4edec22e79d2ff64fd0258f2fedda50c54ff059f9a1a86ae5e
6
+ metadata.gz: cdc0dbe73357acc46d2d89c27d0589e93ad88880a02c859b6933414fa93fff4fc4f43a3526aaa4a11f03efb978463fd25a7cb198607dd98d2e867abaa7c08634
7
+ data.tar.gz: d82baa3585a4fb7cac6b2556357d8052c58866421db43549eddb6d89e5bf58c1ac120818e5163e6acb542654ac341bbca96e39b573c12261cacf12f96badb443
data/lib/mio.rb CHANGED
@@ -7,18 +7,19 @@ require 'mio/model/autoload'
7
7
 
8
8
  class Mio
9
9
 
10
- attr_accessor :base_uri, :username, :password
10
+ attr_accessor :base_uri, :username, :password, :verify_ssl
11
11
  attr_reader :client
12
- def initialize base_uri=nil, username=nil, password=nil
12
+ def initialize base_uri=nil, username=nil, password=nil, verify_ssl=nil
13
13
  @base_uri = base_uri
14
14
  @username = username
15
15
  @password = password
16
+ @verify_ssl = verify_ssl
16
17
 
17
18
  if block_given?
18
19
  yield self
19
20
  end
20
21
 
21
- @client = Mio::Client.new @base_uri, @username, @password
22
+ @client = Mio::Client.new @base_uri, @username, @password, verify_ssl
22
23
  end
23
24
 
24
25
  end
data/lib/mio/client.rb CHANGED
@@ -10,9 +10,9 @@ require 'pp'
10
10
  class Mio
11
11
  class Client
12
12
 
13
- def initialize base_uri, username, password
13
+ def initialize base_uri, username, password, verify_ssl=true
14
14
  @base_uri = base_uri
15
- @agent = Faraday.new(url: base_uri) do |f|
15
+ @agent = Faraday.new(url: base_uri, ssl: {verify: verify_ssl }) do |f|
16
16
  f.adapter :net_http_persistent
17
17
  f.response :detailed_logger if ENV.fetch('VERBOSE', 'false').to_s.downcase == 'true'
18
18
  end
@@ -4,11 +4,12 @@ require 'mio/config'
4
4
 
5
5
  class Mio
6
6
  class Migrations
7
- def initialize base_uri, username, password, base_dir='./migrations'
7
+ def initialize base_uri, username, password, verify_ssl, base_dir='./migrations'
8
8
  @mio = Mio.new do |m|
9
9
  m.base_uri = base_uri
10
10
  m.username = username
11
11
  m.password = password
12
+ m.verify_ssl = verify_ssl
12
13
  end
13
14
  @base = File.expand_path(base_dir)
14
15
  @migrations = Dir.glob( File.join(@base, '*.rb') ).sort
@@ -10,7 +10,8 @@ namespace :mio do
10
10
  config = Mio::Config.read File.expand_path './config/mio.yml'
11
11
  migrater = Mio::Migrations.new(config.base_url,
12
12
  config.username,
13
- config.password )
13
+ config.password,
14
+ config.verify_ssl )
14
15
  migrater.run_migrations
15
16
  end
16
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mio-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.24.0
4
+ version: 2.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jspc