Permalink
Browse files

Add support for coffeescript and backbonejs to the project.

  • Loading branch information...
1 parent aa107c6 commit 5febe260d4e9a6b26dce2535e00865d5eabff2f6 @marioaquino marioaquino committed Apr 29, 2012
View
@@ -31,6 +31,11 @@ gem 'faraday_middleware','0.6.3'
gem 'rbx-require-relative','0.0.5'
+gem 'execjs', '1.3.0'
+gem 'barista', '1.2.1'
+gem 'json_pure', '~> 1.5.1'
+gem 'backbonejs-rails', '~> 0.0.6'
+
group :development, :test do
gem 'mongrel', '~> 1.2.0.pre2'
gem 'sqlite3-ruby', '~> 1.3.2', :require => 'sqlite3'
@@ -77,7 +82,6 @@ group :development, :test do
gem 'gherkin'
gem 'spork', '>= 0.9.0.rc4' unless Bundler::WINDOWS
gem 'rack-test', '~> 0.5.6'
- gem 'json_pure', '~> 1.5.1'
# Factory Girl
#gem 'factory_girl'
gem "#{'j' if RUBY_PLATFORM == 'java'}ruby-prof" unless defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx'
View
@@ -105,6 +105,11 @@ GEM
autotest-standalone (4.5.9)
awesome_print (0.4.0)
babosa (0.3.6)
+ backbonejs-rails (0.0.6)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ barista (1.2.1)
+ coffee-script (~> 2.2)
bcrypt-ruby (2.1.4)
builder (2.1.2)
capybara (1.1.2)
@@ -118,6 +123,10 @@ GEM
childprocess (0.3.1)
ffi (~> 1.0.6)
client_side_validations (3.0.12)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.1)
columnize (0.3.6)
configuration (1.3.1)
crack (0.1.8)
@@ -143,6 +152,8 @@ GEM
rack
erubis (2.6.6)
abstract (>= 1.0.0)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
@@ -315,13 +326,16 @@ DEPENDENCIES
autotest-notification (= 2.3.3)
autotest-rails (= 4.1.0)
awesome_print (~> 0.4.0)
+ backbonejs-rails (~> 0.0.6)
+ barista (= 1.2.1)
capybara (~> 1.1.2)
carmen (= 0.2.4)
client_side_validations (~> 3.0.4)
cucumber-rails (~> 1.0.2)
database_cleaner (~> 0.6.0)
decent_exposure (~> 1.0)
dragonfly (= 0.8.2)
+ execjs (= 1.3.0)
factory_girl_rails (~> 1.0.1)
faraday_middleware (= 0.6.3)
fastercsv (= 1.5.4)
@@ -0,0 +1,3 @@
+$(document).ready ->
+ alert 'Howdy!'
+
View
@@ -3,6 +3,9 @@ embed_assets: on
javascripts:
workspace:
- public/javascripts/application.js
+ - public/javascripts/json2.js
+ - public/javascripts/underscore.min.js
+ - public/javascripts/backbone.min.js
- public/javascripts/jquery.validate.pack.js
- public/javascripts/cycle/jquery.cycle.all.latest.js
- public/javascripts/superfish/js/*.js
@@ -0,0 +1 @@
+ActiveRecord::Base.include_root_in_json = false
@@ -0,0 +1,62 @@
+# Configure barista.
+Barista.configure do |c|
+
+ # Change the root to use app/scripts
+ # c.root = Rails.root.join("app", "scripts")
+
+ # Change the output root, causing Barista to compile into public/coffeescripts
+ # c.output_root = Rails.root.join("public", "coffeescripts")
+
+ # Disable auto compile, use generated file directly:
+ # c.auto_compile = false
+
+ # Add a new framework:
+
+ # c.register :tests, :root => Rails.root.join('test', 'coffeescript'), :output_prefix => 'test'
+
+ # Disable wrapping in a closure:
+ # c.bare = true
+ # ... or ...
+ # c.bare!
+
+ # Change the output root for a framework:
+
+ # c.change_output_prefix! 'framework-name', 'output-prefix'
+
+ # or for all frameworks...
+
+ # c.each_framework do |framework|
+ # c.change_output_prefix! framework, "vendor/#{framework.name}"
+ # end
+
+ # or, prefix the path for the app files:
+
+ # c.change_output_prefix! :default, 'my-app-name'
+
+ # or, change the directory the framework goes into full stop:
+
+ # c.change_output_prefix! :tests, Rails.root.join('spec', 'javascripts')
+
+ # or, hook into the compilation:
+
+ # c.before_compilation { |path| puts "Barista: Compiling #{path}" }
+ # c.on_compilation { |path| puts "Barista: Successfully compiled #{path}" }
+ # c.on_compilation_error { |path, output| puts "Barista: Compilation of #{path} failed with:\n#{output}" }
+ # c.on_compilation_with_warning { |path, output| puts "Barista: Compilation of #{path} had a warning:\n#{output}" }
+
+ # Turn off preambles and exceptions on failure:
+
+ # c.verbose = false
+
+ # Or, make sure it is always on
+ # c.verbose!
+
+ # If you want to use a custom JS file, you can as well
+ # e.g. vendoring CoffeeScript in your application:
+ # c.js_path = Rails.root.join('public', 'javascripts', 'coffee-script.js')
+
+ # Make helpers and the HAML filter output coffee-script instead of the compiled JS.
+ # Used in combination with the coffeescript_interpreter_js helper in Rails.
+ # c.embedded_interpreter = false
+
+end
Oops, something went wrong.

0 comments on commit 5febe26

Please sign in to comment.