guard-jasmine 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -0
- data/lib/guard/jasmine/cli.rb +8 -1
- data/lib/guard/jasmine/version.rb +1 -1
- metadata +25 -25
data/README.md
CHANGED
@@ -315,6 +315,20 @@ These options affects what system notifications (growl, libnotify or notifu) are
|
|
315
315
|
# default: 3
|
316
316
|
```
|
317
317
|
|
318
|
+
## Mapping file changes to the spec filter
|
319
|
+
|
320
|
+
Jasmine doesn't know anything about your test files, it only knows the name of your specs that you specify in the
|
321
|
+
`describe` function. When a file change is detected, Guard::Jasmine extracts the first spec name of the file and uses
|
322
|
+
that spec description as spec filter.
|
323
|
+
|
324
|
+
So if you want to have a precise spec detection, you should:
|
325
|
+
|
326
|
+
* Use only one top-level description per spec file.
|
327
|
+
* Make each top-level description unique.
|
328
|
+
|
329
|
+
To get a feeling how your naming strategy works, play with the web based Jasmine runner and modify the `spec` query
|
330
|
+
parameter.
|
331
|
+
|
318
332
|
## Guard::Jasmine for your CI server
|
319
333
|
|
320
334
|
Guard::Jasmine includes a little command line utility to run your specs once and output the specdoc to the console.
|
@@ -435,6 +449,7 @@ $ guard-jasmine-debug http://127.0.0.1:3000/Jasmine?spec=YourSpec
|
|
435
449
|
|
436
450
|
* [Damien Mathieu](https://github.com/dmathieu)
|
437
451
|
* [Dmytrii Nagirniak](https://github.com/dnagir)
|
452
|
+
* [Mark Dodwell](https://github.com/mkdynamic)
|
438
453
|
|
439
454
|
## Acknowledgment
|
440
455
|
|
data/lib/guard/jasmine/cli.rb
CHANGED
@@ -56,6 +56,12 @@ module Guard
|
|
56
56
|
:default => 'failure',
|
57
57
|
:desc => 'Whether to show console.log statements in the spec runner, either `always`, `never` or `failure`'
|
58
58
|
|
59
|
+
method_option :server_env,
|
60
|
+
:type => :string,
|
61
|
+
:aliases => '-e',
|
62
|
+
:default => 'development',
|
63
|
+
:desc => 'The server environment to use, for example `development`, `test` etc.'
|
64
|
+
|
59
65
|
# Run the Guard::Jasmine::Runner with options from
|
60
66
|
# the command line.
|
61
67
|
#
|
@@ -69,6 +75,7 @@ module Guard
|
|
69
75
|
runner[:phantomjs_bin] = options.bin
|
70
76
|
runner[:timeout] = options.timeout
|
71
77
|
runner[:port] = options.port
|
78
|
+
runner[:server_env] = options.server_env
|
72
79
|
runner[:console] = [:always, :never, :failure].include?(options.console.to_sym) ? options.console.to_sym : :failure
|
73
80
|
runner[:server] = [:auto, :rack, :jasmine_gem, :none].include?(options.server.to_sym) ? options.server.to_sym : :auto
|
74
81
|
|
@@ -77,7 +84,7 @@ module Guard
|
|
77
84
|
runner[:max_error_notify] = 0
|
78
85
|
runner[:specdoc] = :always
|
79
86
|
|
80
|
-
::Guard::Jasmine::Server.start(runner[:server], runner[:port]) unless runner[:server] == :none
|
87
|
+
::Guard::Jasmine::Server.start(runner[:server], runner[:port], runner[:server_env]) unless runner[:server] == :none
|
81
88
|
result = ::Guard::Jasmine::Runner.run(paths, runner)
|
82
89
|
|
83
90
|
::Guard::Jasmine::Server.stop
|
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.
|
4
|
+
version: 0.8.6
|
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-11-
|
12
|
+
date: 2011-11-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &70147398318020 !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: *
|
24
|
+
version_requirements: *70147398318020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: multi_json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70147398317340 !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: *
|
35
|
+
version_requirements: *70147398317340
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: version
|
38
|
-
requirement: &
|
38
|
+
requirement: &70147398316660 !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: *
|
46
|
+
version_requirements: *70147398316660
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: thor
|
49
|
-
requirement: &
|
49
|
+
requirement: &70147398316060 !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: *
|
57
|
+
version_requirements: *70147398316060
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rack
|
60
|
-
requirement: &
|
60
|
+
requirement: &70147398315580 !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: *
|
68
|
+
version_requirements: *70147398315580
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70147398315100 !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: *
|
79
|
+
version_requirements: *70147398315100
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: guard-rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &70147398311880 !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: *
|
90
|
+
version_requirements: *70147398311880
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec
|
93
|
-
requirement: &
|
93
|
+
requirement: &70147398310600 !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: *
|
101
|
+
version_requirements: *70147398310600
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: yard
|
104
|
-
requirement: &
|
104
|
+
requirement: &70147398309620 !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: *
|
112
|
+
version_requirements: *70147398309620
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: redcarpet
|
115
|
-
requirement: &
|
115
|
+
requirement: &70147398307940 !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: *
|
123
|
+
version_requirements: *70147398307940
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: pry
|
126
|
-
requirement: &
|
126
|
+
requirement: &70147398305260 !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: *
|
134
|
+
version_requirements: *70147398305260
|
135
135
|
description: Guard::Jasmine automatically tests your Jasmine specs on PhantomJS
|
136
136
|
email:
|
137
137
|
- michi@netzpiraten.ch
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: 1.3.6
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project: guard-jasmine
|
184
|
-
rubygems_version: 1.8.
|
184
|
+
rubygems_version: 1.8.10
|
185
185
|
signing_key:
|
186
186
|
specification_version: 3
|
187
187
|
summary: Guard gem for headless testing with Jasmine
|