ember-cli-rails 0.1.5 → 0.1.6

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: cf2e33d142612da5f350fd3e2c5485b91655b13e
4
- data.tar.gz: 2129b69228ea81c517036b91c321a27acdb283aa
3
+ metadata.gz: edce710d889ed900929e5b4f2d38d586258e8a48
4
+ data.tar.gz: 5806b65215cae0a61d60627a18399aecb6019acf
5
5
  SHA512:
6
- metadata.gz: 68ca6fb42d0228394855838337b9e9a75749cedf9bf82898cc5c574a572597b7941542824782a1c973317654bf5551be1f508ea8dfc4666d84c2c1bbc49b1417
7
- data.tar.gz: 93897168ded00864768d3cb1db00c45e230b713f05de4106b806005c6f4b4ddfa7205dac0a850c7f54efb65f7d78a3110b1f3e65f08c310bc60d791d6ea9b1c8
6
+ metadata.gz: 3028691cbb5ced53772813f9e302588bdb2f005b1d3831d14a5316e2489e7673ea20e458de9d4ff8aad4a8d63780c626d4eacf7d370ab9587367edd27022c3a2
7
+ data.tar.gz: b389dce752aca330ba2bde20591022a23002e1c61d9b0450f11d72a408f98ba6de8c718878a431a437c249c640afcd91875a6772fa86353acd89e05c006611e0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ 0.1.6
2
+ -----
3
+
4
+ * Support Gemfile in EmberCLI app [#84](https://github.com/rwz/ember-cli-rails/commit/652cf12c0a196b4719f6517f2fea308d8d556a5f) [@sevos](https://github.com/sevos)
5
+ * Allow relative path to be set via initializer [#72](https://github.com/rwz/ember-cli-rails/issues/74)
6
+ * Conditionally silence build output [#82](https://github.com/rwz/ember-cli-rails/issues/82)
7
+ * [DEPRECATION] Default EmberCLI application in Rails' app path [#66](https://github.com/rwz/ember-cli-rails/issues/66) [@jesenko](https://github.com/jesenko)
8
+
1
9
  0.1.5
2
10
  -----
3
11
 
data/README.md CHANGED
@@ -46,14 +46,14 @@ end
46
46
 
47
47
  ##### options
48
48
 
49
- - app - this represents the name of the ember cli application. The presumed
50
- path of which would be `Rails.root.join('app', <your-appname>)`
49
+ - app - this represents the name of the EmberCLI application.
51
50
 
52
- - path - used if you need to override the default path (mentioned above).
53
- Example usage:
51
+ - path - the path, where your EmberCLI applications is located. The default
52
+ value is the name of your app in the Rails root.
54
53
 
55
54
  ```ruby
56
55
  EmberCLI.configure do |c|
56
+ c.app :adminpanel # path is "<your-rails-root>/adminpanel"
57
57
  c.app :frontend, path: "/path/to/your/ember-cli-app/on/disk"
58
58
  end
59
59
  ```
data/lib/ember-cli/app.rb CHANGED
@@ -15,11 +15,12 @@ module EmberCLI
15
15
 
16
16
  def compile
17
17
  prepare
18
- silence_stream(STDOUT){ exec command }
18
+ silence_build { exec command }
19
19
  check_for_build_error!
20
20
  end
21
21
 
22
22
  def install_dependencies
23
+ exec "#{bundler_path} install" if gemfile_path.exist?
23
24
  exec "#{npm_path} install"
24
25
  end
25
26
 
@@ -92,7 +93,34 @@ module EmberCLI
92
93
 
93
94
  delegate :match_version?, :non_production?, to: Helpers
94
95
  delegate :configuration, to: EmberCLI
95
- delegate :tee_path, :npm_path, to: :configuration
96
+ delegate :tee_path, :npm_path, :bundler_path, to: :configuration
97
+
98
+ def default_app_path
99
+ path = Rails.root.join("app", name)
100
+
101
+ return name unless path.directory?
102
+
103
+ ActiveSupport::Deprecation.warn <<-MSG.strip_heredoc
104
+ We have found that placing your EmberCLI
105
+ application inside Rails' app has negative performance implications.
106
+
107
+ Please see, https://github.com/rwz/ember-cli-rails/issues/66 for more
108
+ detailed information.
109
+
110
+ It is now reccomended to place your EmberCLI application into the Rails
111
+ root path.
112
+ MSG
113
+
114
+ path
115
+ end
116
+
117
+ def silence_build(&block)
118
+ if ENV.fetch("EMBER_CLI_RAILS_VERBOSE"){ !Helpers.non_production? }
119
+ yield
120
+ else
121
+ silence_stream(STDOUT, &block)
122
+ end
123
+ end
96
124
 
97
125
  def build_timeout
98
126
  options.fetch(:build_timeout){ configuration.build_timeout }
@@ -191,8 +219,9 @@ module EmberCLI
191
219
 
192
220
  def app_path
193
221
  @app_path ||= begin
194
- path = options.fetch(:path){ Rails.root.join("app", name) }
195
- Pathname.new(path)
222
+ path = options.fetch(:path){ default_app_path }
223
+ pathname = Pathname.new(path)
224
+ app_path = pathname.absolute?? pathname : Rails.root.join(path)
196
225
  end
197
226
  end
198
227
 
@@ -241,9 +270,14 @@ module EmberCLI
241
270
  ENV.clone.tap do |vars|
242
271
  vars.store "DISABLE_FINGERPRINTING", "true"
243
272
  vars.store "EXCLUDE_EMBER_ASSETS", excluded_ember_deps
273
+ vars.store "BUNDLE_GEMFILE", gemfile_path.to_s
244
274
  end
245
275
  end
246
276
 
277
+ def gemfile_path
278
+ app_path.join("Gemfile")
279
+ end
280
+
247
281
  def exec(cmd, options={})
248
282
  method_name = options.fetch(:method, :system)
249
283
 
@@ -21,6 +21,10 @@ module EmberCLI
21
21
  @npm_path ||= Helpers.which("npm")
22
22
  end
23
23
 
24
+ def bundler_path
25
+ @bundler_path ||= Helpers.which("bundler")
26
+ end
27
+
24
28
  def build_timeout
25
29
  @build_timeout ||= 5
26
30
  end
@@ -1,3 +1,3 @@
1
1
  module EmberCLI
2
- VERSION = "0.1.5".freeze
2
+ VERSION = "0.1.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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-10 00:00:00.000000000 Z
12
+ date: 2015-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties