lib/chutney.rb in chutney-3.0.0.beta.2 vs lib/chutney.rb in chutney-3.0.0
- old
+ new
@@ -34,10 +34,11 @@
require 'chutney/linter/unique_scenario_names'
require 'chutney/linter/unknown_variable'
require 'chutney/linter/unused_variable'
require 'chutney/linter/use_background'
require 'chutney/linter/use_outline'
+require 'chutney/version'
require 'cuke_modeler'
require 'forwardable'
# require 'gherkin/dialect'
# require 'gherkin/parser'
@@ -56,17 +57,21 @@
def initialize(*files)
@files = files
@results = Hash.new { |h, k| h[k] = [] }
i18n_paths = Dir[File.expand_path(File.join(__dir__, 'config/locales')) + '/*.yml']
- return if I18n.load_path.include?(i18n_paths)
- I18n.load_path += i18n_paths
+ i18n_paths.each do |path|
+ next if I18n.load_path.include?(path)
+
+ I18n.load_path << path
+ I18n.backend.reload!
+ end
end
def configuration
unless @config
- default_file = [File.expand_path('..', __dir__), '**/config', 'chutney.yml']
+ default_file = [File.expand_path('..', __dir__), '**/config', 'chutney_defaults.yml']
config_file = Dir.glob(File.join(default_file)).first.freeze
@config = Configuration.new(config_file)
end
@config
end