Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed evil "require 'rubygems'" from rufus/rtm/base.rb

and switched to jeweler (thanks Kenneth)
  • Loading branch information...
commit 104432000084a54462957a0cdc67eb4dcf913114 1 parent 5bcf98f
@jmettraux authored
View
1  CHANGELOG.txt
@@ -4,6 +4,7 @@
== rufus-rtm - 0.1.3 not yet released
+- removed evil "require 'rubygems'" from rufus/rtm/base.rb
- can now pass rtm key and secret via method params (Giorgio's request)
View
100 Rakefile
@@ -1,92 +1,74 @@
-require 'rubygems'
+require 'lib/rufus/rtm/base.rb'
+
+require 'rubygems'
require 'rake'
-require 'rake/clean'
-require 'rake/packagetask'
-require 'rake/gempackagetask'
-require 'rake/testtask'
-#require 'rake/rdoctask'
-#require 'hanna/rdoctask'
+#
+# CLEAN
-gemspec = File.read('rufus-rtm.gemspec')
-eval "gemspec = #{gemspec}"
+require 'rake/clean'
+CLEAN.include('pkg', 'tmp', 'html')
+task :default => [ :clean ]
#
-# tasks
-
-CLEAN.include('pkg', 'html')
+# GEM
-task :default => [ :clean, :repackage ]
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
-#
-# TESTING
-
-Rake::TestTask.new(:test) do |t|
- t.libs << 'test'
- t.test_files = FileList['test/test.rb']
- t.verbose = true
-end
+ gem.version = Rufus::RTM::VERSION
+ gem.name = 'rufus-rtm'
+ gem.summary = 'yet another RememberTheMilk wrapper'
+ gem.description = %{
+ yet another RememberTheMilk wrapper
+ }
+ gem.email = 'jmettraux@gmail.com'
+ gem.homepage = 'http://github.com/jmettraux/rufus-rtm/'
+ gem.authors = [ 'John Mettraux' ]
+ gem.rubyforge_project = 'rufus'
-#
-# VERSION
+ gem.test_file = 'test/test.rb'
-task :change_version do
+ gem.add_dependency 'rufus-verbs', '>= 1.0.0'
+ gem.add_development_dependency 'yard', '>= 0'
- version = ARGV.pop
- `sedip "s/VERSION = '.*'/VERSION = '#{version}'/" lib/rufus/rtm/base.rb`
- `sedip "s/s.version = '.*'/s.version = '#{version}'/" rufus-rtm.gemspec`
- exit 0 # prevent rake from triggering other tasks
+ # gemspec spec : http://www.rubygems.org/read/chapter/20
end
+Jeweler::GemcutterTasks.new
#
-# PACKAGING
+# DOC
-Rake::GemPackageTask.new(gemspec) do |pkg|
- #pkg.need_tar = true
-end
+begin
+
+ require 'yard'
-Rake::PackageTask.new('rufus-rtm', gemspec.version) do |pkg|
-
- pkg.need_zip = true
- pkg.package_files = FileList[
- 'Rakefile',
- '*.txt',
- 'lib/**/*',
- 'test/**/*'
- ].to_a
- #pkg.package_files.delete("MISC.txt")
- class << pkg
- def package_name
- "#{@name}-#{@version}-src"
- end
+ YARD::Rake::YardocTask.new do |doc|
+ doc.options = [
+ '-o', 'html/rufus-rtm', '--title',
+ "rufus-rtm #{Rufus::RTM::VERSION}"
+ ]
end
-end
+rescue LoadError
-#
-# DOCUMENTATION
-
-task :rdoc do
- sh %{
- rm -fR rdoc
- yardoc 'lib/**/*.rb' \
- -o html/rufus-rtm \
- --title 'rufus-rtm'
- }
+ task :yard do
+ abort "YARD is not available : sudo gem install yard"
+ end
end
#
-# WEBSITE
+# TO THE WEB
-task :upload_website => [ :clean, :rdoc ] do
+task :upload_website => [ :clean, :yard ] do
account = 'jmettraux@rubyforge.org'
webdir = '/var/www/gforge-projects/rufus'
View
2  lib/rufus/rtm/base.rb
@@ -23,9 +23,7 @@
#++
-require 'rubygems'
require 'rufus/verbs'
-
require 'json'
require 'md5'
View
72 rufus-rtm.gemspec
@@ -1,27 +1,61 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
+ s.name = %q{rufus-rtm}
+ s.version = "0.1.3"
- s.name = 'rufus-rtm'
- s.version = '0.1.2'
- s.authors = [ 'John Mettraux' ]
- s.email = 'jmettraux@gmail.com'
- s.homepage = 'http://rufus.rubyforge.org/rufus-rtm/'
- s.platform = Gem::Platform::RUBY
- s.summary = 'yet another RememberTheMilk wrapper'
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["John Mettraux"]
+ s.date = %q{2010-01-24}
+ s.description = %q{
+ yet another RememberTheMilk wrapper
+ }
+ s.email = %q{jmettraux@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE.txt",
+ "README.txt"
+ ]
+ s.files = [
+ "CHANGELOG.txt",
+ "LICENSE.txt",
+ "README.txt",
+ "Rakefile",
+ "lib/rufus-rtm.rb",
+ "lib/rufus/rtm.rb",
+ "lib/rufus/rtm/base.rb",
+ "lib/rufus/rtm/credentials.rb",
+ "lib/rufus/rtm/resources.rb",
+ "rufus-rtm.gemspec",
+ "test/tasks_test.rb",
+ "test/test.rb"
+ ]
+ s.homepage = %q{http://github.com/jmettraux/rufus-rtm/}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{rufus}
+ s.rubygems_version = %q{1.3.5}
+ s.summary = %q{yet another RememberTheMilk wrapper}
+ s.test_files = [
+ "test/test.rb"
+ ]
- s.require_path = 'lib'
- s.test_file = 'test/test.rb'
- s.has_rdoc = true
- #s.extra_rdoc_files = %w{ README.txt CHANGELOG.txt CREDITS.txt LICENSE.txt }
- s.extra_rdoc_files = %w{ README.txt CHANGELOG.txt LICENSE.txt }
- s.rubyforge_project = 'rufus'
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
- %w{ rufus-verbs }.each do |d|
- s.requirements << d
- s.add_dependency(d)
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<rufus-verbs>, [">= 1.0.0"])
+ s.add_development_dependency(%q<yard>, [">= 0"])
+ else
+ s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
+ s.add_dependency(%q<yard>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
+ s.add_dependency(%q<yard>, [">= 0"])
end
-
- #s.files = Dir['lib/**/*.rb'] + Dir['*.txt'] - [ 'lib/tokyotyrant.rb' ]
- s.files = Dir['lib/**/*.rb'] + Dir['*.txt']
end
View
2  test/tasks_test.rb
@@ -7,6 +7,8 @@
# Tue Feb 5 18:16:55 JST 2008
#
+require 'rubygems'
+
require 'test/unit'
$: << File.dirname(__FILE__) + '/../lib'
Please sign in to comment.
Something went wrong with that request. Please try again.