frosty_meadow 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/frosty_meadow.rb +10 -0
- metadata +2 -2
data/lib/frosty_meadow.rb
CHANGED
@@ -32,4 +32,14 @@ class FrostyMeadow
|
|
32
32
|
|
33
33
|
return words
|
34
34
|
end
|
35
|
+
|
36
|
+
def self.generate_hex_name
|
37
|
+
generated_string = self.generate(:separator => '-')
|
38
|
+
|
39
|
+
return "#{generated_string}-#{self.hex_string}"
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.hex_string length=5
|
43
|
+
((0..length).map{rand(256).chr}*"").unpack("H*")[0][0,length]
|
44
|
+
end
|
35
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frosty_meadow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This gem will generate a random name for your server, much in the way
|
15
15
|
Heroku does.
|