Permalink
Browse files

added skeleton: Gemfile, Rakefile, etc

  • Loading branch information...
1 parent 769f98a commit 0e88d06acd4a372faac8a64e9f1e7deab4bed813 Philip (flip) Kromer committed Aug 13, 2012
Showing with 56 additions and 10 deletions.
  1. +27 −0 Gemfile
  2. +23 −6 Rakefile
  3. +3 −3 rubix.gemspec
  4. +3 −1 spec/spec_helper.rb
View
27 Gemfile
@@ -1,3 +1,30 @@
source "http://rubygems.org"
gemspec
+
+# --------------------------------------------------------------------------
+
+# Only gems that you want listed as development dependencies in the gemspec
+group :development do
+ gem 'bundler', "~> 1.1"
+ gem 'rake', :require => false
+ gem 'yard', ">= 0.7", :require => false
+end
+
+group :docs do
+ gem 'redcarpet', ">= 2.1", :platform => [:ruby]
+ gem 'kramdown', :platform => [:jruby]
+end
+
+# Gems for testing and coverage
+group :test do
+ gem 'simplecov', ">= 0.5", :platform => [:ruby_19], :require => false
+end
+
+# Gems you would use if hacking on this gem (rather than with it)
+group :support do
+ gem 'pry'
+ gem 'guard', ">= 1.0", :platform => [:ruby_19]
+ gem 'guard-rspec', ">= 0.6", :platform => [:ruby_19]
+ gem 'guard-yard', :platform => [:ruby_19]
+end
View
@@ -1,6 +1,27 @@
-require "rspec/core/rake_task"
+require 'rubygems' unless defined?(Gem)
+require 'bundler/setup'
+Bundler.setup(:default, :development)
+require 'rake'
-$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+task :default => :rspec
+task :spec => :rspec
+
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:rspec) do |spec|
+ Bundler.setup(:default, :development, :test)
+ spec.pattern = 'spec/**/*_spec.rb'
+end
+
+desc "Run RSpec with code coverage"
+task :cov do
+ ENV['GORILLIB_COV'] = "yep"
+ Rake::Task[:rspec].execute
+end
+
+require 'yard'
+YARD::Rake::YardocTask.new do
+ Bundler.setup(:default, :development, :docs)
+end
desc "Build rubix"
task :build do
@@ -12,7 +33,3 @@ desc "Release rubix-#{version}"
task :release => :build do
system "gem push rubix-#{version}.gem"
end
-
-RSpec::Core::RakeTask.new(:spec)
-
-task :default => :spec
View
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
- s.add_development_dependency 'mysql2'
+ # s.add_development_dependency 'mysql2'
+ s.add_development_dependency 'oj' unless RUBY_PLATFORM =~ /java/
s.add_dependency 'chef'
s.add_dependency 'multi_json'
- s.add_dependency 'oj'
- s.add_dependency 'configliere', '>= 0.4.8'
+ s.add_dependency 'configliere', '>= 0.4.16'
s.add_dependency 'multipart-post'
end
View
@@ -1,5 +1,7 @@
+require 'bundler/setup' ; Bundler.require(:default, :development, :test)
+require 'rspec/autorun'
+
require 'tempfile'
-require 'rspec'
RUBIX_ROOT = File.expand_path(__FILE__, '../../lib')
$: << RUBIX_ROOT unless $:.include?(RUBIX_ROOT)

0 comments on commit 0e88d06

Please sign in to comment.