teaspoon 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -1
- data/app/views/teaspoon/suite/_boot.html.erb +1 -1
- data/app/views/teaspoon/suite/show.html.erb +3 -0
- data/lib/generators/teaspoon/install/templates/_boot.html.erb +1 -1
- data/lib/teaspoon/configuration.rb +2 -1
- data/lib/teaspoon/console.rb +1 -1
- data/lib/teaspoon/engine.rb +6 -17
- data/lib/teaspoon/instrumentation.rb +2 -4
- data/lib/teaspoon/suite.rb +1 -1
- data/lib/teaspoon/version.rb +1 -1
- metadata +37 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2395822f24d2ede9cc8b2ae7a1445d3f2babb19c3476211a78889f34bf8e941
|
|
4
|
+
data.tar.gz: 1bf8c93878c6a42939fbad422a26229eab74b455336d3d74d09f564e9725ab15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cacc87946f0a2699ecd20976c41757a4a52c47c3071a61cd27d4de662b06142cdb70f027a101dbc2394b0ce22a6db7f662953cc78642c92fff000a1a4005846a
|
|
7
|
+
data.tar.gz: cad67f5194f87b634cc84407da1296fb8aa709443f69757c13ee21dc8913db8bf7ccd7dade0b378ac49160e21d8375826980ae62e0b65d8645b684474ccccefb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
### Unreleased
|
|
2
2
|
|
|
3
|
+
* Support for (webpacker)[https://github.com/rails/webpacker/].
|
|
4
|
+
```ruby
|
|
5
|
+
suite.javascript_packs += ["your-custom-pack.js"]
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
### 1.4.0 Sep 8, 2023
|
|
9
|
+
|
|
10
|
+
* Fix CI
|
|
11
|
+
* Unfortunately disable a few tests with Ruby 3.x, they still pass with 2.x
|
|
12
|
+
* Adding support for multiple test suites through options #511
|
|
13
|
+
* fix instrumentation to support puma >= 6.2 (#600) (#601)
|
|
14
|
+
|
|
15
|
+
### 1.3.0 Mar 19, 2021
|
|
16
|
+
|
|
17
|
+
* Officially drops support for Ruby 2.4 and Rails earlier than 4.2.11
|
|
18
|
+
|
|
19
|
+
### 1.2.2
|
|
20
|
+
|
|
21
|
+
* make sure all tests pass with rails 4.2 - 6.1 (few pending excluded PR welcome)
|
|
22
|
+
* ruby supported 2.5 to 2.7 works, unknown about 3.0
|
|
23
|
+
* remove monkey-patch on `javascript_include_tag`
|
|
24
|
+
|
|
3
25
|
### 1.2.1
|
|
4
26
|
|
|
5
27
|
* require utility in console to get Teaspoon.root (#562)
|
|
@@ -31,7 +53,7 @@
|
|
|
31
53
|
#### Bug Fixes
|
|
32
54
|
|
|
33
55
|
* Fixes an ActionView version related issue.
|
|
34
|
-
* Changes before_filter to before_action where possible (Rails 3 vs. Rails 5)
|
|
56
|
+
* Changes `before_filter` to `before_action` where possible (Rails 3 vs. Rails 5)
|
|
35
57
|
|
|
36
58
|
|
|
37
59
|
### 1.1.4
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= javascript_include_tag *@suite.spec_assets, debug: @suite.config.expand_assets
|
|
1
|
+
<%= javascript_include_tag *@suite.spec_assets, debug: @suite.config.expand_assets %>
|
|
2
2
|
<script type="text/javascript">
|
|
3
3
|
Teaspoon.onWindowLoad(Teaspoon.execute);
|
|
4
4
|
</script>
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
<%= stylesheet_link_tag *@suite.stylesheets %>
|
|
9
9
|
<%= javascript_include_tag *@suite.javascripts %>
|
|
10
|
+
<% @suite.javascript_packs.each do |javascript_pack| %>
|
|
11
|
+
<%= javascript_pack_tag javascript_pack %>
|
|
12
|
+
<% end %>
|
|
10
13
|
<script type="text/javascript">
|
|
11
14
|
Teaspoon.version = <%= Teaspoon::VERSION.to_json.html_safe %>;
|
|
12
15
|
Teaspoon.suites = <%= {all: Teaspoon.configuration.suite_configs.keys, active: @suite.name}.to_json.html_safe %>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= javascript_include_tag *@suite.spec_assets, debug: @suite.config.expand_assets
|
|
1
|
+
<%= javascript_include_tag *@suite.spec_assets, debug: @suite.config.expand_assets %>
|
|
2
2
|
<script type="text/javascript">
|
|
3
3
|
Teaspoon.onWindowLoad(Teaspoon.execute);
|
|
4
4
|
</script>
|
|
@@ -61,7 +61,7 @@ module Teaspoon
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
class Suite
|
|
64
|
-
attr_accessor :matcher, :helper, :javascripts, :stylesheets,
|
|
64
|
+
attr_accessor :matcher, :helper, :javascripts, :javascript_packs, :stylesheets,
|
|
65
65
|
:boot_partial, :body_partial,
|
|
66
66
|
:hooks, :expand_assets, :js_extensions
|
|
67
67
|
|
|
@@ -70,6 +70,7 @@ module Teaspoon
|
|
|
70
70
|
@helper = "spec_helper"
|
|
71
71
|
@javascripts = []
|
|
72
72
|
@stylesheets = ["teaspoon"]
|
|
73
|
+
@javascript_packs = []
|
|
73
74
|
|
|
74
75
|
@boot_partial = "boot"
|
|
75
76
|
@body_partial = "body"
|
data/lib/teaspoon/console.rb
CHANGED
data/lib/teaspoon/engine.rb
CHANGED
|
@@ -101,25 +101,14 @@ module Teaspoon
|
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
options = sources.extract_options!.stringify_keys
|
|
111
|
-
path_options = options.extract!("protocol", "extname", "host").symbolize_keys
|
|
112
|
-
path_options[:debug] = options["allow_non_precompiled"]
|
|
113
|
-
sources.uniq.map { |source|
|
|
114
|
-
tag_options = {
|
|
115
|
-
"src" => path_to_javascript(source, path_options)
|
|
116
|
-
}.merge!(options)
|
|
117
|
-
content_tag(:script, "", tag_options)
|
|
118
|
-
}.join("\n").html_safe
|
|
119
|
-
end
|
|
104
|
+
class Sprockets::Rails::HelperAssetResolvers::Environment
|
|
105
|
+
def raise_unless_precompiled_asset(path)
|
|
106
|
+
if Rails.env.test? or Rails.env.development?
|
|
107
|
+
# nothing, thank you
|
|
108
|
+
else
|
|
109
|
+
super
|
|
120
110
|
end
|
|
121
111
|
end
|
|
122
|
-
rescue
|
|
123
112
|
end
|
|
124
113
|
|
|
125
114
|
# Some Sprockets patches to work with Sprockets 2.x
|
|
@@ -35,10 +35,8 @@ module Teaspoon
|
|
|
35
35
|
|
|
36
36
|
result = add_instrumentation(asset)
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[status, headers, asset]
|
|
38
|
+
headers["Content-Length"] = result.bytesize.to_s
|
|
39
|
+
[status, headers, [result]]
|
|
42
40
|
end
|
|
43
41
|
|
|
44
42
|
protected
|
data/lib/teaspoon/suite.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Teaspoon
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
attr_accessor :config, :name
|
|
16
|
-
delegate :helper, :stylesheets, :javascripts, :boot_partial, :body_partial, :hooks,
|
|
16
|
+
delegate :helper, :stylesheets, :javascripts, :javascript_packs, :boot_partial, :body_partial, :hooks,
|
|
17
17
|
to: :config
|
|
18
18
|
|
|
19
19
|
def initialize(options = {})
|
data/lib/teaspoon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: teaspoon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jejacks0n
|
|
8
8
|
- mikepack
|
|
9
9
|
- jayzes
|
|
10
10
|
- jedschneider
|
|
11
|
-
autorequire:
|
|
11
|
+
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: railties
|
|
@@ -19,14 +19,42 @@ dependencies:
|
|
|
19
19
|
requirements:
|
|
20
20
|
- - ">="
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version:
|
|
22
|
+
version: '5.0'
|
|
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
|
-
version:
|
|
29
|
+
version: '5.0'
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: simplecov
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - "<"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0.18'
|
|
37
|
+
type: :development
|
|
38
|
+
prerelease: false
|
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - "<"
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '0.18'
|
|
44
|
+
- !ruby/object:Gem::Dependency
|
|
45
|
+
name: webrick
|
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
51
|
+
type: :development
|
|
52
|
+
prerelease: false
|
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '0'
|
|
30
58
|
description: Run your Javascript tests using Jasmine, Mocha or QUnit using a variety
|
|
31
59
|
of platforms.
|
|
32
60
|
email:
|
|
@@ -127,7 +155,7 @@ homepage: https://github.com/jejacks0n/teaspoon
|
|
|
127
155
|
licenses:
|
|
128
156
|
- MIT
|
|
129
157
|
metadata: {}
|
|
130
|
-
post_install_message:
|
|
158
|
+
post_install_message:
|
|
131
159
|
rdoc_options: []
|
|
132
160
|
require_paths:
|
|
133
161
|
- lib
|
|
@@ -135,15 +163,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
135
163
|
requirements:
|
|
136
164
|
- - ">="
|
|
137
165
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '2.
|
|
166
|
+
version: '2.7'
|
|
139
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
168
|
requirements:
|
|
141
169
|
- - ">="
|
|
142
170
|
- !ruby/object:Gem::Version
|
|
143
171
|
version: '0'
|
|
144
172
|
requirements: []
|
|
145
|
-
rubygems_version: 3.
|
|
146
|
-
signing_key:
|
|
173
|
+
rubygems_version: 3.4.18
|
|
174
|
+
signing_key:
|
|
147
175
|
specification_version: 4
|
|
148
176
|
summary: 'Teaspoon: A Javascript test runner built on top of Rails'
|
|
149
177
|
test_files: []
|