Permalink
Browse files

Simplify

Cleaned up Travis-CI.
Using gemspec for dependencies.
Remove cruft from Rakefile.
Remove extraneous VERSION.
Add version file for project.
Rename helper to test_helper.
  • Loading branch information...
David Czarnecki
David Czarnecki committed Nov 16, 2011
1 parent eab6884 commit e205a22461945083d32294e5413240afaa42ad6f
Showing with 38 additions and 141 deletions.
  1. +5 −1 .travis.yml
  2. +1 −17 Gemfile
  3. +3 −44 Rakefile
  4. +0 −1 VERSION
  5. +3 −0 lib/tasty-version.rb
  6. +1 −1 lib/tasty.rb
  7. +20 −59 tasty.gemspec
  8. +0 −17 test/helper.rb
  9. +4 −0 test/test_helper.rb
  10. +1 −1 test/test_tasty.rb
View
@@ -1 +1,5 @@
-script: "bundle exec rake"
+rvm:
+ - 1.8.7
+ - 1.9.2
+gemfile:
+ - Gemfile
View
18 Gemfile
@@ -1,19 +1,3 @@
source :rubygems
-# 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 "bundler", "~> 1.0.0"
- gem "jeweler", "~> 1.6.0"
- gem "rcov", ">= 0.9"
-end
-
-group :test do
- gem 'mocha'
- gem 'fakeweb'
-end
-
-gem 'httparty'
+gemspec
View
@@ -1,58 +1,17 @@
-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 = "tasty"
- gem.homepage = "http://github.com/czarneckid/tasty"
- gem.license = "MIT"
- gem.summary = %Q{Ruby library for interacting with del.icio.us}
- gem.description = %Q{Ruby library for interacting with del.icio.us}
- gem.email = "czarneckid@acm.org"
- gem.authors = ["David Czarnecki"]
- # Include your dependencies below. Runtime dependencies are required when using your gem,
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
- # gem.add_development_dependency 'rspec', '> 1.2.3'
-end
-Jeweler::RubygemsDotOrgTasks.new
+Bundler::GemHelper.install_tasks
+require 'rake'
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
-end
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "tasty #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
-
task :default => :test_rubies
desc "Runs tests on Ruby 1.8.7 and 1.9.2"
task :test_rubies do
- system "rvm 1.8.7@tasty_gem,1.9.2@tasty_gem rake test"
+ system "rvm 1.8.7@tasty_gem,1.9.2@tasty_gem do rake test"
end
View
@@ -1 +0,0 @@
-1.0.1
View
@@ -0,0 +1,3 @@
+class Tasty
+ VERSION = '1.0.1'
+end
View
@@ -1,9 +1,9 @@
require 'httparty'
+require 'tasty-version'
class Tasty
include HTTParty
- VERSION = '1.0.1'.freeze
DEFAULT_HEADERS = {
'User-Agent' => "tasty gem #{VERSION}"
}
View
@@ -1,66 +1,27 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
-Gem::Specification.new do |s|
- s.name = %q{tasty}
- s.version = "1.0.1"
+require 'tasty-version'
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["David Czarnecki"]
- s.date = %q{2011-02-16}
+Gem::Specification.new do |s|
+ s.name = "tasty"
+ s.version = Tasty::VERSION
+ s.authors = ["David Czarnecki"]
+ s.email = ["czarneckid@acm.org"]
+ s.homepage = "https://github.com/czarneckid/tasty"
+ s.summary = %q{Ruby library for interacting with del.icio.us}
s.description = %q{Ruby library for interacting with del.icio.us}
- s.email = %q{czarneckid@acm.org}
- s.extra_rdoc_files = [
- "LICENSE.txt",
- "README.rdoc"
- ]
- s.files = [
- ".document",
- "Gemfile",
- "Gemfile.lock",
- "LICENSE.txt",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "lib/tasty.rb",
- "tasty.gemspec",
- "test/fakeweb/delicious_posts_add_response.xml",
- "test/fakeweb/delicious_posts_all_response.xml",
- "test/helper.rb",
- "test/test_tasty.rb"
- ]
- s.homepage = %q{http://github.com/czarneckid/tasty}
- s.licenses = ["MIT"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Ruby library for interacting with del.icio.us}
- s.test_files = [
- "test/helper.rb",
- "test/test_tasty.rb"
- ]
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.rubyforge_project = "tasty"
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<httparty>, ["~> 0.6.1"])
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
- s.add_development_dependency(%q<rcov>, [">= 0"])
- else
- s.add_dependency(%q<httparty>, ["~> 0.6.1"])
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
- s.add_dependency(%q<rcov>, [">= 0"])
- end
- else
- s.add_dependency(%q<httparty>, ["~> 0.6.1"])
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
- s.add_dependency(%q<rcov>, [">= 0"])
- end
-end
+ 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"]
+ s.add_development_dependency('rake')
+ s.add_development_dependency('mocha')
+ s.add_development_dependency('fakeweb')
+
+ s.add_dependency('httparty')
+end
View
@@ -1,17 +0,0 @@
-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'
-
-$LOAD_PATH.unshift(File.dirname(__FILE__))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-require 'tasty'
-
-class Test::Unit::TestCase
-end
View
@@ -0,0 +1,4 @@
+require 'rubygems'
+require 'test/unit'
+
+require 'tasty'
View
@@ -1,4 +1,4 @@
-require 'helper'
+require 'test_helper'
require 'mocha'
require 'fakeweb'

0 comments on commit e205a22

Please sign in to comment.