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 +4 -4
- data/lib/mio.rb +4 -3
- data/lib/mio/client.rb +2 -2
- data/lib/mio/migrations.rb +2 -1
- data/lib/mio/tasks/migrations.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5384369abd8d92f6d39c422e2d6eeb39957e3e0a
|
4
|
+
data.tar.gz: ad1ebe658dff9bd8ae41c4e7df329ec8abb80be0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/mio/migrations.rb
CHANGED
@@ -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
|
data/lib/mio/tasks/migrations.rb
CHANGED
@@ -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
|