Permalink
Browse files

Simplify

Using leaderboard.gemspec for the dependencies.
Cleaning up Rakefile.
Cleaning up test helper.
  • Loading branch information...
1 parent d5235b2 commit 52ecdf2717100ab47df31bf6681f3d6148da7cb2 @czarneckid czarneckid committed Nov 15, 2011
Showing with 20 additions and 130 deletions.
  1. +1 −11 Gemfile
  2. +2 −43 Rakefile
  3. +16 −62 leaderboard.gemspec
  4. +1 −1 lib/leaderboard.rb
  5. +0 −13 test/helper.rb
View
@@ -1,13 +1,3 @@
source "http://rubygems.org"
-# Add dependencies to develop your gem here.
-# Include everything needed to run rake, tests, features, etc.
-group :development do
- gem "bundler"
- gem "jeweler"
- gem "rcov"
- gem "rdoc"
-end
-
-gem 'redis'
-
+gemspec
View
@@ -1,55 +1,14 @@
-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 = "leaderboard"
- gem.homepage = "http://github.com/agoragames/leaderboard"
- gem.license = "MIT"
- gem.summary = %Q{Leaderboards backed by Redis in Ruby}
- gem.description = %Q{Leaderboards backed by Redis in Ruby}
- gem.email = "dczarnecki@agoragames.com"
- 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 'rdoc/task'
-RDoc::Task.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "leaderboard #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
-
REDIS_DIR = File.expand_path(File.join("..", "test"), __FILE__)
REDIS_CNF = File.join(REDIS_DIR, "test.conf")
REDIS_PID = File.join(REDIS_DIR, "db", "redis.pid")
View
@@ -1,69 +1,23 @@
-# 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__)
+
+require 'leaderboard'
Gem::Specification.new do |s|
- s.name = "leaderboard"
- s.version = "2.0.1"
+ s.name = "leaderboard"
+ s.version = Leaderboard::VERSION
+ s.authors = ["David Czarnecki"]
+ s.email = ["dczarnecki@agoragames.com"]
+ s.homepage = "https://github.com/agoragames/leaderboard"
+ s.summary = %q{Leaderboards backed by Redis in Ruby}
+ s.description = %q{Leaderboards backed by Redis in Ruby}
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["David Czarnecki"]
- s.date = "2011-11-07"
- s.description = "Leaderboards backed by Redis in Ruby"
- s.email = "dczarnecki@agoragames.com"
- s.extra_rdoc_files = [
- "LICENSE.txt",
- "README.rdoc"
- ]
- s.files = [
- ".document",
- ".rvmrc",
- "CHANGELOG.markdown",
- "Gemfile",
- "LICENSE.txt",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "leaderboard.gemspec",
- "lib/leaderboard.rb",
- "test/db/.gitkeep",
- "test/helper.rb",
- "test/test.conf",
- "test/test_leaderboard.rb"
- ]
- s.homepage = "http://github.com/agoragames/leaderboard"
- s.licenses = ["MIT"]
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.11"
- s.summary = "Leaderboards backed by Redis in Ruby"
- s.test_files = [
- "test/helper.rb",
- "test/test_leaderboard.rb"
- ]
+ s.rubyforge_project = "leaderboard"
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ 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"]
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<redis>, [">= 0"])
- s.add_development_dependency(%q<bundler>, [">= 0"])
- s.add_development_dependency(%q<jeweler>, [">= 0"])
- s.add_development_dependency(%q<rcov>, [">= 0"])
- s.add_development_dependency(%q<rdoc>, [">= 0"])
- else
- s.add_dependency(%q<redis>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<rcov>, [">= 0"])
- s.add_dependency(%q<rdoc>, [">= 0"])
- end
- else
- s.add_dependency(%q<redis>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<rcov>, [">= 0"])
- s.add_dependency(%q<rdoc>, [">= 0"])
- end
+ s.add_dependency('redis')
end
-
View
@@ -1,7 +1,7 @@
require 'redis'
class Leaderboard
- VERSION = '2.0.1'.freeze
+ VERSION = '2.0.1'
DEFAULT_PAGE_SIZE = 25
DEFAULT_OPTIONS = {
View
@@ -1,17 +1,4 @@
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 'leaderboard'
-
-class Test::Unit::TestCase
-end

0 comments on commit 52ecdf2

Please sign in to comment.