ember-emblem-template 0.3.0 → 0.4.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: 5ee2f839d26536bf225d47fb73626b0f49971125
4
- data.tar.gz: 5508484c2e5746ec4978b28e516e46aa77431c8a
3
+ metadata.gz: fa3efbf2513af652751774004b18418a357e6b0a
4
+ data.tar.gz: b1f987e1fcb1c75b17ec910b579f1b1d55da1d9a
5
5
  SHA512:
6
- metadata.gz: c4d8f6bb168c1c797f4c9510773d9f27047449f1e192680f67fac40ad3e47df0a8cb8b59f34387531fd8a65547f629fe58cb4eb94ec1cfe1e9610bc68a171410
7
- data.tar.gz: 4b77c5c5dce8f83a1dd74566a93f878ae26d8a8c781c899db471174715d3686540d6de94eff1af29d31f5332a92fcf4460a2a4b218cc12de20c9a5efb66704d6
6
+ metadata.gz: 9cc863c0c1a73a0f7a3c4c0de82c03cdf457e9edf6a84e7782e51fffe90b43d8ca8fdafbdd338c270515780358bcef3fc8fd7c267491f07224ba5a68421eaaad
7
+ data.tar.gz: e0d197302a96d0b7b484daf13065fc8b8f7212c879367af6b85934be7e8ac8c2fc7c2576f4ea9059f2d772872de4b4099a14d2316d82e3b29b5c64d5ef9470d2
data/Gemfile CHANGED
@@ -4,4 +4,3 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'sprockets'
7
- gem 'ember-handlebars-template'
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = %q{The sprockets template for Ember Emblem.}
12
12
  spec.description = %q{The sprockets template for Ember Emblem.}
13
- spec.homepage = 'https://github.com/tricknotes/ember-emblem-template'
13
+ spec.homepage = 'https://github.com/botandrose/ember-emblem-template'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'sprockets', '>= 3.3', '< 3.4'
22
- spec.add_dependency 'barber', '>= 0.9.0'
21
+ spec.add_dependency 'ember-handlebars-template', '~> 0.7.0'
22
+ spec.add_dependency 'sprockets-rails', '~> 2.0'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.7'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -27,26 +27,18 @@ module Ember
27
27
  template = compile_ember_emblem(template, config.ember_template)
28
28
  end
29
29
 
30
- target = global_template_target(scope.logical_path, config)
30
+ target = global_template_target('Ember.TEMPLATES', scope.logical_path, config)
31
31
  "#{target} = #{template}\n"
32
32
  end
33
33
 
34
34
  private
35
35
 
36
- def global_template_target(module_name, config)
37
- "Ember.TEMPLATES[#{template_path(module_name, config).inspect}]"
38
- end
39
-
40
36
  def template_path(path, config)
41
37
  root = config.templates_root
42
38
 
43
- if root.kind_of? Array
44
- root.each do |r|
45
- path.sub!(/#{Regexp.quote(r)}\//, '')
46
- end
47
- else
48
- unless root.empty?
49
- path.sub!(/#{Regexp.quote(root)}\/?/, '')
39
+ unless root.empty?
40
+ Array(root).each.each do |r|
41
+ path = path.sub(/#{Regexp.quote(r)}\//, '')
50
42
  end
51
43
  end
52
44
 
@@ -55,14 +47,14 @@ module Ember
55
47
  path.join(config.templates_path_separator)
56
48
  end
57
49
 
58
- def compile_ember_handlebars(string, ember_template = 'Handlebars', input = {})
50
+ def compile_ember_handlebars(string, ember_template = 'Handlebars', options = nil)
59
51
  handlebars = Precompiler.compile(string)
60
- "Ember.#{ember_template}.compile(#{indent(handlebars).inspect});"
52
+ "Ember.#{ember_template}.compile(#{indent(handlebars).inspect}, #{options.to_json});"
61
53
  end
62
54
 
63
- def precompile_ember_handlebars(string, ember_template = 'Handlebars', input = {})
55
+ def precompile_ember_handlebars(string, ember_template = 'Handlebars', input = {}, options = nil)
64
56
  handlebars = Precompiler.compile(string)
65
- "Ember.#{ember_template}.template(#{Barber::Ember::Precompiler.compile(handlebars)});"
57
+ "Ember.#{ember_template}.template(#{Barber::Ember::Precompiler.compile(handlebars, options)});"
66
58
  end
67
59
 
68
60
  def config
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Emblem
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,49 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-emblem-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-23 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sprockets
14
+ name: ember-handlebars-template
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '3.3'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '3.4'
19
+ version: 0.7.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '3.3'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '3.4'
26
+ version: 0.7.0
33
27
  - !ruby/object:Gem::Dependency
34
- name: barber
28
+ name: sprockets-rails
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ">="
31
+ - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: 0.9.0
33
+ version: '2.0'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - ">="
38
+ - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: 0.9.0
40
+ version: '2.0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: bundler
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -110,7 +104,7 @@ files:
110
104
  - lib/emblem/emblem.amd.js
111
105
  - lib/emblem/loader.js
112
106
  - lib/emblem/precompiler.js
113
- homepage: https://github.com/tricknotes/ember-emblem-template
107
+ homepage: https://github.com/botandrose/ember-emblem-template
114
108
  licenses:
115
109
  - MIT
116
110
  metadata: {}