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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8711a3a9000bf35b52b5883bd6b19619bef1302e
4
- data.tar.gz: 6407e71fe05f3220b096b1c4b46f288cefb324f9
3
+ metadata.gz: 8425645fbd02a46e7d3f61e5143791f12eb2ea7b
4
+ data.tar.gz: cdf324f820e824c50ac4e4f45c8b526a44657727
5
5
  SHA512:
6
- metadata.gz: e4d94645e5a59733c1f19e3ed0f21e524478f6550c887d1df75a0792aa07948f9bfc4b8e6016f1b821899225b8a9415df6e2dbaf213ccfaa274fc8ff3200c6c5
7
- data.tar.gz: f10449f6e710fa456536cbf1f868bdd031648aaca726282742d95c46e5b08c69458aab28dddf0abe3eda05af5871b40747f3677f48eea0ea603cc301771adc22
6
+ metadata.gz: 92052c93d17f2e0350d1b5e036f8c38ae8830fdbe12c36f90f2f789f3ac5917f1d0ed8d79cbe9dc0185f86bbde329e648647d3779a8cd24a55d3d8e643e2a4e9
7
+ data.tar.gz: d1371fcc9755c381ae44c815b58104c31cbded08316bf4ae05b8100bf2df9ca0697b6b0d3528fcc4d6a38686f66a1eecde3cb5cdba10f4e7c63439be28ba2ccb
@@ -1,3 +1,3 @@
1
1
  module Ruggy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -7,7 +7,7 @@ module Ruggy
7
7
  using Mushin::Ext
8
8
 
9
9
  def initialize app=nil, opts={}, params={}
10
- @app = 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] = @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
- #outbound of ruggy
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, filepath
57
- Rugged::Repository.clone_at(@clone_url, @local_repo_path)
58
- @repo = Rugged::Repository.new(@local_repo_path)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mushin_ext_ruggy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zotherstupidguy