Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fixed relative path issue. now the .js path is relative to the gem's …
Browse files Browse the repository at this point in the history
…location
  • Loading branch information
Emiliano committed Nov 27, 2015
1 parent 6a1b8af commit fd165ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/zxcvbn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
module Zxcvbn
extend self

DATA_PATH = Pathname(File.expand_path('../../data', __FILE__))

# Returns a Zxcvbn::Score for the given password
#
# Example:
Expand Down
4 changes: 3 additions & 1 deletion lib/zxcvbn/tester.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ module Zxcvbn
require "execjs"

class Tester
DATA_PATH = Pathname(File.expand_path('../../../data/zxcvbn.js', __FILE__))

def initialize
src = File.open("./data/zxcvbn.js", 'r').read
src = File.open(DATA_PATH, 'r').read
@context = ExecJS.compile(src)
end

Expand Down

0 comments on commit fd165ed

Please sign in to comment.