gitlab-elasticsearch-git 1.1.0 → 1.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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1ed1a40fac4c237888663a8b9a15606a77c09d0
4
- data.tar.gz: 28c65fcdcb6953ed270d4c6e4d5ee91137e7fa04
3
+ metadata.gz: 1f92a3114627d7479e95001ac6e83ff8dc8b31df
4
+ data.tar.gz: 7c4fe7e7d2692fb813b61bd73f22f4270b9e2c0c
5
5
  SHA512:
6
- metadata.gz: 69199b236f9ee39ea45b38928272cf3c968af829a49d3c27c87b4f0a4b8b9c783d3b7b7f95ce255b9b22e8d433cc6834ce1797c25150fac60c1d798dd446960d
7
- data.tar.gz: f164040b0925cabbdce3c4f37d5818141d084665001ea55f800284a2b04e69e8f0b2534533f88074de9192921f749627f09ebba367eaa2f7256d0a4b56425011
6
+ metadata.gz: f0bb24885a18b991a8fb63a4e671f9204a108dc892d368658b6de21f7daded1ff5c8d3c6f950103f910595aee608feae5c753d908304fb522e24be14c70293ab
7
+ data.tar.gz: 66fed2886c133d66bbeb186f2a232c2399d5876efa515b8cfe12f3aa85c8f3d3f2ea8a6ed09d7ae4cd6211f374a8dcc4dfa3f00d6f8627e36a0a58f6a0804048
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 1.1.1
2
+ - Support for ES 5.0
3
+
1
4
  1.0.2
2
5
  - Cache commit's author and committer when indexing a commit
3
6
 
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'elasticsearch-model', '~> 0.1.9'
7
- gem 'elasticsearch-api', '~> 1.1.0'
7
+ gem 'elasticsearch-api'
8
8
  gem 'rugged', '~> 0.24'
9
9
  gem 'rake'
10
10
  gem 'pry'
@@ -5,8 +5,8 @@ PATH
5
5
  activemodel (~> 4.2)
6
6
  activesupport (~> 4.2)
7
7
  charlock_holmes (~> 0.7)
8
- elasticsearch-api (~> 1.0)
9
- elasticsearch-model (~> 0.1.8)
8
+ elasticsearch-api
9
+ elasticsearch-model (~> 0.1.9)
10
10
  github-linguist (~> 4.7)
11
11
  rugged (~> 0.24)
12
12
 
@@ -85,7 +85,7 @@ PLATFORMS
85
85
 
86
86
  DEPENDENCIES
87
87
  charlock_holmes (~> 0.7.3)
88
- elasticsearch-api (~> 1.1.0)
88
+ elasticsearch-api
89
89
  elasticsearch-model (~> 0.1.9)
90
90
  github-linguist (~> 4.7.0)
91
91
  gitlab-elasticsearch-git!
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency 'elasticsearch-model', '~> 0.1.8'
22
- spec.add_runtime_dependency 'elasticsearch-api', '~> 1.0'
21
+ spec.add_runtime_dependency 'elasticsearch-model', '~> 0.1.9'
22
+ spec.add_runtime_dependency 'elasticsearch-api'
23
23
  spec.add_runtime_dependency 'rugged', '~> 0.24'
24
24
  spec.add_runtime_dependency 'charlock_holmes', '~> 0.7'
25
25
  spec.add_runtime_dependency 'github-linguist', '~> 4.7'
@@ -7,18 +7,21 @@ module Elasticsearch
7
7
  include Linguist::BlobHelper
8
8
  include Elasticsearch::Git::EncoderHelper
9
9
 
10
- attr_accessor :id, :name, :path, :data, :size, :mode, :commit_id
10
+ attr_accessor :id, :name, :path, :size, :mode, :commit_id
11
+ attr_writer :data
11
12
 
12
13
  def initialize(repo, raw_blob_hash)
13
14
  @id = raw_blob_hash[:oid]
14
-
15
- blob = repo.lookup(@id)
15
+ @blob = repo.lookup(@id)
16
16
 
17
17
  @mode = raw_blob_hash[:mode].to_s(8)
18
- @size = blob.size
18
+ @size = @blob.size
19
19
  @path = encode!(raw_blob_hash[:path])
20
20
  @name = @path.split('/').last
21
- @data = encode!(blob.content)
21
+ end
22
+
23
+ def data
24
+ @data ||= encode!(@blob.content)
22
25
  end
23
26
  end
24
27
  end
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Git
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-elasticsearch-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kumanyaev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-01-20 00:00:00.000000000 Z
13
+ date: 2017-02-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: elasticsearch-model
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.1.8
21
+ version: 0.1.9
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.1.8
28
+ version: 0.1.9
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: elasticsearch-api
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: '1.0'
35
+ version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '1.0'
42
+ version: '0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rugged
45
45
  requirement: !ruby/object:Gem::Requirement