ember-cli-rails 0.5.5 → 0.5.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 897239b5bae13a4c9d2eee7dee4eb81830bc0303
4
- data.tar.gz: b20381e36689fe60d5120008b03047d91f10abb5
3
+ metadata.gz: 0375a7a477a2b32d5c0dd2b1d89e99d8115d76ff
4
+ data.tar.gz: 8e6d4ad0336ef0698c375fa4f5d9446a43e14aca
5
5
  SHA512:
6
- metadata.gz: 74b02765c6f8b32a536a7dd18ece1440d07ffbee9f12ee081872fcb3b603294c1cf99726f59fbb2d941cf5015578133fa8be48a0762342a4f27a62b14332461c
7
- data.tar.gz: 4c428737cf20001b9f1a9c263483209218c81348c1d7e64ca3e0f0aed2e258729e48aa7cd9f09ea42a45143899d3f31e325e486dfbdd24a6271ff13875887d71
6
+ metadata.gz: cc9cdbcba58c5b17af2b553f06cf6f19372669485f4c791b64155b5b2074a93f9f632e5b435b57db2cdc85d8e54645f96ee183f1cffd7756563e5dbf0108139d
7
+ data.tar.gz: 81452d07ba9111c3731b71d1a7e11d1cc29177451019dcc3a58793d477c6bebadc24e63ad1b6a183e944ac5fd78ad9758a6f28d779ff5ff4ac7af1a83ecf379a
@@ -1,6 +1,16 @@
1
1
  master
2
2
  ------
3
3
 
4
+ 0.5.6
5
+ -----
6
+
7
+ * Fallback to `before_filter` for Rails 3.2. [#306]
8
+ * No longer depend on `tee` executable. Use `Kernel#{spawn,system}` with
9
+ redirection options. [#299]
10
+
11
+ [#306]: https://github.com/thoughtbot/ember-cli-rails/pull/306
12
+ [#299]: https://github.com/thoughtbot/ember-cli-rails/pull/299
13
+
4
14
  0.5.5
5
15
  -----
6
16
 
@@ -14,25 +14,6 @@ module EmberCli
14
14
  end
15
15
 
16
16
  def build(watch: false)
17
- [
18
- build_command(watch: watch),
19
- pipe_to_logs_command,
20
- ].compact.join(" | ")
21
- end
22
-
23
- private
24
-
25
- attr_reader :options, :paths
26
-
27
- def pipe_to_logs_command
28
- unless paths.tee.nil?
29
- line = Cocaine::CommandLine.new(paths.tee, "-a :log_file")
30
-
31
- line.command(log_file: paths.log)
32
- end
33
- end
34
-
35
- def build_command(watch: false)
36
17
  line = Cocaine::CommandLine.new(paths.ember, [
37
18
  "build",
38
19
  ("--watch" if watch),
@@ -50,6 +31,10 @@ module EmberCli
50
31
  )
51
32
  end
52
33
 
34
+ private
35
+
36
+ attr_reader :options, :paths
37
+
53
38
  def process_watcher
54
39
  options.fetch(:watcher) { EmberCli.configuration.watcher }
55
40
  end
@@ -22,11 +22,6 @@ module EmberCli
22
22
  @apps ||= HashWithIndifferentAccess.new
23
23
  end
24
24
 
25
- def tee_path
26
- return @tee_path if defined?(@tee_path)
27
- @tee_path = Helpers.which("tee")
28
- end
29
-
30
25
  def bower_path
31
26
  @bower_path ||= Helpers.which("bower")
32
27
  end
@@ -1,13 +1,19 @@
1
1
  module EmberCli
2
2
  module ControllerExtension
3
3
  def self.included(base)
4
- base.before_action do
4
+ build_ember_app = lambda do
5
5
  app = params[:ember_app]
6
6
 
7
7
  if app.present?
8
8
  EmberCli[app].build
9
9
  end
10
10
  end
11
+
12
+ if base.respond_to?(:before_action)
13
+ base.before_action(&build_ember_app)
14
+ else
15
+ base.before_filter(&build_ember_app)
16
+ end
11
17
  end
12
18
  end
13
19
  end
@@ -84,10 +84,6 @@ module EmberCli
84
84
  tmp.join("error.txt")
85
85
  end
86
86
 
87
- define_path :tee do
88
- app_options.fetch(:tee_path) { configuration.tee_path }
89
- end
90
-
91
87
  define_path :bower do
92
88
  app_options.fetch(:bower_path) { configuration.bower_path }.tap do |path|
93
89
  unless Pathname(path).executable?
@@ -50,13 +50,18 @@ module EmberCli
50
50
  attr_reader :ember, :env, :options, :paths
51
51
 
52
52
  def spawn(command)
53
- exec(command, method: :spawn)
53
+ Kernel.spawn(env, command, process_options) || exit(1)
54
54
  end
55
55
 
56
- def exec(command, method: :system)
57
- Dir.chdir paths.root do
58
- Kernel.public_send(method, env, command) || exit(1)
59
- end
56
+ def exec(command)
57
+ Kernel.system(env, command, process_options) || exit(1)
58
+ end
59
+
60
+ def process_options
61
+ {
62
+ chdir: paths.root.to_s,
63
+ out: paths.log.to_s,
64
+ }
60
65
  end
61
66
 
62
67
  def running?
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.5.5".freeze
2
+ VERSION = "0.5.6".freeze
3
3
  end
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.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-22 00:00:00.000000000 Z
13
+ date: 2015-11-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -139,4 +139,3 @@ signing_key:
139
139
  specification_version: 4
140
140
  summary: Integration between Ember CLI and Rails
141
141
  test_files: []
142
- has_rdoc: