indocker 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: b26827edabc3dcae5d27465689bcfa96fc00f7649eecb978af3f766dbf834a78
4
- data.tar.gz: 30bcfaa047bc22995b77cb695ff58d7624d6a3702b97c99df900bbaddd3e9e18
3
+ metadata.gz: e8c37678a3d0b00e17c7e819b8565f0a4bb9330351a66711da35ab2a4fb6681e
4
+ data.tar.gz: dc921c4c6839a9b31392a8373f1231c359261d8759eab8566934a221ddcb9d14
5
5
  SHA512:
6
- metadata.gz: 8c518149fae3e281c98d1620abc68cb192c741843dd583121e0e6cc3c7b24802fe33d5ebf8b257677fba77b64ce052a474d73b9a9efdb9045222d64f34d9f266
7
- data.tar.gz: 1ca41ab244943db566081ac81efdf1ffb0f4a886ce480b39e8d55c595757de249df2c33321ab82a1cee6f0807695ad827cf7218907420802087066b7125b5099
6
+ metadata.gz: 78e90ff4a4970faa4e98b968da758e11fe8bcfd391a68f38c9c1c16210b09dbd93c6801e35873e2fa2fc5348af6e6467b3dfb299d4e3e879ef16391f43730504
7
+ data.tar.gz: f585568265e524e2061bd3e8aab6330c8d4c0a0379ee6a0f4a05ad82dfe6089cbd1624205c98cbfb2df98af80ac81671289e51502f0f1fe45b1fdee1473e605f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- indocker (0.1.2)
4
+ indocker (0.1.3)
5
5
  net-ssh
6
6
 
7
7
  GEM
@@ -10,6 +10,8 @@ class Indocker::Repositories::Clonner
10
10
  raise ArgumenError.new("only git repositories should be clonned") if !repository.is_git?
11
11
 
12
12
  session.exec!("rm -rf #{repository.clone_path} && mkdir -p #{repository.clone_path}")
13
- session.exec!("git clone -b #{repository.branch} --depth 1 #{repository.remote_url} #{repository.clone_path}")
13
+
14
+ git_command = "git clone -b #{repository.branch} --depth 1 #{repository.remote_url} #{repository.clone_path}"
15
+ session.exec!("ssh-agent bash -c 'ssh-add ~/.ssh/#{repository.ssh_key}; #{git_command}'")
14
16
  end
15
17
  end
@@ -1,13 +1,16 @@
1
1
  class Indocker::Repositories::Git < Indocker::Repositories::Abstract
2
- attr_reader :remote_url, :remote_name, :email, :password, :branch
2
+ attr_reader :remote_url, :remote_name, :email, :password, :branch, :ssh_key
3
3
 
4
- def setup(remote_name:, remote_url:, email: nil, password: nil, branch:, clone_path: nil)
4
+ DEFAULT_SSH_KEY = "id_rsa"
5
+
6
+ def setup(remote_name:, remote_url:, email: nil, password: nil, branch:, clone_path: nil, ssh_key: DEFAULT_SSH_KEY)
5
7
  @remote_name = remote_name
6
8
  @remote_url = remote_url
7
9
  @email = email
8
10
  @password = password
9
11
  @branch = branch
10
12
  @clone_path = clone_path
13
+ @ssh_key = ssh_key
11
14
  self
12
15
  end
13
16
 
@@ -1,3 +1,3 @@
1
1
  module Indocker
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-13 00:00:00.000000000 Z
12
+ date: 2020-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh