ember-cli-rails 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +9 -3
- data/lib/ember_cli/path_set.rb +24 -12
- data/lib/ember_cli/shell.rb +4 -2
- data/lib/ember_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6f1ecfa7b10f43b47a13ba32488120646db7e4e
|
4
|
+
data.tar.gz: 24f6c8380556baec9fe584b07a325154150b3466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586309531996485760e27515c587694ba551dd04d73d23e9bb0ec94f0716d95956c596d136dc8bfac347e32fe723b709a6ef955c631dab4d530ddf6d1d9d692e
|
7
|
+
data.tar.gz: c68bdcebcbcf4af6c1f477041ca1b91a19b2b677d70d81ca1d2edffb000832165e34407990f01cb2a6f6eb5f879b191d6aea42165d1257ddf099ef9ef3675727
|
data/CHANGELOG.md
CHANGED
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
|
-
|
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
|
-
|
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
|
|
data/lib/ember_cli/path_set.rb
CHANGED
@@ -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|
|
@@ -46,6 +50,7 @@ module EmberCli
|
|
46
50
|
|
47
51
|
$ cd #{root}
|
48
52
|
$ #{package_manager} install
|
53
|
+
|
49
54
|
MSG
|
50
55
|
end
|
51
56
|
end
|
@@ -62,16 +67,15 @@ module EmberCli
|
|
62
67
|
|
63
68
|
def bower
|
64
69
|
@bower ||= begin
|
65
|
-
|
66
|
-
|
67
|
-
bower_path.tap do |path|
|
68
|
-
unless Pathname(path.to_s).executable?
|
70
|
+
path_for_executable("bower").tap do |bower_path|
|
71
|
+
if bower_json.exist? && (bower_path.blank? || !bower_path.executable?)
|
69
72
|
fail DependencyError.new <<-MSG.strip_heredoc
|
70
|
-
|
73
|
+
Bower is required by EmberCLI
|
74
|
+
|
75
|
+
Install it with:
|
71
76
|
|
72
|
-
|
77
|
+
$ npm install -g bower
|
73
78
|
|
74
|
-
$ npm install -g bower
|
75
79
|
MSG
|
76
80
|
end
|
77
81
|
end
|
@@ -83,12 +87,12 @@ module EmberCli
|
|
83
87
|
end
|
84
88
|
|
85
89
|
def npm
|
86
|
-
@npm ||=
|
90
|
+
@npm ||= path_for_executable("npm")
|
87
91
|
end
|
88
92
|
|
89
93
|
def yarn
|
90
94
|
if yarn?
|
91
|
-
@yarn ||=
|
95
|
+
@yarn ||= path_for_executable("yarn")
|
92
96
|
end
|
93
97
|
end
|
94
98
|
|
@@ -97,17 +101,25 @@ module EmberCli
|
|
97
101
|
end
|
98
102
|
|
99
103
|
def tee
|
100
|
-
@tee ||=
|
104
|
+
@tee ||= path_for_executable("tee")
|
101
105
|
end
|
102
106
|
|
103
107
|
def bundler
|
104
|
-
@bundler ||=
|
108
|
+
@bundler ||= path_for_executable("bundler")
|
105
109
|
end
|
106
110
|
|
107
111
|
private
|
108
112
|
|
109
113
|
attr_reader :app, :ember_cli_root, :environment, :rails_root
|
110
114
|
|
115
|
+
def path_for_executable(command)
|
116
|
+
path = app_options.fetch("#{command}_path") { which(command) }
|
117
|
+
|
118
|
+
if path.present?
|
119
|
+
Pathname.new(path)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
111
123
|
def package_manager
|
112
124
|
if yarn?
|
113
125
|
"yarn"
|
@@ -125,7 +137,7 @@ module EmberCli
|
|
125
137
|
end
|
126
138
|
|
127
139
|
def app_options
|
128
|
-
app.options
|
140
|
+
app.options.with_indifferent_access
|
129
141
|
end
|
130
142
|
|
131
143
|
def which(executable)
|
data/lib/ember_cli/shell.rb
CHANGED
@@ -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
|
-
|
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
|
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.8.
|
4
|
+
version: 0.8.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: 2017-
|
13
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ember-cli-rails-assets
|