-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hoseong Hwang
committed
Dec 19, 2011
0 parents
commit e8710f3
Showing
15 changed files
with
7,213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "http://rubygems.org" | ||
|
||
# Specify your gem's dependencies in dust-rails.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
dust-rails (0.0.1) | ||
execjs | ||
rails (~> 3.1.0) | ||
tilt | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
actionmailer (3.1.3) | ||
actionpack (= 3.1.3) | ||
mail (~> 2.3.0) | ||
actionpack (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
builder (~> 3.0.0) | ||
erubis (~> 2.7.0) | ||
i18n (~> 0.6) | ||
rack (~> 1.3.5) | ||
rack-cache (~> 1.1) | ||
rack-mount (~> 0.8.2) | ||
rack-test (~> 0.6.1) | ||
sprockets (~> 2.0.3) | ||
activemodel (3.1.3) | ||
activesupport (= 3.1.3) | ||
builder (~> 3.0.0) | ||
i18n (~> 0.6) | ||
activerecord (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
arel (~> 2.2.1) | ||
tzinfo (~> 0.3.29) | ||
activeresource (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
activesupport (3.1.3) | ||
multi_json (~> 1.0) | ||
arel (2.2.1) | ||
builder (3.0.0) | ||
erubis (2.7.0) | ||
execjs (1.2.12) | ||
multi_json (~> 1.0) | ||
hike (1.2.1) | ||
i18n (0.6.0) | ||
json (1.6.3) | ||
mail (2.3.0) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.17.2) | ||
multi_json (1.0.4) | ||
polyglot (0.3.3) | ||
rack (1.3.5) | ||
rack-cache (1.1) | ||
rack (>= 0.4) | ||
rack-mount (0.8.3) | ||
rack (>= 1.0.0) | ||
rack-ssl (1.3.2) | ||
rack | ||
rack-test (0.6.1) | ||
rack (>= 1.0) | ||
rails (3.1.3) | ||
actionmailer (= 3.1.3) | ||
actionpack (= 3.1.3) | ||
activerecord (= 3.1.3) | ||
activeresource (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
bundler (~> 1.0) | ||
railties (= 3.1.3) | ||
railties (3.1.3) | ||
actionpack (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
rack-ssl (~> 1.3.2) | ||
rake (>= 0.8.7) | ||
rdoc (~> 3.4) | ||
thor (~> 0.14.6) | ||
rake (0.9.2.2) | ||
rdoc (3.12) | ||
json (~> 1.4) | ||
sprockets (2.0.3) | ||
hike (~> 1.2) | ||
rack (~> 1.0) | ||
tilt (!= 1.3.0, ~> 1.1) | ||
thor (0.14.6) | ||
tilt (1.3.3) | ||
treetop (1.4.10) | ||
polyglot | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.31) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
dust-rails! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'bundler/gem_tasks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "dust-rails/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "dust-rails" | ||
s.version = Dust::Rails::VERSION | ||
s.authors = ["Hoseong Hwang"] | ||
s.email = ["thefron@wafflestudio.com"] | ||
s.homepage = "https://github.com/thefron/dust-rails" | ||
s.summary = %q{Use dust.js with rails} | ||
s.description = %q{This gem makes you dust.js easy to use with rails.} | ||
|
||
s.rubyforge_project = "dust-rails" | ||
|
||
s.add_dependency('rails', '~> 3.1.0') | ||
s.add_dependency('tilt') | ||
s.add_dependency('execjs') | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require "dust-rails/version" | ||
require "dust-rails/rails/engine.rb" | ||
require "dust-rails/rails/dust_template.rb" | ||
|
||
module Dust | ||
module Rails | ||
# Your code goes here... | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require 'tilt' | ||
|
||
module Dust | ||
module Rails | ||
|
||
module Source | ||
def self.path | ||
@path ||= File.expand_path('../../../../vendor/assets/javascripts/dust-full-for-compile.js', __FILE__) | ||
end | ||
|
||
def self.contents | ||
@contents ||= File.read(path) | ||
end | ||
|
||
def self.context | ||
@context ||= ExecJS.compile(contents) | ||
end | ||
|
||
end | ||
|
||
class DustTemplate < ::Tilt::Template | ||
|
||
def self.default_mime_type | ||
'application/javascript' | ||
end | ||
|
||
def prepare | ||
end | ||
|
||
def evaluate(scope, locals, &block) | ||
<<-TMPL | ||
#{Source.context.call("dust.compile", data, basename('.js.dust'))} | ||
TMPL | ||
end | ||
end | ||
end | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'rails/engine' | ||
|
||
module Dust | ||
module Rails | ||
class Engine < ::Rails::Engine | ||
initializer :register_dustjs do |app| | ||
app.assets.register_engine '.dust', DustTemplate | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Dust | ||
module Rails | ||
VERSION = "0.1.0" | ||
end | ||
end |
Binary file not shown.
Oops, something went wrong.