Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing bundler from lib file

  • Loading branch information...
commit 5e2dd9942928e938bd5f367b49b41afc80358165 1 parent 7e8a9b6
Winton Welsh authored
2  .gitignore
View
@@ -1,4 +1,6 @@
.DS_Store
*.gem
+.bundle
+Gemfile.lock
pkg
tmp
3  Gemfile
View
@@ -1,4 +1,3 @@
source "http://rubygems.org"
-gem 'rake', '>=0.8.7', :group => :rakefile
-gem 'rspec', '~>1.0', :group => [ :rakefile, :spec ]
+gemspec
12 Gemfile.lock
View
@@ -1,12 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- rake (0.9.2)
- rspec (1.3.2)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- rake (>= 0.8.7)
- rspec (~> 1.0)
62 Rakefile
View
@@ -1,64 +1,4 @@
-require 'rubygems'
-require 'bundler'
-
-Bundler.require(:rakefile)
-
-require 'rake'
-
-begin
- require 'spec/rake/spectask'
-rescue Exception => e
-end
-
-def gemspec
- @gemspec ||= begin
- file = File.expand_path('../gem_template.gemspec', __FILE__)
- eval(File.read(file), binding, file)
- end
-end
-
-if defined?(Spec::Rake::SpecTask)
- desc "Run specs"
- Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = %w(-fs --color)
- t.warning = true
- end
- task :spec
- task :default => :spec
-end
-
-desc "Build gem(s)"
-task :gem do
- root = File.expand_path('../', __FILE__)
- pkg = "#{root}/pkg"
- system "rm -Rf #{pkg}"
- system "cd #{root} && gem build gem_template.gemspec"
- system "mkdir -p #{pkg} && mv *.gem pkg"
-end
-
-namespace :gem do
- desc "Install gem(s)"
- task :install do
- Rake::Task['gem'].invoke
- Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
- system "gem install #{pkg} --no-ri --no-rdoc"
- end
- end
-
- desc "Push gem(s)"
- task :push do
- Rake::Task['gem'].invoke
- Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
- system "gem push #{pkg}"
- end
- end
-end
-
-desc "Validate the gemspec"
-task :gemspec do
- gemspec.validate
-end
+require 'bundler/gem_tasks'
# DELETE AFTER USING
desc "Rename project"
2  gem_template.gemspec
View
@@ -18,4 +18,6 @@ Gem::Specification.new do |s|
s.files = `cd #{root} && git ls-files`.split("\n")
s.require_paths = %w(lib)
s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n")
+
+ s.add_development_dependency "rspec", "~> 1.0"
end
5 lib/gem_template.rb
View
@@ -1,8 +1,3 @@
-require "rubygems"
-require "bundler"
-
-Bundler.require(:default)
-
$:.unshift File.dirname(__FILE__)
module GemTemplate
2  spec/spec_helper.rb
View
@@ -1,7 +1,7 @@
require "pp"
require "bundler"
-Bundler.require(:spec)
+Bundler.require(:development)
$root = File.expand_path('../../', __FILE__)
Please sign in to comment.
Something went wrong with that request. Please try again.