gollum-grit_adapter 0.1.0 → 0.1.1

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: fec3b95003833b68d26ed5e70595be3e4f165eb3
4
- data.tar.gz: 8b626ca0f6e8bd9a9c1b837514646e6378f27895
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTk5YjhmY2NlZjdmMTBlMGUzNzkwYzVhNmQ0ZTVjN2FlYmEzZDE2Yg==
5
+ data.tar.gz: !binary |-
6
+ ZWRkODA3OWMzNTlkZDlkOTFlMWQ4OWE1ODQyY2U5MWZjYzIyMWNlMg==
5
7
  SHA512:
6
- metadata.gz: 735d80249532575b9ebc38452121f6eb6ff1ff23432edcc48a3d4b5a109a5a56aa0b87eb3ed82652997e2ce431c9e360d64fef6821d8c29ee740640ef08689bf
7
- data.tar.gz: a554c3322767dc792f4c1907c98cffae892ba2cea9a5fec2d8f50396b1ff583289235f003a0dfd15f0cb036d8f1fd02c0c76608d45716883e7a710a4cdde5508
8
+ metadata.gz: !binary |-
9
+ MzAwNTBiYmJjZmIxNjI1MTU0OGJkNTU0YjBlMzBlOTUxMWNiZDUzMTIwYzBh
10
+ NmUyN2NhYmVhYTUzZTEwNWEyZjMzZTZjY2JmMjMzODA1MGFkMzhlM2ZiODQ2
11
+ MWZhMTAzNGQ1ZDQ2ZTEwYzdkMDc4YjUyMmU1MjllNTUwNjIwNjY=
12
+ data.tar.gz: !binary |-
13
+ N2NmMmViZmU5ZjU0YWViNzZkZjBjNDRiZWI3ZWYyNThhMzhjOWZlOGE4Yjc4
14
+ NWUyMTRkYmQwZTQ4OTcyNGE2ZmU3ZDg2OWViM2UwZDczN2M1OWI4MzMxNTUw
15
+ NTFkNDRmZjRmMGJhZDY1ZjA0MGQ4NDgxZTE4ZDNjOWQ4ZWU2NWI=
@@ -136,6 +136,8 @@ module Gollum
136
136
 
137
137
  def grep(query, options={})
138
138
  ref = options[:ref] ? options[:ref] : "HEAD"
139
+ query = Shellwords.split(query).select {|q| !(q =~ /^(-O)|(--open-files-in-pager)/) }
140
+ query = Shellwords.join(query)
139
141
  args = [{}, '-I', '-i', '-c', query, ref, '--']
140
142
  args << options[:path] if options[:path]
141
143
  result = @git.grep(*args).split("\n")
@@ -165,6 +167,7 @@ module Gollum
165
167
 
166
168
  def ls_files(query, options = {})
167
169
  options[:ref] = options[:ref] ? options[:ref] : "HEAD"
170
+ query = Shellwords.shellescape(query)
168
171
  @git.ls_files({}, "*#{query}*").split("\n")
169
172
  end
170
173
 
@@ -1,7 +1,7 @@
1
1
  module Gollum
2
2
  module Lib
3
3
  module Git
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum-grit_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-11-25 00:00:00.000000000 Z
11
+ date: 2014-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab-grit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '2.7'
20
+ - - ! '>='
18
21
  - !ruby/object:Gem::Version
19
22
  version: 2.7.1
20
23
  type: :runtime
@@ -22,6 +25,9 @@ dependencies:
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '2.7'
30
+ - - ! '>='
25
31
  - !ruby/object:Gem::Version
26
32
  version: 2.7.1
27
33
  - !ruby/object:Gem::Dependency
@@ -45,11 +51,11 @@ executables: []
45
51
  extensions: []
46
52
  extra_rdoc_files: []
47
53
  files:
54
+ - Gemfile
55
+ - README.md
56
+ - lib/grit_adapter.rb
48
57
  - lib/grit_adapter/git_layer_grit.rb
49
58
  - lib/grit_adapter/version.rb
50
- - lib/grit_adapter.rb
51
- - README.md
52
- - Gemfile
53
59
  homepage: https://github.com/gollum/grit_adapter
54
60
  licenses:
55
61
  - MIT
@@ -60,17 +66,17 @@ require_paths:
60
66
  - lib
61
67
  required_ruby_version: !ruby/object:Gem::Requirement
62
68
  requirements:
63
- - - '>='
69
+ - - ! '>='
64
70
  - !ruby/object:Gem::Version
65
71
  version: '0'
66
72
  required_rubygems_version: !ruby/object:Gem::Requirement
67
73
  requirements:
68
- - - '>='
74
+ - - ! '>='
69
75
  - !ruby/object:Gem::Version
70
76
  version: '0'
71
77
  requirements: []
72
78
  rubyforge_project:
73
- rubygems_version: 2.0.0
79
+ rubygems_version: 2.4.1
74
80
  signing_key:
75
81
  specification_version: 4
76
82
  summary: Adapter for Gollum to use Grit at the backend.