charmkit 0.4.9 → 0.5.0

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
  SHA1:
3
- metadata.gz: d1ed1d1b33b056348463ac9f861a8d64d0f58a9c
4
- data.tar.gz: 0afb41943b5aec098e1b0798b01d9f5d37f7296d
3
+ metadata.gz: 10d0c25d8128a82b90918def008d8e908f528a09
4
+ data.tar.gz: 146b5a09c853bddb9820ebeae3bd4c8d7cc1dcde
5
5
  SHA512:
6
- metadata.gz: d0fa005597463a6d1cca7bfea6b91d6ef35372dfbcc1d7ec9dbae66ea52a3e4fe20438973e34d538c75c1427d8baab97f16bb9c81e116665dad44bb9670fe6c0
7
- data.tar.gz: 072010d8fc17dd186b62b42c4a90db4422ea61b96939782db674af0226bcd80d83bebb04e5730c6103efe96b0cd49a5b1ee0264475d541b73551cdb354e488fc
6
+ metadata.gz: d295bc469620b0b36afae912684e2b0b782c6c93bb6b5c5dcb5598c4c4343fa1bac01d148cc2ff9c85c100ca4a65992d97910d51860a1f15f4d37e5ce377785e
7
+ data.tar.gz: 94a75b3018d33c28df6f78253831f32c94f8f5a652d41fe86a6e5e10ade542d26e2ed42d549d2701f30181c8c23a4bfe75c14fe49ce22f6be9db3bd73e52e4e4
@@ -0,0 +1,13 @@
1
+ module Charmkit
2
+ module Helpers
3
+ module Crypt
4
+ # Generate a password salt
5
+ #
6
+ # @param [Integer] min mininum number of characters
7
+ # @param [Integer] max maximum number of characters
8
+ def gen_salt(min=0, max=20)
9
+ (min...max).map { ('a'..'z').to_a[rand(26)] }.join
10
+ end
11
+ end
12
+ end
13
+ end
@@ -5,8 +5,8 @@ module Charmkit
5
5
 
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 4
9
- PATCH = 9
8
+ MINOR = 5
9
+ PATCH = 0
10
10
  PRE = nil
11
11
 
12
12
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
data/lib/charmkit.rb CHANGED
@@ -3,6 +3,7 @@ require "charmkit/helpers/template"
3
3
  require "charmkit/helpers/runner"
4
4
  require "charmkit/helpers/hookenv"
5
5
  require "charmkit/helpers/fs"
6
+ require "charmkit/helpers/crypt"
6
7
 
7
8
  module Charmkit; end
8
9
  extend Charmkit::Helpers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charmkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Stokes
@@ -161,6 +161,7 @@ files:
161
161
  - examples/render_inline.rb
162
162
  - lib/charmkit.rb
163
163
  - lib/charmkit/extend/string_tools.rb
164
+ - lib/charmkit/helpers/crypt.rb
164
165
  - lib/charmkit/helpers/fs.rb
165
166
  - lib/charmkit/helpers/hookenv.rb
166
167
  - lib/charmkit/helpers/runner.rb