ember-cli-rails 0.8.7 → 0.9.0

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: b9ebe9447a282f4d2c08c1c4fd374a753bc41a3e
4
- data.tar.gz: e2086dd52187c9cc7baf2a76c4384ce3a3eb9202
3
+ metadata.gz: 66a6b948a0cc20a4a451f0765f34143b6c25c878
4
+ data.tar.gz: bc90703a1cf03404bad413c8114c2976f9e4d956
5
5
  SHA512:
6
- metadata.gz: 9f7031cc499fdc978795be3c7dd4f570149f9f4412e02df6d4aeff86f78433beb3cf1ceca3ad32bcdd731496869dfd6594f637f907d32b9359c2bb3e31642f27
7
- data.tar.gz: 1bcf390dfb8923794cfd4f17d135754d7d51acf8f7661b82db16ded3b6354593643df82cacffc86b7dac1341234da7013139dfd63a58f080b2b986e33a82f5ea
6
+ metadata.gz: 7b4334c4774fde5f7640736250b69e60fc9875e18eb9c573d16f770b16ae7032cff847c9e0e3c90141c116e9e3bd5d07f8cbbfaca8708ae654190f5bfa9c3e41
7
+ data.tar.gz: 949d2dc2b36e751a22ecc56252361d2758b9febbd3821fa62f570e311a45d8c5e78c9fdbd50435f1c2a55b179cfac73b4ecbe2f4a466e8c3622021c5a9d069ee
@@ -1,6 +1,13 @@
1
1
  master
2
2
  ------
3
3
 
4
+ 0.9.0
5
+ -----
6
+
7
+ * Don't require `bower` installation if `bower.json` is missing [#532]
8
+
9
+ [#532]: https://github.com/thoughtbot/ember-cli-rails/pull/532
10
+
4
11
  0.8.7
5
12
  -----
6
13
 
data/README.md CHANGED
@@ -270,7 +270,8 @@ To configure your EmberCLI-Rails applications for Heroku:
270
270
  1. Execute `rails generate ember:heroku`.
271
271
  1. Commit the newly generated files.
272
272
  1. [Add the NodeJS buildpack][buildpack] and configure NPM to include the
273
- `bower` dependency's executable file.
273
+ `bower` dependency's executable file (if your build process requires
274
+ `bower`).
274
275
 
275
276
  ```sh
276
277
  $ heroku buildpacks:clear
@@ -328,11 +329,16 @@ contains the directory or directories that contain the `bower` and `npm`
328
329
  executables.
329
330
 
330
331
  #### For faster deployments
331
- Place the following in your deploy/<environment>.rb
332
+
333
+ Place the following in your `deploy/<environment>.rb`
334
+
332
335
  ```ruby
333
336
  set :linked_dirs, %w{<ember-app-name>/node_modules <ember-app-name>/bower_components}
334
337
  ```
335
- to avoid rebuilding all the node modules and bower components with every deploy. Replace `<ember-app-name>` with the name of your ember app (default is `frontend`).
338
+
339
+ to avoid rebuilding all the node modules and bower components with every deploy.
340
+ Replace `<ember-app-name>` with the name of your ember app (default is
341
+ `frontend`).
336
342
 
337
343
  ## Override
338
344
 
@@ -35,6 +35,10 @@ module EmberCli
35
35
  @gemfile ||= root.join("Gemfile")
36
36
  end
37
37
 
38
+ def bower_json
39
+ ember_cli_root.join("bower.json")
40
+ end
41
+
38
42
  def ember
39
43
  @ember ||= begin
40
44
  root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
@@ -64,7 +68,7 @@ module EmberCli
64
68
  def bower
65
69
  @bower ||= begin
66
70
  path_for_executable("bower").tap do |bower_path|
67
- if bower_path.blank? || !bower_path.executable?
71
+ if bower_json.exist? && (bower_path.blank? || !bower_path.executable?)
68
72
  fail DependencyError.new <<-MSG.strip_heredoc
69
73
  Bower is required by EmberCLI
70
74
 
@@ -41,13 +41,15 @@ module EmberCli
41
41
  clean_ember_dependencies!
42
42
  end
43
43
 
44
- if paths.yarn
44
+ if paths.yarn.present? && Pathname.new(paths.yarn).executable?
45
45
  run! "#{paths.yarn} install"
46
46
  else
47
47
  run! "#{paths.npm} prune && #{paths.npm} install"
48
48
  end
49
49
 
50
- run! "[ -f bower.json ] && #{paths.bower} prune && #{paths.bower} install"
50
+ if paths.bower_json.exist?
51
+ run! "#{paths.bower} prune && #{paths.bower} install"
52
+ end
51
53
  end
52
54
 
53
55
  def test
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.8.7".freeze
2
+ VERSION = "0.9.0".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.8.7
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud