oldskool-password 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,6 @@ require 'passmakr'
2
2
 
3
3
  module Oldskool
4
4
  class PasswordHandler
5
- include Utils
6
-
7
5
  def initialize(params, keyword, config)
8
6
  @params = params
9
7
  @keyword = keyword
@@ -11,12 +9,16 @@ module Oldskool
11
9
  self
12
10
  end
13
11
 
12
+ def plugin_template(template)
13
+ File.read(File.expand_path("../../../views/#{template}.erb", __FILE__))
14
+ end
15
+
14
16
  def handle_request(keyword, query)
15
17
  len = Integer(query) rescue 8
16
18
 
17
19
  pw = Passmakr.new(:phonemic, len)
18
20
 
19
- {:template => plugin_template(:password, __FILE__), :pw => pw}
21
+ {:template => plugin_template(:password), :pw => pw}
20
22
  end
21
23
  end
22
24
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oldskool-password
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - R.I.Pienaar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-14 00:00:00 +00:00
18
+ date: 2012-01-15 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency