ember-cli-rails 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/ember-cli/app.rb +13 -4
- data/lib/ember-cli/helpers.rb +6 -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: 0f1c285912cf8c63f40ff4d60c1849228451a46f
|
4
|
+
data.tar.gz: 853262662f45b8e71ac20318f73366f132643b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f834f53ae8acda2f5cb5a330f3c9ca99df08b1633d7027eb0d3b2dec18779c4e2d345a1b2f427e8347fe1f291605a231e3f4ef993b0dc92e5a00df19a1dbfd80
|
7
|
+
data.tar.gz: 5adb96c7232ea843a72911c62b82e831299881edc476490f2c2a76addc029ff993cb47460a9f9946c2f1947365dbb9ab2138ab2615ab740b7a8749ff780d0ca4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
0.0.14
|
2
|
+
------
|
3
|
+
|
4
|
+
* Do not include jQuery into vendor.js when jquery-rails is available [#32](https://github.com/rwz/ember-cli-rails/issues/32)
|
5
|
+
|
6
|
+
0.0.13
|
7
|
+
------
|
8
|
+
|
9
|
+
* Fix assets:precompile in production environment. [#38](https://github.com/rwz/ember-cli-rails/issues/38)
|
10
|
+
|
1
11
|
0.0.12
|
2
12
|
------
|
3
13
|
|
data/README.md
CHANGED
@@ -64,7 +64,7 @@ Once you've updated your initializer to taste, you need to install the
|
|
64
64
|
For each of your EmberCLI applications install the addon with:
|
65
65
|
|
66
66
|
```sh
|
67
|
-
npm install --save-dev ember-cli-rails-addon@0.0.
|
67
|
+
npm install --save-dev ember-cli-rails-addon@0.0.7
|
68
68
|
```
|
69
69
|
|
70
70
|
And that's it!
|
data/lib/ember-cli/app.rb
CHANGED
@@ -4,6 +4,7 @@ module EmberCLI
|
|
4
4
|
class App
|
5
5
|
ADDON_VERSION = "0.0.7"
|
6
6
|
EMBER_CLI_VERSION = "~> 0.1.3"
|
7
|
+
JQUERY_VERSIONS = ["~> 1.7", "~> 2.1"].freeze
|
7
8
|
|
8
9
|
attr_reader :name, :options, :pid
|
9
10
|
|
@@ -70,6 +71,7 @@ module EmberCLI
|
|
70
71
|
private
|
71
72
|
|
72
73
|
delegate :ember_path, to: :configuration
|
74
|
+
delegate :match_version?, :non_production?, to: Helpers
|
73
75
|
delegate :tee_path, to: :configuration
|
74
76
|
delegate :configuration, to: :EmberCLI
|
75
77
|
|
@@ -92,12 +94,18 @@ module EmberCLI
|
|
92
94
|
end
|
93
95
|
end
|
94
96
|
|
97
|
+
def suppress_jquery?
|
98
|
+
return false unless defined?(Jquery::Rails::JQUERY_VERSION)
|
99
|
+
|
100
|
+
JQUERY_VERSIONS.any? do |requirement|
|
101
|
+
match_version?(Jquery::Rails::JQUERY_VERSION, requirement)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
95
105
|
def check_ember_cli_version!
|
96
106
|
version = dev_dependencies.fetch("ember-cli").split("-").first
|
97
|
-
version = Gem::Version.new(version)
|
98
|
-
requirement = Gem::Requirement.new(EMBER_CLI_VERSION)
|
99
107
|
|
100
|
-
unless
|
108
|
+
unless match_version?(version, EMBER_CLI_VERSION)
|
101
109
|
fail <<-MSG.strip_heredoc
|
102
110
|
EmberCLI Rails require ember-cli NPM package version to be
|
103
111
|
#{requirement} to work properly. From within your EmberCLI directory
|
@@ -173,7 +181,7 @@ module EmberCLI
|
|
173
181
|
end
|
174
182
|
|
175
183
|
def environment
|
176
|
-
|
184
|
+
non_production?? "development" : "production"
|
177
185
|
end
|
178
186
|
|
179
187
|
def package_json
|
@@ -192,6 +200,7 @@ module EmberCLI
|
|
192
200
|
def env_hash
|
193
201
|
ENV.clone.tap do |vars|
|
194
202
|
vars.store "DISABLE_FINGERPRINTING", "true"
|
203
|
+
vars.store "SUPPRESS_JQUERY", "true" if suppress_jquery?
|
195
204
|
end
|
196
205
|
end
|
197
206
|
end
|
data/lib/ember-cli/helpers.rb
CHANGED
@@ -2,6 +2,12 @@ module EmberCLI
|
|
2
2
|
module Helpers
|
3
3
|
extend self
|
4
4
|
|
5
|
+
def match_version?(version, requirement)
|
6
|
+
version = Gem::Version.new(version)
|
7
|
+
requirement = Gem::Requirement.new(requirement)
|
8
|
+
requirement.satisfied_by?(version)
|
9
|
+
end
|
10
|
+
|
5
11
|
def which(cmd)
|
6
12
|
exts = ENV.fetch("PATHEXT", ?;).split(?;, -1).uniq
|
7
13
|
|
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.0.
|
4
|
+
version: 0.0.14
|
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: 2014-12-
|
12
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|