tiny-redis 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -18
- data/lib/tiny/redis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd6a84939fe1d2708c7002aadbb81ce0be8d80c89bcd5a004f27dd4a71bb7959
|
4
|
+
data.tar.gz: 0e794200b037b8317420415445872a30964b285528514c62ded17d1b1d9a43ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e46955cce74ffe344565f059987446dd274bf9736290bb462a3348bb935c69670f22dac777364cb48679c6d84e6dc6379a035e49fc1b9a217d1f75e010f2ac8
|
7
|
+
data.tar.gz: e1583b64114d166feefab1d59ad0df457ae6ed0c34307ad266328754781d4a9229ab39e3b7cb732debc3a8f477a904447b75ea20e2ec030122c7706bd7de2f6b
|
data/README.md
CHANGED
@@ -1,28 +1,39 @@
|
|
1
|
-
|
2
|
-
Short description and motivation.
|
1
|
+
### tiny-redis
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
Tiny Redis - encrypted barebones JSON formatted orm.
|
4
|
+
Encryption is Rails Credentials based.
|
6
5
|
|
7
|
-
|
8
|
-
|
6
|
+
Steps to use:
|
7
|
+
```
|
8
|
+
add to Gemfile:
|
9
|
+
gem 'tiny-redis'
|
10
|
+
|
11
|
+
bundle install
|
9
12
|
|
10
|
-
|
11
|
-
|
13
|
+
rails g tiny_redis
|
14
|
+
|
15
|
+
this will install initalizer that creates a pool of redis connections
|
12
16
|
```
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
## How to use
|
19
|
+
|
20
|
+
```
|
21
|
+
class User
|
22
|
+
include TinyRedis
|
23
|
+
|
24
|
+
attr_accessor :email
|
25
|
+
alias_method :index, :email # this will tie your records method to indexing parameter
|
26
|
+
end
|
27
|
+
```
|
28
|
+
Set up credentials:
|
17
29
|
```
|
30
|
+
rails credentials:edit --environment development
|
18
31
|
|
19
|
-
|
20
|
-
|
21
|
-
|
32
|
+
add:
|
33
|
+
user:
|
34
|
+
encryptkey: abcdabcdabcdadbvabcdabcdabcdadbv
|
22
35
|
```
|
23
36
|
|
24
|
-
|
25
|
-
Contribution directions go here.
|
37
|
+
Now your records in redis are encrypted. If you wish for more security you can remove config/master.key after server starts. And investigate SE Linux address space protection so hacker can't pry encryption key from the app so easily.
|
26
38
|
|
27
|
-
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
39
|
+
Have fun! 🎉
|
data/lib/tiny/redis/version.rb
CHANGED