From 925ecee72c89ccbeb550e85e1e6c6f6c41b92549 Mon Sep 17 00:00:00 2001 From: Richard Ramsden Date: Wed, 3 Aug 2011 23:05:45 -0700 Subject: [PATCH] gemifying x11 with jeweler --- .gitignore | 48 ++++++++++++++++++++++++++++++++++++++++ Gemfile | 13 +++++++++++ LICENSE.txt | 20 +++++++++++++++++ README => README.md | 3 +++ Rakefile | 53 +++++++++++++++++++++++++++++++++++++++++++++ test/helper.rb | 18 +++++++++++++++ test/test_X11.rb | 7 ++++++ 7 files changed, 162 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 LICENSE.txt rename README => README.md (94%) create mode 100644 Rakefile create mode 100644 test/helper.rb create mode 100644 test/test_X11.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb8e985 --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +# rcov generated +coverage + +# rdoc generated +rdoc + +# yard generated +doc +.yardoc + +# bundler +.bundle + +# jeweler generated +pkg + +# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore: +# +# * Create a file at ~/.gitignore +# * Include files you want ignored +# * Run: git config --global core.excludesfile ~/.gitignore +# +# After doing this, these files will be ignored in all your git projects, +# saving you from having to 'pollute' every project you touch with them +# +# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line) +# +# For MacOS: +# +#.DS_Store + +# For TextMate +#*.tmproj +#tmtags + +# For emacs: +#*~ +#\#* +#.\#* + +# For vim: +#*.swp + +# For redcar: +#.redcar + +# For rubinius: +#*.rbc diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..f79b668 --- /dev/null +++ b/Gemfile @@ -0,0 +1,13 @@ +source "http://rubygems.org" +# Add dependencies required to use your gem here. +# Example: +# gem "activesupport", ">= 2.3.5" + +# Add dependencies to develop your gem here. +# Include everything needed to run rake, tests, features, etc. +group :development do + gem "shoulda", ">= 0" + gem "bundler", "~> 1.0.0" + gem "jeweler", "~> 1.6.4" + gem "rcov", ">= 0" +end diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..527d86b --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2011 Richard Ramsden + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README b/README.md similarity index 94% rename from README rename to README.md index f79f274..5ca5f79 100644 --- a/README +++ b/README.md @@ -1,3 +1,6 @@ +Ruby X11 +======== + (under-development) Pure Ruby implementation of the X Window System Protocol. This library is based off of Mathieu Bouchard's work on his RubyX11 project. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..a59f927 --- /dev/null +++ b/Rakefile @@ -0,0 +1,53 @@ +# encoding: utf-8 + +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 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "X11" + gem.homepage = "http://github.com/rramsden/X11" + gem.license = "MIT" + gem.summary = %Q{TODO: one-line summary of your gem} + gem.description = %Q{TODO: longer description of your gem} + gem.email = "richard@rramsden.ca" + gem.authors = ["Richard Ramsden"] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new + +require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true +end + +require 'rcov/rcovtask' +Rcov::RcovTask.new do |test| + test.libs << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true + test.rcov_opts << '--exclude "gems/*"' +end + +task :default => :test + +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "X11 #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') +end diff --git a/test/helper.rb b/test/helper.rb new file mode 100644 index 0000000..89c2746 --- /dev/null +++ b/test/helper.rb @@ -0,0 +1,18 @@ +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 'test/unit' +require 'shoulda' + +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +$LOAD_PATH.unshift(File.dirname(__FILE__)) +require 'X11' + +class Test::Unit::TestCase +end diff --git a/test/test_X11.rb b/test/test_X11.rb new file mode 100644 index 0000000..405099a --- /dev/null +++ b/test/test_X11.rb @@ -0,0 +1,7 @@ +require 'helper' + +class TestX11 < Test::Unit::TestCase + should "probably rename this file and start testing for real" do + flunk "hey buddy, you should probably rename this file and start testing for real" + end +end