ember-cli-rails 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01ad5e448480f3166d9da3fe61436dfcb01ba241
4
- data.tar.gz: 3da6bf6fc695b7df6464b81264d095407f49538f
3
+ metadata.gz: b9e22a400999b48e24aebc6db3d83d40398ba1e9
4
+ data.tar.gz: 22e419c4a33f82814415ba93e9e8067149b72648
5
5
  SHA512:
6
- metadata.gz: 52874840c8471865343ff050252ccc7d404489fc5bed110cdfeba2906d74355e677f6c853d2f85306589520fd8caa4f34d6ff0643301e36655ebf2f0442766c6
7
- data.tar.gz: d9b964b2db6b3104dab4f1b7441745e27859647a69b649be671e07d59db1dd24e3dcf5956eb31801fca61856bd6c51cb1a6a2e3b1375bee2be945d33c3689b6a
6
+ metadata.gz: d2568fd9aae6d84d87b3cac48722c94fa7aefdd032f8779044aad7ac66e022e51cfd65869c1d89954fcdceedd375e48e6f7288943a5b2f854ab1ce15b1dda5fa
7
+ data.tar.gz: 9fb0f10c413452433b0fff754b328c5dcd107e8d17580abf25f8631405d581168ca79f6ff4cc0aa0eeab2a3792236b73eda4bd9f0e005067d14c8bdf4c481e72
@@ -1,3 +1,8 @@
1
+ 0.1.11
2
+ ------
3
+
4
+ * Do not include rake tasks twice [#110](https://github.com/rwz/ember-cli-rails/pull/110) [BlakeWilliams](https://github.com/BlakeWilliams)
5
+
1
6
  0.1.10
2
7
  ------
3
8
 
data/README.md CHANGED
@@ -113,6 +113,35 @@ could render your app at the `/` route with the following view:
113
113
 
114
114
  Your Ember application will now be served at the `/` route.
115
115
 
116
+ ## CSRF Tokens
117
+
118
+ Your Rails controllers, by default, are expecting a valid authenticity token to be submitted with non-`GET` requests.
119
+ Without it you'll receive a `422 Unprocessable Entity` error, specifically: `ActionController::InvalidAuthenticityToken`.
120
+
121
+ In order to add that token to your requests, you need to add into your template:
122
+
123
+ ```erb
124
+ <!-- /app/views/application/index.html.erb -->
125
+ # ... your ember script and stylesheet includes ...
126
+ <%= csrf_meta_tags %>
127
+ ```
128
+
129
+ This will add the tokens to your page.
130
+
131
+ You can then override the application `DS.RESTAdapter` (or whatever flavor of adapter you're using) to send that token with the requests:
132
+
133
+ ```js
134
+ // path/to/your/ember-cli-app/app/adapters/application.js
135
+ import DS from 'ember-data';
136
+ import $ from 'jquery';
137
+
138
+ export default DS.RESTAdapter.extend({
139
+ headers: {
140
+ "X-CSRF-Token": $('meta[name="csrf-token"]').attr('content')
141
+ }
142
+ });
143
+ ```
144
+
116
145
  ## Ember Test Suite
117
146
 
118
147
  To run an Ember app's tests in a browser, mount the `EmberCLI::Engine`:
@@ -15,9 +15,5 @@ module EmberCLI
15
15
  initializer "ember-cli-rails.enable" do
16
16
  EmberCLI.enable! unless ENV["SKIP_EMBER"]
17
17
  end
18
-
19
- rake_tasks do
20
- load "tasks/ember-cli.rake"
21
- end
22
18
  end
23
19
  end
@@ -1,3 +1,3 @@
1
1
  module EmberCLI
2
- VERSION = "0.1.10".freeze
2
+ VERSION = "0.1.11".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.10
4
+ version: 0.1.11
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: 2015-03-07 00:00:00.000000000 Z
13
+ date: 2015-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.4.5
95
+ rubygems_version: 2.4.6
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Integration between Ember CLI and Rails