ember-cli-rails 0.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +8 -1
- data/app/controller/ember_cli/ember_controller.rb +0 -5
- data/app/helpers/ember_rails_helper.rb +1 -1
- data/app/views/ember_cli/ember/index.html.erb +1 -1
- data/lib/ember_cli/build_monitor.rb +31 -5
- data/lib/ember_cli/ember_constraint.rb +19 -0
- data/lib/ember_cli/route_helpers.rb +2 -2
- data/lib/ember_cli/version.rb +1 -1
- metadata +4 -10
- data/lib/ember_cli/html_constraint.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7da213bce2e711701b48dbfa52fdac73ae86520f
|
4
|
+
data.tar.gz: bfdb3787798a02a1bfe7ce3563532ac354718605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d497a65f5083432417e4267bb2c89aad7e7487513598bf78636862082a6fde99e24feef45b99adbb927fbb2a144a9e7055205396a60ad738e530670cd8bce46b
|
7
|
+
data.tar.gz: 6b76aab9d8f823906413783547c4cee3f919f54d699d6c634c9ff3fe26f677a4d324d3d83e7d7dce20100c41eb1f7ca3fa67d578b1cc93fbae5ce72fc572beab
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
master
|
2
2
|
------
|
3
3
|
|
4
|
+
0.8.0
|
5
|
+
-----
|
6
|
+
|
7
|
+
* `EmberCli::EmberController` now inherits from `ActionController::Base` instead
|
8
|
+
of `ApplicationController`. [#400]
|
9
|
+
* Remove support for Ruby 2.1.x. [#400]
|
10
|
+
* Don't route requests to `/rails/info` through the mounted Ember application.
|
11
|
+
|
4
12
|
0.7.4
|
5
13
|
-----
|
6
14
|
|
@@ -31,6 +39,7 @@ master
|
|
31
39
|
* `EmberCli::Deploy::File` serves assets with Rails' `static_cache_control`
|
32
40
|
value. [#403]
|
33
41
|
|
42
|
+
[#400]: https://github.com/thoughtbot/ember-cli-rails/pull/400
|
34
43
|
[#396]: https://github.com/thoughtbot/ember-cli-rails/pull/396
|
35
44
|
[#403]: https://github.com/thoughtbot/ember-cli-rails/pull/403
|
36
45
|
|
data/README.md
CHANGED
@@ -303,6 +303,13 @@ you're not using `nvm`, make sure the string you prepend to the `$PATH` variable
|
|
303
303
|
contains the directory or directories that contain the `bower` and `npm`
|
304
304
|
executables.
|
305
305
|
|
306
|
+
#### For faster deployments
|
307
|
+
Place the following in your deploy/<environment>.rb
|
308
|
+
```ruby
|
309
|
+
set :linked_dirs, %w{<ember-app-name>/node_modules <ember-app-name>/bower_components}
|
310
|
+
```
|
311
|
+
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`).
|
312
|
+
|
306
313
|
## Override
|
307
314
|
|
308
315
|
By default, routes defined by `ember_app` will be rendered with the internal
|
@@ -623,7 +630,7 @@ This project supports:
|
|
623
630
|
|
624
631
|
This project supports:
|
625
632
|
|
626
|
-
* Ruby versions `>= 2.
|
633
|
+
* Ruby versions `>= 2.2.0`
|
627
634
|
* Rails versions `>=4.1.x`.
|
628
635
|
|
629
636
|
To learn more about supported versions and upgrades, read the [upgrading guide].
|
@@ -6,7 +6,7 @@ module EmberCli
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def check!
|
9
|
-
if
|
9
|
+
if has_build_errors?
|
10
10
|
raise_build_error!
|
11
11
|
end
|
12
12
|
|
@@ -14,7 +14,7 @@ module EmberCli
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def reset
|
17
|
-
if
|
17
|
+
if error_file_exists?
|
18
18
|
error_file.delete
|
19
19
|
end
|
20
20
|
end
|
@@ -35,17 +35,43 @@ module EmberCli
|
|
35
35
|
!paths.lockfile.exist?
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
38
|
+
def error_file_exists?
|
39
39
|
error_file.exist? && error_file.size?
|
40
40
|
end
|
41
41
|
|
42
|
+
def build_errors
|
43
|
+
error_lines.
|
44
|
+
reject { |line| is_blank_or_backtrace?(line) }.
|
45
|
+
reject { |line| is_deprecation_warning?(line) }
|
46
|
+
end
|
47
|
+
|
48
|
+
def has_build_errors?
|
49
|
+
build_errors.any?
|
50
|
+
end
|
51
|
+
|
52
|
+
def is_blank_or_backtrace?(line)
|
53
|
+
line =~ /(^\s*$|^\s{4}at .+$)/
|
54
|
+
end
|
55
|
+
|
56
|
+
def is_deprecation_warning?(line)
|
57
|
+
line =~ /^(\e[^\s]+)?DEPRECATION:/
|
58
|
+
end
|
59
|
+
|
60
|
+
def error_lines
|
61
|
+
if error_file_exists?
|
62
|
+
error_file.readlines
|
63
|
+
else
|
64
|
+
[""]
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
42
68
|
def error_file
|
43
69
|
paths.build_error_file
|
44
70
|
end
|
45
71
|
|
46
72
|
def raise_build_error!
|
47
|
-
backtrace =
|
48
|
-
message = "#{name.inspect} has failed to build: #{backtrace
|
73
|
+
backtrace = build_errors.first
|
74
|
+
message = "#{name.inspect} has failed to build: #{backtrace}"
|
49
75
|
|
50
76
|
error = BuildError.new(message)
|
51
77
|
error.set_backtrace(backtrace)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module EmberCli
|
2
|
+
class EmberConstraint
|
3
|
+
def matches?(request)
|
4
|
+
html_request?(request) && !rails_info_request?(request)
|
5
|
+
end
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def rails_info_request?(request)
|
10
|
+
request.fullpath.start_with?("/rails/info")
|
11
|
+
end
|
12
|
+
|
13
|
+
def html_request?(request)
|
14
|
+
index = request.format.to_s =~ /html/ || -1
|
15
|
+
|
16
|
+
index > -1
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "ember_cli/
|
1
|
+
require "ember_cli/ember_constraint"
|
2
2
|
|
3
3
|
module ActionDispatch
|
4
4
|
module Routing
|
@@ -14,7 +14,7 @@ module ActionDispatch
|
|
14
14
|
format: :html,
|
15
15
|
)
|
16
16
|
|
17
|
-
scope constraints: ::EmberCli::
|
17
|
+
scope constraints: ::EmberCli::EmberConstraint.new do
|
18
18
|
get("#{to}(*rest)", routing_options)
|
19
19
|
end
|
20
20
|
|
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.
|
4
|
+
version: 0.8.0
|
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: 2016-
|
13
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ember-cli-rails-assets
|
@@ -33,9 +33,6 @@ dependencies:
|
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '3.2'
|
36
|
-
- - "<"
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: '5'
|
39
36
|
type: :runtime
|
40
37
|
prerelease: false
|
41
38
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,9 +40,6 @@ dependencies:
|
|
43
40
|
- - ">="
|
44
41
|
- !ruby/object:Gem::Version
|
45
42
|
version: '3.2'
|
46
|
-
- - "<"
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '5'
|
49
43
|
- !ruby/object:Gem::Dependency
|
50
44
|
name: cocaine
|
51
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,10 +89,10 @@ files:
|
|
95
89
|
- lib/ember_cli/command.rb
|
96
90
|
- lib/ember_cli/configuration.rb
|
97
91
|
- lib/ember_cli/deploy/file.rb
|
92
|
+
- lib/ember_cli/ember_constraint.rb
|
98
93
|
- lib/ember_cli/engine.rb
|
99
94
|
- lib/ember_cli/errors.rb
|
100
95
|
- lib/ember_cli/helpers.rb
|
101
|
-
- lib/ember_cli/html_constraint.rb
|
102
96
|
- lib/ember_cli/path_set.rb
|
103
97
|
- lib/ember_cli/route_helpers.rb
|
104
98
|
- lib/ember_cli/runner.rb
|
@@ -124,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
118
|
requirements:
|
125
119
|
- - ">="
|
126
120
|
- !ruby/object:Gem::Version
|
127
|
-
version: 2.
|
121
|
+
version: 2.2.0
|
128
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
123
|
requirements:
|
130
124
|
- - ">="
|