Permalink
Browse files

Initial Commit. v1.0

  • Loading branch information...
0 parents commit e8af9b9847dd977cd2b90cadffec1b4ad3a1ef42 @markbates committed May 19, 2011
Showing with 767 additions and 0 deletions.
  1. +16 −0 .gitignore
  2. +1 −0 .rvmrc
  3. +9 −0 Gemfile
  4. +134 −0 Gemfile.lock
  5. +21 −0 LICENSE
  6. +3 −0 README.textile
  7. +30 −0 Rakefile
  8. +33 −0 coffeebeans.gemspec
  9. +32 −0 lib/coffeebeans.rb
  10. +4 −0 spec/dummy/.gitignore
  11. +32 −0 spec/dummy/Gemfile
  12. +86 −0 spec/dummy/Gemfile.lock
  13. +3 −0 spec/dummy/app/controllers/application_controller.rb
  14. +8 −0 spec/dummy/app/controllers/drinks_controller.rb
  15. +2 −0 spec/dummy/app/helpers/application_helper.rb
  16. +9 −0 spec/dummy/app/views/drinks/index.html.erb
  17. +1 −0 spec/dummy/app/views/drinks/index.js.coffee
  18. +1 −0 spec/dummy/app/views/layouts/application.html.erb
  19. +4 −0 spec/dummy/config.ru
  20. +47 −0 spec/dummy/config/application.rb
  21. +6 −0 spec/dummy/config/boot.rb
  22. +5 −0 spec/dummy/config/environment.rb
  23. +26 −0 spec/dummy/config/environments/development.rb
  24. +49 −0 spec/dummy/config/environments/production.rb
  25. +35 −0 spec/dummy/config/environments/test.rb
  26. +7 −0 spec/dummy/config/initializers/backtrace_silencers.rb
  27. +10 −0 spec/dummy/config/initializers/inflections.rb
  28. +5 −0 spec/dummy/config/initializers/mime_types.rb
  29. +7 −0 spec/dummy/config/initializers/secret_token.rb
  30. +8 −0 spec/dummy/config/initializers/session_store.rb
  31. +5 −0 spec/dummy/config/locales/en.yml
  32. +59 −0 spec/dummy/config/routes.rb
  33. +7 −0 spec/dummy/db/seeds.rb
  34. 0 spec/dummy/lib/tasks/.gitkeep
  35. +6 −0 spec/dummy/script/rails
  36. 0 spec/dummy/vendor/plugins/.gitkeep
  37. +18 −0 spec/request/coffee_script_spec.rb
  38. +38 −0 spec/spec_helper.rb
@@ -0,0 +1,16 @@
+*.log
+.DS_Store
+doc
+tmp
+pkg
+*.gem
+*.pid
+coverage
+coverage.data
+build/*
+*.pbxuser
+*.mode1v3
+.svn
+profile
+.console_history
+.sass-cache/*
@@ -0,0 +1 @@
+rvm use ruby-1.9.2@coffeescript_rails
@@ -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'
@@ -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
@@ -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.
@@ -0,0 +1,3 @@
+README
+========================================================================
+coffeescript_rails was developed by: markbates
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,4 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
@@ -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.

0 comments on commit e8af9b9

Please sign in to comment.