rasputin 0.11.3 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +36 -34
- data/README.md +7 -3
- data/lib/rasputin/haml.rb +11 -0
- data/lib/rasputin/handlebars/compiler.rb +12 -4
- data/lib/rasputin/version.rb +1 -1
- data/lib/rasputin.rb +2 -1
- data/vendor/assets/javascripts/ember-data.js +1400 -0
- data/vendor/assets/javascripts/ember-precompiler.js +31 -0
- data/vendor/assets/javascripts/ember-routing.js +111 -92
- metadata +13 -12
- data/lib/rasputin/handlebars/handlebars.js +0 -1673
- data/vendor/assets/javascripts/ember-datastore.js +0 -11632
data/Gemfile.lock
CHANGED
@@ -1,64 +1,66 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rasputin (0.
|
5
|
-
actionpack (~> 3.1.0
|
6
|
-
|
7
|
-
|
4
|
+
rasputin (0.11.3)
|
5
|
+
actionpack (~> 3.1.0)
|
6
|
+
jquery-rails (~> 1.0)
|
7
|
+
railties (~> 3.1.0)
|
8
|
+
sprockets (~> 2.0.0)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: http://rubygems.org/
|
11
12
|
specs:
|
12
|
-
actionpack (3.1.
|
13
|
-
activemodel (= 3.1.
|
14
|
-
activesupport (= 3.1.
|
13
|
+
actionpack (3.1.3)
|
14
|
+
activemodel (= 3.1.3)
|
15
|
+
activesupport (= 3.1.3)
|
15
16
|
builder (~> 3.0.0)
|
16
17
|
erubis (~> 2.7.0)
|
17
18
|
i18n (~> 0.6)
|
18
|
-
rack (~> 1.3.
|
19
|
-
rack-cache (~> 1.
|
20
|
-
rack-mount (~> 0.8.
|
21
|
-
rack-test (~> 0.6.
|
22
|
-
sprockets (~> 2.0.
|
23
|
-
|
24
|
-
|
25
|
-
activesupport (= 3.1.0.rc4)
|
26
|
-
bcrypt-ruby (~> 2.1.4)
|
19
|
+
rack (~> 1.3.5)
|
20
|
+
rack-cache (~> 1.1)
|
21
|
+
rack-mount (~> 0.8.2)
|
22
|
+
rack-test (~> 0.6.1)
|
23
|
+
sprockets (~> 2.0.3)
|
24
|
+
activemodel (3.1.3)
|
25
|
+
activesupport (= 3.1.3)
|
27
26
|
builder (~> 3.0.0)
|
28
27
|
i18n (~> 0.6)
|
29
|
-
activesupport (3.1.
|
28
|
+
activesupport (3.1.3)
|
30
29
|
multi_json (~> 1.0)
|
31
|
-
bcrypt-ruby (2.1.4)
|
32
30
|
builder (3.0.0)
|
33
31
|
erubis (2.7.0)
|
34
|
-
hike (1.1
|
32
|
+
hike (1.2.1)
|
35
33
|
i18n (0.6.0)
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
jquery-rails (1.0.19)
|
35
|
+
railties (~> 3.0)
|
36
|
+
thor (~> 0.14)
|
37
|
+
json (1.6.3)
|
38
|
+
multi_json (1.0.4)
|
39
|
+
rack (1.3.5)
|
40
|
+
rack-cache (1.1)
|
39
41
|
rack (>= 0.4)
|
40
|
-
rack-mount (0.8.
|
42
|
+
rack-mount (0.8.3)
|
41
43
|
rack (>= 1.0.0)
|
42
44
|
rack-ssl (1.3.2)
|
43
45
|
rack
|
44
|
-
rack-test (0.6.
|
46
|
+
rack-test (0.6.1)
|
45
47
|
rack (>= 1.0)
|
46
|
-
railties (3.1.
|
47
|
-
actionpack (= 3.1.
|
48
|
-
activesupport (= 3.1.
|
48
|
+
railties (3.1.3)
|
49
|
+
actionpack (= 3.1.3)
|
50
|
+
activesupport (= 3.1.3)
|
49
51
|
rack-ssl (~> 1.3.2)
|
50
52
|
rake (>= 0.8.7)
|
51
53
|
rdoc (~> 3.4)
|
52
54
|
thor (~> 0.14.6)
|
53
|
-
rake (0.9.2)
|
54
|
-
rdoc (3.
|
55
|
-
|
56
|
-
|
55
|
+
rake (0.9.2.2)
|
56
|
+
rdoc (3.11)
|
57
|
+
json (~> 1.4)
|
58
|
+
sprockets (2.0.3)
|
59
|
+
hike (~> 1.2)
|
57
60
|
rack (~> 1.0)
|
58
|
-
tilt (
|
61
|
+
tilt (~> 1.1, != 1.3.0)
|
59
62
|
thor (0.14.6)
|
60
|
-
tilt (1.3.
|
61
|
-
tzinfo (0.3.29)
|
63
|
+
tilt (1.3.3)
|
62
64
|
|
63
65
|
PLATFORMS
|
64
66
|
ruby
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ It provide direct requires for official ember packages :
|
|
7
7
|
|
8
8
|
* ember
|
9
9
|
* ember-datetime
|
10
|
-
* ember-
|
10
|
+
* ember-data
|
11
11
|
* ember-touch
|
12
12
|
* ember-routing
|
13
13
|
|
@@ -37,7 +37,7 @@ If you do not want this behavior you can tourn it off in your rails configuratio
|
|
37
37
|
|
38
38
|
config.rasputin.precompile_handlebars = false
|
39
39
|
|
40
|
-
If you use Slim templates, you can use handlebars filter :
|
40
|
+
If you use Slim of Haml templates, you can use handlebars filter :
|
41
41
|
|
42
42
|
handlebars:
|
43
43
|
{{view Ember.Button}}OK{{/view}}
|
@@ -63,7 +63,7 @@ In your javascript asset manifest (app/assets/javascripts/application.js) add th
|
|
63
63
|
And any of the following you want to include:
|
64
64
|
|
65
65
|
//= require ember-datetime
|
66
|
-
//= require ember-
|
66
|
+
//= require ember-data
|
67
67
|
//= require ember-touch
|
68
68
|
//= require ember-routing
|
69
69
|
//= require ember-i18n
|
@@ -77,6 +77,10 @@ In your stylesheet asset manifest (app/assets/stylesheets/application.css) add t
|
|
77
77
|
ChangeLog
|
78
78
|
----------
|
79
79
|
|
80
|
+
0.12.0
|
81
|
+
|
82
|
+
* replace ember-datastore with ember-data
|
83
|
+
|
80
84
|
0.11.3
|
81
85
|
|
82
86
|
* update Ember.js to 0.9.3 and clean up ember-datastore
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Haml
|
2
|
+
module Filters
|
3
|
+
module Handlebars
|
4
|
+
include Base
|
5
|
+
def render_with_options(text, options)
|
6
|
+
type = "type=#{options[:attr_wrapper]}text/x-handlebars#{options[:attr_wrapper]}"
|
7
|
+
"<script #{type}>\n#{text.rstrip}\n</script>"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -4,12 +4,20 @@ module Rasputin
|
|
4
4
|
module Handlebars
|
5
5
|
module Source
|
6
6
|
|
7
|
+
def self.precompiler_path
|
8
|
+
assets_path("ember-precompiler.js")
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.assets_path(name)
|
12
|
+
File.expand_path(File.join(__FILE__, "..", "..", "..", "..", "vendor/assets/javascripts/#{name}"))
|
13
|
+
end
|
14
|
+
|
7
15
|
def self.bundled_path
|
8
|
-
|
16
|
+
assets_path("ember.js")
|
9
17
|
end
|
10
18
|
|
11
19
|
def self.path
|
12
|
-
@path ||= ENV["
|
20
|
+
@path ||= ENV["EMBER_SOURCE_PATH"] || bundled_path
|
13
21
|
end
|
14
22
|
|
15
23
|
def self.path=(path)
|
@@ -18,7 +26,7 @@ module Rasputin
|
|
18
26
|
end
|
19
27
|
|
20
28
|
def self.contents
|
21
|
-
@contents ||= File.read(path)
|
29
|
+
@contents ||= [File.read(precompiler_path), File.read(path)].join("\n")
|
22
30
|
end
|
23
31
|
|
24
32
|
def self.version
|
@@ -37,7 +45,7 @@ module Rasputin
|
|
37
45
|
|
38
46
|
def compile(template)
|
39
47
|
template = template.read if template.respond_to?(:read)
|
40
|
-
Source.context.call("
|
48
|
+
Source.context.call("EmberHandlebars.precompile", template)
|
41
49
|
end
|
42
50
|
end
|
43
51
|
end
|
data/lib/rasputin/version.rb
CHANGED
data/lib/rasputin.rb
CHANGED
@@ -6,11 +6,12 @@ require "rasputin/handlebars/compiler"
|
|
6
6
|
require "rasputin/handlebars/template"
|
7
7
|
|
8
8
|
require "rasputin/slim" if defined? Slim
|
9
|
+
require "rasputin/haml" if defined? Haml
|
9
10
|
|
10
11
|
module Rasputin
|
11
12
|
class Engine < ::Rails::Engine
|
12
13
|
config.rasputin = ActiveSupport::OrderedOptions.new
|
13
|
-
config.rasputin.precompile_handlebars =
|
14
|
+
config.rasputin.precompile_handlebars = Rails.env.production?
|
14
15
|
config.rasputin.template_name_separator = '/'
|
15
16
|
|
16
17
|
initializer :setup_rasputin do |app|
|