ember-rails 0.14.1 → 0.15.0

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: 0cf471e302779ef5b339f0ec11f3203c87175618
4
- data.tar.gz: caacf1625d1b51543d5a6a3bb9d48e6b11574a91
3
+ metadata.gz: b60a63f6567215c83896d987c2a2d6f23e2e36be
4
+ data.tar.gz: 1d7a76412bb6a2aff43f2c1d113a6eb2b591f1ff
5
5
  SHA512:
6
- metadata.gz: bc8dbdc727b58571d73433c900faa99bd84987f0445e6db9a7850e31db9a17efd8d2aa2c2550f01cb7643be22e131794c842a156278b753aeb03535e0134102c
7
- data.tar.gz: bf42e6518eaf4028fe9656b977fd96103bae9f7ab450942edef13f9ac64d12c7ca65784d84cbce2b27fab34fb65a9a61510bbe2dd2217f7880c39db8cd8fb5eb
6
+ metadata.gz: 336a685840c73eb1ad6cd7ce70142e939ec39461930821725381c449e5b86e327bc5062b34c886d9bc7bfc769f9020aed1c634929e15367a8c0f4148d4773f7f
7
+ data.tar.gz: daa683afc9cf7da1f1f0c9f659df026d466d5f65f108e0365b03cdd60c0965287dbeaf7fe247fb082f81e0d7e7bdfc81f378dd35f662d590dd75d47279e46880
data/README.md CHANGED
@@ -14,7 +14,7 @@ You can see an example of how to use the gem [here](https://github.com/keithpitt
14
14
 
15
15
  ```ruby
16
16
  gem 'ember-rails'
17
- gem 'ember-source', '1.2.0' # or the version you need
17
+ gem 'ember-source', '1.5.0' # or the version you need
18
18
  ```
19
19
 
20
20
  * Run `bundle install`
@@ -26,9 +26,19 @@ rails generate ember:bootstrap
26
26
 
27
27
  * Restart your server (if it's running)
28
28
 
29
+ ## Building a new project from scratch
29
30
 
30
- Notes:
31
+ Rails supports the ability to build projects from a template source ruby file.
32
+
33
+ To build an Ember centric Rails project you can simply type the following into your command line:
31
34
 
35
+ ```
36
+ rails new my_app -m http://emberjs.com/edge_template.rb
37
+ ```
38
+
39
+ Read more about [Rails application templates](http://edgeguides.rubyonrails.org/rails_application_templates.html) and take a look at the edge_template.rb [source code](https://github.com/emberjs/website/blob/master/source/edge_template.rb).
40
+
41
+ Notes:
32
42
 
33
43
  To install the latest builds of ember and ember-data. It should be noted that the
34
44
  examples in the [getting started guide](http://emberjs.com/guides/getting-started/)
@@ -38,7 +48,7 @@ have been designed to use the released version of ember:
38
48
  rails generate ember:install
39
49
  ```
40
50
 
41
- You'll probably need to clear out your cache after doing this with
51
+ You'll probably need to clear out your cache after doing this with:
42
52
 
43
53
  ```shell
44
54
  rake tmp:clear
@@ -87,7 +97,7 @@ using an EmberScript variant first.
87
97
 
88
98
  ## Configuration Options
89
99
 
90
- The following options are availabe for configuration in your application or environment level
100
+ The following options are available for configuration in your application or environment-level
91
101
  config files (`config/application.rb`, `config/environments/development.rb`, etc.):
92
102
 
93
103
  * `config.ember.variant` - Used to determine which Ember variant to use. Valid options: `:development`, `:production`.
@@ -116,7 +126,7 @@ to use `rails g ember:bootstrap` to create the following directory structure und
116
126
 
117
127
  Additionally, it will add the following lines to `app/assets/javascripts/application.js`.
118
128
  By default, it uses the Rails Application's name and creates an `rails_app_name.js`
119
- file to setup application namespace and initial requires:
129
+ file to set up application namespace and initial requires:
120
130
 
121
131
  //= require handlebars
122
132
  //= require ember
@@ -225,7 +235,7 @@ You can reference your component inside your other handlebars template files by
225
235
  {{ my-component }}
226
236
 
227
237
  ### A note about upgrading ember-rails and components
228
- The ember-rails project now includes generators for components. If you have an exisitng project and need
238
+ The ember-rails project now includes generators for components. If you have an existing project and need
229
239
  to compile component files you will need to include the components folder as part of the asset pipeline.
230
240
  A typical project expects two folders for *components* related code:
231
241
 
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Rails
3
- VERSION = '0.14.1'
3
+ VERSION = '0.15.0'
4
4
  end
5
5
  end
@@ -54,6 +54,9 @@ module Ember
54
54
  {:before => regex}
55
55
  elsif contents =~ regex = /^\s*$/
56
56
  {:before => regex}
57
+ else
58
+ regex = /\z/
59
+ {:after => regex}
57
60
  end
58
61
 
59
62
  inject_into_file(full_path.to_s, injection_options) do
@@ -5,10 +5,10 @@ module Ember
5
5
  def ember_path
6
6
  if options[:ember_path]
7
7
  options[:ember_path]
8
- elsif configuration.ember_path
9
- configuration.ember_path
10
8
  elsif rails_engine?
11
9
  "app/assets/javascripts/#{engine_name}"
10
+ elsif configuration.ember_path
11
+ configuration.ember_path
12
12
  else
13
13
  "app/assets/javascripts"
14
14
  end
@@ -25,10 +25,10 @@ module Ember
25
25
  def application_name
26
26
  if options[:app_name]
27
27
  options[:app_name]
28
- elsif configuration.app_name
29
- configuration.app_name
30
28
  elsif rails_engine?
31
29
  engine_name
30
+ elsif configuration.app_name
31
+ configuration.app_name
32
32
  elsif defined?(::Rails) && ::Rails.application
33
33
  ::Rails.application.class.name.split('::').first
34
34
  else
@@ -3,7 +3,7 @@
3
3
  //= require ember
4
4
  //= require ember-data
5
5
  //= require_self
6
- //= require <%= application_name.underscore %>
6
+ //= require ./<%= application_name.underscore %>
7
7
 
8
8
  // for more details see: http://emberjs.com/guides/application/
9
9
  <%= application_name.camelize %> = Ember.Application.create();
@@ -1,3 +1,4 @@
1
+ #= require jquery
1
2
  #= require handlebars
2
3
  #= require ember
3
4
  #= require ember-data
@@ -1,4 +1,4 @@
1
- // for more details see: http://emberjs.com/guides/controllers/
1
+ // for more details see: http://emberjs.com/guides/controllers/representing-multiple-models-with-arraycontroller/
2
2
 
3
3
  <%= application_name.camelize %>.<%= class_name %>Controller = Ember.ArrayController.extend({
4
4
 
@@ -1,7 +1,9 @@
1
- // http://emberjs.com/guides/models/using-the-store/
2
-
3
1
  <%= application_name.camelize %>.Store = DS.Store.extend({
4
- // Override the default adapter with the `DS.ActiveModelAdapter` which
5
- // is built to work nicely with the ActiveModel::Serializers gem.
6
- adapter: '_ams'
2
+
3
+ });
4
+
5
+ // Override the default adapter with the `DS.ActiveModelAdapter` which
6
+ // is built to work nicely with the ActiveModel::Serializers gem.
7
+ <%= application_name.camelize %>.ApplicationAdapter = DS.ActiveModelAdapter.extend({
8
+
7
9
  });
@@ -1,6 +1,12 @@
1
- # http://emberjs.com/guides/models/using-the-store/
1
+ # http://emberjs.com/guides/models/#toc_store
2
+ # http://emberjs.com/guides/models/pushing-records-into-the-store/
2
3
 
3
- <%= application_name.camelize %>.Store = DS.Store.extend
4
- # Override the default adapter with the `DS.ActiveModelAdapter` which
5
- # is built to work nicely with the ActiveModel::Serializers gem.
6
- adapter: '_ams'
4
+ <%= application_name.camelize %>.Store = DS.Store.extend({
5
+
6
+ })
7
+
8
+ # Override the default adapter with the `DS.ActiveModelAdapter` which
9
+ # is built to work nicely with the ActiveModel::Serializers gem.
10
+ <%= application_name.camelize %>.ApplicationAdapter = DS.ActiveModelAdapter.extend({
11
+
12
+ })
@@ -1,7 +1,5 @@
1
- # http://emberjs.com/guides/models/using-the-store/
2
-
3
1
  class <%= application_name.camelize %>.Store extends DS.Store
4
- # Override the default adapter with the `DS.ActiveModelAdapter` which
5
- # is built to work nicely with the ActiveModel::Serializers gem.
6
- adapter: '_ams'
7
2
 
3
+ # Override the default adapter with the `DS.ActiveModelAdapter` which
4
+ # is built to work nicely with the ActiveModel::Serializers gem.
5
+ class <%= application_name.camelize %>.ApplicationAdapter extends DS.ActiveModelAdapter
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Pitt
@@ -11,230 +11,202 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-11-27 00:00:00.000000000 Z
14
+ date: 2014-04-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: execjs
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - '>='
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '1.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.2'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: railties
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: '3.1'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3.1'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: active_model_serializers
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - '>='
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - '>='
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: barber
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - '>='
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: 0.4.1
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: 0.4.1
72
72
  - !ruby/object:Gem::Dependency
73
- name: ember-source
73
+ name: jquery-rails
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - '>='
76
+ - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: '0'
78
+ version: 1.0.17
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: 1.0.17
86
86
  - !ruby/object:Gem::Dependency
87
- name: handlebars-source
87
+ name: ember-source
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - '>='
90
+ - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: '0'
92
+ version: 1.1.0
93
93
  type: :runtime
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: '0'
99
+ version: 1.1.0
100
100
  - !ruby/object:Gem::Dependency
101
- name: ember-data-source
101
+ name: handlebars-source
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - '>='
104
+ - - ">"
105
105
  - !ruby/object:Gem::Version
106
- version: '0'
106
+ version: 1.0.0
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - '>='
111
+ - - ">"
112
112
  - !ruby/object:Gem::Version
113
- version: '0'
113
+ version: 1.0.0
114
114
  - !ruby/object:Gem::Dependency
115
- name: jquery-rails
115
+ name: ember-data-source
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - '>='
118
+ - - ">="
119
119
  - !ruby/object:Gem::Version
120
- version: 1.0.17
120
+ version: 1.0.0.beta.5
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - '>='
125
+ - - ">="
126
126
  - !ruby/object:Gem::Version
127
- version: 1.0.17
127
+ version: 1.0.0.beta.5
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: bundler
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
- - - '>='
132
+ - - ">="
133
133
  - !ruby/object:Gem::Version
134
134
  version: 1.2.2
135
135
  type: :development
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.2.2
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: appraisal
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
- - - '>='
146
+ - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  type: :development
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - '>='
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  - !ruby/object:Gem::Dependency
157
157
  name: tzinfo
158
158
  requirement: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - '>='
160
+ - - ">="
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  type: :development
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - '>='
167
+ - - ">="
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
- - !ruby/object:Gem::Dependency
171
- name: ember-source
172
- requirement: !ruby/object:Gem::Requirement
173
- requirements:
174
- - - ~>
175
- - !ruby/object:Gem::Version
176
- version: '1.2'
177
- type: :development
178
- prerelease: false
179
- version_requirements: !ruby/object:Gem::Requirement
180
- requirements:
181
- - - ~>
182
- - !ruby/object:Gem::Version
183
- version: '1.2'
184
- - !ruby/object:Gem::Dependency
185
- name: handlebars-source
186
- requirement: !ruby/object:Gem::Requirement
187
- requirements:
188
- - - ~>
189
- - !ruby/object:Gem::Version
190
- version: 1.1.1
191
- type: :development
192
- prerelease: false
193
- version_requirements: !ruby/object:Gem::Requirement
194
- requirements:
195
- - - ~>
196
- - !ruby/object:Gem::Version
197
- version: 1.1.1
198
170
  - !ruby/object:Gem::Dependency
199
171
  name: sprockets-rails
200
172
  requirement: !ruby/object:Gem::Requirement
201
173
  requirements:
202
- - - '>='
174
+ - - ">="
203
175
  - !ruby/object:Gem::Version
204
176
  version: '0'
205
177
  type: :development
206
178
  prerelease: false
207
179
  version_requirements: !ruby/object:Gem::Requirement
208
180
  requirements:
209
- - - '>='
181
+ - - ">="
210
182
  - !ruby/object:Gem::Version
211
183
  version: '0'
212
184
  - !ruby/object:Gem::Dependency
213
185
  name: vcr
214
186
  requirement: !ruby/object:Gem::Requirement
215
187
  requirements:
216
- - - '>='
188
+ - - ">="
217
189
  - !ruby/object:Gem::Version
218
190
  version: '0'
219
191
  type: :development
220
192
  prerelease: false
221
193
  version_requirements: !ruby/object:Gem::Requirement
222
194
  requirements:
223
- - - '>='
195
+ - - ">="
224
196
  - !ruby/object:Gem::Version
225
197
  version: '0'
226
198
  - !ruby/object:Gem::Dependency
227
199
  name: webmock
228
200
  requirement: !ruby/object:Gem::Requirement
229
201
  requirements:
230
- - - <
202
+ - - "<"
231
203
  - !ruby/object:Gem::Version
232
204
  version: 1.14.0
233
205
  type: :development
234
206
  prerelease: false
235
207
  version_requirements: !ruby/object:Gem::Requirement
236
208
  requirements:
237
- - - <
209
+ - - "<"
238
210
  - !ruby/object:Gem::Version
239
211
  version: 1.14.0
240
212
  description:
@@ -245,12 +217,12 @@ executables: []
245
217
  extensions: []
246
218
  extra_rdoc_files: []
247
219
  files:
248
- - README.md
249
220
  - LICENSE
221
+ - README.md
222
+ - lib/ember-rails.rb
250
223
  - lib/ember/handlebars/template.rb
251
224
  - lib/ember/rails/engine.rb
252
225
  - lib/ember/rails/version.rb
253
- - lib/ember-rails.rb
254
226
  - lib/ember_rails.rb
255
227
  - lib/generators/ember/bootstrap_generator.rb
256
228
  - lib/generators/ember/component_generator.rb
@@ -308,17 +280,17 @@ require_paths:
308
280
  - lib
309
281
  required_ruby_version: !ruby/object:Gem::Requirement
310
282
  requirements:
311
- - - '>='
283
+ - - ">="
312
284
  - !ruby/object:Gem::Version
313
285
  version: '0'
314
286
  required_rubygems_version: !ruby/object:Gem::Requirement
315
287
  requirements:
316
- - - '>='
288
+ - - ">="
317
289
  - !ruby/object:Gem::Version
318
290
  version: '0'
319
291
  requirements: []
320
292
  rubyforge_project:
321
- rubygems_version: 2.0.6
293
+ rubygems_version: 2.2.0
322
294
  signing_key:
323
295
  specification_version: 4
324
296
  summary: Ember for Rails 3.1+