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
0 parents
commit e8af9b9
Showing
38 changed files
with
767 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,16 @@ | ||
*.log | ||
.DS_Store | ||
doc | ||
tmp | ||
pkg | ||
*.gem | ||
*.pid | ||
coverage | ||
coverage.data | ||
build/* | ||
*.pbxuser | ||
*.mode1v3 | ||
.svn | ||
profile | ||
.console_history | ||
.sass-cache/* |
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 @@ | ||
rvm use ruby-1.9.2@coffeescript_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,9 @@ | ||
source 'http://rubygems.org' | ||
|
||
gem 'rake' | ||
gem 'rails' | ||
gem "rspec-rails", "2.6.0" | ||
gem 'gemstub', ">= 2.0.0" | ||
gem 'coffee-script' | ||
gem 'sqlite3' | ||
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git' |
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,134 @@ | ||
GIT | ||
remote: git://github.com/jnicklas/capybara.git | ||
revision: 4c3ce57430a1b07e534450dca8a2e551b5363539 | ||
specs: | ||
capybara (1.0.0.beta1) | ||
mime-types (>= 1.16) | ||
nokogiri (>= 1.3.3) | ||
rack (>= 1.0.0) | ||
rack-test (>= 0.5.4) | ||
selenium-webdriver (~> 0.2.0) | ||
xpath (~> 0.1.4) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
abstract (1.0.0) | ||
actionmailer (3.0.7) | ||
actionpack (= 3.0.7) | ||
mail (~> 2.2.15) | ||
actionpack (3.0.7) | ||
activemodel (= 3.0.7) | ||
activesupport (= 3.0.7) | ||
builder (~> 2.1.2) | ||
erubis (~> 2.6.6) | ||
i18n (~> 0.5.0) | ||
rack (~> 1.2.1) | ||
rack-mount (~> 0.6.14) | ||
rack-test (~> 0.5.7) | ||
tzinfo (~> 0.3.23) | ||
activemodel (3.0.7) | ||
activesupport (= 3.0.7) | ||
builder (~> 2.1.2) | ||
i18n (~> 0.5.0) | ||
activerecord (3.0.7) | ||
activemodel (= 3.0.7) | ||
activesupport (= 3.0.7) | ||
arel (~> 2.0.2) | ||
tzinfo (~> 0.3.23) | ||
activeresource (3.0.7) | ||
activemodel (= 3.0.7) | ||
activesupport (= 3.0.7) | ||
activesupport (3.0.7) | ||
arel (2.0.10) | ||
builder (2.1.2) | ||
childprocess (0.1.9) | ||
ffi (~> 1.0.6) | ||
coffee-script (2.2.0) | ||
coffee-script-source | ||
execjs | ||
coffee-script-source (1.1.0) | ||
diff-lcs (1.1.2) | ||
erubis (2.6.6) | ||
abstract (>= 1.0.0) | ||
execjs (1.0.0) | ||
multi_json (~> 1.0) | ||
ffi (1.0.8) | ||
gemstub (2.0.3) | ||
activesupport (>= 3.0.0) | ||
genosaurus | ||
mark_facets | ||
rspec (>= 2.0.0) | ||
genosaurus (1.2.4) | ||
erubis | ||
hashie (1.0.0) | ||
i18n (0.5.0) | ||
json_pure (1.5.1) | ||
mail (2.2.19) | ||
activesupport (>= 2.3.6) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mark_facets (0.2.0) | ||
hashie | ||
mime-types (1.16) | ||
multi_json (1.0.2) | ||
nokogiri (1.4.4) | ||
polyglot (0.3.1) | ||
rack (1.2.2) | ||
rack-mount (0.6.14) | ||
rack (>= 1.0.0) | ||
rack-test (0.5.7) | ||
rack (>= 1.0) | ||
rails (3.0.7) | ||
actionmailer (= 3.0.7) | ||
actionpack (= 3.0.7) | ||
activerecord (= 3.0.7) | ||
activeresource (= 3.0.7) | ||
activesupport (= 3.0.7) | ||
bundler (~> 1.0) | ||
railties (= 3.0.7) | ||
railties (3.0.7) | ||
actionpack (= 3.0.7) | ||
activesupport (= 3.0.7) | ||
rake (>= 0.8.7) | ||
thor (~> 0.14.4) | ||
rake (0.8.7) | ||
rspec (2.6.0) | ||
rspec-core (~> 2.6.0) | ||
rspec-expectations (~> 2.6.0) | ||
rspec-mocks (~> 2.6.0) | ||
rspec-core (2.6.0) | ||
rspec-expectations (2.6.0) | ||
diff-lcs (~> 1.1.2) | ||
rspec-mocks (2.6.0) | ||
rspec-rails (2.6.0) | ||
actionpack (~> 3.0) | ||
activesupport (~> 3.0) | ||
railties (~> 3.0) | ||
rspec (~> 2.6.0) | ||
rubyzip (0.9.4) | ||
selenium-webdriver (0.2.0) | ||
childprocess (>= 0.1.7) | ||
ffi (>= 1.0.7) | ||
json_pure | ||
rubyzip | ||
sqlite3 (1.3.3) | ||
thor (0.14.6) | ||
treetop (1.4.9) | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.27) | ||
xpath (0.1.4) | ||
nokogiri (~> 1.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
capybara! | ||
coffee-script | ||
gemstub (>= 2.0.0) | ||
rails | ||
rake | ||
rspec-rails (= 2.6.0) | ||
sqlite3 |
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,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2011 markbates | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,3 @@ | ||
README | ||
======================================================================== | ||
coffeescript_rails was developed by: markbates |
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,30 @@ | ||
require 'rubygems' | ||
|
||
# Set up gems listed in the Gemfile. | ||
gemfile = File.expand_path('../Gemfile', __FILE__) | ||
begin | ||
ENV['BUNDLE_GEMFILE'] = gemfile | ||
require 'bundler' | ||
Bundler.setup | ||
rescue Bundler::GemNotFound => e | ||
STDERR.puts e.message | ||
STDERR.puts "Try running `bundle install`." | ||
exit! | ||
end if File.exist?(gemfile) | ||
|
||
Bundler.require | ||
|
||
Gemstub.test_framework = :rspec | ||
|
||
Gemstub.gem_spec do |s| | ||
s.version = '1.0.0' | ||
# s.rubyforge_project = 'coffeescript_rails' | ||
s.add_dependency('coffee-script') | ||
s.add_dependency('actionpack', '>= 3.0.0') | ||
s.email = 'mark+github@markbates.com' | ||
# s.homepage = '' | ||
end | ||
|
||
Gemstub.rdoc do |rd| | ||
rd.title = 'coffeebeans' | ||
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,33 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{coffeebeans} | ||
s.version = "1.0.0.20110519132850" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = [%q{markbates}] | ||
s.date = %q{2011-05-19} | ||
s.description = %q{coffeebeans was developed by: markbates} | ||
s.email = %q{mark+github@markbates.com} | ||
s.extra_rdoc_files = [%q{LICENSE}] | ||
s.files = [%q{lib/coffeebeans.rb}, %q{LICENSE}] | ||
s.homepage = %q{} | ||
s.require_paths = [%q{lib}] | ||
s.rubygems_version = %q{1.8.2} | ||
s.summary = %q{coffeebeans} | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<coffee-script>, [">= 0"]) | ||
s.add_runtime_dependency(%q<actionpack>, [">= 3.0.0"]) | ||
else | ||
s.add_dependency(%q<coffee-script>, [">= 0"]) | ||
s.add_dependency(%q<actionpack>, [">= 3.0.0"]) | ||
end | ||
else | ||
s.add_dependency(%q<coffee-script>, [">= 0"]) | ||
s.add_dependency(%q<actionpack>, [">= 3.0.0"]) | ||
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,32 @@ | ||
require 'coffee-script' | ||
|
||
module CoffeeBeans | ||
module Handlers | ||
module CoffeeScript | ||
def self.erb_handler | ||
@@erb_handler ||= ActionView::Template.registered_template_handler(:erb) | ||
end | ||
|
||
def self.call(template) | ||
compiled_source = erb_handler.call(template) | ||
"::CoffeeScript.compile(begin;#{compiled_source};end)" | ||
end | ||
end | ||
end | ||
|
||
module ViewHelpers | ||
|
||
def coffee_script_tag(&block) | ||
content_tag(:script, coffee_script(&block), :type => 'text/javascript') | ||
end | ||
|
||
def coffee_script(&block) | ||
::CoffeeScript.compile(capture(&block)) | ||
end | ||
|
||
end | ||
|
||
end | ||
|
||
ActionView::Template.register_template_handler :coffee, CoffeeBeans::Handlers::CoffeeScript | ||
ActionView::Base.send :include, CoffeeBeans::ViewHelpers |
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 @@ | ||
.bundle | ||
db/*.sqlite3 | ||
log/*.log | ||
tmp/ |
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,32 @@ | ||
source 'http://rubygems.org' | ||
|
||
gem 'rails', '3.0.7' | ||
|
||
gem 'coffeescript_rails', :path => '~/gemdev/coffeescript_rails' | ||
|
||
# Bundle edge Rails instead: | ||
# gem 'rails', :git => 'git://github.com/rails/rails.git' | ||
|
||
|
||
# Use unicorn as the web server | ||
# gem 'unicorn' | ||
|
||
# Deploy with Capistrano | ||
# gem 'capistrano' | ||
|
||
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) | ||
# gem 'ruby-debug' | ||
# gem 'ruby-debug19', :require => 'ruby-debug' | ||
|
||
# Bundle the extra gems: | ||
# gem 'bj' | ||
# gem 'nokogiri' | ||
# gem 'sqlite3-ruby', :require => 'sqlite3' | ||
# gem 'aws-s3', :require => 'aws/s3' | ||
|
||
# Bundle gems for the local environment. Make sure to | ||
# put test-only gems in this group so their generators | ||
# and rake tasks are available in development mode: | ||
# group :development, :test do | ||
# gem 'webrat' | ||
# end |
Oops, something went wrong.