Permalink
Browse files

gemification using jeweler

  • Loading branch information...
1 parent 9ce8010 commit 7df57017dd2d56140bb8fa24310301db765fb576 Thomas Jachmann committed Nov 8, 2009
Showing with 129 additions and 5 deletions.
  1. +5 −0 .document
  2. +2 −0 .gitignore
  3. +20 −0 LICENSE
  4. +26 −0 README.rdoc
  5. +53 −0 Rakefile
  6. +1 −1 examples/colors.rb
  7. +1 −1 examples/feedback.rb
  8. +4 −0 examples/setup.rb
  9. +0 −3 lib/launchpad.rb
  10. +10 −0 test/helper.rb
  11. +7 −0 test/test_launchpad-gem.rb
View
@@ -0,0 +1,5 @@
+README.rdoc
+lib/**/*.rb
+bin/*
+features/**/*.feature
+LICENSE
View
@@ -0,0 +1,2 @@
+rdoc
+pkg
View
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 Thomas Jachmann
+
+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.
View
@@ -0,0 +1,26 @@
+= launchpad
+
+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.
+
+This is the first version, nothing sophisticated, but you can access the launchpad already. In and out. The API might change quite a bit during the next releases, so don't rely on it, this is work in progress. If you need anything or think the interface could be improved in any way, please contact me.
+
+Sometimes, the launchpad won't react to anything. Don't despair, just dis- and reconnect the thing. It seems that some (unexpected) MIDI signals make it hickup.
+
+
+== Requirements
+
+* Jan Krutisch's portmidi gem
+* Roger B. Dannenberg's portmidi library
+
+
+== Near future plans
+
+* dedicated interaction with control buttons (top and right row)
+* listeners for presses on single buttons/button areas
+* double buffering (already there but has some glitches)
+* bitmap rendering
+
+
+== Copyright
+
+Copyright (c) 2009 Thomas Jachmann. See LICENSE for details.
View
@@ -0,0 +1,53 @@
+require 'rubygems'
+require 'rake'
+
+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 = 'tom.j@gmx.net'
+ gem.homepage = 'http://github.com/thomasjachmann/launchpad'
+ gem.authors = ['Thomas Jachmann']
+ gem.add_dependency('portmidi')
+ #gem.add_development_dependency 'thoughtbot-shoulda', '>= 0'
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+rescue LoadError
+ puts 'Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler'
+end
+
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ 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
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../lib/launchpad"
+require File.join(File.dirname(__FILE__), 'setup')
l = Launchpad.new(:input => false, :output => true)
View
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../lib/launchpad"
+require File.join(File.dirname(__FILE__), 'setup')
Launchpad.start do |l, x, y, state|
l.single(:x => x, :y => y, :red => state ? 3 : 0)
View
@@ -0,0 +1,4 @@
+# normally, this is done by rubygems (or whatever you use for your library management)
+require 'rubygems'
+require 'portmidi'
+require File.join(File.dirname(__FILE__), '..', 'lib', 'launchpad')
View
@@ -1,6 +1,3 @@
-require 'rubygems'
-require 'portmidi'
-
class Launchpad
class LaunchpadError < StandardError; end
View
@@ -0,0 +1,10 @@
+require 'rubygems'
+require 'test/unit'
+#require 'shoulda'
+
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'launchpad'
+
+class Test::Unit::TestCase
+end
@@ -0,0 +1,7 @@
+require 'helper'
+
+class TestLaunchpadGem < 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

0 comments on commit 7df5701

Please sign in to comment.