ember-cli-rails 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/ember_cli/app.rb +4 -3
- data/lib/ember_cli/command.rb +1 -7
- data/lib/ember_cli/runner.rb +29 -16
- data/lib/ember_cli/shell.rb +2 -2
- data/lib/ember_cli/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d157a938817929f1ba712ece97d2d011589b9277
|
4
|
+
data.tar.gz: 2e813694b87a48835a810a87d7f6344f2f68b8d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 081d7613d112ce8bd739a13f6fd236e4e921d7ee5d2dae204774415558271d528fdda723b7579414e65c7e3a6d3f0562424e6971b9682528155b6d08ef4bdeab
|
7
|
+
data.tar.gz: b37e4cba19eb651a5e4d4240a6c22ec365327c4604a99a7c5fc98616f58a63dfb46a833bfa310d465e588d5f19b2b1776fb12fbf81cffde5c77389b37af4d6e5
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
master
|
2
2
|
------
|
3
3
|
|
4
|
+
0.7.3
|
5
|
+
-----
|
6
|
+
|
7
|
+
* Stream output instead of waiting until subprocesses finish. [#423]
|
8
|
+
* Update `ember-cli-rails-assets` dependency. [#422]
|
9
|
+
* Only write errors to `STDERR`. [#421]
|
10
|
+
* Remove dependency on `tee`. Fixes bug [#417]. [#420]
|
11
|
+
|
12
|
+
[#423]: https://github.com/thoughtbot/ember-cli-rails/pull/423
|
13
|
+
[#422]: https://github.com/thoughtbot/ember-cli-rails/pull/422
|
14
|
+
[#421]: https://github.com/thoughtbot/ember-cli-rails/issues/421
|
15
|
+
[#420]: https://github.com/thoughtbot/ember-cli-rails/issues/420
|
16
|
+
[#417]: https://github.com/thoughtbot/ember-cli-rails/issues/417
|
17
|
+
|
4
18
|
0.7.2
|
5
19
|
-----
|
6
20
|
|
data/lib/ember_cli/app.rb
CHANGED
@@ -36,9 +36,10 @@ module EmberCli
|
|
36
36
|
def compile
|
37
37
|
@compiled ||= begin
|
38
38
|
prepare
|
39
|
-
@shell.compile
|
39
|
+
exit_status = @shell.compile
|
40
40
|
@build.check!
|
41
|
-
|
41
|
+
|
42
|
+
exit_status.success?
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
@@ -71,7 +72,7 @@ module EmberCli
|
|
71
72
|
def test
|
72
73
|
prepare
|
73
74
|
|
74
|
-
@shell.test
|
75
|
+
@shell.test.success?
|
75
76
|
end
|
76
77
|
|
77
78
|
def check_for_errors!
|
data/lib/ember_cli/command.rb
CHANGED
@@ -14,7 +14,7 @@ module EmberCli
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def build(watch: false)
|
17
|
-
|
17
|
+
ember_build(watch: watch)
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
@@ -25,12 +25,6 @@ module EmberCli
|
|
25
25
|
options.fetch(:watcher) { EmberCli.configuration.watcher }
|
26
26
|
end
|
27
27
|
|
28
|
-
def tee
|
29
|
-
Cocaine::CommandLine.
|
30
|
-
new(paths.tee, "-a :log").
|
31
|
-
command(log: paths.log)
|
32
|
-
end
|
33
|
-
|
34
28
|
def ember_build(watch: false)
|
35
29
|
line = Cocaine::CommandLine.new(paths.ember, [
|
36
30
|
"build",
|
data/lib/ember_cli/runner.rb
CHANGED
@@ -2,35 +2,48 @@ require "open3"
|
|
2
2
|
|
3
3
|
module EmberCli
|
4
4
|
class Runner
|
5
|
-
def initialize(env: {},
|
5
|
+
def initialize(out:, err:, env: {}, options: {})
|
6
6
|
@env = env
|
7
|
-
@
|
8
|
-
@
|
7
|
+
@output_streams = Array(out)
|
8
|
+
@error_streams = Array(err)
|
9
9
|
@options = options
|
10
|
+
@threads = []
|
10
11
|
end
|
11
12
|
|
12
13
|
def run(command)
|
13
|
-
|
14
|
+
Open3.popen3(env, command, options) do |stdin, stdout, stderr, process|
|
15
|
+
stdin.close
|
14
16
|
|
15
|
-
|
17
|
+
threads << redirect_stream_in_thread(stdout, write_to: output_streams)
|
18
|
+
threads << redirect_stream_in_thread(stderr, write_to: error_streams)
|
16
19
|
|
17
|
-
|
20
|
+
threads.each(&:join)
|
21
|
+
process.value
|
22
|
+
end
|
18
23
|
end
|
19
24
|
|
20
25
|
def run!(command)
|
21
|
-
|
26
|
+
run(command).tap do |status|
|
27
|
+
unless status.success?
|
28
|
+
exit status.exitstatus
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
22
32
|
|
23
|
-
|
24
|
-
@err.write <<-MSG.strip_heredoc
|
25
|
-
ERROR: Failed command: `#{command}`
|
26
|
-
OUTPUT:
|
27
|
-
#{output}
|
28
|
-
MSG
|
33
|
+
protected
|
29
34
|
|
30
|
-
|
31
|
-
end
|
35
|
+
attr_reader :env, :error_streams, :options, :output_streams, :threads
|
32
36
|
|
33
|
-
|
37
|
+
private
|
38
|
+
|
39
|
+
def redirect_stream_in_thread(stream, write_to:)
|
40
|
+
Thread.new do
|
41
|
+
Thread.current.abort_on_exception = true
|
42
|
+
|
43
|
+
while line = stream.gets
|
44
|
+
write_to.each { |redirection_stream| redirection_stream.puts(line) }
|
45
|
+
end
|
46
|
+
end
|
34
47
|
end
|
35
48
|
end
|
36
49
|
end
|
data/lib/ember_cli/shell.rb
CHANGED
data/lib/ember_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-cli-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Pravosud
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ember-cli-rails-assets
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.6.
|
21
|
+
version: 0.6.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.6.
|
28
|
+
version: 0.6.2
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: railties
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|