Permalink
Browse files

Added gem support and starting bin and lib files

  • Loading branch information...
1 parent c08a788 commit 115b98080248a778a434452eff184e6d7444403a @samuelkadolph samuelkadolph committed Jan 12, 2011
Showing with 105 additions and 0 deletions.
  1. 0 CHANGELOG
  2. +3 −0 Gemfile
  3. +6 −0 Rakefile
  4. +1 −0 VERSION
  5. +1 −0 bin/tattletail
  6. +14 −0 lib/tattletail.rb
  7. +48 −0 tasks/release.rb
  8. +11 −0 tasks/testing.rb
  9. +21 −0 tattletail.gemspec
  10. 0 tests/tattletail/.gitkeep
View
No changes.
View
@@ -0,0 +1,3 @@
+source 'http://rubygems.org'
+
+gemspec
View
@@ -0,0 +1,6 @@
+require 'rake'
+
+$:.unshift(File.expand_path('..', __FILE__))
+
+require 'tasks/release'
+require 'tasks/testing'
View
@@ -0,0 +1 @@
+0.1.0
View
@@ -0,0 +1 @@
+#!/usr/bin/env ruby
View
@@ -0,0 +1,14 @@
+module Tattletail
+ module VERSION
+ MAJOR = 0
+ MINOR = 1
+ TINY = 0
+ PRE = nil
+
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
+
+ def self.to_s
+ STRING
+ end
+ end
+end
View
@@ -0,0 +1,48 @@
+version = File.read(File.expand_path('../../VERSION', __FILE__)).strip
+tag = "v#{version}"
+name = 'sambot'
+gem = "dist/#{name}-#{version}.gem"
+gemspec = "#{name}.gemspec"
+
+directory 'dist'
+
+task :clean do
+ rm_f(gem)
+end
+
+task :update_version do
+ file = 'lib/tattletail.rb'
+ ruby = File.read(file)
+
+ major, minor, tiny, pre = version.split('.')
+ pre = pre ? pre.inspect : 'nil'
+
+ ruby.gsub!(/^(\s*)MAJOR = .*?$/, "\\1MAJOR = #{major}")
+ raise("Could not insert MAJOR in #{file}") unless $1
+
+ ruby.gsub!(/^(\s*)MINOR = .*?$/, "\\1MINOR = #{minor}")
+ raise("Could not insert MINOR in #{file}") unless $1
+
+ ruby.gsub!(/^(\s*)TINY = .*?$/, "\\1TINY = #{tiny}")
+ raise("Could not insert TINY in #{file}") unless $1
+
+ ruby.gsub!(/^(\s*)PRE = .*?$/, "\\1PRE = #{pre}")
+ raise("Could not insert PRE in #{file}") unless $1
+
+ File.open(file, 'w') { |f| f << ruby }
+end
+
+desc "Build #{name} gem"
+task :build => %w(clean update_version dist) do
+ sh("gem build #{gemspec} && mv #{name}-#{version}.gem dist/")
+end
+
+desc "Install the #{name} gem"
+task :install => :build do
+ sh("gem install #{gem}")
+end
+
+desc "Push the #{name} gem to RubyGems"
+task :push => :build do
+ sh("gem push #{gem}")
+end
View
@@ -0,0 +1,11 @@
+require 'rake/testtask'
+
+task :default => :test
+
+desc 'Run unit tests'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'test'
+ t.pattern = 'test/tattletail/*_test.rb'
+ t.verbose = true
+ t.warning = true
+end
View
@@ -0,0 +1,21 @@
+version = File.read(File.expand_path('../VERSION', __FILE__)).strip
+
+Gem::Specification.new do |s|
+ s.platform = Gem::Platform::RUBY
+ s.name = 'tattletail'
+ s.version = version
+ s.summary = 'Captures output from a shell and sends it to a web-interface along with relevant files.'
+ s.description = 'A ruby gem to capture the output from a shell and send it to a web-interface along with gisting relevant files. For use with assisting in debugging code and practices. A tool for remote pairing.'
+
+ s.required_ruby_version = '>= 1.9.2'
+
+ s.authors = ['Johnneylee Jack Rollins', 'Samuel Kadolph']
+ s.email = ['spaceghost@amberlampdesign.com', 'samuel@kadolph.com']
+ s.homepage = 'https://github.com/Spaceghost/Tattletail'
+
+ s.files = Dir['CHANGELOG', 'lib/**/*', 'LICENSE', 'README']
+ s.require_path = 'lib'
+
+ s.executables = ['tattletail']
+ s.default_executable = 'tattletail'
+end
No changes.

0 comments on commit 115b980

Please sign in to comment.