guard-jasmine 0.8.8 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -212,7 +212,7 @@ end
212
212
  The general options configures the environment that is needed to run Guard::Jasmine:
213
213
 
214
214
  ```ruby
215
- :server => :jasmine_gem # Jasmine server to use, either :auto, :rack, :jasmine_gem or :none
215
+ :server => :jasmine_gem # Jasmine server to use, either :auto, :none, :webrick, :mongrel, :thin, :jasmine_gem
216
216
  # default: :auto
217
217
 
218
218
  :server_env => :test # Jasmine server Rails environment to set, e.g. :development or :test
@@ -235,6 +235,9 @@ If you're setting the `:server` option to `:none`, you can supply the Jasmine ru
235
235
  # default: http://127.0.0.1:8888/jasmine
236
236
  ```
237
237
 
238
+ Detecting the server with the `auto` option does only detect the jasmine gem or webrick. If you want to use mongrel or
239
+ thins, you have to set it explicit in the server option.
240
+
238
241
  The reason why the Server environment is set to `development` by default is that in development mode
239
242
  the asset pipeline doesn't concatenate the JavaScripts and you'll see the line number in the real file,
240
243
  instead of a ridiculous high line number in a single, very large JavaScript.
@@ -344,7 +347,7 @@ Usage:
344
347
  guard-jasmine spec
345
348
 
346
349
  Options:
347
- -s, [--server=SERVER] # Server to start, either `auto`, `rack`, `jasmine_gem` or `none`
350
+ -s, [--server=SERVER] # Server to start, either `auto`, `none`, `webrick`, `mongrel`, `thin`, `jasmine_gem`
348
351
  # Default: auto
349
352
  -p, [--port=N] # Server port to use
350
353
  # Default: 8888
@@ -39,7 +39,7 @@ module Guard
39
39
  #
40
40
  # @param [Array<Guard::Watcher>] watchers the watchers in the Guard block
41
41
  # @param [Hash] options the options for the Guard
42
- # @option options [String] :server the server to use, either :rails or :jasmine
42
+ # @option options [String] :server the server to use, either :auto, :none, :webrick, :mongrel, :thin, :jasmine_gem
43
43
  # @option options [String] :server_env the server environment to use, for example :development, :test
44
44
  # @option options [String] :port the port for the Jasmine test server
45
45
  # @option options [String] :jasmine_url the url of the Jasmine test runner
@@ -59,7 +59,7 @@ module Guard
59
59
  options[:jasmine_url] = "http://localhost:#{ options[:port] }/jasmine" if options[:port] && !options[:jasmine_url]
60
60
  options = DEFAULT_OPTIONS.merge(options)
61
61
  options[:specdoc] = :failure if ![:always, :never, :failure].include? options[:specdoc]
62
- options[:server] = :auto if ![:auto, :none, :rack, :jasmine_gem].include? options[:server]
62
+ options[:server] = :auto if ![:none, :webrick, :mongrel, :thin, :jasmine_gem].include? options[:server]
63
63
  options[:phantomjs_bin] = Jasmine.which('phantomjs') unless options[:phantomjs_bin]
64
64
 
65
65
  super(watchers, options)
@@ -77,7 +77,7 @@ module Guard
77
77
  runner[:port] = options.port
78
78
  runner[:server_env] = options.server_env
79
79
  runner[:console] = [:always, :never, :failure].include?(options.console.to_sym) ? options.console.to_sym : :failure
80
- runner[:server] = [:auto, :rack, :jasmine_gem, :none].include?(options.server.to_sym) ? options.server.to_sym : :auto
80
+ runner[:server] = [:auto, :none, :webrick, :mongrel, :thin, :jasmine_gem].include?(options.server.to_sym) ? options.server.to_sym : :auto
81
81
 
82
82
  runner[:notification] = false
83
83
  runner[:hide_success] = true
@@ -21,8 +21,8 @@ module Guard
21
21
  strategy = detect_server if strategy == :auto
22
22
 
23
23
  case strategy
24
- when :rack
25
- start_rack_server(port, environment)
24
+ when :webrick, :mongrel, :thin
25
+ start_rack_server(port, environment, strategy)
26
26
  when :jasmine_gem
27
27
  start_jasmine_gem_server(port)
28
28
  end
@@ -44,15 +44,16 @@ module Guard
44
44
  #
45
45
  # @param [Number] port the server port
46
46
  # @param [String] environment the Rails environment
47
+ # @param [Symbol] server the rack server to use
47
48
  #
48
- def start_rack_server(port, environment)
49
+ def start_rack_server(port, environment, server)
49
50
  require 'rack'
50
51
 
51
- ::Guard::UI.info "Guard::Jasmine starts Rack test server on port #{ port } in #{ environment } environment."
52
+ ::Guard::UI.info "Guard::Jasmine starts #{ server } test server on port #{ port } in #{ environment } environment."
52
53
 
53
54
  self.thread = Thread.new {
54
55
  ENV['RAILS_ENV'] = environment.to_s
55
- Rack::Server.start(:config => 'config.ru', :Port => port, :AccessLog => [])
56
+ Rack::Server.start(:config => 'config.ru', :Port => port, :server => server)
56
57
  }
57
58
 
58
59
  rescue Exception => e
@@ -84,7 +85,7 @@ module Guard
84
85
  #
85
86
  def detect_server
86
87
  if File.exists?('config.ru')
87
- :rack
88
+ :webrick
88
89
  elsif File.exists?(File.join('spec', 'javascripts', 'support', 'jasmine.yml'))
89
90
  :jasmine_gem
90
91
  else
@@ -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 = '0.8.8'
4
+ VERSION = '0.9.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: 0.8.8
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-15 00:00:00.000000000Z
12
+ date: 2011-12-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70258909388700 !ruby/object:Gem::Requirement
16
+ requirement: &70364667614360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70258909388700
24
+ version_requirements: *70364667614360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &70258909387020 !ruby/object:Gem::Requirement
27
+ requirement: &70364667607740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70258909387020
35
+ version_requirements: *70364667607740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: version
38
- requirement: &70258909386160 !ruby/object:Gem::Requirement
38
+ requirement: &70364667598460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70258909386160
46
+ version_requirements: *70364667598460
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: thor
49
- requirement: &70258909311800 !ruby/object:Gem::Requirement
49
+ requirement: &70364667594640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.14.6
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70258909311800
57
+ version_requirements: *70364667594640
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rack
60
- requirement: &70258909310640 !ruby/object:Gem::Requirement
60
+ requirement: &70364667591680 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.3.5
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70258909310640
68
+ version_requirements: *70364667591680
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &70258909309160 !ruby/object:Gem::Requirement
71
+ requirement: &70364667589820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70258909309160
79
+ version_requirements: *70364667589820
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-rspec
82
- requirement: &70258909308540 !ruby/object:Gem::Requirement
82
+ requirement: &70364667588300 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0.5'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70258909308540
90
+ version_requirements: *70364667588300
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rspec
93
- requirement: &70258909307680 !ruby/object:Gem::Requirement
93
+ requirement: &70364667585360 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '2.7'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70258909307680
101
+ version_requirements: *70364667585360
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: yard
104
- requirement: &70258909306820 !ruby/object:Gem::Requirement
104
+ requirement: &70364667569100 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.7.3
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70258909306820
112
+ version_requirements: *70364667569100
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: redcarpet
115
- requirement: &70258909305760 !ruby/object:Gem::Requirement
115
+ requirement: &70364667563080 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 1.17.2
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70258909305760
123
+ version_requirements: *70364667563080
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: pry
126
- requirement: &70258909305180 !ruby/object:Gem::Requirement
126
+ requirement: &70364667540220 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: 0.9.6.2
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70258909305180
134
+ version_requirements: *70364667540220
135
135
  description: Guard::Jasmine automatically tests your Jasmine specs on PhantomJS
136
136
  email:
137
137
  - michi@netzpiraten.ch