ember-cli-rails 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a477097f445d867f4eb15dc3324de4403ba786c4
4
- data.tar.gz: 372d3a187bf7c67b88143c5f33baf04de9e1a767
3
+ metadata.gz: c3b6c66e66f544beb8cae1809ec6335eeaa01781
4
+ data.tar.gz: f2480c373d2636e7210c080d6c4e1ba2dbec397d
5
5
  SHA512:
6
- metadata.gz: 69f1d502d3a90a6ef890e2a0739e30bdc76c1818f60b2cfa55aaec67cb6a12f76dd47b725f77ecec9f02caa4091ef6883916ff194b0815ba6a4a9ce99ec6b927
7
- data.tar.gz: 77a53d500ce206dfb378f67920732391329bfd6e21eadd8439cdd22abd43507b72a9350ec432667654baf2bc4dd606ac1b9b994656447f41903b3844bd0893d2
6
+ metadata.gz: 22c165670fb13e5d6dc7b2bbc3386f897808003c19289080bf6add88c925a6f8193616bd3c0a408b3f9d73846f8155e42ee3e61047ea63ef2f04b53eb2479dba
7
+ data.tar.gz: fca0c69dbfa1909dda543d06f96f7f711474fee98b025482f5c74b08eabd5d7f7b49703f09fd0922d382f627a6ebd162def2669ce0221682346f1a9788b6230b
@@ -1,6 +1,11 @@
1
1
  master
2
2
  ------
3
3
 
4
+ 0.5.4
5
+ -----
6
+
7
+ * Escape generated CLI strings. Adds support for paths with spaces.
8
+
4
9
  0.5.3
5
10
  -----
6
11
 
data/README.md CHANGED
@@ -1,25 +1,17 @@
1
1
  # Ember CLI Rails
2
2
 
3
- Ember CLI Rails is an integration story between (surprise surprise) Ember CLI and
4
- Rails 3.1 and up. It is designed to provide an easy way to organize your Rails backed
5
- Ember CLI application with a specific focus on upgradeability. Rails and Ember
6
- [slash Ember CLI] are maintained by different teams with different goals. As
7
- such, we believe that it is important to ensure smooth upgrading of both
8
- aspects of your application.
9
-
10
- A large contingent of Ember developers use Rails. And Rails is awesome. With
11
- the upcoming changes to Ember 2.0 and the Ember community's desire to unify
12
- around Ember CLI it is now more important than ever to ensure that Rails and
13
- Ember CLI can coexist and development still be fun!
14
-
15
- To this end we have created a minimum set of features (which we will outline
16
- below) to allow you keep your Rails workflow while minimizing the risk of
17
- upgrade pain with your Ember build tools.
18
-
19
- For example, end-to-end tests with frameworks like Cucumber should just work.
20
- You should still be able leverage the asset pipeline, and all the conveniences
21
- that Rails offers. And you should get all the new goodies like ES6 modules and
22
- Ember CLI addons too! Without further ado, let's get in there!
3
+ Unify your EmberCLI and Rails Workflows!
4
+
5
+ EmberCLI-Rails is designed to give you the best of both worlds:
6
+
7
+ * Stay up to date with the latest JavaScript technology and EmberCLI addons
8
+ * Develop your Rails API and Ember front-ends from within a single process
9
+ * Inject Rails-generated content into your EmberCLI application
10
+ * Avoid Cross-Origin Resource Sharing gotchas by serving your EmberCLI
11
+ applications and your API from a single domain
12
+ * Write truly end-to-end integration tests, exercising your application's entire
13
+ stack through JavaScript-enabled Capybara tests
14
+ * Deploy your entire suite of applications with a single `git push`
23
15
 
24
16
  **EmberCLI-Rails Supports EmberCLI 1.13.x and later.**
25
17
 
@@ -1,3 +1,5 @@
1
+ require "cocaine"
2
+
1
3
  module EmberCli
2
4
  class Command
3
5
  def initialize(paths:, options: {})
@@ -6,50 +8,50 @@ module EmberCli
6
8
  end
7
9
 
8
10
  def test
9
- "#{paths.ember} test --environment test"
11
+ line = Cocaine::CommandLine.new(paths.ember, "test --environment test")
12
+
13
+ line.command
10
14
  end
11
15
 
12
16
  def build(watch: false)
13
17
  [
14
- "#{paths.ember} build",
15
- "#{watch_flag(watch)}",
16
- "--environment #{build_environment}",
17
- "--output-path #{paths.dist}",
18
- pipe_errors_to_file,
19
- pipe_to_log_files,
20
- ].join(" ")
18
+ build_command(watch: watch),
19
+ pipe_to_logs_command,
20
+ ].compact.join(" | ")
21
21
  end
22
22
 
23
23
  private
24
24
 
25
25
  attr_reader :options, :paths
26
26
 
27
- def process_watcher
28
- options.fetch(:watcher) { EmberCli.configuration.watcher }
29
- end
30
-
31
- def watch_flag(watch)
32
- watch_flag = ""
27
+ def pipe_to_logs_command
28
+ unless paths.tee.nil?
29
+ line = Cocaine::CommandLine.new(paths.tee, "-a :log_file")
33
30
 
34
- if watch
35
- watch_flag = "--watch"
36
-
37
- if process_watcher
38
- watch_flag += " --watcher #{process_watcher}"
39
- end
31
+ line.command(log_file: paths.log)
40
32
  end
41
-
42
- watch_flag
43
33
  end
44
34
 
45
- def pipe_errors_to_file
46
- "2> #{paths.build_error_file}"
35
+ def build_command(watch: false)
36
+ line = Cocaine::CommandLine.new(paths.ember, [
37
+ "build",
38
+ ("--watch" if watch),
39
+ ("--watcher :watcher" if process_watcher),
40
+ "--environment :environment",
41
+ "--output-path :output_path",
42
+ "2> :error_file",
43
+ ].compact.join(" "))
44
+
45
+ line.command(
46
+ environment: build_environment,
47
+ output_path: paths.dist,
48
+ watcher: process_watcher,
49
+ error_file: paths.build_error_file,
50
+ )
47
51
  end
48
52
 
49
- def pipe_to_log_files
50
- if paths.tee
51
- "| #{paths.tee} -a #{paths.log}"
52
- end
53
+ def process_watcher
54
+ options.fetch(:watcher) { EmberCli.configuration.watcher }
53
55
  end
54
56
 
55
57
  def build_environment
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.5.3".freeze
2
+ VERSION = "0.5.4".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.3
4
+ version: 0.5.4
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-19 00:00:00.000000000 Z
13
+ date: 2015-11-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -60,6 +60,20 @@ dependencies:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '2.0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: cocaine
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.5.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.5.0
63
77
  description:
64
78
  email:
65
79
  - pavel@pravosud.com