sequel-soft-destroy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/sequel/plugins/soft_destroy.rb +7 -1
- data/sequel-soft-destroy.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 98637f765d7722bb6d4518fa9b94b4939eecbd4824f63be024fbbb2a9c27bc67
|
4
|
+
data.tar.gz: 55425887148c8bd506eae1cfa10cab7045f79a382bfdf3617903097e700478c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ca35cb71072c13b15b62c7ccaf4c383634d99b63318887326772379c813ff7313689273d0eaee39d2a04f2ae8f559d28969a2368634bcf3297cf6941e5a279
|
7
|
+
data.tar.gz: 70b2d657d057e9a68533b6b6fcd71d75f9020693a34ac0ce04541c5be681ab23077618a312e8382d1ad60ae53cb45681fee46696bc5697ad00f18057aeb6b34a
|
@@ -9,7 +9,13 @@ module Sequel
|
|
9
9
|
Sequel::Plugins.def_dataset_methods(self, :filter_deleted)
|
10
10
|
|
11
11
|
def [](*args)
|
12
|
-
|
12
|
+
args = args.first if args.size <= 1
|
13
|
+
|
14
|
+
return filter_deleted.first(args) if args.is_a?(Hash)
|
15
|
+
|
16
|
+
return if args.nil?
|
17
|
+
|
18
|
+
model = primary_key_lookup(args)
|
13
19
|
|
14
20
|
return if model.nil? || model.deleted?
|
15
21
|
|
data/sequel-soft-destroy.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = "sequel-soft-destroy"
|
3
3
|
s.author = "Federico Saravia"
|
4
4
|
s.email = "fedesaravia@gmail.com"
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.2"
|
6
6
|
s.summary = "A simple Sequel plugin that provides soft delete capabilities."
|
7
7
|
s.homepage = "https://github.com/fsaravia/sequel-soft-destroy"
|
8
8
|
s.license = "MIT"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-soft-destroy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Saravia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: fedesaravia@gmail.com
|
@@ -39,8 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
requirements: []
|
42
|
-
|
43
|
-
rubygems_version: 2.6.11
|
42
|
+
rubygems_version: 3.0.3
|
44
43
|
signing_key:
|
45
44
|
specification_version: 4
|
46
45
|
summary: A simple Sequel plugin that provides soft delete capabilities.
|