gollum-grit_adapter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c2a20942c96f829cb954507a337cbaac99d8dd8b
4
- data.tar.gz: 91387d9abcd383d7012efd67623e5e87ec1da084
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjUyYjVjOGNhYzc4OWRkZTBhZGU4MDRjNjAyOTNlYmMwZTU3NWVlYQ==
5
+ data.tar.gz: !binary |-
6
+ NzVjZjU3MTU3M2U4OGNjNzcxODdhNTNjMGYxMzk3NzFjNjg1NGIyMg==
5
7
  SHA512:
6
- metadata.gz: 32dad58dec2f20e831914edbdbbeb0d5f1ed14eb4726edab34e7b3cc831113968895f3a622308117f6740aa9a49428ccae2319cdd4ef6a883f7b1f3d8d8d6925
7
- data.tar.gz: 1cbd9de24f1bb5d673b76077173cd71b0f40bb76082eb21002c8dd281cbaa1ceabfd22841962e6b2f4e46275e68924254b36cbb9a600616d957f06368f22ab98
8
+ metadata.gz: !binary |-
9
+ NmRjNjViMjUwYzVlNDM0MmNlNzI2OWQwODNjOGMxYjI1OTg0YzNlMWZkNDgw
10
+ MjAyZWRiYTE5YjlkYzY1NGUzZjI5MTVmMDQxMWY5ZGMwZGQ4NWFhNjYwZTYy
11
+ OGU3ODczMDU3YTY2MzY4MWY0MzM1YzU1M2FhNWM0OTRjNTNlODI=
12
+ data.tar.gz: !binary |-
13
+ ZjFmZTZjZTFiZjgyYmU1NmZjZGY2YjgwYzljODc0NDgzNTVkYzkyOGNiNDg4
14
+ YzA0ZDQwODI1MmYxZGVjNjExMDFmMGI2M2U4YWJkNWE4ZTQxMDhhOGE1ZmM0
15
+ ZGMwNTlmOGQ2M2E2NjdmMDkwZjQzNGUzNzQyZWIwNjJhMzA3OTQ=
@@ -137,6 +137,7 @@ module Gollum
137
137
 
138
138
  def grep(query, options={})
139
139
  ref = options[:ref] ? options[:ref] : "HEAD"
140
+ query = Shellwords.shellescape(query)
140
141
  query = Shellwords.split(query).select {|q| !(q =~ /^(-O)|(--open-files-in-pager)/) }
141
142
  query = Shellwords.join(query)
142
143
  args = [{}, '-I', '-i', '-c', query, ref, '--']
@@ -365,7 +366,15 @@ module Gollum
365
366
 
366
367
  # if index.current_tree && tree = index.current_tree / (@wiki.page_file_dir || '/')
367
368
  def /(file)
368
- @tree.send(:/, file)
369
+ result = @tree.send(:/, file)
370
+ case result
371
+ when Grit::Blob
372
+ return Gollum::Git::Blob.new(result)
373
+ when Grit::Tree
374
+ return Gollum::Git::Tree.new(result)
375
+ else
376
+ nil
377
+ end
369
378
  end
370
379
 
371
380
  def blobs
@@ -1,7 +1,7 @@
1
1
  module Gollum
2
2
  module Lib
3
3
  module Git
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum-grit_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart Kamphorst, Dawa Ometto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-07 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab-grit
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.7'
20
- - - '>='
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.7.1
23
23
  type: :runtime
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.7'
30
- - - '>='
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.7.1
33
33
  - !ruby/object:Gem::Dependency
@@ -51,11 +51,11 @@ executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
+ - Gemfile
55
+ - README.md
56
+ - lib/grit_adapter.rb
54
57
  - lib/grit_adapter/git_layer_grit.rb
55
58
  - lib/grit_adapter/version.rb
56
- - lib/grit_adapter.rb
57
- - README.md
58
- - Gemfile
59
59
  homepage: https://github.com/gollum/grit_adapter
60
60
  licenses:
61
61
  - MIT
@@ -66,17 +66,17 @@ require_paths:
66
66
  - lib
67
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ! '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ! '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.0.0
79
+ rubygems_version: 2.4.1
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Adapter for Gollum to use Grit at the backend.