mushin_ext_ruggy 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Ruggy/version.rb +1 -1
- data/lib/mushin_ext_ruggy.rb +11 -14
- 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: 8425645fbd02a46e7d3f61e5143791f12eb2ea7b
|
4
|
+
data.tar.gz: cdf324f820e824c50ac4e4f45c8b526a44657727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92052c93d17f2e0350d1b5e036f8c38ae8830fdbe12c36f90f2f789f3ac5917f1d0ed8d79cbe9dc0185f86bbde329e648647d3779a8cd24a55d3d8e643e2a4e9
|
7
|
+
data.tar.gz: d1371fcc9755c381ae44c815b58104c31cbded08316bf4ae05b8100bf2df9ca0697b6b0d3528fcc4d6a38686f66a1eecde3cb5cdba10f4e7c63439be28ba2ccb
|
data/lib/Ruggy/version.rb
CHANGED
data/lib/mushin_ext_ruggy.rb
CHANGED
@@ -7,7 +7,7 @@ module Ruggy
|
|
7
7
|
using Mushin::Ext
|
8
8
|
|
9
9
|
def initialize app=nil, opts={}, params={}
|
10
|
-
@app
|
10
|
+
@app = app
|
11
11
|
@opts = opts
|
12
12
|
@params = params
|
13
13
|
end
|
@@ -26,12 +26,7 @@ module Ruggy
|
|
26
26
|
#outbound code
|
27
27
|
when :cqrs_command
|
28
28
|
#inbound code
|
29
|
-
env[:repo] =
|
30
|
-
|
31
|
-
#env[:repo][:master][:commit_sha][:blob_sha]
|
32
|
-
#env[:repo][:master][:filepath]
|
33
|
-
env[:repo][:blob][:branch][:filepath]
|
34
|
-
env[:repo][:tree][:branch][:dirpath]
|
29
|
+
env[:repo] = clone_repo(env[@params[:slug][:clone_url]], @params[:local_repo_path])
|
35
30
|
|
36
31
|
@app.call(env)
|
37
32
|
#outbound code
|
@@ -41,10 +36,7 @@ module Ruggy
|
|
41
36
|
|
42
37
|
end
|
43
38
|
|
44
|
-
#
|
45
|
-
|
46
|
-
#outbound of gitlapse
|
47
|
-
env[:lapses] = [{:lapse_id =>"#{start_blob_sha}_#{finish_blob_sha}", :start_blob_content => "", :finish_blob_content => "", :lapse => "thecontentofthelapse to be viewed in the browser", :lapse_metadata => "json stuff"}]
|
39
|
+
#env[:lapses] = [{:lapse_id =>"#{start_blob_sha}_#{finish_blob_sha}", :start_blob_content => "", :finish_blob_content => "", :lapse => "thecontentofthelapse to be viewed in the browser", :lapse_metadata => "json stuff"}]
|
48
40
|
|
49
41
|
def generate_lapses_hash commits, filepath
|
50
42
|
commits.each do |commit|
|
@@ -53,9 +45,14 @@ module Ruggy
|
|
53
45
|
end
|
54
46
|
end
|
55
47
|
|
56
|
-
def clone_repo clone_url, local_repo_path
|
57
|
-
Rugged::Repository.clone_at(@clone_url, @local_repo_path)
|
58
|
-
|
48
|
+
def clone_repo clone_url, local_repo_path
|
49
|
+
# Rugged::Repository.clone_at(@clone_url, @local_repo_path)
|
50
|
+
Rugged::Repository.clone_at(@clone_url, @local_repo_path, {
|
51
|
+
transfer_progress: lambda { |total_objects, indexed_objects, received_objects, local_objects, total_deltas, indexed_deltas, received_bytes|
|
52
|
+
print("\r total_objects: #{total_objects}, indexed_objects: #{indexed_objects}, received_objects: #{received_objects}, local_objects: #{local_objects}, total_deltas: #{total_deltas}, indexed_deltas: #{indexed_deltas}, received_bytes: #{received_bytes}")
|
53
|
+
}
|
54
|
+
})
|
55
|
+
return @repo = Rugged::Repository.new(@local_repo_path)
|
59
56
|
end
|
60
57
|
|
61
58
|
=begin
|