guard-jasmine 1.6.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -439,6 +439,17 @@ The `:errors` option is partially working when using at least PhantomJS version
439
439
  [Issue #166](http://code.google.com/p/phantomjs/issues/detail?id=166) for the actual status of retreiving the JavaScript
440
440
  stack trace.
441
441
 
442
+ ### Overwrite options when running all specs
443
+
444
+ You may want to have different options when the spec runner runs all specs. You can specify the `:run_all` options
445
+ as a Hash that contains any valid runner option and will overwrite the general options.
446
+
447
+ ```ruby
448
+ :run_all => { :specdoc => :never } # Run all options,
449
+ # Takes any valid option
450
+ # default: {}
451
+ ```
452
+
442
453
  #### Console logs
443
454
 
444
455
  The `:console` options adds captured console logs from the spec runner and adds them to the specdoc. Guard:Jasmine
@@ -18,7 +18,7 @@ module Guard
18
18
 
19
19
  extend Util
20
20
 
21
- attr_accessor :last_run_failed, :last_failed_paths
21
+ attr_accessor :last_run_failed, :last_failed_paths, :run_all_options
22
22
 
23
23
  DEFAULT_OPTIONS = {
24
24
  :server => :auto,
@@ -62,6 +62,7 @@ module Guard
62
62
  # @option options [Symbol] :console options for the console.log output, either :always, :never or :failure
63
63
  # @option options [Symbol] :errors options for the errors output, either :always, :never or :failure
64
64
  # @option options [Symbol] :focus options for focus on failures in the specdoc
65
+ # @option options [Hash] :run_all options overwrite options when run all specs
65
66
  #
66
67
  def initialize(watchers = [], options = { })
67
68
  options[:jasmine_url] = "http://localhost:#{ options[:port] }/jasmine" if options[:port] && !options[:jasmine_url]
@@ -70,6 +71,8 @@ module Guard
70
71
  options[:server] ||= :auto
71
72
  options[:phantomjs_bin] = Jasmine.which('phantomjs') unless options[:phantomjs_bin]
72
73
 
74
+ self.run_all_options = options.delete(:run_all) || {}
75
+
73
76
  super(watchers, options)
74
77
 
75
78
  self.last_run_failed = false
@@ -115,7 +118,7 @@ module Guard
115
118
  # @raise [:task_has_failed] when run_on_change has failed
116
119
  #
117
120
  def run_all
118
- passed, failed_specs = Runner.run([options[:spec_dir]], options)
121
+ passed, failed_specs = Runner.run([options[:spec_dir]], options.merge(self.run_all_options))
119
122
 
120
123
  self.last_failed_paths = failed_specs
121
124
  self.last_run_failed = !passed
@@ -1,6 +1,6 @@
1
1
  module Guard
2
2
  module JasmineVersion
3
3
  # Guard::Jasmine version that is used for the Gem specification
4
- VERSION = '1.6.1'
4
+ VERSION = '1.7.0'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: -1426917572557703361
141
+ hash: 4241117556701944522
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements: