gummi 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,10 @@ module Gummi
18
18
  # Public Persistence API
19
19
  # ––––––––––––––––––––––
20
20
 
21
+ def exists?(id)
22
+ client.exists index: index.name, type: document_type, id: id
23
+ end
24
+
21
25
  def create(*args)
22
26
  instance = new(*args)
23
27
  instance.create ? instance : nil
@@ -8,6 +8,10 @@ module Gummi
8
8
  after_conversion :set_id_and_version
9
9
  end
10
10
 
11
+ def exists?(id)
12
+ db_class.exist? id
13
+ end
14
+
11
15
  def get(id)
12
16
  return unless id
13
17
  document = db_class.get id
data/lib/gummi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gummi
2
- VERSION = '0.3.11'
2
+ VERSION = '0.3.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gummi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-26 00:00:00.000000000 Z
12
+ date: 2014-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: virtus
@@ -274,12 +274,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
274
  - - ! '>='
275
275
  - !ruby/object:Gem::Version
276
276
  version: '0'
277
+ segments:
278
+ - 0
279
+ hash: 1770312503358899044
277
280
  required_rubygems_version: !ruby/object:Gem::Requirement
278
281
  none: false
279
282
  requirements:
280
283
  - - ! '>='
281
284
  - !ruby/object:Gem::Version
282
285
  version: '0'
286
+ segments:
287
+ - 0
288
+ hash: 1770312503358899044
283
289
  requirements: []
284
290
  rubyforge_project:
285
291
  rubygems_version: 1.8.23
@@ -311,4 +317,3 @@ test_files:
311
317
  - spec/support/models/db/ship.rb
312
318
  - spec/support/models/people.rb
313
319
  - spec/support/models/person.rb
314
- has_rdoc: