mongoid_cleaner 1.1.0 → 1.2.0

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: 0d8c7375290440e533630aba4b66a36217cd933b
4
- data.tar.gz: a74702cb43805411e46c4b3f681d383e0f7b6bb9
3
+ metadata.gz: d6c7635a6e45a5a02bbb9ca0f61c16d55069b2c5
4
+ data.tar.gz: a8e93643118c1f4534353f71b0ac45d2421a3373
5
5
  SHA512:
6
- metadata.gz: 6f57547909b9fa0bc81f0529b7679f56dc454a9e0724a32caca262e7d4325fa7012410cb9c2f597e994ae6e7286dc51c7fbfe5bf12a22842436dd325e24aa376
7
- data.tar.gz: b6ff6fcc604dfd3fc398f078e016af7b42477cfbd2e165411f264ac69e84077b48f18447917a01a165ca8a9cb148f84667fbea344f7e9bf014d586dcf92449ee
6
+ metadata.gz: dd3af619f36b263b7997aa9de5f335da1896ffa1ec1f8719c939bfd4a0a59900efd141fb34c0495fb391710b49b41399ae6442d14e509176151dde08b6361b69
7
+ data.tar.gz: 14dad4bd8e4354603f8750ca2ab83b9936b9845635426fa67e4eb555ca4ef326953ae625b6a96ccd673d94dd17cafdd82293ceb1e256eb2facdc79e19732f86c
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Laurent Arnoud
3
+ Copyright (c) 2015 trommsdorff + drüner gmbh
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,11 @@ module MongoidCleaner
29
29
  end
30
30
 
31
31
  def session
32
- @session ||= Mongoid.default_session
32
+ @session ||= if mongoid_version > 4
33
+ Mongoid.default_client
34
+ else
35
+ Mongoid.default_session
36
+ end
33
37
  end
34
38
 
35
39
  # return with mongoid 5 `Mongo::Operation::Result`
@@ -1,4 +1,4 @@
1
1
  # :nodoc:
2
2
  module MongoidCleaner
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TD Dashboys
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5.1
110
+ rubygems_version: 2.4.5
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: MongoidCleaner with drop and truncation strategy