ember-rails 0.18.2 → 0.18.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: 241f7fa9602433d8a3d1d53f29992046de7f1d9f
4
- data.tar.gz: 4dbb2c96030f8056b52ee10e1fb87a8afe5f388b
3
+ metadata.gz: e1d22abfb91aed7657b7ec68913cce19405523b6
4
+ data.tar.gz: 3f26432eb8a12d3010651f0ea6ee8e521a3cb53c
5
5
  SHA512:
6
- metadata.gz: e37cba1638cfbdb0f32e121583b8bac10412663ce865792b1a34b145d0448afba65df7b6eefe98f6afa180f6a0fc9b3ac27eb7a6697545f7de254659ec4310da
7
- data.tar.gz: ae3f05c71158a506fa58b29ebfa3a03cdd2d514ebb5ca9344e1adc7de07c8b36af5546640565f0aa53333087f46ae1462994954cee5b6a5baa3ea1bd2b6a70f1
6
+ metadata.gz: 24a9c94fc3a9df5d76606475ab3d5478eccd57e629ebf0a1994a6f5d5b9c1a3c64b056f5fb5d4f3dcfb02ea4adafa65b3619f81d65e38c7a392ac78a541df32d
7
+ data.tar.gz: 9ac7bdd8d5b16da29c3b1435acbbb796491a1db9a5f846d02a34ccba48b64147ecb451aa0e1b37a01ea40d3327634f38f4e7054f3f3ca7faf3d8e395c6780a9a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ember-rails [![Build Status](https://secure.travis-ci.org/emberjs/ember-rails.svg?branch=master)](http://travis-ci.org/emberjs/ember-rails) [![Dependency Status](https://gemnasium.com/emberjs/ember-rails.png)](https://gemnasium.com/emberjs/ember-rails)
1
+ # ember-rails [![Build Status](https://secure.travis-ci.org/emberjs/ember-rails.svg?branch=master)](http://travis-ci.org/emberjs/ember-rails) [![Dependency Status](https://gemnasium.com/emberjs/ember-rails.png)](https://gemnasium.com/emberjs/ember-rails) [![Code Climate](https://codeclimate.com/github/emberjs/ember-rails/badges/gpa.svg)](https://codeclimate.com/github/emberjs/ember-rails)
2
2
 
3
3
  ember-rails makes developing an [Ember.JS](http://emberjs.com/) application much easier in Rails 3.1+.
4
4
 
@@ -94,16 +94,6 @@ You can now use the flag `--javascript-engine=em` to specify EmberScript
94
94
  assets in your generators, but all of the generators will default to
95
95
  using an EmberScript variant first.
96
96
 
97
- Note:
98
-
99
- Ember-rails include some flags options for bootstrap generator:
100
-
101
- ```
102
- --ember-path or -d # custom ember path
103
- --skip-git or -g # skip git keeps
104
- --javascript-engine # engine for javascript (js, coffee or em)
105
- --app-name or -n # custom ember app name
106
- ```
107
97
 
108
98
  ## Configuration Options
109
99
 
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Rails
3
- VERSION = '0.18.2'
3
+ VERSION = '0.18.3'
4
4
  end
5
5
  end
data/lib/ember_rails.rb CHANGED
@@ -8,7 +8,7 @@ require 'ember/rails/engine'
8
8
  begin
9
9
  require 'handlebars/source'
10
10
  rescue LoadError => e
11
- raise e unless e.message == 'cannot load such file -- handlebars/source'
11
+ raise e unless ['cannot load such file -- handlebars/source', 'no such file to load -- handlebars/source'].include?(e.message)
12
12
  end
13
13
 
14
14
  module Ember
@@ -49,15 +49,7 @@ module Ember
49
49
  full_path = Pathname.new(destination_root).join(ember_path, application_file)
50
50
 
51
51
  if full_path.exist?
52
- contents = full_path.read
53
- injection_options = if contents =~ regex = /^.*require_tree.*$/
54
- {:before => regex}
55
- elsif contents =~ regex = /^\s*$/
56
- {:before => regex}
57
- else
58
- regex = /\z/
59
- {:after => regex}
60
- end
52
+ injection_options = get_options_from_contents(full_path.read)
61
53
 
62
54
  inject_into_file(full_path.to_s, injection_options) do
63
55
  context = instance_eval('binding')
@@ -68,6 +60,17 @@ module Ember
68
60
  template application_file, full_path
69
61
  end
70
62
  end
63
+
64
+ def get_options_from_contents(contents)
65
+ if contents =~ regex = /^.*require_tree.*$/
66
+ {:before => regex}
67
+ elsif contents =~ regex = /^\s*$/
68
+ {:before => regex}
69
+ else
70
+ regex = /\z/
71
+ {:after => regex}
72
+ end
73
+ end
71
74
  end
72
75
  end
73
76
  end
@@ -70,21 +70,12 @@ module Ember
70
70
  private
71
71
 
72
72
  def get_ember_data_for(environment)
73
- # temporarily using a variable here until a stable release of
74
- # ember-data is released so that installing with ember-data
75
- # *just works*.
76
- chan = if channel.to_s == 'release'
77
- say_status("warning:", 'Ember Data is not available on the :release channel. Falling back to beta channel.' , :yellow)
78
- :beta
79
- else
80
- channel
81
- end
82
73
 
83
74
  create_file "vendor/assets/ember/#{environment}/ember-data.js" do
84
- fetch url_for(chan, 'ember-data', environment), "vendor/assets/ember/#{environment}/ember-data.js"
75
+ fetch url_for(channel, 'ember-data', environment), "vendor/assets/ember/#{environment}/ember-data.js"
85
76
  end
86
77
 
87
- sourcemap_url = "#{base_url}/#{chan}/ember-data.js.map"
78
+ sourcemap_url = "#{base_url}/#{channel}/ember-data.js.map"
88
79
  if resource_exist?(sourcemap_url)
89
80
  create_file "vendor/assets/ember/#{environment}/ember-data.js.map" do
90
81
  fetch sourcemap_url, "vendor/assets/ember/#{environment}/ember-data.js.map", false
metadata CHANGED
@@ -1,213 +1,241 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.2
4
+ version: 0.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Pitt
8
8
  - Rob Monie
9
9
  - Joao Carlos
10
10
  - Paul Chavard
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-04-11 00:00:00.000000000 Z
14
+ date: 2015-07-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: railties
18
17
  requirement: !ruby/object:Gem::Requirement
19
18
  requirements:
20
- - - ">="
19
+ - - '>='
21
20
  - !ruby/object:Gem::Version
22
21
  version: '3.1'
23
- type: :runtime
22
+ name: railties
24
23
  prerelease: false
24
+ type: :runtime
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.1'
30
30
  - !ruby/object:Gem::Dependency
31
- name: active_model_serializers
32
31
  requirement: !ruby/object:Gem::Requirement
33
32
  requirements:
34
- - - ">="
33
+ - - '>='
35
34
  - !ruby/object:Gem::Version
36
35
  version: '0'
37
- type: :runtime
36
+ name: active_model_serializers
38
37
  prerelease: false
38
+ type: :runtime
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - '>='
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  - !ruby/object:Gem::Dependency
45
- name: jquery-rails
46
45
  requirement: !ruby/object:Gem::Requirement
47
46
  requirements:
48
- - - ">="
47
+ - - '>='
49
48
  - !ruby/object:Gem::Version
50
49
  version: 1.0.17
51
- type: :runtime
50
+ name: jquery-rails
52
51
  prerelease: false
52
+ type: :runtime
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ">="
55
+ - - '>='
56
56
  - !ruby/object:Gem::Version
57
57
  version: 1.0.17
58
58
  - !ruby/object:Gem::Dependency
59
- name: ember-source
60
59
  requirement: !ruby/object:Gem::Requirement
61
60
  requirements:
62
- - - ">="
61
+ - - '>='
63
62
  - !ruby/object:Gem::Version
64
63
  version: 1.1.0
65
- type: :runtime
64
+ name: ember-source
66
65
  prerelease: false
66
+ type: :runtime
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 1.1.0
72
72
  - !ruby/object:Gem::Dependency
73
- name: ember-data-source
74
73
  requirement: !ruby/object:Gem::Requirement
75
74
  requirements:
76
- - - ">="
75
+ - - '>='
77
76
  - !ruby/object:Gem::Version
78
77
  version: 1.0.0.beta.5
79
- type: :runtime
78
+ name: ember-data-source
80
79
  prerelease: false
80
+ type: :runtime
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ">="
83
+ - - '>='
84
84
  - !ruby/object:Gem::Version
85
85
  version: 1.0.0.beta.5
86
86
  - !ruby/object:Gem::Dependency
87
- name: ember-handlebars-template
88
87
  requirement: !ruby/object:Gem::Requirement
89
88
  requirements:
90
- - - ">="
89
+ - - '>='
91
90
  - !ruby/object:Gem::Version
92
91
  version: 0.1.1
93
- - - "<"
92
+ - - <
94
93
  - !ruby/object:Gem::Version
95
94
  version: '1.0'
96
- type: :runtime
95
+ name: ember-handlebars-template
97
96
  prerelease: false
97
+ type: :runtime
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 0.1.1
103
- - - "<"
103
+ - - <
104
104
  - !ruby/object:Gem::Version
105
105
  version: '1.0'
106
106
  - !ruby/object:Gem::Dependency
107
- name: bundler
108
107
  requirement: !ruby/object:Gem::Requirement
109
108
  requirements:
110
- - - ">="
109
+ - - '>='
111
110
  - !ruby/object:Gem::Version
112
111
  version: 1.2.2
113
- type: :development
112
+ name: bundler
114
113
  prerelease: false
114
+ type: :development
115
115
  version_requirements: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - ">="
117
+ - - '>='
118
118
  - !ruby/object:Gem::Version
119
119
  version: 1.2.2
120
120
  - !ruby/object:Gem::Dependency
121
- name: appraisal
122
121
  requirement: !ruby/object:Gem::Requirement
123
122
  requirements:
124
- - - ">="
123
+ - - '>='
125
124
  - !ruby/object:Gem::Version
126
125
  version: 1.0.0
127
- type: :development
126
+ name: appraisal
128
127
  prerelease: false
128
+ type: :development
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ">="
131
+ - - '>='
132
132
  - !ruby/object:Gem::Version
133
133
  version: 1.0.0
134
134
  - !ruby/object:Gem::Dependency
135
- name: tzinfo
136
135
  requirement: !ruby/object:Gem::Requirement
137
136
  requirements:
138
- - - ">="
137
+ - - '>='
139
138
  - !ruby/object:Gem::Version
140
139
  version: '0'
141
- type: :development
140
+ name: tzinfo
142
141
  prerelease: false
142
+ type: :development
143
143
  version_requirements: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ">="
145
+ - - '>='
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  - !ruby/object:Gem::Dependency
149
- name: vcr
150
149
  requirement: !ruby/object:Gem::Requirement
151
150
  requirements:
152
- - - ">="
151
+ - - '>='
153
152
  - !ruby/object:Gem::Version
154
153
  version: '0'
155
- type: :development
154
+ name: vcr
156
155
  prerelease: false
156
+ type: :development
157
157
  version_requirements: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - ">="
159
+ - - '>='
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  - !ruby/object:Gem::Dependency
163
- name: webmock
164
163
  requirement: !ruby/object:Gem::Requirement
165
164
  requirements:
166
- - - "<"
165
+ - - <
167
166
  - !ruby/object:Gem::Version
168
167
  version: 1.14.0
169
- type: :development
168
+ name: webmock
170
169
  prerelease: false
170
+ type: :development
171
171
  version_requirements: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - "<"
173
+ - - <
174
174
  - !ruby/object:Gem::Version
175
175
  version: 1.14.0
176
176
  - !ruby/object:Gem::Dependency
177
- name: sprockets-rails
178
177
  requirement: !ruby/object:Gem::Requirement
179
178
  requirements:
180
- - - ">="
179
+ - - '>='
181
180
  - !ruby/object:Gem::Version
182
181
  version: '0'
183
- type: :development
182
+ name: sprockets-rails
184
183
  prerelease: false
184
+ type: :development
185
185
  version_requirements: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - ">="
187
+ - - '>='
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  - !ruby/object:Gem::Dependency
191
- name: handlebars-source
192
191
  requirement: !ruby/object:Gem::Requirement
193
192
  requirements:
194
- - - ">"
193
+ - - '>'
195
194
  - !ruby/object:Gem::Version
196
195
  version: 1.0.0
197
- - - "<"
196
+ - - <
198
197
  - !ruby/object:Gem::Version
199
198
  version: '3'
200
- type: :development
199
+ name: handlebars-source
201
200
  prerelease: false
201
+ type: :development
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
- - - ">"
204
+ - - '>'
205
205
  - !ruby/object:Gem::Version
206
206
  version: 1.0.0
207
- - - "<"
207
+ - - <
208
208
  - !ruby/object:Gem::Version
209
209
  version: '3'
210
- description:
210
+ - !ruby/object:Gem::Dependency
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ name: test-unit
217
+ prerelease: false
218
+ type: :development
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - '>='
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - '>='
228
+ - !ruby/object:Gem::Version
229
+ version: 1.0.4
230
+ name: safe_yaml
231
+ prerelease: false
232
+ type: :development
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - '>='
236
+ - !ruby/object:Gem::Version
237
+ version: 1.0.4
238
+ description:
211
239
  email:
212
240
  - me@keithpitt.com
213
241
  - paul@chavard.net
@@ -215,12 +243,12 @@ executables: []
215
243
  extensions: []
216
244
  extra_rdoc_files: []
217
245
  files:
218
- - LICENSE
219
246
  - README.md
247
+ - LICENSE
220
248
  - lib/ember-rails.rb
249
+ - lib/ember_rails.rb
221
250
  - lib/ember/rails/engine.rb
222
251
  - lib/ember/rails/version.rb
223
- - lib/ember_rails.rb
224
252
  - lib/generators/ember/adapter_generator.rb
225
253
  - lib/generators/ember/bootstrap_generator.rb
226
254
  - lib/generators/ember/component_generator.rb
@@ -276,24 +304,24 @@ homepage: https://github.com/emberjs/ember-rails
276
304
  licenses:
277
305
  - MIT
278
306
  metadata: {}
279
- post_install_message:
307
+ post_install_message:
280
308
  rdoc_options: []
281
309
  require_paths:
282
310
  - lib
283
311
  required_ruby_version: !ruby/object:Gem::Requirement
284
312
  requirements:
285
- - - ">="
313
+ - - '>='
286
314
  - !ruby/object:Gem::Version
287
315
  version: '0'
288
316
  required_rubygems_version: !ruby/object:Gem::Requirement
289
317
  requirements:
290
- - - ">="
318
+ - - '>='
291
319
  - !ruby/object:Gem::Version
292
320
  version: '0'
293
321
  requirements: []
294
- rubyforge_project:
295
- rubygems_version: 2.4.5
296
- signing_key:
322
+ rubyforge_project:
323
+ rubygems_version: 2.1.9
324
+ signing_key:
297
325
  specification_version: 4
298
326
  summary: Ember for Rails 3.1+
299
327
  test_files: []