Skip to content
Newer
Older
100644 121 lines (85 sloc) 3 KB
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
1 require 'rubygems'
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored Jun 16, 2010
2
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
3 $:.unshift(File.dirname(__FILE__) + '/lib')
4 require 'whois'
add6330 @weppos Double quotes
authored Apr 12, 2010
5
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored Jun 16, 2010
6
be24e73 @weppos Base GEM skeleton.
authored Jun 29, 2009
7 # Common package properties
52e0b51 @weppos SHAPSHOT feature is no longer required
authored Feb 16, 2012
8 PKG_NAME = Whois::GEM
9 PKG_VERSION = Whois::VERSION
add6330 @weppos Double quotes
authored Apr 12, 2010
10
11
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored Aug 12, 2010
12 # Run test by default.
247a885 @weppos Rename :rspec task to :spec.
authored Sep 11, 2011
13 task :default => :spec
14 task :test => :spec
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored Aug 12, 2010
15
16 spec = Gem::Specification.new do |s|
17 s.name = PKG_NAME
18 s.version = PKG_VERSION
19 s.summary = "An intelligent pure Ruby WHOIS client and parser."
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
20 s.description = "Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, parse and convert responses into easy-to-use Ruby objects."
afd063a @weppos Minimum Ruby version is now 1.8.7
authored Oct 21, 2010
21
3c3d4e8 @weppos Drop support for Ruby 1.8
authored Sep 20, 2012
22 s.required_ruby_version = ">= 1.9.2"
afd063a @weppos Minimum Ruby version is now 1.8.7
authored Oct 21, 2010
23
70e4604 @weppos Standardize
authored Apr 11, 2011
24 s.authors = ["Simone Carletti"]
25 s.email = ["weppos@weppos.net"]
3c3d4e8 @weppos Drop support for Ruby 1.8
authored Sep 19, 2012
26 s.homepage = "http://www.ruby-whois.org/"
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
27 s.rubyforge_project = "whois"
be24e73 @weppos Base GEM skeleton.
authored Jun 29, 2009
28
7311d44 @weppos Rename LICENSE file
authored Sep 21, 2012
29 s.files = %w( LICENSE.txt .yardopts ) +
1590606 @weppos Packaged gem is missing .md files
authored May 25, 2012
30 Dir.glob("*.{md,gemspec}") +
4e40fe3 @weppos Removed support for .gemtest and removed /spec folder from the packag…
authored Jul 6, 2012
31 Dir.glob("{bin,lib}/**/*")
eb5bd31 @weppos Code cleanups
authored Feb 3, 2012
32 s.executables = %w( ruby-whois )
33 s.require_paths = %w( lib )
be24e73 @weppos Base GEM skeleton.
authored Jun 29, 2009
34
8fcab72 @weppos Fixed error "rake is not part of the bundle. Add it to Gemfile."
authored Jun 23, 2011
35 s.add_development_dependency "rake", "~> 0.9"
3c3d4e8 @weppos Drop support for Ruby 1.8
authored Sep 19, 2012
36 s.add_development_dependency "rspec", "~> 2.11.0"
8fcab72 @weppos Fixed error "rake is not part of the bundle. Add it to Gemfile."
authored Jun 23, 2011
37 s.add_development_dependency "mocha"
38 s.add_development_dependency "yard"
e58b1a8 @weppos Add post-install message
authored Mar 26, 2012
39
40 s.post_install_message = <<EOS
41 ********************************************************************************
42
43 Thank you for installing the whois gem!
44
45 If you like this gem, please support the project.
46 http://pledgie.com/campaigns/11383
47
48 Does your project or organization use this gem? Add it to the apps wiki.
49 https://github.com/weppos/whois/wiki/apps
50
51 Are you looking for a quick and convenient way to perform WHOIS queries?
52 Check out RoboWhois WHOIS API.
1c515d0 @weppos RoboWhois is now HTTPS
authored Sep 19, 2012
53 https://www.robowhois.com/
e58b1a8 @weppos Add post-install message
authored Mar 26, 2012
54
55 ********************************************************************************
56 EOS
be24e73 @weppos Base GEM skeleton.
authored Jun 29, 2009
57 end
58
1785e41 @weppos Move require statements near to the corresponding usage
authored Oct 17, 2011
59
60 require 'rubygems/package_task'
61
9294603 @weppos rake/gempackagetask is deprecated. Use rubygems/package_task instead.
authored Jun 17, 2011
62 Gem::PackageTask.new(spec) do |pkg|
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored Aug 12, 2010
63 pkg.gem_spec = spec
64 end
be24e73 @weppos Base GEM skeleton.
authored Jun 29, 2009
65
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored Aug 12, 2010
66 desc "Build the gemspec file #{spec.name}.gemspec"
67 task :gemspec do
68 file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
69 File.open(file, "w") {|f| f << spec.to_ruby }
70 end
71
52e0b51 @weppos SHAPSHOT feature is no longer required
authored Feb 16, 2012
72 desc "Remove any temporary products, including gemspec"
73 task :clean => [:clobber] do
74 rm "#{spec.name}.gemspec" if File.file?("#{spec.name}.gemspec")
75 end
76
77 desc "Remove any generated file"
78 task :clobber => [:clobber_package]
79
80 desc "Package the library and generates the gemspec"
81 task :package => [:gemspec]
82
d9ad2e0 @weppos Add cross-ruby test tasks
authored Aug 19, 2010
83
1785e41 @weppos Move require statements near to the corresponding usage
authored Oct 17, 2011
84 require 'rspec/core/rake_task'
67bf22e @weppos Don't force Fuubar as dependency.
authored Mar 26, 2012
85 begin
86 require 'fuubar'
87 rescue LoadError
88 end
1785e41 @weppos Move require statements near to the corresponding usage
authored Oct 17, 2011
89
0fec60c @weppos Don't run rake task in verbose mode by default
authored Jan 8, 2012
90 RSpec::Core::RakeTask.new do |t|
91 t.verbose = !!ENV["VERBOSE"]
67bf22e @weppos Don't force Fuubar as dependency.
authored Mar 26, 2012
92 t.rspec_opts = []
93 t.rspec_opts << ['--format', 'Fuubar'] if defined?(Fuubar)
0fec60c @weppos Don't run rake task in verbose mode by default
authored Jan 7, 2012
94 end
d3842b6 @weppos Install RSpec 2
authored Sep 22, 2010
95
d9ad2e0 @weppos Add cross-ruby test tasks
authored Aug 19, 2010
96
1785e41 @weppos Move require statements near to the corresponding usage
authored Oct 17, 2011
97 require 'yard'
98
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
99 YARD::Rake::YardocTask.new(:yardoc) do |y|
100 y.options = ["--output-dir", "yardoc"]
101 end
4c633ca @weppos Replace RDoc with YARD
authored Dec 20, 2010
102
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
103 namespace :yardoc do
104 task :clobber do
105 rm_r "yardoc" rescue nil
4c633ca @weppos Replace RDoc with YARD
authored Dec 20, 2010
106 end
107 end
108
c0ff6ec @weppos Simplify Rakefile
authored Mar 11, 2011
109 task :clobber => "yardoc:clobber"
54b1d16 @weppos Added Rake :console task.
authored Jun 29, 2009
110
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored Jun 16, 2010
111
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored Aug 12, 2010
112 desc "Open an irb session preloaded with this library"
113 task :console do
114 sh "irb -rubygems -I lib -r whois.rb"
115 end
116
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored Jun 16, 2010
117
afb4065 @weppos Super simple and super buggy initial version. It works, but sometimes…
authored Jul 1, 2009
118 Dir["tasks/**/*.rake"].each do |file|
119 load(file)
120 end
Something went wrong with that request. Please try again.