sequenceable 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: 01776a6b11acaf53acaaa5d6431fbd7a96fc2caf25001d752cd569f635b6164d
4
- data.tar.gz: dcffc2ab8348346a7d29be45c8b89ec3f1b793b2a43da59e67cc36bc30568cc2
3
+ metadata.gz: d46f47a422961d672f1242bd06113f3282a2135ae7e0ef28aad946a97ed813d1
4
+ data.tar.gz: d7fc5dbab12f9b7690b6239e10eb576a0034cf6847c6d6f18ad81681660af709
5
5
  SHA512:
6
- metadata.gz: 80edf8f1389e309626c00774a3e5bf0b7036d63c1ffed4c5c982e5c47eb2ec1cf53512145778f0bebc421c93f883755c659c8a929448e1d12d947ede21133a6e
7
- data.tar.gz: 1f4cdf3347d7b10eb5fa3daf85e86ae85af936e1398f92fd061a4804c045cf846190cb143d76e4cc50542a370afe663bafaa80f6c10acf73cdd5ab48c7816ba4
6
+ metadata.gz: 43437c3e19ed88638eb35a800bd7827d5b0a67b486dc8d9b0610d7e01dd75f69354878fdaf94202f0e6045958708b4463574c4e774c5e731623c80d51ae37251
7
+ data.tar.gz: 12c718f2f66b472e48990ec8f7ff7dcfdbac7023064aa818a4c19354ef6b98e9a87ead5946335e745c8fb1c5a7e0b59337ca07c15a27c2b2b60bbf7fc1504b66
data/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # Sequenceable
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/sequenceable.svg)](https://badge.fury.io/rb/sequenceable)
4
- [![sandip-mane](https://circleci.com/gh/sandip-mane/sequenceable.svg?style=shield)](https://app.circleci.com/pipelines/github/sandip-mane/sequenceable?branch=master)
4
+ [![sandip-mane](https://circleci.com/gh/sandip-mane/sequenceable/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/sandip-mane/sequenceable?branch=master)
5
5
 
6
- Adds sequencing abilities to the ActiveRecord Models.
7
- This gem can be useful in managing `sequence` of the records in the database.
6
+ Adds sequencing to the database records.
7
+
8
+ Often we want to keep a record `sequence`/`order` in the database. This gem takes care of adding sequence (auto-incremented) to newly added records.
9
+
10
+ Tough its not just auto-increment, you can do [scoped sequencing](#scope) and more with this gem.
8
11
 
9
- The `sequence` will be auto-generated, when the records are created.
10
12
 
11
13
  ## Usage
12
14
 
@@ -15,7 +15,7 @@ module Sequenceable
15
15
  for_name = sequencing_configuration[:scope]
16
16
  return self.class if for_name.blank?
17
17
 
18
- self.class.where(for_name => self.send(for_name))
18
+ self.class.default_scoped.where(for_name => self.send(for_name))
19
19
  end
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sequenceable
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequenceable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandip Mane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord