1 require 'rake/gempackagetask'
4 GEM_SPEC = Gem::Specification.new do |s|
5 unless s.respond_to?(:add_development_dependency)
6 puts 'The gem spec requires a newer version of RubyGems.'
11 s.version = PKG_VERSION
12 s.summary = PKG_SUMMARY
13 s.description = PKG_DESCRIPTION
15 s.files = PKG_FILES.to_a
16 s.executables << 'google-api'
19 s.extra_rdoc_files = %w( README )
20 s.rdoc_options.concat ['--main', 'README']
22 # Dependencies used in the main library
23 s.add_runtime_dependency('signet', '~> 0.2.2')
24 s.add_runtime_dependency('addressable', '~> 2.2.2')
25 s.add_runtime_dependency('httpadapter', '~> 1.0.0')
26 s.add_runtime_dependency('json', '>= 1.4.6')
27 s.add_runtime_dependency('extlib', '>= 0.9.15')
29 # Dependencies used in the CLI
30 s.add_runtime_dependency('launchy', '>= 0.3.2')
32 # Dependencies used in the examples
33 s.add_development_dependency('sinatra', '>= 1.2.0')
35 s.add_development_dependency('rake', '>= 0.7.3')
36 s.add_development_dependency('rspec', '~> 1.2.9')
37 s.add_development_dependency('rcov', '>= 0.9.9')
38 s.add_development_dependency('diff-lcs', '>= 1.1.2')
40 s.require_path = 'lib'
42 s.homepage = PKG_HOMEPAGE
45 Rake::GemPackageTask.new(GEM_SPEC) do |p|
51 desc 'Show information about the gem'
56 desc 'Install the gem'
57 task :install => ['clobber', 'gem:package'] do
58 sh "#{SUDO} gem install --local pkg/#{GEM_SPEC.full_name}"
61 desc 'Uninstall the gem'
63 installed_list = Gem.source_index.find_name(PKG_NAME)
65 (installed_list.collect { |s| s.version.to_s}.include?(PKG_VERSION))
67 "#{SUDO} gem uninstall --version '#{PKG_VERSION}' " +
68 "--ignore-dependencies --executables #{PKG_NAME}"
73 desc 'Reinstall the gem'
74 task :reinstall => [:uninstall, :install]
77 desc 'Alias to gem:package'
78 task 'gem' => 'gem:package'
80 task 'clobber' => ['gem:clobber_package']