Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bundle/gem/rails setup, rake spec works.

  • Loading branch information...
commit 2d5e1bc155176b84b9bd53f7d2b4f8b9a7579171 1 parent 8208fe6
@dblock dblock authored
View
13 Gemfile
@@ -3,7 +3,12 @@ source "http://rubygems.org"
gem 'coffee-script', '~> 2.2'
group :development, :test do
- gem 'jeweler', '~> 1.0'
- gem 'rspec', '~> 2.1'
- gem 'rr', '~> 1.0'
-end
+ gem 'rails', '~> 3.0'
+ gem 'jeweler', '~> 1.0'
+ gem 'rspec', '~> 2.6'
+ gem 'rspec-rails', '~> 2.6'
+ gem 'rspec-core', '~> 2.6'
+ gem 'rdoc', '~> 2.4'
+ gem 'rr', '~> 1.0'
+ gem 'ruby-debug19', '~> 0.11'
+end
View
88 Gemfile.lock
@@ -1,20 +1,82 @@
GEM
remote: http://rubygems.org/
specs:
+ abstract (1.0.0)
+ actionmailer (3.0.8)
+ actionpack (= 3.0.8)
+ mail (~> 2.2.19)
+ actionpack (3.0.8)
+ activemodel (= 3.0.8)
+ activesupport (= 3.0.8)
+ 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.8)
+ activesupport (= 3.0.8)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.8)
+ activemodel (= 3.0.8)
+ activesupport (= 3.0.8)
+ arel (~> 2.0.10)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.8)
+ activemodel (= 3.0.8)
+ activesupport (= 3.0.8)
+ activesupport (3.0.8)
+ archive-tar-minitar (0.5.2)
+ arel (2.0.10)
+ builder (2.1.2)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.1)
+ columnize (0.3.4)
diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
execjs (1.1.0)
multi_json (~> 1.0)
git (1.2.5)
+ i18n (0.5.0)
jeweler (1.6.2)
bundler (~> 1.0)
git (>= 1.2.5)
rake
+ linecache19 (0.5.12)
+ ruby_core_source (>= 0.1.4)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
multi_json (1.0.3)
+ polyglot (0.3.1)
+ rack (1.2.3)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.8)
+ actionmailer (= 3.0.8)
+ actionpack (= 3.0.8)
+ activerecord (= 3.0.8)
+ activeresource (= 3.0.8)
+ activesupport (= 3.0.8)
+ bundler (~> 1.0)
+ railties (= 3.0.8)
+ railties (3.0.8)
+ actionpack (= 3.0.8)
+ activesupport (= 3.0.8)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
rake (0.9.1)
+ rdoc (2.5.11)
rr (1.0.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
@@ -24,6 +86,25 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
+ ruby-debug-base19 (0.11.25)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.5)
+ archive-tar-minitar (>= 0.5.2)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.29)
PLATFORMS
ruby
@@ -31,5 +112,10 @@ PLATFORMS
DEPENDENCIES
coffee-script (~> 2.2)
jeweler (~> 1.0)
+ rails (~> 3.0)
+ rdoc (~> 2.4)
rr (~> 1.0)
- rspec (~> 2.1)
+ rspec (~> 2.6)
+ rspec-core (~> 2.6)
+ rspec-rails (~> 2.6)
+ ruby-debug19 (~> 0.11)
View
51 Rakefile
@@ -1,29 +1,46 @@
require 'rubygems'
+require 'bundler'
+
+begin
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems."
+ exit e.status_code
+end
+
require 'rake'
+require 'rspec/core/rake_task'
-require 'lib/barista/version'
+require 'barista/version'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "barista"
- gem.summary = %Q{Simple, transparent coffeescript integration for Rails and Rack applications.}
- gem.description = File.read(File.expand_path('DESCRIPTION', File.dirname(__FILE__)))
- gem.email = "sutto@sutto.net"
- gem.homepage = "http://github.com/Sutto/barista"
- gem.version = Barista::Version::STRING
- gem.authors = ["Darcy Laycock"]
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ gem.name = "barista"
+ gem.summary = %Q{Simple, transparent coffeescript integration for Rails and Rack applications.}
+ gem.description = File.read(File.expand_path('DESCRIPTION', File.dirname(__FILE__)))
+ gem.email = "sutto@sutto.net"
+ gem.homepage = "http://github.com/Sutto/barista"
+ gem.version = Barista::Version::STRING
+ gem.authors = ["Darcy Laycock"]
end
+Jeweler::GemcutterTasks.new
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = "spec/**/*_spec.rb"
+end
+
+require 'rdoc/task'
+RDoc::Task.new do |rdoc|
version = Barista::Version::STRING
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "barista #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
+
+task :default => :spec
+
+require 'barista'
+
+
View
4 spec/barista_spec.rb
@@ -1,4 +1,4 @@
-require 'spec/spec_helper'
+require 'spec_helper'
describe Barista do
@@ -12,4 +12,4 @@
context 'compiling all'
-end
+end
View
18 spec/spec_helper.rb
@@ -1,11 +1,19 @@
+require 'rubygems'
+
ENV['RAILS_ENV'] ||= 'test'
-require 'bundler/setup'
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+
+require 'rspec/rails'
-spec_dir = Rails.root.join("spec")
+Bundler.require(:default, Rails.env) if defined?(Bundler)
-Dir[spec_dir.join("support/**/*.rb")].each { |f| require f }
+require 'barista'
RSpec.configure do |config|
- config.mock_with :rr
-end
+ config.mock_with :rspec
+ config.expect_with :rspec
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.