git_local 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_local/repository.rb +8 -5
- data/lib/git_local/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbda12a56bce862f7a3aa3db2e8a3c321117b49c
|
4
|
+
data.tar.gz: 283d7b31670a371b926a10dd1d29376c4b13ab1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eda22ed05ab8f70153aa8553c5f44ceed4b4e09783876063cc51efe65d4926a15dcff170173e077964c602fb41c928522d444f602c07c8e35fc418ad0bc0ac1
|
7
|
+
data.tar.gz: 0b99c6ae86427664bd126952d5c369cd8700f6cb5cae960f232452495e3e4a0bc67aaa54ac9af7cb8741db6c44532ba4eeda1f0fdc2c54b8073abdc0597d968a
|
data/lib/git_local/repository.rb
CHANGED
@@ -6,12 +6,15 @@ module GitLocal
|
|
6
6
|
class InvalidArgument < StandardError
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
GITHUB_HOST = "github.com".freeze
|
10
|
+
|
11
|
+
def initialize(org:, repo:, branch:, local_directory:, host: GITHUB_HOST)
|
10
12
|
check_for_special_characters(org, repo, branch, local_directory)
|
11
|
-
@org = org
|
12
|
-
@repo = repo
|
13
13
|
@branch = branch
|
14
|
+
@host = host
|
14
15
|
@local_directory = local_directory
|
16
|
+
@org = org
|
17
|
+
@repo = repo
|
15
18
|
end
|
16
19
|
|
17
20
|
def get
|
@@ -74,12 +77,12 @@ module GitLocal
|
|
74
77
|
|
75
78
|
private
|
76
79
|
|
77
|
-
attr_reader :
|
80
|
+
attr_reader :branch, :host, :local_directory, :org, :repo
|
78
81
|
|
79
82
|
def clone_and_checkout
|
80
83
|
FileUtils.makedirs(repo_path) unless Dir.exist?(repo_path)
|
81
84
|
|
82
|
-
popened_io = IO.popen("(cd #{repo_path} && git clone git
|
85
|
+
popened_io = IO.popen("(cd #{repo_path} && git clone git@#{host}:#{org_repo}.git --branch #{branch} --single-branch #{branch} && cd #{path}) 2>&1")
|
83
86
|
out = popened_io.map(&:chomp) || []
|
84
87
|
Process.wait(popened_io.pid)
|
85
88
|
|
data/lib/git_local/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Galvanize Product
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.6.6
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: A lightweight git command line wrapper in Ruby
|