Class: JasmineCIRunner
- Inherits:
-
Object
- Object
- JasmineCIRunner
- Defined in:
- lib/tasks/jasmine_ci/jasmine_ci_runner.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(dir, js_filter) ⇒ JasmineCIRunner
constructor
A new instance of JasmineCIRunner.
- #is_configured?(all_files) ⇒ Boolean
- #name ⇒ Object
- #should_run?(modified_files) ⇒ Boolean
Constructor Details
#initialize(dir, js_filter) ⇒ JasmineCIRunner
Returns a new instance of JasmineCIRunner.
3 4 5 6 |
# File 'lib/tasks/jasmine_ci/jasmine_ci_runner.rb', line 3 def initialize(dir, js_filter) @dir = dir @js_filter = js_filter end |
Instance Method Details
#execute ⇒ Object
12 13 14 |
# File 'lib/tasks/jasmine_ci/jasmine_ci_runner.rb', line 12 def execute return `rake jasmine:ci 2>&1` end |
#is_configured?(all_files) ⇒ Boolean
16 17 18 |
# File 'lib/tasks/jasmine_ci/jasmine_ci_runner.rb', line 16 def is_configured?(all_files) return all_files.include?(@dir + '/spec/javascripts/support/jasmine.yml') end |
#name ⇒ Object
8 9 10 |
# File 'lib/tasks/jasmine_ci/jasmine_ci_runner.rb', line 8 def name return 'Jasmine CI' end |
#should_run?(modified_files) ⇒ Boolean
20 21 22 |
# File 'lib/tasks/jasmine_ci/jasmine_ci_runner.rb', line 20 def should_run?(modified_files) return !(modified_files.detect { |file| @js_filter.filter(file) }).nil? end |