ember-cli-rails 0.1.1 → 0.1.2

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: ee3daaab44f2411efc9ad6c6a6f403d2e068f0c7
4
- data.tar.gz: 97794eb3763d02c76f96bb2b690c5a10e123afae
3
+ metadata.gz: 80bff7ddf6a25ed99c090e4098e2da8929bc0fb0
4
+ data.tar.gz: 74c0f4b34f36bc24de522d6a151613e5fa6bae41
5
5
  SHA512:
6
- metadata.gz: 31435715128f279afecf8b388f3e33f28f006c43aa453350112cccfe7542e8cc58557b57456c3d53f046d5a4a2cfae3982c6ca4f29b6bb2e12d9f5ef1008912d
7
- data.tar.gz: 16d084e779d941fc56c54752858e604bdfeb9ffa895b27db07a719a569952f742802f75fd25c8f12e1425135e3427fb5fa6c08b159f3e0d18f8663f4eceb40e3
6
+ metadata.gz: e4a9a91135ae46175d12f511a5a0615e48ed279b7db29db47d7ca031f810948daa91c85f64074f5b44bfad32dadc61d8672bb2e4368b95f6f583a9950fcbc4ca
7
+ data.tar.gz: a16d659d8628c992e022622f89e1ae22e3af88798cd9db65dff7e8c6bf6b5e616be80a9c2a2e9c8aed3983c5414ae339e0f1c3d4db86225c97f830b224f38ddb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.2
2
+ -----
3
+
4
+ * Bump addon version to prevent missing tmp folder error [ember-cli-rails-addon#8](https://github.com/rondale-sc/ember-cli-rails-addon/pull/8)
5
+ * Add configuration to control Middleware and live recompilation [#64](https://github.com/rwz/ember-cli-rails/issues/64)
6
+
1
7
  0.1.1
2
8
  -----
3
9
 
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.9
67
+ npm install --save-dev ember-cli-rails-addon@0.0.11
68
68
  ```
69
69
 
70
70
  And that's it!
@@ -144,6 +144,10 @@ polluting your git history. Note that for this to work, you must have
144
144
  `config/environments/development.rb`, otherwise the middleware responsible for
145
145
  building Ember CLI will not be enabled.
146
146
 
147
+ Alternatively, if you want to override the default behavior in any given Rails
148
+ environment, you can manually set the `config.use_ember_middleware` and
149
+ `config.use_ember_live_recompilation` flags in the environment-specific config
150
+ file.
147
151
 
148
152
  #### Ember Dependencies
149
153
 
@@ -28,7 +28,7 @@ module EmberCLI
28
28
  def enable!
29
29
  prepare!
30
30
 
31
- if Helpers.non_production?
31
+ if Helpers.use_middleware?
32
32
  Rails.configuration.middleware.use Middleware
33
33
  end
34
34
  end
data/lib/ember-cli/app.rb CHANGED
@@ -2,7 +2,7 @@ require "timeout"
2
2
 
3
3
  module EmberCLI
4
4
  class App
5
- ADDON_VERSION = "0.0.9"
5
+ ADDON_VERSION = "0.0.11"
6
6
  EMBER_CLI_VERSION = "~> 0.1.5"
7
7
 
8
8
  class BuildError < StandardError; end
@@ -99,15 +99,15 @@ module EmberCLI
99
99
  end
100
100
 
101
101
  def lockfile
102
- tmp_path.join("build.lock")
102
+ @lockfile ||= tmp_path.join("build.lock")
103
103
  end
104
104
 
105
105
  def check_for_build_error!
106
- raise_build_error! if build_error_file.exist?
106
+ raise_build_error! if build_error?
107
107
  end
108
108
 
109
109
  def build_error_file
110
- tmp_path.join("error.txt")
110
+ @build_error_file ||= tmp_path.join("error.txt")
111
111
  end
112
112
 
113
113
  def reset_build_error!
@@ -22,7 +22,20 @@ module EmberCLI
22
22
  end
23
23
 
24
24
  def non_production?
25
- !Rails.env.production? && Rails.configuration.consider_all_requests_local
25
+ !Rails.env.production? && rails_config_for(:consider_all_requests_local)
26
+ end
27
+
28
+ def use_middleware?
29
+ rails_config_for(:use_ember_middleware) || non_production?
30
+ end
31
+
32
+ def use_live_recompilation?
33
+ rails_config_for(:use_ember_live_recompilation) || Rails.env.development?
34
+ end
35
+
36
+ def rails_config_for(key)
37
+ config = Rails.configuration
38
+ config.respond_to?(key) && config.public_send(key)
26
39
  end
27
40
 
28
41
  def override_assets_precompile_task!
@@ -15,7 +15,7 @@ module EmberCLI
15
15
 
16
16
  def enable_ember_cli
17
17
  @enabled ||= begin
18
- if Rails.env.development?
18
+ if Helpers.use_live_recompilation?
19
19
  EmberCLI.run!
20
20
  else
21
21
  EmberCLI.compile!
@@ -1,3 +1,3 @@
1
1
  module EmberCLI
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".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.1.1
4
+ version: 0.1.2
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-01-20 00:00:00.000000000 Z
12
+ date: 2015-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties