lib/language_cards.rb in language_cards-0.0.5 vs lib/language_cards.rb in language_cards-0.0.6
- old
+ new
@@ -12,27 +12,26 @@
# * Value to Value is simply keyboard practice and should be clocked
module LanguageCards
CLEAR = begin
require 'mkmf'
+ MakeMakefile::Logging.instance_variable_set(:@log, File.open(File::NULL, 'w'))
clear = case RbConfig::CONFIG['target_os']
when /mingw32|mswin/
MakeMakefile.find_executable('cls')
else
MakeMakefile.find_executable('clear')
end
clear ? `#{clear}` : "\e[3J\e[H\e[2J"
- ensure
- File.delete('mkmf.log')
end
CLI = HighLine.new
JOIN = " : "
SUBMENUWIDTH = 60
::I18n.load_path = Dir[File.join(File.expand_path(File.join('..','..'), __FILE__), 'locales', '*.yml')]
- ::I18n.load_path += Dir[File.join(File.expand_path(ENV['HOME']), '.language_cards', 'locales', '*.yml')]
+ ::I18n.load_path += Dir[File.join(File.expand_path(ENV['HOME']), '.language_cards', 'locales', '*.yml')] if ENV['HOME']
def self.start
LanguageCards.new.start
end
end