redipress 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redipress/simple_option.rb +39 -0
- data/lib/redipress/variables.rb +1 -1
- data/lib/redipress.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d161e8417cb8b95105e0ce68a4be0a8818327560
|
4
|
+
data.tar.gz: f36b8f2a5cf425d5944305a762c07f982a32d9bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6e52ae8ea7f15e5ccd2a811502f4e442fb0fa0b6bbfe7f634ec409faf0be040a89748371573cb2f088154def23b9f3c7dec46c37219d570452e942e3987d3b
|
7
|
+
data.tar.gz: 0d524c9840ee2a57a500dd1a109364a9c3adab6ca5d00a009132b35c4ca419e280e84e34f3b494a4e876ce71bf5f0f6759b7e5de7b1c565df08b3fab47f98874
|
@@ -0,0 +1,39 @@
|
|
1
|
+
unless defined?(RediPress)
|
2
|
+
raise "You can't load this file. Please load the redipress file instead."
|
3
|
+
end
|
4
|
+
|
5
|
+
module RediPress
|
6
|
+
# This class is intended for use by configurations using selectable parameters.
|
7
|
+
#
|
8
|
+
class SimpleOption
|
9
|
+
# Define the name and slug attributes for reading
|
10
|
+
#
|
11
|
+
attr_reader :name, :slug
|
12
|
+
|
13
|
+
# Setup an instance of this class with a name and an option.
|
14
|
+
# The name will be shown in the list of options.
|
15
|
+
#
|
16
|
+
# Arguments:
|
17
|
+
# name: (String|Symbol)
|
18
|
+
# slug: (String|Symbol)
|
19
|
+
#
|
20
|
+
# Example:
|
21
|
+
# >> RediPress::SimpleOption.new('RediPress', :redipress)
|
22
|
+
# => #<RediPress::SimpleOption:0x00000000000000>
|
23
|
+
#
|
24
|
+
def initialize(name, slug)
|
25
|
+
@name = name.to_s
|
26
|
+
@slug = slug.to_s
|
27
|
+
end
|
28
|
+
|
29
|
+
# Convert the object to a string
|
30
|
+
#
|
31
|
+
# Example:
|
32
|
+
# >> option.to_s
|
33
|
+
# => 'RediPress'
|
34
|
+
#
|
35
|
+
def to_s
|
36
|
+
@name
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/redipress/variables.rb
CHANGED
data/lib/redipress.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redipress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rediweb Hosting
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/redipress/configuration/base.rb
|
149
149
|
- lib/redipress/errors.rb
|
150
150
|
- lib/redipress/parameter.rb
|
151
|
+
- lib/redipress/simple_option.rb
|
151
152
|
- lib/redipress/ssh.rb
|
152
153
|
- lib/redipress/variables.rb
|
153
154
|
- redipress.gemspec
|