ember-rails 0.20.3 → 0.20.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/rails/version.rb +1 -1
- data/lib/ember_rails.rb +1 -1
- data/lib/generators/ember/bootstrap_generator.rb +9 -9
- data/lib/generators/ember/install_generator.rb +1 -1
- data/lib/generators/ember/service_generator.rb +23 -0
- data/lib/generators/templates/service.coffee +3 -0
- data/lib/generators/templates/service.em +1 -0
- data/lib/generators/templates/service.js +3 -0
- data/lib/generators/templates/service.module.es6 +5 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f460a7d1062f0a12a4a5d4dbca47c6251a69cddf
|
4
|
+
data.tar.gz: 87ff3aa9e2357051cb00d239d97f56611f83d5ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293beaa12ef47a4757e04a2929e9712481a4e84e6efeff178c27fae571a2d106e62f8fae1780c223c8d48f9276297561c7dc8150d8c03b08f15475a32be08de7
|
7
|
+
data.tar.gz: 4d2eff017080719b39b59446deea1f724af427dd24f57fb21b24210338b7bb0910145f491b0ce029cab7f82cd333efa03d9ba8bfde064aa7ad9da2ee695109d7
|
data/lib/ember/rails/version.rb
CHANGED
data/lib/ember_rails.rb
CHANGED
@@ -18,7 +18,7 @@ module Ember
|
|
18
18
|
config.ember = ActiveSupport::OrderedOptions.new
|
19
19
|
config.ember.module_prefix = 'ember-app'
|
20
20
|
config.ember.prefix_files = %w(store router)
|
21
|
-
config.ember.prefix_dirs = %w(models controllers views routes components helpers mixins serializers adapters transforms)
|
21
|
+
config.ember.prefix_dirs = %w(models controllers views routes components helpers mixins services serializers adapters transforms)
|
22
22
|
|
23
23
|
generators do |app|
|
24
24
|
app.config.generators.assets = false
|
@@ -21,7 +21,7 @@ module Ember
|
|
21
21
|
else
|
22
22
|
inject_into_application_file(engine_extension)
|
23
23
|
end
|
24
|
-
rescue Exception
|
24
|
+
rescue Exception
|
25
25
|
inject_into_application_file('js')
|
26
26
|
end
|
27
27
|
end
|
@@ -69,14 +69,14 @@ module Ember
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def get_options_from_contents(contents)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
regex = /^.*require_tree.*$/
|
73
|
+
return {:before => regex} if contents =~ regex
|
74
|
+
|
75
|
+
regex = /^\s*$/
|
76
|
+
return {:before => regex} if contents =~ regex
|
77
|
+
|
78
|
+
regex = /\z/
|
79
|
+
{:after => regex}
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'generators/ember/generator_helpers'
|
2
|
+
|
3
|
+
module Ember
|
4
|
+
module Generators
|
5
|
+
class ServiceGenerator < ::Rails::Generators::NamedBase
|
6
|
+
include Ember::Generators::GeneratorHelpers
|
7
|
+
|
8
|
+
source_root File.expand_path("../../templates", __FILE__)
|
9
|
+
|
10
|
+
desc "Creates a new Ember.js service"
|
11
|
+
|
12
|
+
class_option :javascript_engine, :desc => "Engine for JavaScripts"
|
13
|
+
class_option :ember_path, :type => :string, :aliases => "-d", :default => false, :desc => "Custom ember app path"
|
14
|
+
class_option :app_name, :type => :string, :aliases => "-n", :default => false, :desc => "Custom ember app name"
|
15
|
+
|
16
|
+
def create_service_files
|
17
|
+
file_path = File.join(ember_path, 'services', class_path, "#{file_name.dasherize}.#{engine_extension}")
|
18
|
+
|
19
|
+
template "service.#{engine_extension}", file_path
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
class <%= application_name.camelize %>.<%= class_name %>Service extends Ember.Service
|
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.20.
|
4
|
+
version: 0.20.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Pitt
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-03-
|
14
|
+
date: 2016-03-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|
@@ -290,6 +290,7 @@ files:
|
|
290
290
|
- lib/generators/ember/resource_generator.rb
|
291
291
|
- lib/generators/ember/resource_override.rb
|
292
292
|
- lib/generators/ember/route_generator.rb
|
293
|
+
- lib/generators/ember/service_generator.rb
|
293
294
|
- lib/generators/ember/template_generator.rb
|
294
295
|
- lib/generators/ember/view_generator.rb
|
295
296
|
- lib/generators/templates/adapter.coffee
|
@@ -341,6 +342,10 @@ files:
|
|
341
342
|
- lib/generators/templates/router.em
|
342
343
|
- lib/generators/templates/router.js
|
343
344
|
- lib/generators/templates/router.module.es6
|
345
|
+
- lib/generators/templates/service.coffee
|
346
|
+
- lib/generators/templates/service.em
|
347
|
+
- lib/generators/templates/service.js
|
348
|
+
- lib/generators/templates/service.module.es6
|
344
349
|
- lib/generators/templates/template.hbs
|
345
350
|
- lib/generators/templates/view.coffee
|
346
351
|
- lib/generators/templates/view.em
|