ember-cli-rails 0.1.2 → 0.1.3

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: 80bff7ddf6a25ed99c090e4098e2da8929bc0fb0
4
- data.tar.gz: 74c0f4b34f36bc24de522d6a151613e5fa6bae41
3
+ metadata.gz: 030d5f1596ebae3fecc96c480954a9e4cb4e3151
4
+ data.tar.gz: f677b7c8673737370c96f354af72a7b6db07df61
5
5
  SHA512:
6
- metadata.gz: e4a9a91135ae46175d12f511a5a0615e48ed279b7db29db47d7ca031f810948daa91c85f64074f5b44bfad32dadc61d8672bb2e4368b95f6f583a9950fcbc4ca
7
- data.tar.gz: a16d659d8628c992e022622f89e1ae22e3af88798cd9db65dff7e8c6bf6b5e616be80a9c2a2e9c8aed3983c5414ae339e0f1c3d4db86225c97f830b224f38ddb
6
+ metadata.gz: 377903d80e5ee92956235ecc98fa4337b81ace80869d44ec8627adcba014e33ec433e523b0c5fdfa1c651c3f47d995fd4e3e8a6a280344360ad32d8d40dafb75
7
+ data.tar.gz: 0b0fa9d57c95603281445df2ab1e8e3db21b0471c9103dac625e18b61e03a77e5a2c4b72f20b93b9b312fd88626944399b56f4a63f566a141b02db6931f6c282
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.1.3
2
+ -----
3
+
4
+ * Make sure setting optional config parameters override defaults [#70](https://github.com/rwz/ember-cli-rails/issues/70)
5
+
1
6
  0.1.2
2
7
  -----
3
8
 
data/README.md CHANGED
@@ -83,7 +83,7 @@ end
83
83
 
84
84
  ## Usage
85
85
 
86
- You render your Ember CLI app by including the corresponding JS/CSS tags in whichever
86
+ You render your EmberCLI app by including the corresponding JS/CSS tags in whichever
87
87
  Rails view you'd like the Ember app to appear.
88
88
 
89
89
  For example, if you had the following Rails app
@@ -123,26 +123,79 @@ init` and then add the following to your `Guardfile`.
123
123
  ```ruby
124
124
  guard "livereload" do
125
125
  # ...
126
- watch %r{app/<your-appname>/\w+/.+\.(js|hbs|html|css|<other-extensions>)}
126
+ watch %r{app/<your-appname>/app/\w+/.+\.(js|hbs|html|css|<other-extensions>)}
127
127
  # ...
128
128
  end
129
129
  ```
130
130
 
131
131
  This tells Guard to watch your EmberCLI app for any changes to the JavaScript,
132
- Handlebars, HTML, or CSS files. Take note that other extensions can be added to
133
- the line (such as `coffee` for CoffeeScript) to watch them for changes as well.
132
+ Handlebars, HTML, or CSS files within `app` path. Take note that other
133
+ extensions can be added to the line (such as `coffee` for CoffeeScript) to
134
+ watch them for changes as well.
135
+
136
+ ## Heroku
137
+
138
+ In order to deploy EmberCLI Rails app to Heroku you need to follow the steps
139
+ below:
140
+
141
+ First, enable Heroku Multi Buildpack by running the following command:
142
+
143
+ ```sh
144
+ heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi
145
+ ```
146
+
147
+ Next, check in `.buildpacks` file to specify which buildpacks to use:
148
+
149
+ ```
150
+ https://github.com/heroku/heroku-buildpack-nodejs
151
+ https://github.com/heroku/heroku-buildpack-ruby
152
+ ```
153
+
154
+ Add `rails_12factor` gem to your production group in Gemfile, then run `bundle
155
+ install`:
156
+
157
+ ```ruby
158
+ gem "rails_12factor", group: :production
159
+ ```
160
+
161
+ Add a `package.json` to the root of your Rails project. This is to make sure
162
+ it'll be detected by the NodeJS buildpack.
163
+
164
+ ```javascript
165
+ {
166
+ "dependencies": {
167
+ "bower": "*"
168
+ }
169
+ }
170
+ ```
171
+
172
+ Add a `postinstall` task to your EmberCLI app's `package.json`. This will
173
+ ensure that during the deployment process, Heroku will install all dependencies
174
+ found in both `node_modules` and `bower_components`.
175
+
176
+ ```javascript
177
+ {
178
+ # ...
179
+ "scripts": {
180
+ # ...
181
+ "postinstall": "../../node_modules/bower/bin/bower install"
182
+ }
183
+ }
184
+ ```
185
+
186
+ Now you should be ready to deploy.
134
187
 
135
188
  ## Additional Information
136
189
 
137
- When running in the development environment, EmberCLI Rails runs `ember build`
138
- with the `--output-path` and `--watch` flags on. The `--watch` flag tells
139
- EmberCLI to watch for file system events and rebuild when an EmberCLI file is changed.
140
- The `--output-path` flag specifies where the distribution files will be put.
141
- EmberCLI Rails does some fancy stuff to get it into your asset path without
142
- polluting your git history. Note that for this to work, you must have
190
+ When running in the development environment, EmberCLI Rails runs `ember build`
191
+ with the `--output-path` and `--watch` flags on. The `--watch` flag tells
192
+ EmberCLI to watch for file system events and rebuild when an EmberCLI file is
193
+ changed. The `--output-path` flag specifies where the distribution files will
194
+ be put. EmberCLI Rails does some fancy stuff to get it into your asset path
195
+ without polluting your git history. Note that for this to work, you must have
143
196
  `config.consider_all_requests_local = true` set in
144
197
  `config/environments/development.rb`, otherwise the middleware responsible for
145
- building Ember CLI will not be enabled.
198
+ building EmberCLI will not be enabled.
146
199
 
147
200
  Alternatively, if you want to override the default behavior in any given Rails
148
201
  environment, you can manually set the `config.use_ember_middleware` and
@@ -26,16 +26,16 @@ module EmberCLI
26
26
  end
27
27
 
28
28
  def use_middleware?
29
- rails_config_for(:use_ember_middleware) || non_production?
29
+ rails_config_for(:use_ember_middleware, non_production?)
30
30
  end
31
31
 
32
32
  def use_live_recompilation?
33
- rails_config_for(:use_ember_live_recompilation) || Rails.env.development?
33
+ rails_config_for(:use_ember_live_recompilation, Rails.env.development?)
34
34
  end
35
35
 
36
- def rails_config_for(key)
36
+ def rails_config_for(key, default=false)
37
37
  config = Rails.configuration
38
- config.respond_to?(key) && config.public_send(key)
38
+ config.respond_to?(key) ? config.public_send(key) : default
39
39
  end
40
40
 
41
41
  def override_assets_precompile_task!
@@ -1,3 +1,3 @@
1
1
  module EmberCLI
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.1.3".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.2
4
+ version: 0.1.3
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-25 00:00:00.000000000 Z
12
+ date: 2015-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties