Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

and switched to jeweler (thanks Kenneth)
  • Loading branch information...
commit 104432000084a54462957a0cdc67eb4dcf913114 1 parent 5bcf98f
John Mettraux authored
1  CHANGELOG.txt
@@ -4,6 +4,7 @@
4 4
5 5 == rufus-rtm - 0.1.3 not yet released
6 6
  7 +- removed evil "require 'rubygems'" from rufus/rtm/base.rb
7 8 - can now pass rtm key and secret via method params (Giorgio's request)
8 9
9 10
100 Rakefile
... ... @@ -1,92 +1,74 @@
1 1
2   -require 'rubygems'
3 2
  3 +require 'lib/rufus/rtm/base.rb'
  4 +
  5 +require 'rubygems'
4 6 require 'rake'
5   -require 'rake/clean'
6   -require 'rake/packagetask'
7   -require 'rake/gempackagetask'
8   -require 'rake/testtask'
9 7
10   -#require 'rake/rdoctask'
11   -#require 'hanna/rdoctask'
12 8
  9 +#
  10 +# CLEAN
13 11
14   -gemspec = File.read('rufus-rtm.gemspec')
15   -eval "gemspec = #{gemspec}"
  12 +require 'rake/clean'
  13 +CLEAN.include('pkg', 'tmp', 'html')
  14 +task :default => [ :clean ]
16 15
17 16
18 17 #
19   -# tasks
20   -
21   -CLEAN.include('pkg', 'html')
  18 +# GEM
22 19
23   -task :default => [ :clean, :repackage ]
  20 +require 'jeweler'
24 21
  22 +Jeweler::Tasks.new do |gem|
25 23
26   -#
27   -# TESTING
28   -
29   -Rake::TestTask.new(:test) do |t|
30   - t.libs << 'test'
31   - t.test_files = FileList['test/test.rb']
32   - t.verbose = true
33   -end
  24 + gem.version = Rufus::RTM::VERSION
  25 + gem.name = 'rufus-rtm'
  26 + gem.summary = 'yet another RememberTheMilk wrapper'
34 27
  28 + gem.description = %{
  29 + yet another RememberTheMilk wrapper
  30 + }
  31 + gem.email = 'jmettraux@gmail.com'
  32 + gem.homepage = 'http://github.com/jmettraux/rufus-rtm/'
  33 + gem.authors = [ 'John Mettraux' ]
  34 + gem.rubyforge_project = 'rufus'
35 35
36   -#
37   -# VERSION
  36 + gem.test_file = 'test/test.rb'
38 37
39   -task :change_version do
  38 + gem.add_dependency 'rufus-verbs', '>= 1.0.0'
  39 + gem.add_development_dependency 'yard', '>= 0'
40 40
41   - version = ARGV.pop
42   - `sedip "s/VERSION = '.*'/VERSION = '#{version}'/" lib/rufus/rtm/base.rb`
43   - `sedip "s/s.version = '.*'/s.version = '#{version}'/" rufus-rtm.gemspec`
44   - exit 0 # prevent rake from triggering other tasks
  41 + # gemspec spec : http://www.rubygems.org/read/chapter/20
45 42 end
  43 +Jeweler::GemcutterTasks.new
46 44
47 45
48 46 #
49   -# PACKAGING
  47 +# DOC
50 48
51   -Rake::GemPackageTask.new(gemspec) do |pkg|
52   - #pkg.need_tar = true
53   -end
  49 +begin
  50 +
  51 + require 'yard'
54 52
55   -Rake::PackageTask.new('rufus-rtm', gemspec.version) do |pkg|
56   -
57   - pkg.need_zip = true
58   - pkg.package_files = FileList[
59   - 'Rakefile',
60   - '*.txt',
61   - 'lib/**/*',
62   - 'test/**/*'
63   - ].to_a
64   - #pkg.package_files.delete("MISC.txt")
65   - class << pkg
66   - def package_name
67   - "#{@name}-#{@version}-src"
68   - end
  53 + YARD::Rake::YardocTask.new do |doc|
  54 + doc.options = [
  55 + '-o', 'html/rufus-rtm', '--title',
  56 + "rufus-rtm #{Rufus::RTM::VERSION}"
  57 + ]
69 58 end
70   -end
71 59
  60 +rescue LoadError
72 61
73   -#
74   -# DOCUMENTATION
75   -
76   -task :rdoc do
77   - sh %{
78   - rm -fR rdoc
79   - yardoc 'lib/**/*.rb' \
80   - -o html/rufus-rtm \
81   - --title 'rufus-rtm'
82   - }
  62 + task :yard do
  63 + abort "YARD is not available : sudo gem install yard"
  64 + end
83 65 end
84 66
85 67
86 68 #
87   -# WEBSITE
  69 +# TO THE WEB
88 70
89   -task :upload_website => [ :clean, :rdoc ] do
  71 +task :upload_website => [ :clean, :yard ] do
90 72
91 73 account = 'jmettraux@rubyforge.org'
92 74 webdir = '/var/www/gforge-projects/rufus'
2  lib/rufus/rtm/base.rb
@@ -23,9 +23,7 @@
23 23 #++
24 24
25 25
26   -require 'rubygems'
27 26 require 'rufus/verbs'
28   -
29 27 require 'json'
30 28 require 'md5'
31 29
72 rufus-rtm.gemspec
... ... @@ -1,27 +1,61 @@
  1 +# Generated by jeweler
  2 +# DO NOT EDIT THIS FILE DIRECTLY
  3 +# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
  4 +# -*- encoding: utf-8 -*-
1 5
2 6 Gem::Specification.new do |s|
  7 + s.name = %q{rufus-rtm}
  8 + s.version = "0.1.3"
3 9
4   - s.name = 'rufus-rtm'
5   - s.version = '0.1.2'
6   - s.authors = [ 'John Mettraux' ]
7   - s.email = 'jmettraux@gmail.com'
8   - s.homepage = 'http://rufus.rubyforge.org/rufus-rtm/'
9   - s.platform = Gem::Platform::RUBY
10   - s.summary = 'yet another RememberTheMilk wrapper'
  10 + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  11 + s.authors = ["John Mettraux"]
  12 + s.date = %q{2010-01-24}
  13 + s.description = %q{
  14 + yet another RememberTheMilk wrapper
  15 + }
  16 + s.email = %q{jmettraux@gmail.com}
  17 + s.extra_rdoc_files = [
  18 + "LICENSE.txt",
  19 + "README.txt"
  20 + ]
  21 + s.files = [
  22 + "CHANGELOG.txt",
  23 + "LICENSE.txt",
  24 + "README.txt",
  25 + "Rakefile",
  26 + "lib/rufus-rtm.rb",
  27 + "lib/rufus/rtm.rb",
  28 + "lib/rufus/rtm/base.rb",
  29 + "lib/rufus/rtm/credentials.rb",
  30 + "lib/rufus/rtm/resources.rb",
  31 + "rufus-rtm.gemspec",
  32 + "test/tasks_test.rb",
  33 + "test/test.rb"
  34 + ]
  35 + s.homepage = %q{http://github.com/jmettraux/rufus-rtm/}
  36 + s.rdoc_options = ["--charset=UTF-8"]
  37 + s.require_paths = ["lib"]
  38 + s.rubyforge_project = %q{rufus}
  39 + s.rubygems_version = %q{1.3.5}
  40 + s.summary = %q{yet another RememberTheMilk wrapper}
  41 + s.test_files = [
  42 + "test/test.rb"
  43 + ]
11 44
12   - s.require_path = 'lib'
13   - s.test_file = 'test/test.rb'
14   - s.has_rdoc = true
15   - #s.extra_rdoc_files = %w{ README.txt CHANGELOG.txt CREDITS.txt LICENSE.txt }
16   - s.extra_rdoc_files = %w{ README.txt CHANGELOG.txt LICENSE.txt }
17   - s.rubyforge_project = 'rufus'
  45 + if s.respond_to? :specification_version then
  46 + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
  47 + s.specification_version = 3
18 48
19   - %w{ rufus-verbs }.each do |d|
20   - s.requirements << d
21   - s.add_dependency(d)
  49 + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
  50 + s.add_runtime_dependency(%q<rufus-verbs>, [">= 1.0.0"])
  51 + s.add_development_dependency(%q<yard>, [">= 0"])
  52 + else
  53 + s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
  54 + s.add_dependency(%q<yard>, [">= 0"])
  55 + end
  56 + else
  57 + s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
  58 + s.add_dependency(%q<yard>, [">= 0"])
22 59 end
23   -
24   - #s.files = Dir['lib/**/*.rb'] + Dir['*.txt'] - [ 'lib/tokyotyrant.rb' ]
25   - s.files = Dir['lib/**/*.rb'] + Dir['*.txt']
26 60 end
27 61
2  test/tasks_test.rb
@@ -7,6 +7,8 @@
7 7 # Tue Feb 5 18:16:55 JST 2008
8 8 #
9 9
  10 +require 'rubygems'
  11 +
10 12 require 'test/unit'
11 13
12 14 $: << File.dirname(__FILE__) + '/../lib'

0 comments on commit 1044320

Please sign in to comment.
Something went wrong with that request. Please try again.