gitlab_git 10.0.1 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gitlab_git/repository.rb +15 -6
  4. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2d857c8e1f6c851a7fa699ef3279d936c999c27
4
- data.tar.gz: ec384017aa519ce625cc9b05f13725450dd2dabb
3
+ metadata.gz: ff3b25f848c88c1a2fa6e9249f32152c4e770b7a
4
+ data.tar.gz: 8e911f71f1b6212a93426205b1d4a6fdc0916e01
5
5
  SHA512:
6
- metadata.gz: 38cba0dc0b5db525ac2967133ed0ec439f41d10d153e3dc5608e6d796a4c955d173db00b63e2907e0fcc5620eaeedbef2dabd48a29af506c06090c54b22c9001
7
- data.tar.gz: 9aff7f02f2ccf1cf4df3ca23c31ae5b55de7ef204c82ec075087420f7cdeae7924f4d88b89c19a10433fa69339557620e67cb42305b76dec2efb2e8eff49ae5e
6
+ metadata.gz: 37e8e94113d74a81fbbd12d2ea34c128a86f85afafdf92ce2514d43e3d1bc70f3c0c29951447f3274c45f25da3a5cc9d342f736eed8252e2b917ff35f1b3d091
7
+ data.tar.gz: 4a07fb48b3416c136dbc1c2934c8e3be559946c99cfb9b47880b695994a6644d789560faacf4823be303013da3b22862372d52ca978d524e6acfbaeb20e8a29d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.0.1
1
+ 10.0.2
@@ -235,6 +235,7 @@ module Gitlab
235
235
  # path: 'app/models',
236
236
  # limit: 10,
237
237
  # offset: 5,
238
+ # after: Time.new(2016, 4, 21, 14, 32, 10)
238
239
  # )
239
240
  #
240
241
  def log(options)
@@ -245,7 +246,9 @@ module Gitlab
245
246
  ref: root_ref,
246
247
  follow: false,
247
248
  skip_merges: false,
248
- disable_walk: false
249
+ disable_walk: false,
250
+ after: nil,
251
+ before: nil
249
252
  }
250
253
 
251
254
  options = default_options.merge(options)
@@ -259,15 +262,19 @@ module Gitlab
259
262
  return []
260
263
  end
261
264
 
262
- if can_walk?(options)
263
- log_by_walk(sha, options)
264
- else
265
+ if log_using_shell?(options)
265
266
  log_by_shell(sha, options)
267
+ else
268
+ log_by_walk(sha, options)
266
269
  end
267
270
  end
268
271
 
269
- def can_walk?(options)
270
- options[:path].blank? && !options[:skip_merges] && !options[:disable_walk]
272
+ def log_using_shell?(options)
273
+ options[:path].present? ||
274
+ options[:disable_walk] ||
275
+ options[:skip_merges] ||
276
+ options[:after] ||
277
+ options[:before]
271
278
  end
272
279
 
273
280
  def log_by_walk(sha, options)
@@ -287,6 +294,8 @@ module Gitlab
287
294
  cmd += %W(--skip=#{options[:offset].to_i})
288
295
  cmd += %W(--follow) if options[:follow]
289
296
  cmd += %W(--no-merges) if options[:skip_merges]
297
+ cmd += %W(--after=#{options[:after].iso8601}) if options[:after]
298
+ cmd += %W(--before=#{options[:before].iso8601}) if options[:before]
290
299
  cmd += [sha]
291
300
  cmd += %W(-- #{options[:path]}) if options[:path].present?
292
301
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 10.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-21 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.7.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: listen
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 3.0.6
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.6
69
83
  description: GitLab wrapper around git objects
70
84
  email: dmitriy.zaporozhets@gmail.com
71
85
  executables: []