gitlab-elasticsearch-git 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c686ec3b666fcb0df143586028937230272cfa7
4
+ data.tar.gz: f2ca82ebbf1a0560e7dce667dbb1a60c44089082
5
+ SHA512:
6
+ metadata.gz: 9e8e50875d77d35fae8a5680fd4ead4d56a9f2863a9aecedc60483001ecf322c0bb812e5cf65f6187bf63e1e5ef3ad7bbd63921cfa8efa619db2479e3f0b7e81
7
+ data.tar.gz: d97d5ecbc0729de00ba59ec92053f37d534b88a8a8453c6746177869b01f95f7f2fcf84aa5dfe37c66ec4a4b763c7f6b312e55f4ac48114acf87cd0e2635d1f8
@@ -0,0 +1,11 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ _yardoc
6
+ coverage
7
+ rdoc
8
+ spec/reports
9
+ test/tmp
10
+ test/version_tmp
11
+ tmp
@@ -0,0 +1,9 @@
1
+ 0.0.6
2
+ - Support elasticsearch-model gem version 0.1.8
3
+
4
+ 0.0.5
5
+ - Search by file name on master branch
6
+ - Migrate from elasticsearch 0.9.x -> 1.x
7
+
8
+ 0.0.4
9
+ - Stable version
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in elasticsearch-git.gemspec
4
+ gemspec
5
+
6
+ gem 'elasticsearch-model'
7
+ gem 'elasticsearch-api'
8
+ gem 'rugged'
9
+ gem 'bundler'
10
+ gem 'rake'
11
+ gem 'pry'
12
+ gem 'charlock_holmes', '~> 0.7.3'
13
+ gem 'github-linguist', '~> 4.7.0'
14
+ gem 'minitest'
15
+ gem 'wrong'
@@ -0,0 +1,97 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gitlab-elasticsearch-git (0.0.6)
5
+ activemodel (~> 4.2.0)
6
+ activesupport (~> 4.2.0)
7
+ charlock_holmes (~> 0.7.3)
8
+ elasticsearch-api (> 0.4.0)
9
+ elasticsearch-model
10
+ github-linguist (~> 4.7.0)
11
+ rugged (~> 0.23.3)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ activemodel (4.2.5)
17
+ activesupport (= 4.2.5)
18
+ builder (~> 3.1)
19
+ activesupport (4.2.5)
20
+ i18n (~> 0.7)
21
+ json (~> 1.7, >= 1.7.7)
22
+ minitest (~> 5.1)
23
+ thread_safe (~> 0.3, >= 0.3.4)
24
+ tzinfo (~> 1.1)
25
+ builder (3.2.2)
26
+ charlock_holmes (0.7.3)
27
+ coderay (1.1.0)
28
+ diff-lcs (1.2.5)
29
+ elasticsearch (1.0.15)
30
+ elasticsearch-api (= 1.0.15)
31
+ elasticsearch-transport (= 1.0.15)
32
+ elasticsearch-api (1.0.15)
33
+ multi_json
34
+ elasticsearch-model (0.1.8)
35
+ activesupport (> 3)
36
+ elasticsearch (> 0.4)
37
+ hashie
38
+ elasticsearch-transport (1.0.15)
39
+ faraday
40
+ multi_json
41
+ escape_utils (1.1.0)
42
+ faraday (0.9.2)
43
+ multipart-post (>= 1.2, < 3)
44
+ github-linguist (4.7.4)
45
+ charlock_holmes (~> 0.7.3)
46
+ escape_utils (~> 1.1.0)
47
+ mime-types (>= 1.19)
48
+ rugged (>= 0.23.0b)
49
+ hashie (3.4.3)
50
+ i18n (0.7.0)
51
+ json (1.8.3)
52
+ method_source (0.8.2)
53
+ mime-types (3.0)
54
+ mime-types-data (~> 3.2015)
55
+ mime-types-data (3.2015.1120)
56
+ minitest (5.8.3)
57
+ multi_json (1.11.2)
58
+ multipart-post (2.0.0)
59
+ predicated (0.2.6)
60
+ pry (0.10.3)
61
+ coderay (~> 1.1.0)
62
+ method_source (~> 0.8.1)
63
+ slop (~> 3.4)
64
+ rake (10.5.0)
65
+ ruby2ruby (2.2.0)
66
+ ruby_parser (~> 3.1)
67
+ sexp_processor (~> 4.0)
68
+ ruby_parser (3.7.2)
69
+ sexp_processor (~> 4.1)
70
+ rugged (0.23.3)
71
+ sexp_processor (4.6.0)
72
+ slop (3.6.0)
73
+ thread_safe (0.3.5)
74
+ tzinfo (1.2.2)
75
+ thread_safe (~> 0.1)
76
+ wrong (0.7.1)
77
+ diff-lcs (~> 1.2.5)
78
+ predicated (~> 0.2.6)
79
+ ruby2ruby (>= 2.0.1)
80
+ ruby_parser (>= 3.0.1)
81
+ sexp_processor (>= 4.0)
82
+
83
+ PLATFORMS
84
+ ruby
85
+
86
+ DEPENDENCIES
87
+ bundler
88
+ charlock_holmes (~> 0.7.3)
89
+ elasticsearch-api
90
+ elasticsearch-model
91
+ github-linguist (~> 4.7.0)
92
+ gitlab-elasticsearch-git!
93
+ minitest
94
+ pry
95
+ rake
96
+ rugged
97
+ wrong
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Andrey Kumanyaev
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,345 @@
1
+ # Elasticsearch::Git
2
+
3
+ This gem is based on https://github.com/zzet/elasticsearch-git
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/elasticsearch-git.svg)](http://badge.fury.io/rb/elasticsearch-git)
6
+
7
+ [Elasticsearch](https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-model) integrations for git repositories.
8
+
9
+ ## NOTE
10
+
11
+ Now indexing text-like documents mo nore 1 mb size
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ``` ruby
18
+ gem 'elasticsearch-git', '~> 0.0.5'
19
+
20
+ # or
21
+
22
+ gem 'elasticsearch-git', github: 'zzet/elasticsearch-git', ref: 'last_ref'
23
+ ```
24
+
25
+ And then execute:
26
+
27
+ ``` bash
28
+ $ bundle
29
+ ```
30
+
31
+ Or install it yourself as:
32
+
33
+ ``` bash
34
+ $ gem install elasticsearch-git
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ``` ruby
40
+ class Repository
41
+ include Elasticsearch::Git::Repository
42
+
43
+ def repository_id
44
+ project.id
45
+ end
46
+
47
+ repository_for_indexing '/path/to/your/repo'
48
+ end
49
+
50
+ Repository.__elasticsearch__.create_index! force: true
51
+
52
+ repo = Repository.new
53
+ repo.index_commits
54
+ repo.index_blobs
55
+
56
+ repo.index_commits(from_rev: "1802bafa70d3b1678cfa46a482fd396dd8a4bd40", to_rev: "8d4175e9f4a36065b52fa752c1fd3594c82c0f28")
57
+ repo.index_blobs(from_rev: "1802bafa70d3b1678cfa46a482fd396dd8a4bd40", to_rev: "8d4175e9f4a36065b52fa752c1fd3594c82c0f28")
58
+
59
+ Repository.search("query", type: 'blob')
60
+ Repository.search("query", type: 'commit')
61
+
62
+ # Search in all types
63
+ Repository.search("query")
64
+ ```
65
+
66
+ ## Integration with Gitlab
67
+
68
+ [Sample (In Undev Gitlab fork)](https://github.com/zzet/gitlabhq/blob/master/app/elastic/repositories_search.rb)
69
+
70
+ ``` ruby
71
+ # app/elastic/repositories_search.rb
72
+ module RepositoriesSearch
73
+ extend ActiveSupport::Concern
74
+
75
+ included do
76
+ include Elasticsearch::Git::Repository
77
+
78
+ self.__elasticsearch__.client = Elasticsearch::Client.new host: Gitlab.config.elasticsearch.host, port: Gitlab.config.elasticsearch.port
79
+
80
+ def repository_id
81
+ project.id
82
+ end
83
+ end
84
+
85
+ module ClassMethods
86
+ def import
87
+ Repository.__elasticsearch__.create_index! force: true
88
+
89
+ Project.find_each do |project|
90
+ if project.repository.exists? && !project.repository.empty?
91
+ project.repository.index_commits
92
+ project.repository.index_blobs
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ # app/models/repository.rb
100
+ class Repository
101
+ include RepositoriesSearch
102
+ #...
103
+ def project
104
+ @project ||= Project.find_with_namespace(@path_with_namespace)
105
+ end
106
+ #...
107
+ end
108
+
109
+ Repository.import # for indexing all repositories
110
+
111
+ Repository.__elasticsearch__.create_index! force: true
112
+ Project.last.repository.index_commits
113
+ Project.last.repository.index_blobs
114
+
115
+ Repository.search("some_query")
116
+ # => {blobs: [{}, {}, {}], commits: [{}, {}, {}]}
117
+
118
+ Repository.search("some_query", type: :blob)
119
+ # => {blobs: [{}, {}, {}], commits: []}
120
+
121
+ Repository.search("some_query", type: :commit)
122
+ # => {blobs: [], commits: [{}, {}, {}]}
123
+
124
+ Repository.search("some_query", type: :commit, page: 2, per: 50)
125
+ # => ...
126
+
127
+ Repository.search("some_query", options: { repository_id: Project.last.id })
128
+ # => {blobs: [{}, {}, {}], commits: [{}, {}, {}]}
129
+
130
+ Repository.search("some_query", options: { repository_id: current_user.authorized_projects.ids })
131
+ # => {blobs: [{}, {}, {}], commits: [{}, {}, {}]}
132
+
133
+ Project.last.repository.search("Copyright")[:blobs].first
134
+ => #<Elasticsearch::Model::Response::Result:0xbb84b3fc
135
+ @result=
136
+ {"_index"=>"repository-index-development",
137
+ "_type"=>"repository",
138
+ "_id"=>"4328_LICENSE.txt",
139
+ "_score"=>0.034848917,
140
+ "_source"=>
141
+ {"blob"=>
142
+ {"type"=>"blob",
143
+ "oid"=>"f99909cd4ecb6f2ad08f8e55aac3a9fcd86a2bd2",
144
+ "rid"=>4328,
145
+ "content"=>
146
+ "Copyright (c) 2014 Andrey Kumanyaev\n\nMIT
147
+ License\n\nPermission is hereby granted, free of charge, to any person
148
+ obtaining\na copy of this software and associated documentation files
149
+ (the\n\"Software\"), to deal in the Software without restriction,
150
+ including\nwithout limitation the rights to use, copy, modify, merge,
151
+ publish,\ndistribute, sublicense, and/or sell copies of the Software,
152
+ and to\npermit persons to whom the Software is furnished to do so,
153
+ subject to\nthe following conditions:\n\nThe above copyright notice and
154
+ this permission notice shall be\nincluded in all copies or substantial
155
+ portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT
156
+ WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
157
+ THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
158
+ AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
159
+ BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
160
+ ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
161
+ CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
162
+ SOFTWARE.\n",
163
+ "commit_sha"=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"}}}>
164
+ ```
165
+
166
+ ## Examples
167
+
168
+ After integration this gem into [Gitlab](https://github.com/gitlabhq/gitlabhq)
169
+
170
+ ``` ruby
171
+ Repository.search("too")[:commits].first
172
+ => #<Elasticsearch::Model::Response::Result:0xbb50dfdc
173
+ @result=
174
+ {"_index"=>"repository-index-development",
175
+ "_type"=>"repository",
176
+ "_id"=>"4328_1802bafa70d3b1678cfa46a482fd396dd8a4bd40",
177
+ "_score"=>0.15873253,
178
+ "_source"=>
179
+ {"commit"=>
180
+ {"type"=>"commit",
181
+ "rid"=>4328,
182
+ "sha"=>"1802bafa70d3b1678cfa46a482fd396dd8a4bd40",
183
+ "author"=>
184
+ {"name"=>"Andrey Kumanyaev",
185
+ "email"=>"me@zzet.org",
186
+ "time"=>"2014-02-16T02:24:23+04:00"},
187
+ "committer"=>
188
+ {"name"=>"Andrey Kumanyaev",
189
+ "email"=>"me@zzet.org",
190
+ "time"=>"2014-02-16T02:24:23+04:00"},
191
+ "message"=>"Save 2. Indexing work. Search too\n"}}}>
192
+
193
+
194
+ Project.last.repository.as_indexed_json
195
+ Project Load (1.7ms) SELECT "projects".* FROM "projects" ORDER BY "projects"."id" DESC LIMIT 1
196
+ Namespace Load (4.8ms) SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."id" = $1 ORDER BY "namespaces"."id" ASC LIMIT 1 [["id", 3739]]
197
+ Namespace Load (0.9ms) SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."path" = 'zzet' LIMIT 1
198
+ Project Load (0.7ms) SELECT "projects".* FROM "projects" WHERE "projects"."namespace_id" = 3739 AND "projects"."path" = 'elasticsearch-git' LIMIT 1
199
+ # Long lines are stripped manually
200
+ => {:blobs=>
201
+ [[{:type=>"blob",
202
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_.gitignore",
203
+ :rid=>4328,
204
+ :oid=>"d87d4be66f458acd52878902bbf1391732ad21e1",
205
+ :content=>
206
+ "*.gem\n*.rbc\n.bundle\n.config\n.yardoc\nGemfile.lock\nInstalledFiles\n_yardoc\ncoverage\ndoc/\nlib/bundler/man\npkg\nrdoc\nspec/reports\ntest/tmp\ntest/version_tmp\ntmp\n",
207
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
208
+ {:type=>"blob",
209
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_Gemfile",
210
+ :rid=>4328,
211
+ :oid=>"7322405f8f3ee5de24f7a727940ac52543e8954c",
212
+ :content=>
213
+ "source 'https://rubygems.org'\n\n# Specify your gem's dependencies in elasticsearch-git.gemspec\ngemspec\n\ngem 'elasticsearch-model', github: 'elasticsearch/elasticsearch-rails'\ngem 'elasticsearc....."
214
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
215
+ {:type=>"blob",
216
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_LICENSE.txt",
217
+ :rid=>4328,
218
+ :oid=>"f99909cd4ecb6f2ad08f8e55aac3a9fcd86a2bd2",
219
+ :content=>
220
+ "Copyright (c) 2014 Andrey Kumanyaev\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Softw...."
221
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
222
+ {:type=>"blob",
223
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_README.md",
224
+ :rid=>4328,
225
+ :oid=>"8258d574dfc8040a5d003f06c6493e0033527f36",
226
+ :content=>
227
+ "# Elasticsearch::Git\n\nAttention: Pre-pre-pre beta code. Not production.\n\n[Elasticsearch](https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-model) integrations for g...."
228
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
229
+ {:type=>"blob",
230
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_Rakefile",
231
+ :rid=>4328,
232
+ :oid=>"29955274e0d42e164337c411ad9144e8ffd7e46e",
233
+ :content=>"require \"bundler/gem_tasks\"\n",
234
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
235
+ {:type=>"blob",
236
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_elasticsearch-git.gemspec",
237
+ :rid=>4328,
238
+ :oid=>"67762437568dda1bb98ec5eca8be7e4a5c8115a9",
239
+ :content=>
240
+ "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'elasticsearch/git/version'\n\nGem::Specification.new do |spec|\n spec..."
241
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
242
+ {:type=>"blob",
243
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_elasticsearch/git.rb",
244
+ :rid=>4328,
245
+ :oid=>"d3817ec58af1f44dfd18856bf54ef2bf607901a8",
246
+ :content=>
247
+ "require \"elasticsearch/git/version\"\nrequire \"elasticsearch/git/model\"\nrequire \"elasticsearch/git/commit\"\n\nmodule Elasticsearch\n module Git\n class Test\n include Elasticsearch::..."
248
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
249
+ {:type=>"blob",
250
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_git/model.rb",
251
+ :rid=>4328,
252
+ :oid=>"3dfbae747f25391779fbe012fe8cc4f38cc4651c",
253
+ :content=>
254
+ "require 'active_support/concern'\nrequire 'active_model'\nrequire 'elasticsearch/model'\n\nmodule Elasticsearch\n module Git\n module Model\n extend ActiveSupport::Concern\n\n include..."
255
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
256
+ {:type=>"blob",
257
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_git/repository.rb",
258
+ :rid=>4328,
259
+ :oid=>"70fe59c8391f6c27adb79c3e45824e6b4cf9566c",
260
+ :content=>
261
+ "require 'active_support/concern'\nrequire 'active_model'\nrequire 'elasticsearch'\nrequire 'elasticsearch/model'\nrequire 'rugged'\nrequire 'gitlab_git'\n\nmodule Elasticsearch\n module Git\n m..."
262
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
263
+ {:type=>"blob",
264
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_git/version.rb",
265
+ :rid=>4328,
266
+ :oid=>"79e8082b122492464732f1fb43e9f2bdc96ea146",
267
+ :content=>
268
+ "module Elasticsearch\n module Git\n VERSION = \"0.0.1\"\n end\nend\n",
269
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"},
270
+ {:type=>"blob",
271
+ :id=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28_test/test_helper.rb",
272
+ :rid=>4328,
273
+ :oid=>"6acc0d2b7bf0f286557d3757c1140b41ab57e8f7",
274
+ :content=>
275
+ "require \"rubygems\"\nrequire 'bundler/setup'\nrequire 'pry'\n\nBundler.require\n\nrequire 'wrong/adapters/minitest'\n\nPROJECT_ROOT = File.join(Dir.pwd)\n\nWrong.config.color\n\nMinitest.autorun\n..."
276
+ :commit_sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28"}]],
277
+ :commits=>
278
+ [{:type=>"commit",
279
+ :sha=>"8d4175e9f4a36065b52fa752c1fd3594c82c0f28",
280
+ :author=>
281
+ {:name=>"Andrey Kumanyaev",
282
+ :email=>"me@zzet.org",
283
+ :time=>2014-02-16 13:50:32 +0400},
284
+ :committer=>
285
+ {:name=>"Andrey Kumanyaev",
286
+ :email=>"me@zzet.org",
287
+ :time=>2014-02-16 13:50:32 +0400},
288
+ :message=>"Improve readme\n"},
289
+ {:type=>"commit",
290
+ :sha=>"37f1b0710eb7f41254ae0c33db09794a25bbb246",
291
+ :author=>
292
+ {:name=>"Andrey Kumanyaev",
293
+ :email=>"me@zzet.org",
294
+ :time=>2014-02-16 13:49:25 +0400},
295
+ :committer=>
296
+ {:name=>"Andrey Kumanyaev",
297
+ :email=>"me@zzet.org",
298
+ :time=>2014-02-16 13:49:25 +0400},
299
+ :message=>"prepare first test release\n"},
300
+ {:type=>"commit",
301
+ :sha=>"1802bafa70d3b1678cfa46a482fd396dd8a4bd40",
302
+ :author=>
303
+ {:name=>"Andrey Kumanyaev",
304
+ :email=>"me@zzet.org",
305
+ :time=>2014-02-16 02:24:23 +0400},
306
+ :committer=>
307
+ {:name=>"Andrey Kumanyaev",
308
+ :email=>"me@zzet.org",
309
+ :time=>2014-02-16 02:24:23 +0400},
310
+ :message=>"Save 2. Indexing work. Search too\n"},
311
+ {:type=>"commit",
312
+ :sha=>"3ed383bfbf6cba611d191dbc3590779c0444b7f0",
313
+ :author=>
314
+ {:name=>"Andrey Kumanyaev",
315
+ :email=>"me@zzet.org",
316
+ :time=>2014-02-16 00:23:10 +0400},
317
+ :committer=>
318
+ {:name=>"Andrey Kumanyaev",
319
+ :email=>"me@zzet.org",
320
+ :time=>2014-02-16 00:23:10 +0400},
321
+ :message=>"Save commit\n"},
322
+ {:type=>"commit",
323
+ :sha=>"7021addf520a19bdeceef29947c8687965c132ff",
324
+ :author=>
325
+ {:name=>"Andrey Kumanyaev",
326
+ :email=>"me@zzet.org",
327
+ :time=>2014-02-15 14:28:43 +0400},
328
+ :committer=>
329
+ {:name=>"Andrey Kumanyaev",
330
+ :email=>"me@zzet.org",
331
+ :time=>2014-02-15 14:28:43 +0400},
332
+ :message=>"first commit\n"}]}
333
+ ```
334
+
335
+ ## TODO
336
+
337
+ * Add Exceptions handlers for indexing (Error connections and timeouts)
338
+
339
+ ## Contributing
340
+
341
+ 1. Fork it ( http://github.com/zzet/elasticsearch-git/fork )
342
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
343
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
344
+ 4. Push to the branch (`git push origin my-new-feature`)
345
+ 5. Create new Pull Request