Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Start using Bundler.

  • Loading branch information...
commit d88e97edbdfd02c0cbf15dbe69e58f02797cd02f 1 parent 5412c81
@jarmo jarmo authored
Showing with 23 additions and 134 deletions.
  1. +3 −0  Gemfile
  2. +9 −46 Rakefile
  3. +0 −54 rakefile.rb
  4. +11 −34 watir-classic.gemspec
View
3  Gemfile
@@ -0,0 +1,3 @@
+source :rubygems
+
+gemspec
View
55 Rakefile
@@ -1,56 +1,19 @@
require 'rubygems'
-require 'rake/clean'
-require 'fileutils'
+require 'bundler'
-projects = ['watir-classic']
+Bundler::GemHelper.install_tasks
-def launch_subrake(cmd)
- system("#{Gem.ruby} -S rake #{cmd}")
-end
-
-task :default => :gems
-
-task :gemdir do
- mkdir_p "gems" if !File.exist?("gems")
-end
-
-desc "Generate all the Watir gems"
-task :gems => :gemdir do
- projects.each do |project|
- tmp_files = %w{CHANGES VERSION README.rdoc LICENSE}
- FileUtils.cp tmp_files, project
- Dir.chdir(project) do
- launch_subrake "gem"
- FileUtils.rm tmp_files
- end
- end
- gems = Dir['*/pkg/*.gem']
- gems.each {|gem| FileUtils.install gem, 'gems'}
-end
+task :default => :spec
-desc "Clean all the projects"
-task :clean_subprojects do
- projects.each do |project|
- Dir.chdir(project) do
- launch_subrake "clean"
- end
- end
-end
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec)
-desc "Clean the build environment and projects"
-task :clean => [:clean_subprojects] do
- FileUtils.rm_r Dir.glob("gems/*") << "test/reports", :force => true
+RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.rcov = true
end
-desc "Run tests for Watir"
-task :test => [:test_watir]
-
-desc 'Run tests for Watir'
-task :test_watir do
- Dir.chdir("watir-classic") do
- launch_subrake "test"
- end
-end
+require 'yard'
+YARD::Rake::YardocTask.new
#
# ------------------------------ watirspec -----------------------------------
View
54 rakefile.rb
@@ -1,54 +0,0 @@
-require 'rubygems'
-require 'rake'
-require 'rake/clean'
-require 'rake/packagetask'
-require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
-
-require './watir-rdoc'
-
-$VERBOSE = nil
-desc 'Generate Watir API Documentation'
-Rake::RDocTask.new('rdoc') do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.options += $WATIR_RDOC_OPTIONS
- rdoc.rdoc_files.include('lib/watir-classic/ie.rb')
- $WATIR_EXTRA_RDOC_FILES.each do |file|
- rdoc.rdoc_files.include(file)
- end
- rdoc.rdoc_files.include('lib/watir-classic/contrib/*.rb')
- rdoc.rdoc_files.include('lib/watir-classic/dialogs/*.rb')
- rdoc.rdoc_files.include('lib/watir-classic/*.rb')
- rdoc.rdoc_files.exclude('lib/watir-classic/camel_case.rb')
-end
-
-Rake::TestTask.new do |t|
- t.test_files = FileList['unittests/core_tests.rb']
- t.verbose = true
-end
-
-CLEAN << 'pkg' << 'rdoc'
-
-
-desc 'Attach to an active IE window'
-task :attach do
- sh "irb.bat -r attach.rb"
-end
-
-task :default => :package
-
-if defined? Rake::GemPackageTask
-
- gemspec = eval(File.read('watir-classic.gemspec'))
-
- Rake::GemPackageTask.new(gemspec) do |p|
- p.gem_spec = gemspec
- p.need_tar = false
- p.need_zip = false
- end
-
-else
- puts 'Warning: without Rubygems packaging tasks are not available'
-end
-
View
45 watir-classic.gemspec
@@ -1,18 +1,9 @@
-require './watir-rdoc'
-
-$__watir_source_patterns = [
- 'CHANGES', 'rakefile.rb', 'VERSION', "README.rdoc", 'watir.gemspec', 'watir-rdoc.rb', 'LICENSE',
- 'lib/watir-classic.rb', 'lib/watir-classic/*.rb', 'lib/watir-classic/dialogs/*.rb', 'unittests/*.rb', 'unittests/html/*.html', 'unittests/html/images/*.*',
- 'unittests/other/*.rb', 'unittests/testcase/*.rb', 'unittests/windows/*.rb',
- 'lib/watir-classic/IEDialog/Release/IEDialog.dll', 'lib/watir-classic/win32ole/1.8.7/win32ole.so','lib/watir-classic/win32ole/1.9.3/win32ole.so',
- 'lib/watir-classic/contrib/*.rb'] +
- $WATIR_EXTRA_RDOC_FILES
-
-spec = Gem::Specification.new do |s|
- version = File.exist?('VERSION') ? File.read('VERSION').strip : "0.0.0"
+# -*- encoding: utf-8 -*-
+Gem::Specification.new do |s|
s.name = 'watir-classic'
- s.version = version
- s.summary = 'Automated testing tool for web applications.'
+ s.version = File.read("VERSION").strip
+ s.author = 'Bret Pettichord'
+ s.email = 'watir-general@groups.google.com'
s.description = <<-EOF
WATIR is "Web Application Testing in Ruby". Watir (pronounced water) is a free,
open-source functional testing tool for automating browser-based tests of web applications.
@@ -24,15 +15,13 @@ spec = Gem::Specification.new do |s|
Watir can test web applications written in any language.
Watir is a Ruby library that works with Internet Explorer on Windows.
EOF
- s.author = 'Bret Pettichord'
- s.email = 'watir-general@groups.google.com'
- s.rubyforge_project = 'Watir'
- s.homepage = 'http://www.watir.com/'
+ s.homepage = 'http://watir.com/'
+ s.summary = 'Automated testing tool for web applications.'
- s.platform = Gem::Platform::RUBY
- s.required_ruby_version = '>= 1.8.7'
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- spec/*`.split("\n")
+ s.require_paths = ["lib"]
s.requirements << 'Microsoft Windows running Internet Explorer 5.5 or later.'
- s.require_path = 'lib'
s.add_dependency 'win32-process', '>= 0.5.5'
s.add_dependency 'windows-pr', '>= 0.6.6'
@@ -42,17 +31,5 @@ spec = Gem::Specification.new do |s|
s.add_dependency 'user-choices'
s.add_dependency 'yajl-ruby'
- s.rdoc_options += $WATIR_RDOC_OPTIONS
- s.extra_rdoc_files = $WATIR_EXTRA_RDOC_FILES
- s.executables << 'watir-console'
-
-# s.test_file = 'unittests/core_tests.rb'
-
- s.files = $__watir_source_patterns.inject([]) { |list, glob|
- list << Dir[glob].delete_if { |path|
- File.directory?(path) or
- path.include?('CVS')
- }
- }.flatten
-
+ s.add_development_dependency("rspec", "~>2.3")
end
Please sign in to comment.
Something went wrong with that request. Please try again.