Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 115 lines (81 sloc) 2.911 kB
c0ff6ec @weppos Simplify Rakefile
authored
1 require 'rubygems'
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored
2
c0ff6ec @weppos Simplify Rakefile
authored
3 $:.unshift(File.dirname(__FILE__) + '/lib')
5104e5a @weppos Fix NameError: uninitialized constant Whois::Record
authored
4 require 'whois'
add6330 @weppos Double quotes
authored
5
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored
6
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
7 # Run test by default.
247a885 @weppos Rename :rspec task to :spec.
authored
8 task :default => :spec
9 task :test => :spec
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
10
11 spec = Gem::Specification.new do |s|
b5466c5 @weppos Remove unnecessary code remnants
authored
12 s.name = "whois"
13 s.version = Whois::VERSION
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
14 s.summary = "An intelligent pure Ruby WHOIS client and parser."
c0ff6ec @weppos Simplify Rakefile
authored
15 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
16
3c3d4e8 @weppos Drop support for Ruby 1.8
authored
17 s.required_ruby_version = ">= 1.9.2"
afd063a @weppos Minimum Ruby version is now 1.8.7
authored
18
70e4604 @weppos Standardize
authored
19 s.authors = ["Simone Carletti"]
20 s.email = ["weppos@weppos.net"]
86bb947 @manuelmeurer change all ruby-whois.org occurrences to whoisrb.org
manuelmeurer authored
21 s.homepage = "http://whoisrb.org/"
3200892 @weppos Add license in gemspec (closes GH-242)
authored
22 s.license = "MIT"
c0ff6ec @weppos Simplify Rakefile
authored
23 s.rubyforge_project = "whois"
be24e73 @weppos Base GEM skeleton.
authored
24
7311d44 @weppos Rename LICENSE file
authored
25 s.files = %w( LICENSE.txt .yardopts ) +
2c22a12 @weppos .md => .markdown
authored
26 Dir.glob("*.{markdown,gemspec}") +
2b69ed1 @weppos Include /data folder in the final gem
authored
27 Dir.glob("{bin,data,lib}/**/*")
463b568 @weppos Fix gemspec
authored
28 s.executables = %w( whoisrb )
eb5bd31 @weppos Code cleanups
authored
29 s.require_paths = %w( lib )
be24e73 @weppos Base GEM skeleton.
authored
30
1295fde @weppos Replace active_support with activesupport (see GH-317)
authored
31 s.add_dependency "activesupport", ">= 3"
bdc4757 @byroot Stop embeding half of active-support. Just require it.
byroot authored
32
5013e02 @weppos Update development dependencies
authored
33 s.add_development_dependency "rake"
d83c91a @weppos Upgrade to rspec 3.0
authored
34 s.add_development_dependency "rspec", "~> 3.0"
5013e02 @weppos Update development dependencies
authored
35 s.add_development_dependency "mocha"
8fcab72 @weppos Fixed error "rake is not part of the bundle. Add it to Gemfile."
authored
36 s.add_development_dependency "yard"
e58b1a8 @weppos Add post-install message
authored
37
38 s.post_install_message = <<EOS
39 ********************************************************************************
40
41 Thank you for installing the whois gem!
42
43 If you like this gem, please support the project.
44 http://pledgie.com/campaigns/11383
45
46 Does your project or organization use this gem? Add it to the apps wiki.
47 https://github.com/weppos/whois/wiki/apps
48
49 ********************************************************************************
50 EOS
be24e73 @weppos Base GEM skeleton.
authored
51 end
52
1785e41 @weppos Move require statements near to the corresponding usage
authored
53
54 require 'rubygems/package_task'
55
9294603 @weppos rake/gempackagetask is deprecated. Use rubygems/package_task instead.
authored
56 Gem::PackageTask.new(spec) do |pkg|
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
57 pkg.gem_spec = spec
58 end
be24e73 @weppos Base GEM skeleton.
authored
59
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
60 desc "Build the gemspec file #{spec.name}.gemspec"
61 task :gemspec do
62 file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
63 File.open(file, "w") {|f| f << spec.to_ruby }
64 end
65
52e0b51 @weppos SHAPSHOT feature is no longer required
authored
66 desc "Remove any temporary products, including gemspec"
67 task :clean => [:clobber] do
68 rm "#{spec.name}.gemspec" if File.file?("#{spec.name}.gemspec")
69 end
70
71 desc "Remove any generated file"
72 task :clobber => [:clobber_package]
73
74 desc "Package the library and generates the gemspec"
75 task :package => [:gemspec]
76
d9ad2e0 @weppos Add cross-ruby test tasks
authored
77
1785e41 @weppos Move require statements near to the corresponding usage
authored
78 require 'rspec/core/rake_task'
67bf22e @weppos Don't force Fuubar as dependency.
authored
79 begin
80 require 'fuubar'
81 rescue LoadError
82 end
1785e41 @weppos Move require statements near to the corresponding usage
authored
83
0fec60c @weppos Don't run rake task in verbose mode by default
authored
84 RSpec::Core::RakeTask.new do |t|
85 t.verbose = !!ENV["VERBOSE"]
67bf22e @weppos Don't force Fuubar as dependency.
authored
86 t.rspec_opts = []
87 t.rspec_opts << ['--format', 'Fuubar'] if defined?(Fuubar)
0fec60c @weppos Don't run rake task in verbose mode by default
authored
88 end
d3842b6 @weppos Install RSpec 2
authored
89
d9ad2e0 @weppos Add cross-ruby test tasks
authored
90
1785e41 @weppos Move require statements near to the corresponding usage
authored
91 require 'yard'
92
c0ff6ec @weppos Simplify Rakefile
authored
93 YARD::Rake::YardocTask.new(:yardoc) do |y|
94 y.options = ["--output-dir", "yardoc"]
95 end
4c633ca @weppos Replace RDoc with YARD
authored
96
c0ff6ec @weppos Simplify Rakefile
authored
97 namespace :yardoc do
98 task :clobber do
99 rm_r "yardoc" rescue nil
4c633ca @weppos Replace RDoc with YARD
authored
100 end
101 end
102
c0ff6ec @weppos Simplify Rakefile
authored
103 task :clobber => "yardoc:clobber"
54b1d16 @weppos Added Rake :console task.
authored
104
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored
105
c018532 @weppos Drop dependency from Echoe and rewrite the Rakefile from scratch.
authored
106 desc "Open an irb session preloaded with this library"
107 task :console do
108 sh "irb -rubygems -I lib -r whois.rb"
109 end
110
1f4d414 @weppos Change :publish_docs task to deploy on my server instead of RubyGems.
authored
111
afb4065 @weppos Super simple and super buggy initial version. It works, but sometimes…
authored
112 Dir["tasks/**/*.rake"].each do |file|
113 load(file)
114 end
Something went wrong with that request. Please try again.