From bd7c5b60f626a7d9d7a1863f993031a9b57e1741 Mon Sep 17 00:00:00 2001 From: Jan Lelis Date: Thu, 3 Feb 2011 20:52:27 +0100 Subject: [PATCH] support rubygems-test --- .gemtest | 0 .gitignore | 3 +++ Gemfile | 5 +---- Gemfile.lock | 7 +++++++ Rakefile | 3 ++- clipboard.gemspec | 2 ++ spec/clipboard_spec.rb | 2 ++ 7 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .gemtest diff --git a/.gemtest b/.gemtest new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore index c1e0daf..c533c9e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ tmtags ## VIM *.swp +## RUBINIUS +*.rbc + ## PROJECT::GENERAL coverage rdoc diff --git a/Gemfile b/Gemfile index ccc8cda..a1b93f3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,3 @@ source :rubygems -group :dev do - gem 'rake' - gem 'rspec', '>=2' -end +gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 4d9aa21..9719fba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,8 @@ +PATH + remote: . + specs: + clipboard (0.9.5) + GEM remote: http://rubygems.org/ specs: @@ -13,8 +18,10 @@ GEM rspec-mocks (2.4.0) PLATFORMS + java ruby DEPENDENCIES + clipboard! rake rspec (>= 2) diff --git a/Rakefile b/Rakefile index 7c1695a..50f7795 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,7 @@ require 'rake' require 'rake/rdoctask' require 'fileutils' +task :test => :spec task :default => :spec require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |t| @@ -13,7 +14,7 @@ def gemspec end desc "Build the gem" -task :gem=>:gemspec do +task :gem => :gemspec do sh "gem build clipboard.gemspec" FileUtils.mkdir_p 'pkg' FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg' diff --git a/clipboard.gemspec b/clipboard.gemspec index 13e3916..513cf21 100644 --- a/clipboard.gemspec +++ b/clipboard.gemspec @@ -15,4 +15,6 @@ Gem::Specification.new do |s| s.requirements = ["On Linux (or other X), you need xclip. Install it on debian/ubuntu with sudo apt-get install xclip"] s.requirements << ["On Windows, you need the ffi gem."] s.files = Dir.glob(%w[{lib,spec}/**/*.rb [A-Z]* [A-Z]*.rdoc]) + %w{clipboard.gemspec} + s.add_development_dependency 'rake' + s.add_development_dependency 'rspec', '>=2' end diff --git a/spec/clipboard_spec.rb b/spec/clipboard_spec.rb index 5a0bc65..c685707 100644 --- a/spec/clipboard_spec.rb +++ b/spec/clipboard_spec.rb @@ -1,3 +1,5 @@ +# Please note: cannot test, if it really accesses your platform clipboard. + require File.expand_path('spec/spec_helper') $os = RbConfig::CONFIG['host_os']