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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +4 -4
- data/lib/ember-cli/app.rb +38 -4
- data/lib/ember-cli/configuration.rb +4 -0
- 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: edce710d889ed900929e5b4f2d38d586258e8a48
|
4
|
+
data.tar.gz: 5806b65215cae0a61d60627a18399aecb6019acf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 -
|
53
|
-
|
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
|
-
|
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){
|
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
|
|
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.1.
|
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-
|
12
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|