Skip to content
Browse files

Converted to latest RSpec, Bundler, etc. and bumped to 1.0.1.

Now using bundler for deployment.
  • Loading branch information...
1 parent fbb9c3b commit 490928bac11fc5057a364f8b2bd37359a46db6cf @notahat notahat committed
Showing with 57 additions and 91 deletions.
  1. +3 −1 .gitignore
  2. +4 −0 Gemfile
  3. +24 −0 Gemfile.lock
  4. +5 −31 Rakefile
  5. +0 −1 VERSION
  6. +3 −0 lib/safe_shell/version.rb
  7. +17 −48 safe_shell.gemspec
  8. +1 −1 spec/safe_shell_spec.rb
  9. +0 −9 spec/spec_helper.rb
View
4 .gitignore
@@ -16,7 +16,9 @@ tmtags
## PROJECT::GENERAL
coverage
rdoc
-pkg
+pkg/*
+*.gem
+.bundle
## PROJECT::SPECIFIC
tmp/*
View
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in safe_shell.gemspec
+gemspec
View
24 Gemfile.lock
@@ -0,0 +1,24 @@
+PATH
+ remote: .
+ specs:
+ safe_shell (1.0.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.2)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.1)
+ rspec-expectations (2.5.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.5.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rspec
+ safe_shell!
View
36 Rakefile
@@ -1,39 +1,13 @@
-require 'rubygems'
-require 'rake'
+require 'bundler'
+Bundler::GemHelper.install_tasks
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "safe_shell"
- gem.summary = %Q{Safely execute shell commands and get their output.}
- gem.description = %Q{Execute shell commands and get the resulting output, but without the security problems of Ruby's backtick operator.}
- gem.email = "pete@notahat.com"
- gem.homepage = "http://github.com/envato/safe_shell"
- gem.authors = ["Envato", "Ian Leitch", "Pete Yandell"]
- gem.add_development_dependency "rspec", ">= 1.2.9"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
-
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
-end
+require 'rspec/core/rake_task'
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
-end
-
-task :spec => :check_dependencies
+RSpec::Core::RakeTask.new(:spec)
task :default => :spec
+
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
View
1 VERSION
@@ -1 +0,0 @@
-1.0.0
View
3 lib/safe_shell/version.rb
@@ -0,0 +1,3 @@
+module SafeShell
+ VERSION = "1.0.1"
+end
View
65 safe_shell.gemspec
@@ -1,55 +1,24 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "safe_shell/version"
Gem::Specification.new do |s|
- s.name = %q{safe_shell}
- s.version = "1.0.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Envato", "Ian Leitch", "Pete Yandell"]
- s.date = %q{2010-11-08}
+ s.name = "safe_shell"
+ s.version = SafeShell::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Envato", "Ian Leitch", "Pete Yandell"]
+ s.email = ["pete@notahat.com"]
+ s.homepage = "http://github.com/envato/safe_shell"
+ s.summary = %q{Safely execute shell commands and get their output.}
s.description = %q{Execute shell commands and get the resulting output, but without the security problems of Ruby’s backtick operator.}
- s.email = %q{pete@notahat.com}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "lib/safe_shell.rb",
- "spec/safe_shell_spec.rb",
- "spec/spec.opts",
- "spec/spec_helper.rb",
- "tmp/.gitkeep"
- ]
- s.homepage = %q{http://github.com/envato/safe_shell}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Safely execute shell commands and get their output.}
- s.test_files = [
- "spec/safe_shell_spec.rb",
- "spec/spec_helper.rb"
- ]
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.add_development_dependency "rspec"
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
- else
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
- end
- else
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
- end
-end
+ s.rubyforge_project = "safe_shell"
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+ s.extra_rdoc_files = ["LICENSE", "README.rdoc"]
+end
View
2 spec/safe_shell_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'safe_shell'
describe "SafeShell" do
View
9 spec/spec_helper.rb
@@ -1,9 +0,0 @@
-$LOAD_PATH.unshift(File.dirname(__FILE__))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-require 'safe_shell'
-require 'spec'
-require 'spec/autorun'
-
-Spec::Runner.configure do |config|
-
-end

0 comments on commit 490928b

Please sign in to comment.
Something went wrong with that request. Please try again.