konacha 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +1 -1
- data/.travis.yml +3 -2
- data/Gemfile +1 -1
- data/Gemfile-rails3 +1 -0
- data/Gemfile-rails41 +5 -0
- data/History.md +7 -0
- data/README.md +11 -3
- data/app/assets/stylesheets/konacha.css +8 -0
- data/konacha.gemspec +2 -2
- data/lib/konacha.rb +2 -2
- data/lib/konacha/engine.rb +2 -1
- data/lib/konacha/server.rb +1 -1
- metadata +42 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d684a1044391502b8e81e688025c34717beace35
|
4
|
+
data.tar.gz: 04346e38a066208173c5b408d98e52c6fafaf285
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62f951553607dad516e2b60314e156a8d88854d82ce172a0f7eb697e2e75881987184c128fc939b335879fbbcb3d4ce2a60e2d4a052ff28329e117e47d5d20ce
|
7
|
+
data.tar.gz: 0a92066f85f648fb3dccd057c195f7ea343c0a4d7ad67cb64ed72f05bef7417042e4aab79ba9e0779366b79d77277b0c7b30216ad2243506a7d1252768c13f89
|
data/.gitmodules
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile-rails3
CHANGED
data/Gemfile-rails41
ADDED
data/History.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# master
|
2
2
|
|
3
|
+
# 3.4.0
|
4
|
+
|
5
|
+
* Add host configuration option (#196)
|
6
|
+
* Make mocha pre.error element vertically scrollable (#184)
|
7
|
+
* Use root namespace for Rails::Engine (#197)
|
8
|
+
* Tighten sprockets dependency - 3.x doesn't work (#202, #203, #204)
|
9
|
+
|
3
10
|
# 3.3.0
|
4
11
|
|
5
12
|
* Allow multiple spec_dir entries (#187)
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Dependency Status](https://gemnasium.com/jfirebaugh/konacha.png)](https://gemnasium.com/jfirebaugh/konacha)
|
5
5
|
|
6
6
|
Konacha ([koh-NAH-cha], a type of green tea) is a Rails engine that allows you to test your JavaScript with the
|
7
|
-
[Mocha](http://
|
7
|
+
[Mocha](http://mochajs.org/) test framework and [chai](http://chaijs.com/)
|
8
8
|
assertion library.
|
9
9
|
|
10
10
|
[![Konacha in action][2]][1]
|
@@ -94,6 +94,14 @@ first, so your code runs in the correct context.
|
|
94
94
|
|
95
95
|
![Selecting the test-context frame in Chrome](https://raw.github.com/jfirebaugh/konacha/master/images/frame-select.png)
|
96
96
|
|
97
|
+
You can also add the following to your `config/routes.rb` to see the specs run at `/konacha`:
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
Rails.application.routes.draw do
|
101
|
+
mount Konacha::Engine, at: "/konacha" if defined?(Konacha)
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
97
105
|
### Command-Line Runner
|
98
106
|
|
99
107
|
To run your tests from the command line, type:
|
@@ -146,7 +154,7 @@ The `spec_helper` is a good place to set Mocha and Chai options as well, for ins
|
|
146
154
|
|
147
155
|
```javascript
|
148
156
|
// set the Mocha test interface
|
149
|
-
// see http://
|
157
|
+
// see http://mochajs.org/#interfaces
|
150
158
|
mocha.ui('bdd');
|
151
159
|
|
152
160
|
// ignore the following globals during leak detection
|
@@ -278,7 +286,7 @@ Run `bundle exec rake` to run the test suite.
|
|
278
286
|
### Contributing to Mocha and Chai
|
279
287
|
|
280
288
|
The Konacha repository includes the
|
281
|
-
[Mocha](https://github.com/
|
289
|
+
[Mocha](https://github.com/mochajs/mocha) and
|
282
290
|
[Chai](https://github.com/chaijs/chai) repositories as submodules, so
|
283
291
|
you can hack on them directly:
|
284
292
|
|
data/konacha.gemspec
CHANGED
@@ -17,12 +17,12 @@ the asset pipeline and engines.}
|
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
gem.name = "konacha"
|
19
19
|
gem.require_paths = ["lib"]
|
20
|
-
gem.version = "3.
|
20
|
+
gem.version = "3.4.0"
|
21
21
|
gem.license = "MIT"
|
22
22
|
|
23
23
|
gem.add_dependency "railties", ">= 3.1", "< 5"
|
24
24
|
gem.add_dependency "actionpack", ">= 3.1", "< 5"
|
25
|
-
gem.add_dependency "sprockets"
|
25
|
+
gem.add_dependency "sprockets", "~> 2"
|
26
26
|
gem.add_dependency "capybara"
|
27
27
|
gem.add_dependency "colorize"
|
28
28
|
|
data/lib/konacha.rb
CHANGED
@@ -11,7 +11,7 @@ module Konacha
|
|
11
11
|
|
12
12
|
def serve
|
13
13
|
puts "Your tests are here:"
|
14
|
-
puts " http
|
14
|
+
puts " http://#{host}:#{port}/"
|
15
15
|
self.mode = :server
|
16
16
|
Konacha::Server.start
|
17
17
|
end
|
@@ -29,7 +29,7 @@ module Konacha
|
|
29
29
|
yield config
|
30
30
|
end
|
31
31
|
|
32
|
-
delegate :port, :spec_dir, :spec_matcher, :application, :driver, :runner_port, :formatters, :to => :config
|
32
|
+
delegate :host, :port, :spec_dir, :spec_matcher, :application, :driver, :runner_port, :formatters, :to => :config
|
33
33
|
|
34
34
|
def spec_root
|
35
35
|
[config.spec_dir].flatten.map {|d| File.join(Rails.root, d)}
|
data/lib/konacha/engine.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Konacha
|
2
|
-
class Engine < Rails::Engine
|
2
|
+
class Engine < ::Rails::Engine
|
3
3
|
# Do not mess up the application's namespace.
|
4
4
|
# http://api.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+Engine
|
5
5
|
isolate_namespace Konacha
|
@@ -36,6 +36,7 @@ module Konacha
|
|
36
36
|
options.spec_dir ||= "spec/javascripts"
|
37
37
|
options.spec_matcher ||= /_spec\.|_test\./
|
38
38
|
options.port ||= 3500
|
39
|
+
options.host ||= 'localhost'
|
39
40
|
options.application ||= self.class.application(app)
|
40
41
|
options.driver ||= :selenium
|
41
42
|
options.stylesheets ||= %w(application)
|
data/lib/konacha/server.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Konacha
|
2
2
|
class Server
|
3
3
|
def self.start
|
4
|
-
Rack::Server.start(:app => Konacha.application, :Port => Konacha.port, :AccessLog => [])
|
4
|
+
Rack::Server.start(:app => Konacha.application, :Host => Konacha.host, :Port => Konacha.port, :AccessLog => [])
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
metadata
CHANGED
@@ -1,207 +1,207 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konacha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Firebaugh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
|
-
- - <
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.1'
|
30
|
-
- - <
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: actionpack
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '3.1'
|
40
|
-
- - <
|
40
|
+
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '3.1'
|
50
|
-
- - <
|
50
|
+
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '5'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: sprockets
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
59
|
+
version: '2'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '2'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: capybara
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
type: :runtime
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: colorize
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: jquery-rails
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: rspec-rails
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- - ~>
|
113
|
+
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '3.1'
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- - ~>
|
120
|
+
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '3.1'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: capybara-firebug
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - ~>
|
127
|
+
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '1.1'
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - ~>
|
134
|
+
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '1.1'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: coffee-script
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- -
|
141
|
+
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - ">="
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: ejs
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
type: :development
|
159
159
|
prerelease: false
|
160
160
|
version_requirements: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
- !ruby/object:Gem::Dependency
|
166
166
|
name: tzinfo
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
|
-
- -
|
169
|
+
- - ">="
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: '0'
|
172
172
|
type: :development
|
173
173
|
prerelease: false
|
174
174
|
version_requirements: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- -
|
176
|
+
- - ">="
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: selenium-webdriver
|
181
181
|
requirement: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
|
-
- -
|
183
|
+
- - ">="
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
type: :development
|
187
187
|
prerelease: false
|
188
188
|
version_requirements: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
|
-
- -
|
190
|
+
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
- !ruby/object:Gem::Dependency
|
194
194
|
name: poltergeist
|
195
195
|
requirement: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
|
-
- - ~>
|
197
|
+
- - "~>"
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '1.5'
|
200
200
|
type: :development
|
201
201
|
prerelease: false
|
202
202
|
version_requirements: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
|
-
- - ~>
|
204
|
+
- - "~>"
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '1.5'
|
207
207
|
description: |-
|
@@ -217,13 +217,14 @@ executables: []
|
|
217
217
|
extensions: []
|
218
218
|
extra_rdoc_files: []
|
219
219
|
files:
|
220
|
-
- .gitignore
|
221
|
-
- .gitmodules
|
222
|
-
- .rspec
|
223
|
-
- .travis.yml
|
220
|
+
- ".gitignore"
|
221
|
+
- ".gitmodules"
|
222
|
+
- ".rspec"
|
223
|
+
- ".travis.yml"
|
224
224
|
- Gemfile
|
225
225
|
- Gemfile-rails3
|
226
226
|
- Gemfile-rails40
|
227
|
+
- Gemfile-rails41
|
227
228
|
- History.md
|
228
229
|
- LICENSE
|
229
230
|
- README.md
|
@@ -313,17 +314,17 @@ require_paths:
|
|
313
314
|
- lib
|
314
315
|
required_ruby_version: !ruby/object:Gem::Requirement
|
315
316
|
requirements:
|
316
|
-
- -
|
317
|
+
- - ">="
|
317
318
|
- !ruby/object:Gem::Version
|
318
319
|
version: '0'
|
319
320
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
320
321
|
requirements:
|
321
|
-
- -
|
322
|
+
- - ">="
|
322
323
|
- !ruby/object:Gem::Version
|
323
324
|
version: '0'
|
324
325
|
requirements: []
|
325
326
|
rubyforge_project:
|
326
|
-
rubygems_version: 2.
|
327
|
+
rubygems_version: 2.2.2
|
327
328
|
signing_key:
|
328
329
|
specification_version: 4
|
329
330
|
summary: Unit-test your Rails JavaScript with the mocha test framework and chai assertion
|