acts_as_lockable_by 0.1.1 → 0.1.2

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: d975f3f181fa0770661057cc10c95e5aa3b4524aa3f224d100702db3b78fe119
4
- data.tar.gz: c0df706de2d54848492c894ca14d04ea8cb696726e9acb89c429f01c68f29046
3
+ metadata.gz: 3976883f5be56291cff8cba6cb37aba57df6fefc8c1f5a0d74bbbd2b0b359f1b
4
+ data.tar.gz: fad1c05df1f2f440177d5e9ec00f4713f96c11e50cdeaa0b4cfb37a813af3112
5
5
  SHA512:
6
- metadata.gz: d6306434f556cb62351a68579830c96f62f86dc530a04efca47794e021bf126f87db735889666f9fad347515e0d28d4b6a4aead036eb770e0ad687d1658b461d
7
- data.tar.gz: 6a1a071b7a180ec017545f981f79f4efcd36448490aab4d1beb9de816b901431b95d50af596cd8982d4a147839497622392da196704e734eee5d0813b8c9e479
6
+ metadata.gz: 78a174973d5cbae20549a4402754488ac95f010f13b3cdf978ba100046aa7244c4e41ba48a9bbb7cc7628cb3375ab2c628ba06ecba09dabb0b9228db4b8738cb
7
+ data.tar.gz: 96858980e66076a9c880399d6dc977e006679ec09efe3a756c92d837c732192e5cda36274a580a952f52a79f8c75b5d1049106070d378c7aa3bb39403d3271bd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acts_as_lockable_by (0.1.1)
4
+ acts_as_lockable_by (0.1.2)
5
5
  activesupport (~> 5.0)
6
6
  redis (~> 4)
7
7
 
@@ -17,7 +17,7 @@ GEM
17
17
  awesome_print (1.8.0)
18
18
  byebug (10.0.2)
19
19
  coderay (1.1.2)
20
- concurrent-ruby (1.1.1)
20
+ concurrent-ruby (1.1.2)
21
21
  diff-lcs (1.3)
22
22
  eventmachine (1.2.7)
23
23
  htmlentities (4.3.4)
data/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/acts_as_lockable_by.svg)](http://badge.fury.io/rb/acts_as_lockable_by)
4
4
  [![Build Status](https://travis-ci.com/tareksamni/acts_as_lockable_by.svg?branch=master)](https://travis-ci.com/tareksamni/acts_as_lockable_by)
5
5
 
6
- This gem was originally developed and maintained by [ABTION](https://abtion.com/). Its main goal is providing the ability to lock a resource so that no other users/lockers can access it till the lock is released or the ttl expires. It uses `redis` a shared memory space to share locks across different deployments which enables easy horizontal scalability for your ruby/rails project on multiple servers.
6
+ This gem was originally developed, incubated and maintained at [ABTION](https://abtion.com/). Its main goal is providing the ability to lock a resource so that no other users/lockers can access it till the lock is released or the ttl expires. It uses `redis` a shared memory space to share locks across different deployments which enables easy horizontal scalability for your ruby/rails project on multiple servers.
7
7
 
8
8
  An example usage for this gem is when you need a blog post (resource) to be only edtiable by 1 user concurrently. So the first user to lock the blog post to himself will always have access and be able to edit it. This user will need to renew the lock before the `ttl` expires otherwise the post will be unlocked/released and any other users can lock it to themselves.
9
9
 
10
10
  `ActsAsLockableBy` uses `redis` as a shared distributed efficient lock manager with its built-in ability to expire locks when `ttl` expires.
11
11
 
12
- The `lock`, `unlock` and `renew_lock` methods in this gem are all atomic operations and running as one redis call on the redis server. That even multiple clients calling and of these methods against the same key will never enter into a race condition or thread unsafety.
12
+ The `lock`, `unlock` and `renew_lock` methods in this gem are all atomic operations and running as one redis call on the redis server. Even multiple clients calling any of these methods against the same key/resource will never enter into a race condition or thread unsafety scenarios.
13
13
 
14
14
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
15
15
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -30,7 +30,7 @@ module ActsAsLockableBy
30
30
 
31
31
  # rubocop:disable Naming/PredicateName
32
32
  def is_lockable?
33
- tagger?
33
+ lockable?
34
34
  end
35
35
  # rubocop:enable Naming/PredicateName
36
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsLockableBy
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_lockable_by
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tarek N. Elsamni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport