guard-jasmine 1.13.2 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -616,6 +616,7 @@ Options:
616
616
  # Default: auto
617
617
  -p, [--port=N] # Server port to use
618
618
  # Default: Random free port
619
+ [--verbose] # Show the server output in the console
619
620
  -e, [--server-env=SERVER_ENV] # The server environment to use, for example `development`, `test` etc.
620
621
  # Default: test
621
622
  [--server-timeout=N] # The number of seconds to wait for the Jasmine spec server
@@ -44,6 +44,11 @@ module Guard
44
44
  :default => 60,
45
45
  :desc => 'The number of seconds to wait for the Jasmine spec server'
46
46
 
47
+ method_option :verbose,
48
+ :type => :boolean,
49
+ :default => false,
50
+ :desc => 'Show the server output in the console'
51
+
47
52
  method_option :rackup_config,
48
53
  :type => :string,
49
54
  :aliases => '-c',
@@ -140,6 +145,7 @@ module Guard
140
145
  runner_options[:jasmine_url] = options.url || "http://localhost:#{ runner_options[:port] }#{ options.server.to_sym == :jasmine_gem ? '/' : '/jasmine' }"
141
146
  runner_options[:phantomjs_bin] = options.bin || CLI.which('phantomjs')
142
147
  runner_options[:timeout] = options.timeout
148
+ runner_options[:verbose] = options.verbose
143
149
  runner_options[:server] = options.server.to_sym
144
150
  runner_options[:server_env] = options.server_env
145
151
  runner_options[:server_timeout] = options.server_timeout
@@ -37,9 +37,9 @@ module Guard
37
37
  when :unicorn
38
38
  start_unicorn_server(port, options)
39
39
  when :jasmine_gem
40
- start_rake_server(port, 'jasmine')
40
+ start_rake_server(port, 'jasmine', options)
41
41
  else
42
- start_rake_server(port, server.to_s) unless server == :none
42
+ start_rake_server(port, server.to_s, options) unless server == :none
43
43
  end
44
44
 
45
45
  wait_for_server(port, timeout) unless server == :none
@@ -76,7 +76,7 @@ module Guard
76
76
 
77
77
  self.process = ChildProcess.build(*['rackup', '-E', environment.to_s, '-p', port.to_s, '-s', server.to_s, rackup_config].compact)
78
78
  self.process.environment['COVERAGE'] = options[:coverage].to_s
79
- self.process.io.inherit! if ::Guard.respond_to?(:options) && ::Guard.options && ::Guard.options[:verbose]
79
+ self.process.io.inherit! if options[:verbose]
80
80
  self.process.start
81
81
 
82
82
  rescue => e
@@ -99,7 +99,7 @@ module Guard
99
99
 
100
100
  self.process = ChildProcess.build('unicorn_rails', '-E', environment.to_s, '-p', port.to_s)
101
101
  self.process.environment['COVERAGE'] = options[:coverage].to_s
102
- self.process.io.inherit! if ::Guard.respond_to?(:options) && ::Guard.options && ::Guard.options[:verbose]
102
+ self.process.io.inherit! if options[:verbose]
103
103
  self.process.start
104
104
 
105
105
  rescue => e
@@ -110,12 +110,13 @@ module Guard
110
110
  #
111
111
  # @param [Number] port the server port
112
112
  # @param [String] task the rake task name
113
+ # @option options [Symbol] server the rack server to use
113
114
  #
114
- def start_rake_server(port, task)
115
+ def start_rake_server(port, task, options)
115
116
  ::Guard::UI.info "Guard::Jasmine starts Jasmine Gem test server on port #{ port }."
116
117
 
117
118
  self.process = ChildProcess.build('ruby', '-S', 'rake', task, "JASMINE_PORT=#{ port }")
118
- self.process.io.inherit! if ::Guard.respond_to?(:options) && ::Guard.options && ::Guard.options[:verbose]
119
+ self.process.io.inherit! if options[:verbose]
119
120
  self.process.start
120
121
 
121
122
  rescue => e
@@ -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.13.2'
4
+ VERSION = '1.14.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.13.2
4
+ version: 1.14.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: 2013-03-13 00:00:00.000000000 Z
12
+ date: 2013-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard