barber 0.4.2 → 0.5.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: e03b6182bb8347d84976b8dd36439d689f40a641
4
- data.tar.gz: 026ba331c8bce76ebfd87001c7fa1fd7d8f63f0b
3
+ metadata.gz: 62be6072a62e7b509024470d438cb1fe9349d97d
4
+ data.tar.gz: b3511bbd6bc16aceadd42dcb62eeb914b0137504
5
5
  SHA512:
6
- metadata.gz: 756b5ad6a8196a767676fd2b54c4a9e41acda2d3cb9deccb7be287d4c8dc95958feb2f8d10214a894b6c5446313f1c74908d8c5d6e62ee804d0e183adf8a76a2
7
- data.tar.gz: 0644b3877d5dee7299da51d8a5c4c1fc8af5580d4a89535652282034d4ff3d6f672a995447c7174ea21d63d0d36d35bbf69bd1642d0166d5b4388ae5278d1d9b
6
+ metadata.gz: 86666693c3ade779b29f0717dbad6d5891d04b5bd60f2955e575e2791ff88963b2151cfd922ea896b6e26fd0fe594ea69855e7e7e98c84d987754cdf3ce6c597
7
+ data.tar.gz: 946d257518463a3157753f17d592faf42ef8ae0ced12ecafdf63d6ebeb09ecb7ae973782267102631971e287cbd316b08ed7d9ad47916e9abfafa21c4201ffb2
@@ -1,6 +1,8 @@
1
1
  rvm:
2
2
  - "1.9.3"
3
- - "1.9.2"
4
3
  - "2.0.0"
5
4
  - jruby-19mode
6
5
  - rbx-19mode
6
+ before_script:
7
+ - bundle exec appraisal install
8
+ script: bundle exec rake appraisal
data/Appraisals CHANGED
@@ -1,9 +1,14 @@
1
- appraise "ember-pre4" do
2
- # Uses handlebars rc2
3
- gem "ember-source", "1.0.0.pre4.1"
1
+ appraise "ember-rc4" do
2
+ # Uses handlebars 1.0.0.rc4
3
+ gem "ember-source", "1.0.0.rc4"
4
4
  end
5
5
 
6
- appraise "ember-rc1" do
7
- # Uses handlebars rc3
8
- gem "ember-source", "1.0.0.rc1.0"
6
+ appraise "ember-1.7" do
7
+ # Uses handlebars 1.3.0
8
+ gem "ember-source", "1.7.0"
9
+ end
10
+
11
+ appraise "ember-1.9" do
12
+ # Uses handlebars 2.0.0
13
+ gem "ember-source", "~> 1.9.0.alpha.2"
9
14
  end
data/Gemfile CHANGED
@@ -3,5 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in handlebars-precompiler.gemspec
4
4
  gemspec
5
5
 
6
- gem 'handlebars-source', '1.0.0rc3'
7
6
  gem 'therubyrhino', platform: :jruby
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Barber handles all your Handlebars precompilation needs. You can use
4
4
  Barber as part of your project build system or with someting like
5
- [rake-pipeline](https://github.com/living-social/rake-pipeline).
5
+ [rake-pipeline](https://github.com/livingsocial/rake-pipeline).
6
6
 
7
7
  ## Installation
8
8
 
@@ -34,7 +34,7 @@ require 'barber'
34
34
  Barber::FilePrecompiler.call(File.read("template.handlebars"))
35
35
  # "Handlebars.template(function(...));"
36
36
 
37
- Barber::InlinePreCompiler.call(File.read("template.handlebars"))
37
+ Barber::InlinePrecompiler.call(File.read("template.handlebars"))
38
38
  # Note the missing semicolon. You can use this with gsub to replace
39
39
  # calls to inline templates
40
40
  # "Handlebars.template(function(...))"
@@ -16,11 +16,11 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Barber::VERSION
17
17
 
18
18
  gem.add_dependency "execjs"
19
- gem.add_dependency "handlebars-source"
19
+ gem.add_dependency "handlebars-source", [">= 1.0.0.rc.4"]
20
20
  gem.add_dependency "ember-source"
21
21
 
22
22
  gem.add_development_dependency "rake"
23
23
  gem.add_development_dependency "simplecov"
24
- gem.add_development_dependency "mocha"
24
+ gem.add_development_dependency "mocha", "~> 1.0"
25
25
  gem.add_development_dependency "appraisal"
26
26
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "therubyrhino", :platform => :jruby
6
+ gem "ember-source", "1.7.0"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ barber (0.4.2)
5
+ ember-source
6
+ execjs
7
+ handlebars-source (>= 1.0.0.rc.4)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ appraisal (1.0.2)
13
+ bundler
14
+ rake
15
+ thor (>= 0.14.0)
16
+ docile (1.1.5)
17
+ ember-source (1.7.0)
18
+ handlebars-source (~> 1.0)
19
+ execjs (2.2.2)
20
+ handlebars-source (1.3.0)
21
+ metaclass (0.0.4)
22
+ mocha (1.0.0)
23
+ metaclass (~> 0.0.1)
24
+ multi_json (1.10.1)
25
+ rake (10.3.2)
26
+ simplecov (0.9.1)
27
+ docile (~> 1.1.0)
28
+ multi_json (~> 1.0)
29
+ simplecov-html (~> 0.8.0)
30
+ simplecov-html (0.8.0)
31
+ thor (0.19.1)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ appraisal
38
+ barber!
39
+ ember-source (= 1.7.0)
40
+ mocha (~> 1.0.0)
41
+ rake
42
+ simplecov
43
+ therubyrhino
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "therubyrhino", :platform => :jruby
6
+ gem "ember-source", "~> 1.9.0.alpha.2"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ barber (0.4.2)
5
+ ember-source
6
+ execjs
7
+ handlebars-source (>= 1.0.0.rc.4)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ appraisal (1.0.2)
13
+ bundler
14
+ rake
15
+ thor (>= 0.14.0)
16
+ docile (1.1.5)
17
+ ember-source (1.9.0.alpha.2)
18
+ handlebars-source (~> 2.0)
19
+ execjs (2.2.2)
20
+ handlebars-source (2.0.0)
21
+ metaclass (0.0.4)
22
+ mocha (1.0.0)
23
+ metaclass (~> 0.0.1)
24
+ multi_json (1.10.1)
25
+ rake (10.3.2)
26
+ simplecov (0.9.1)
27
+ docile (~> 1.1.0)
28
+ multi_json (~> 1.0)
29
+ simplecov-html (~> 0.8.0)
30
+ simplecov-html (0.8.0)
31
+ thor (0.19.1)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ appraisal
38
+ barber!
39
+ ember-source (~> 1.9.0.alpha.2)
40
+ mocha (~> 1.0.0)
41
+ rake
42
+ simplecov
43
+ therubyrhino
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "therubyrhino", :platform => :jruby
6
+ gem "ember-source", "1.0.0.rc4"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ barber (0.4.2)
5
+ ember-source
6
+ execjs
7
+ handlebars-source (>= 1.0.0.rc.4)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ appraisal (1.0.2)
13
+ bundler
14
+ rake
15
+ thor (>= 0.14.0)
16
+ docile (1.1.5)
17
+ ember-source (1.0.0.rc4)
18
+ handlebars-source (= 1.0.0.rc4)
19
+ execjs (2.2.2)
20
+ handlebars-source (1.0.0.rc4)
21
+ metaclass (0.0.4)
22
+ mocha (1.0.0)
23
+ metaclass (~> 0.0.1)
24
+ multi_json (1.10.1)
25
+ rake (10.3.2)
26
+ simplecov (0.9.1)
27
+ docile (~> 1.1.0)
28
+ multi_json (~> 1.0)
29
+ simplecov-html (~> 0.8.0)
30
+ simplecov-html (0.8.0)
31
+ thor (0.19.1)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ appraisal
38
+ barber!
39
+ ember-source (= 1.0.0.rc4)
40
+ mocha (~> 1.0.0)
41
+ rake
42
+ simplecov
43
+ therubyrhino
@@ -1,15 +1,14 @@
1
1
  var exports = this.exports || {};
2
+ var module = this.module || {exports: null};
2
3
 
3
4
  function require() {
4
5
  // ember-template-compiler only requires('handlebars')
5
- return Handlebars;
6
+ return module.exports || Handlebars;
6
7
  }
7
8
 
8
9
  // Precompiler
9
10
  var Barber = {
10
11
  precompile: function(string) {
11
- return exports.precompile(string).toString();
12
+ return exports.precompile(string, false).toString();
12
13
  }
13
14
  };
14
-
15
-
@@ -24,7 +24,7 @@ module Barber
24
24
  end
25
25
 
26
26
  def handlebars
27
- @handlebears ||= File.new(Handlebars::Source.bundled_path)
27
+ @handlebars ||= File.new(Handlebars::Source.bundled_path)
28
28
  end
29
29
 
30
30
  private
@@ -1,3 +1,3 @@
1
1
  module Barber
2
- VERSION = "0.4.2"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -4,7 +4,7 @@ class EmberPrecompilerTest < MiniTest::Unit::TestCase
4
4
  def test_calls_the_ember_handlebars_precompiler
5
5
  result = compile "Hello {{name}}"
6
6
  assert result
7
- assert_match /Ember\.Handlebars/, result
7
+ assert_match /data\.buffer/, result
8
8
  end
9
9
 
10
10
  def test_is_a_precompiler
@@ -6,4 +6,4 @@ require 'barber'
6
6
  require 'minitest/unit'
7
7
  require 'minitest/autorun'
8
8
 
9
- require 'mocha'
9
+ require 'mocha/mini_test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tchak
@@ -9,104 +9,104 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-06 00:00:00.000000000 Z
12
+ date: 2014-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: handlebars-source
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '0'
34
+ version: 1.0.0.rc.4
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '0'
41
+ version: 1.0.0.rc.4
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: ember-source
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: simplecov
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: mocha
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0'
90
+ version: '1.0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '0'
97
+ version: '1.0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: appraisal
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  description: Handlebars precompilation
@@ -117,18 +117,20 @@ executables: []
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - .gitignore
121
- - .travis.yml
120
+ - ".gitignore"
121
+ - ".travis.yml"
122
122
  - Appraisals
123
123
  - Gemfile
124
124
  - LICENSE
125
125
  - README.md
126
126
  - Rakefile
127
127
  - barber.gemspec
128
- - gemfiles/ember_pre4.gemfile
129
- - gemfiles/ember_pre4.gemfile.lock
130
- - gemfiles/ember_rc1.gemfile
131
- - gemfiles/ember_rc1.gemfile.lock
128
+ - gemfiles/ember_1.7.gemfile
129
+ - gemfiles/ember_1.7.gemfile.lock
130
+ - gemfiles/ember_1.9.gemfile
131
+ - gemfiles/ember_1.9.gemfile.lock
132
+ - gemfiles/ember_rc4.gemfile
133
+ - gemfiles/ember_rc4.gemfile.lock
132
134
  - lib/barber.rb
133
135
  - lib/barber/ember/precompiler.rb
134
136
  - lib/barber/ember/precompilers.rb
@@ -151,17 +153,17 @@ require_paths:
151
153
  - lib
152
154
  required_ruby_version: !ruby/object:Gem::Requirement
153
155
  requirements:
154
- - - '>='
156
+ - - ">="
155
157
  - !ruby/object:Gem::Version
156
158
  version: '0'
157
159
  required_rubygems_version: !ruby/object:Gem::Requirement
158
160
  requirements:
159
- - - '>='
161
+ - - ">="
160
162
  - !ruby/object:Gem::Version
161
163
  version: '0'
162
164
  requirements: []
163
165
  rubyforge_project:
164
- rubygems_version: 2.0.3
166
+ rubygems_version: 2.2.2
165
167
  signing_key:
166
168
  specification_version: 4
167
169
  summary: Handlebars precompilation toolkit
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "therubyrhino", :platform=>:jruby
6
- gem "ember-source", "1.0.0.pre4.1"
7
-
8
- gemspec :path=>"../"
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: /Users/machty/code/gits/barber
3
- specs:
4
- barber (0.4.0)
5
- ember-source
6
- execjs
7
- handlebars-source
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- appraisal (0.5.1)
13
- bundler
14
- rake
15
- ember-source (1.0.0.pre4.1)
16
- handlebars-source (>= 1.0.0.rc2)
17
- execjs (1.4.0)
18
- multi_json (~> 1.0)
19
- handlebars-source (1.0.0.rc.3)
20
- metaclass (0.0.1)
21
- mocha (0.13.2)
22
- metaclass (~> 0.0.1)
23
- multi_json (1.6.1)
24
- rake (10.0.3)
25
- simplecov (0.7.1)
26
- multi_json (~> 1.0)
27
- simplecov-html (~> 0.7.1)
28
- simplecov-html (0.7.1)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- appraisal
35
- barber!
36
- ember-source (= 1.0.0.pre4.1)
37
- mocha
38
- rake
39
- simplecov
40
- therubyrhino
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "therubyrhino", :platform=>:jruby
6
- gem "ember-source", "1.0.0.rc1.0"
7
-
8
- gemspec :path=>"../"
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: /Users/machty/code/gits/barber
3
- specs:
4
- barber (0.4.0)
5
- ember-source
6
- execjs
7
- handlebars-source
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- appraisal (0.5.1)
13
- bundler
14
- rake
15
- ember-source (1.0.0.rc1.0)
16
- handlebars-source (= 1.0.0.rc3)
17
- execjs (1.4.0)
18
- multi_json (~> 1.0)
19
- handlebars-source (1.0.0.rc.3)
20
- metaclass (0.0.1)
21
- mocha (0.13.2)
22
- metaclass (~> 0.0.1)
23
- multi_json (1.6.1)
24
- rake (10.0.3)
25
- simplecov (0.7.1)
26
- multi_json (~> 1.0)
27
- simplecov-html (~> 0.7.1)
28
- simplecov-html (0.7.1)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- appraisal
35
- barber!
36
- ember-source (= 1.0.0.rc1.0)
37
- mocha
38
- rake
39
- simplecov
40
- therubyrhino