gollum-rjgit_adapter 1.1-java → 2.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gollum-rjgit_adapter.gemspec +1 -1
- data/lib/rjgit_adapter/git_layer_rjgit.rb +10 -2
- data/lib/rjgit_adapter/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b43b7c10bac608a25d31dd1e9ead18db91b115bfc022b892ae47eff6113ed59
|
4
|
+
data.tar.gz: 0a0e6af732771952c77f2f69215395c7c1ebf5dc178f800c7e2ea6b522ef4617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92d672432737fedbf2edc45499292f12e238268b63c07ffc18ef94bd47fbe367f8eb4c35914a075d3863af6c5aea9bf8f6a5a6e3c8c607849e84e8879b441c2d
|
7
|
+
data.tar.gz: 3bde52190df00ef1921a04d4dcb777e2f8a37394b489a161ee92f880327e7512e0a54244f3409e07805e9cd6a74a943f350d1c6a229aeae58c59b5ef8a90ed11
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{Adapter for Gollum to use RJGit at the backend.}
|
13
13
|
s.description = %q{Adapter for Gollum to use RJGit at the backend.}
|
14
14
|
|
15
|
-
s.add_runtime_dependency "rjgit", "~> 6.
|
15
|
+
s.add_runtime_dependency "rjgit", "~> 6.5"
|
16
16
|
s.add_development_dependency "rspec", "3.4.0"
|
17
17
|
|
18
18
|
s.files = Dir['lib/**/*.rb'] + ["README.md", "Gemfile"]
|
@@ -437,7 +437,7 @@ module Gollum
|
|
437
437
|
def lstree(sha, options={})
|
438
438
|
entries = RJGit::Porcelain.ls_tree(@repo.jrepo, nil, @repo.find(sha, :tree), {:recursive => options[:recursive]})
|
439
439
|
entries.map! do |entry|
|
440
|
-
entry[:mode] = entry[:mode]
|
440
|
+
entry[:mode] = entry[:mode]
|
441
441
|
entry[:sha] = entry[:id]
|
442
442
|
entry
|
443
443
|
end
|
@@ -478,13 +478,21 @@ module Gollum
|
|
478
478
|
end
|
479
479
|
|
480
480
|
def /(file)
|
481
|
-
@tree.send(:/, file)
|
481
|
+
obj = @tree.send(:/, file)
|
482
|
+
return nil if obj.nil?
|
483
|
+
obj.is_a?(RJGit::Tree) ? Gollum::Git::Tree.new(obj) : Gollum::Git::Blob.new(obj)
|
482
484
|
end
|
483
485
|
|
484
486
|
def blobs
|
485
487
|
return Array.new if @tree == {}
|
486
488
|
@tree.blobs.map{|blob| Gollum::Git::Blob.new(blob) }
|
487
489
|
end
|
490
|
+
|
491
|
+
def find_blob(&block)
|
492
|
+
return nil unless block_given?
|
493
|
+
blob = @tree.find_blob {|blob| yield blob[:name] }
|
494
|
+
blob ? Gollum::Git::Blob.new(blob) : nil
|
495
|
+
end
|
488
496
|
end
|
489
497
|
|
490
498
|
class NoSuchShaFound < StandardError
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum-rjgit_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '2.0'
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Bart Kamphorst, Dawa Ometto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '6.
|
18
|
+
version: '6.5'
|
19
19
|
name: rjgit
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '6.
|
26
|
+
version: '6.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|