Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

introduces bundler, removes jeweler

converts to bundler generate gem
  • Loading branch information...
commit 87c7b1007ecb15e5f994373a1139f30a72ab1092 1 parent b81aec7
@thomasjachmann authored
View
3  .document
@@ -1,3 +0,0 @@
-README.rdoc
-lib/**/*.rb
-LICENSE
View
6 .gitignore
@@ -1,2 +1,4 @@
-rdoc
-pkg
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
View
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in launchpad.gemspec
+gemspec
View
51 Rakefile
@@ -1,28 +1,4 @@
-require 'rubygems'
-require 'rake'
-
-require File.join(File.dirname(__FILE__), 'lib', 'launchpad', 'version')
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = 'launchpad'
- gem.summary = 'A gem for accessing novation\'s launchpad programmatically and easily.'
- gem.description = 'This gem provides an interface to access novation\'s launchpad programmatically. LEDs can be lighted and button presses can be evaluated using launchpad\'s MIDI input/output.'
- gem.email = 'self@thomasjachmann.com'
- gem.homepage = 'http://github.com/thomasjachmann/launchpad'
- gem.version = Launchpad::VERSION
- gem.authors = ['Thomas Jachmann']
- gem.has_rdoc = true
- gem.add_dependency('portmidi', '>= 0.0.6')
- gem.add_development_dependency('shoulda', '>= 0')
- gem.add_development_dependency('mocha')
- # 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: sudo gem install jeweler'
-end
+require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
@@ -31,29 +7,4 @@ Rake::TestTask.new(:test) do |test|
test.verbose = true
end
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
- end
-rescue LoadError
- task :rcov do
- abort 'RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov'
- end
-end
-
-task :test => :check_dependencies
-
task :default => :test
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "launchpad #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
97 launchpad.gemspec
@@ -1,83 +1,28 @@
-# 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 "launchpad/version"
Gem::Specification.new do |s|
- s.name = %q{launchpad}
- s.version = "0.2.2"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Thomas Jachmann"]
- s.date = %q{2010-02-24}
+ s.name = "launchpad"
+ s.version = Launchpad::VERSION
+ s.authors = ["Thomas Jachmann"]
+ s.email = ["self@thomasjachmann.com"]
+ s.homepage = "https://github.com/thomasjachmann/launchpad"
+ s.summary = %q{A gem for accessing novation's launchpad programmatically and easily.}
s.description = %q{This gem provides an interface to access novation's launchpad programmatically. LEDs can be lighted and button presses can be evaluated using launchpad's MIDI input/output.}
- s.email = %q{tom.j@gmx.net}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "examples/color_picker.rb",
- "examples/colors.rb",
- "examples/doodle.rb",
- "examples/double_buffering.rb",
- "examples/drawing_board.rb",
- "examples/feedback.rb",
- "examples/reset.rb",
- "examples/setup.rb",
- "experiments/wandering_dot.rb",
- "launchpad.gemspec",
- "lib/launchpad.rb",
- "lib/launchpad/device.rb",
- "lib/launchpad/errors.rb",
- "lib/launchpad/interaction.rb",
- "lib/launchpad/midi_codes.rb",
- "lib/launchpad/version.rb",
- "test/helper.rb",
- "test/test_device.rb",
- "test/test_interaction.rb"
- ]
- s.homepage = %q{http://github.com/thomasjachmann/launchpad}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{A gem for accessing novation's launchpad programmatically and easily.}
- s.test_files = [
- "test/helper.rb",
- "test/test_device.rb",
- "test/test_interaction.rb",
- "examples/color_picker.rb",
- "examples/colors.rb",
- "examples/doodle.rb",
- "examples/double_buffering.rb",
- "examples/drawing_board.rb",
- "examples/feedback.rb",
- "examples/reset.rb",
- "examples/setup.rb"
- ]
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.rubyforge_project = "launchpad"
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<portmidi>, [">= 0.0.6"])
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_development_dependency(%q<mocha>, [">= 0"])
- else
- s.add_dependency(%q<portmidi>, [">= 0.0.6"])
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- end
- else
- s.add_dependency(%q<portmidi>, [">= 0.0.6"])
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- end
-end
+ s.add_dependency "portmidi", ">= 0.0.6"
+ s.add_dependency "ffi"
+ s.add_development_dependency "shoulda"
+ s.add_development_dependency "mocha"
+ s.add_development_dependency "redgreen"
+ # s.has_rdoc = true
+
+ 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"]
+end
View
11 test/helper.rb
@@ -1,16 +1,11 @@
require 'rubygems'
+require 'bundler/setup'
+
require 'test/unit'
require 'shoulda'
require 'mocha'
+require 'redgreen' if ENV['TM_FILENAME'].nil?
-begin
- require 'redgreen' if ENV['TM_FILENAME'].nil?
-rescue LoadError
- # ignore - just for colorization
-end
-
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'launchpad'
class Test::Unit::TestCase
View
4 test/test_interaction.rb
@@ -90,7 +90,7 @@ class TestInteraction < Test::Unit::TestCase
should 'start a new thread and block in blocking mode' do
t = Thread.new {}
Thread.expects(:new).returns(t)
- t.expects(:join)
+ t.expects(:join).twice # once from start, once from test's teardown
@interaction.start
end
@@ -98,7 +98,7 @@ class TestInteraction < Test::Unit::TestCase
should 'start a new thread and return in detached mode' do
t = Thread.new {}
Thread.expects(:new).returns(t)
- t.expects(:join).never
+ t.expects(:join).once # once from test's teardown
@interaction.start(:detached => true)
end
Please sign in to comment.
Something went wrong with that request. Please try again.