raykit 0.0.422 → 0.0.424
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/command.rb +7 -0
- data/lib/raykit/git/repository.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c80318f0939d820f982acf8644b5ecee11f2f83750d80ab4c6d1ed045bbace9
|
4
|
+
data.tar.gz: de8e2f76d8922232d6a99e6d603a40e3211dcc17d62cb3d6a841026c77afe2e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ff70196d60fefe7b66075567a32700a5964ea728ed29ed774e895562a5b47465e025e3a144e555178e772c2bfeb4a399b24177ea08854ddeae5dd4273eef98
|
7
|
+
data.tar.gz: 161dc927c64f03bb4fb8d4e5318887e1eb160b978174cdfd1d970646c3c23df2cd71f20e1673815faf66951db7bc9d2598dff6b9cb80815ca8b0ebe7e1ce9256
|
data/lib/raykit/command.rb
CHANGED
@@ -264,6 +264,13 @@ module Raykit
|
|
264
264
|
self
|
265
265
|
end
|
266
266
|
|
267
|
+
def save_as(filename)
|
268
|
+
File.open(filename, "w") do |f|
|
269
|
+
f.write(JSON.pretty_generate(to_hash))
|
270
|
+
end
|
271
|
+
self
|
272
|
+
end
|
273
|
+
|
267
274
|
def log_to_file(filename)
|
268
275
|
File.delete(filename) if File.exists?(filename)
|
269
276
|
File.open(filename, "w") { |f|
|
@@ -77,9 +77,11 @@ module Raykit
|
|
77
77
|
# The latest commit id for a branch of the repostiory
|
78
78
|
def latest_commit(branch)
|
79
79
|
if checkout_local_clone_directory_branch(branch)
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
Dir.chdir(local_clone_directory) do
|
81
|
+
text = `git log -n 1`
|
82
|
+
scan = text.scan(/commit (\w+)\s/)
|
83
|
+
return scan[0][0].to_s
|
84
|
+
end
|
83
85
|
end
|
84
86
|
""
|
85
87
|
end
|
@@ -162,7 +164,6 @@ module Raykit
|
|
162
164
|
FileUtils.rm_rf(".git")
|
163
165
|
cmd = Raykit::Command.new(command)
|
164
166
|
cmd = cmd.run().summary().details_on_failure
|
165
|
-
#cmd = run(command).details_on_failure
|
166
167
|
end
|
167
168
|
FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
|
168
169
|
cmd
|