clone_git_file 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clone_git_file/version.rb +1 -1
- data/lib/clone_git_file.rb +5 -5
- 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: ec35eda62d60421bbfcb6e0c3002d6f0e2c4b304
|
4
|
+
data.tar.gz: abbcab95f99f19000ffae574650d66a112678ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821445e71339f6a7c7f863bfe5053d7759aea267b3cfe2d27cd0da7126c026fb7869e504134b8558933e5e8fe8a545d56e2418ef36c2507ed3d84036df027cb3
|
7
|
+
data.tar.gz: 7e26cda4214a41e91196b87e7f419af06944fdf786309ff5f283d6f9c18f459b8fe9e762f3a9f41574548db29bac830c8225fb15a3f2bdc32cca07ae59633d1d
|
data/lib/clone_git_file.rb
CHANGED
@@ -40,9 +40,9 @@ module CloneGitFile
|
|
40
40
|
|
41
41
|
# change into the directory so that relative file loads will work
|
42
42
|
if File.directory?(file_path)
|
43
|
-
commands <<
|
43
|
+
commands << %(cd "#{file_path}")
|
44
44
|
else
|
45
|
-
commands <<
|
45
|
+
commands << %(cd "#{File.dirname(file_path)}")
|
46
46
|
end
|
47
47
|
commands << %(\n#{ENV["EDITOR"]} "#{file_path}")
|
48
48
|
|
@@ -62,11 +62,11 @@ module CloneGitFile
|
|
62
62
|
|
63
63
|
def clone_repo
|
64
64
|
commands = ""
|
65
|
-
commands <<
|
65
|
+
commands << %(git clone #{parsed_data.repo_url} "#{local_repo_path}")
|
66
66
|
|
67
67
|
branch_name = parsed_data.branch_name
|
68
68
|
if branch_name && branch_name != ""
|
69
|
-
commands <<
|
69
|
+
commands << %(\ncd "#{local_repo_path}")
|
70
70
|
commands << "\ngit checkout #{parsed_data.branch_name}"
|
71
71
|
end
|
72
72
|
|
@@ -78,7 +78,7 @@ module CloneGitFile
|
|
78
78
|
def update_repo
|
79
79
|
commands = ""
|
80
80
|
|
81
|
-
commands <<
|
81
|
+
commands << %(cd "#{local_repo_path}")
|
82
82
|
commands << "\ngit reset HEAD --hard"
|
83
83
|
commands << "\ngit pull"
|
84
84
|
commands << "\ngit checkout #{parsed_data.branch_name}" if parsed_data.branch_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clone_git_file
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Conway
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.5.1
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: A small tool which allows you to easily clone and open a file from git services
|