sprockets-emblem 0.2.1 → 0.2.2

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: 701bb9d15fae229027723fc94fe7ea03253f322e
4
- data.tar.gz: 506a1f8a825e532a49b06a60686583f0674bf113
3
+ metadata.gz: 082260ac97badebe993fd4aec4d480899ab6e136
4
+ data.tar.gz: f06102c0007d6abb4a3dff910cf8a95112338162
5
5
  SHA512:
6
- metadata.gz: 33c4bd041237d9ec3fcbfb9b1ba3d04138d7765071c3f4ec6d0dc7e5d826f919a6ff4606402004802576bb4e72a852511cef7472c013b1e5662af342b8293a12
7
- data.tar.gz: 35f67a7f3dbc31618bd372473d1d0b01edf384ab88595e08534b57d1c79382c56adbb18ad215d710445162fb96eae809cb966e0ab2da74f3c853f637932ca085
6
+ metadata.gz: 914b1f64889481a024b1e5914d2562d8732ea7d79e980867444390ff0dc602a768756d508244000129d34081b6f2889351b5b37adf5621b460832de1380203f3
7
+ data.tar.gz: 5d6690eb0386e9f806222452023775d12bae1dd8664290a9cb6e010c84f33df738f5fad75b9e36acdc524576d386b4de64566e2952e619d9c64d68e415d7ffa1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -16,7 +16,7 @@ module Sprockets
16
16
  end
17
17
 
18
18
  def evaluate(scope, locals, &block)
19
- compiled_hbs = context.call('Emblem.precompile', hbs_variant, data)
19
+ compiled_hbs = context.call('Emblem.precompile', HandlebarsVariant, data)
20
20
  "Handlebars.template(#{compiled_hbs});"
21
21
  end
22
22
 
@@ -29,15 +29,19 @@ module Sprockets
29
29
  HandlebarsAssets::Handlebars.send :source
30
30
  end
31
31
 
32
- def hbs_variant
33
- @hbs_variant ||= begin
34
- 'Handlebars'.tap do |hbs|
35
- hbs.define_singleton_method(:encode_json) { |encoder| hbs }
36
- end
37
- end
32
+ def prepare
38
33
  end
39
34
 
40
- def prepare
35
+ module HandlebarsVariant
36
+ VARIANT = 'Handlebars'.freeze
37
+
38
+ def self.to_json(options = nil)
39
+ VARIANT
40
+ end
41
+
42
+ def self.encode_json(encoder = nil)
43
+ VARIANT
44
+ end
41
45
  end
42
46
  end
43
47
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: sprockets-emblem 0.2.1 ruby lib
5
+ # stub: sprockets-emblem 0.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "sprockets-emblem"
9
- s.version = "0.2.1"
9
+ s.version = "0.2.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Roman Shterenzon"]
14
- s.date = "2015-02-20"
14
+ s.date = "2015-03-02"
15
15
  s.description = "Sprockets integration for Emblem.js"
16
16
  s.email = "romanbsd@yahoo.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-emblem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Shterenzon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-20 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: emblem-source