Module: Jasmine::Blanket
- Defined in:
- lib/jasmine-blanket.rb,
lib/jasmine-blanket/engine.rb,
lib/jasmine-blanket/version.rb,
lib/jasmine-blanket/configuration.rb
Defined Under Namespace
Classes: Configuration, Engine
Constant Summary
collapse
- VERSION =
"2.0.2.5"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
19
20
21
22
|
# File 'lib/jasmine-blanket.rb', line 19
def self.config
initialize_config
@config
end
|
11
12
13
|
# File 'lib/jasmine-blanket.rb', line 11
def self.configure(&block)
block.call(self.config)
end
|
.coverage_threshold ⇒ Object
48
49
50
|
# File 'lib/jasmine-blanket.rb', line 48
def self.coverage_threshold
@config.coverage_threshold
end
|
.excluded_folders ⇒ Object
44
45
46
|
# File 'lib/jasmine-blanket.rb', line 44
def self.excluded_folders
@config.excluded_folders
end
|
.included_folders ⇒ Object
40
41
42
|
# File 'lib/jasmine-blanket.rb', line 40
def self.included_folders
@config.included_folders
end
|
.initialize_config ⇒ Object
.load_configuration_from_yaml(path = nil) ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/jasmine-blanket.rb', line 24
def self.load_configuration_from_yaml(path = nil)
path ||= File.join(Dir.pwd, 'spec', 'javascripts', 'support', 'jasmine.yml')
if File.exist?(path)
yaml_config = YAML::load(File.read(path))
Jasmine::Blanket.configure do |config|
config.included_folders = yaml_config["included_blanket_folders"] if yaml_config["included_blanket_folders"].any?
config.excluded_folders = yaml_config["excluded_blanket_folders"] if yaml_config["excluded_blanket_folders"].any?
config.coverage_threshold = yaml_config["coverage_threshold"] if yaml_config["coverage_threshold"]
end
else
raise ConfigNotFound, "Unable to load jasmine config from #{path}"
end
end
|