mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-27 07:33:05 +00:00
add require_relative
This commit is contained in:
parent
24949b2bde
commit
4569ad4d1c
5 changed files with 18 additions and 17 deletions
|
@ -1,15 +1,13 @@
|
|||
#!/usr/bin/ruby
|
||||
# author: nishiki
|
||||
# mail: nishiki@yaegashi.fr
|
||||
# info: a simple script who manage your passwords
|
||||
|
||||
module MPW
|
||||
|
||||
require 'rubygems'
|
||||
require 'gpgme'
|
||||
require 'yaml'
|
||||
require 'i18n'
|
||||
require 'rubygems'
|
||||
require 'gpgme'
|
||||
require 'yaml'
|
||||
require 'i18n'
|
||||
|
||||
module MPW
|
||||
class Config
|
||||
|
||||
attr_accessor :error_msg
|
||||
|
@ -231,5 +229,4 @@ module MPW
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -8,7 +8,8 @@ require 'csv'
|
|||
require 'i18n'
|
||||
require 'fileutils'
|
||||
require 'yaml'
|
||||
require "#{APP_ROOT}/lib/Item"
|
||||
|
||||
require_relative './Item'
|
||||
|
||||
module MPW
|
||||
class MPW
|
||||
|
|
|
@ -7,8 +7,9 @@ require 'rubygems'
|
|||
require 'i18n'
|
||||
require 'yaml'
|
||||
require 'tempfile'
|
||||
require "#{APP_ROOT}/lib/Item"
|
||||
require "#{APP_ROOT}/lib/MPW"
|
||||
|
||||
require_relative './MPW'
|
||||
require_relative './Item'
|
||||
|
||||
module MPW
|
||||
class Sync
|
||||
|
|
|
@ -10,8 +10,9 @@ require 'readline'
|
|||
require 'i18n'
|
||||
require 'colorize'
|
||||
|
||||
require "#{APP_ROOT}/lib/MPW"
|
||||
require "#{APP_ROOT}/lib/Sync"
|
||||
require_relative '../Sync'
|
||||
require_relative '../MPW'
|
||||
require_relative '../Item'
|
||||
|
||||
class Cli
|
||||
|
||||
|
|
9
mpw
9
mpw
|
@ -10,10 +10,9 @@ require 'locale'
|
|||
require 'set'
|
||||
require 'i18n'
|
||||
|
||||
APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath)
|
||||
require "#{APP_ROOT}/lib/UI/Cli"
|
||||
require "#{APP_ROOT}/lib/Config"
|
||||
require "#{APP_ROOT}/lib/MPW"
|
||||
require_relative 'lib/UI/Cli'
|
||||
require_relative 'lib/Config'
|
||||
require_relative 'lib/MPW'
|
||||
|
||||
# --------------------------------------------------------- #
|
||||
# Set local
|
||||
|
@ -25,6 +24,8 @@ if defined?(I18n.enforce_available_locales)
|
|||
I18n.enforce_available_locales = true
|
||||
end
|
||||
|
||||
APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath)
|
||||
|
||||
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
||||
I18n.load_path = Dir["#{APP_ROOT}/i18n/cli/*.yml"]
|
||||
I18n.default_locale = :en
|
||||
|
|
Loading…
Reference in a new issue