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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8320bee3de062a2a2766b026cb4604a070bc335eb3a5caaec00da60ae1afe18
4
- data.tar.gz: 859167265d4a159c42b659bb9d96aadfaf9169923c8df059154a34355c71a111
3
+ metadata.gz: 1b43b7c10bac608a25d31dd1e9ead18db91b115bfc022b892ae47eff6113ed59
4
+ data.tar.gz: 0a0e6af732771952c77f2f69215395c7c1ebf5dc178f800c7e2ea6b522ef4617
5
5
  SHA512:
6
- metadata.gz: e7d23fa515e68a8bc97de2c893b7ab6a916025bdb10627db826b314be34d872629bd79304747294520d8ffd348e3e080c63df3b962b2b6790fc5e2adf50b42cb
7
- data.tar.gz: 7e89aaf1c081f2532c949c84d6044450b0b375dceeb6d82942122070b47f6ceb293988bbf338b93d24e607e37e1e84d7136d4d4b1325b39ac068fdccdb9c30c5
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.1"
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].to_s(8)
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
@@ -1,7 +1,7 @@
1
1
  module Gollum
2
2
  module Lib
3
3
  module Git
4
- VERSION = '1.1'
4
+ VERSION = '2.0'
5
5
  end
6
6
  end
7
7
  end
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: '1.1'
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-03-12 00:00:00.000000000 Z
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.1'
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.1'
26
+ version: '6.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements: