marlin 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +1 -1
- data/Procfile +1 -1
- data/lib/marlin/action.rb +14 -0
- data/lib/marlin/actions/delete_key.rb +1 -1
- data/lib/marlin/actions/read_key.rb +1 -1
- data/lib/marlin/actions/save_key.rb +1 -1
- data/lib/marlin/config/initializers/autoloader.rb +2 -0
- data/lib/marlin/persister.rb +13 -0
- data/lib/marlin/persisters/memory.rb +1 -1
- data/lib/marlin/persisters/{redis.rb → redis_storage.rb} +4 -2
- data/lib/marlin/version.rb +1 -1
- metadata +4 -5
- data/lib/marlin/actions/base.rb +0 -16
- data/lib/marlin/actions/replicate_key.rb +0 -9
- data/lib/marlin/persisters/base.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569d7a74ce9249a33efec6fb82adb78c9e689150a553c7ba9e04a500d1a6a6bf
|
4
|
+
data.tar.gz: e4f7ea000a94cde446b18b7a44a039f27b3eaf82f5fbbd34ca6335eb2bd96c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0a95107d8e6847ca9a6c229bdb01b29bd3653f51790b9e979c9b2c5f15d186f84bea7e210aea5a6f05a3f767769b173cc8d39446c1d0e5793c087e5f701a70
|
7
|
+
data.tar.gz: a288eb29236ce04f1f8ca242f6fc1d7f8dbdb85c910ef10cdba272a7a84399248d0d9f542f5b76c6de5d0cf2b5e58a437703c861809b5d04384c6b1306f5f12a
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
web: bundle exec rackup config.ru -p
|
1
|
+
web: bundle exec rackup config.ru -p $PORT
|
@@ -1,6 +1,8 @@
|
|
1
|
+
require "redis"
|
2
|
+
|
1
3
|
module Marlin
|
2
4
|
module Persisters
|
3
|
-
class
|
5
|
+
class RedisStorage < Marlin::Persister
|
4
6
|
def read(key)
|
5
7
|
redis.get(key.to_s)
|
6
8
|
end
|
@@ -16,7 +18,7 @@ module Marlin
|
|
16
18
|
private
|
17
19
|
|
18
20
|
def redis
|
19
|
-
@redis ||=
|
21
|
+
@redis ||= Redis.new(url: ENV["REDIS_URL"])
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
data/lib/marlin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marlin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Kovalenko
|
@@ -67,16 +67,15 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- config.ru
|
69
69
|
- lib/marlin.rb
|
70
|
-
- lib/marlin/
|
70
|
+
- lib/marlin/action.rb
|
71
71
|
- lib/marlin/actions/delete_key.rb
|
72
72
|
- lib/marlin/actions/read_key.rb
|
73
|
-
- lib/marlin/actions/replicate_key.rb
|
74
73
|
- lib/marlin/actions/save_key.rb
|
75
74
|
- lib/marlin/app.rb
|
76
75
|
- lib/marlin/config/initializers/autoloader.rb
|
77
|
-
- lib/marlin/
|
76
|
+
- lib/marlin/persister.rb
|
78
77
|
- lib/marlin/persisters/memory.rb
|
79
|
-
- lib/marlin/persisters/
|
78
|
+
- lib/marlin/persisters/redis_storage.rb
|
80
79
|
- lib/marlin/version.rb
|
81
80
|
- marlin.gemspec
|
82
81
|
homepage: https://github.com/ilyacoding/marlin
|
data/lib/marlin/actions/base.rb
DELETED