Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Window class extracted into a separate lib
- Loading branch information
Showing
46 changed files
with
784 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Dependencies in this Gemfile are managed through the gemspec. Add/remove | ||
## depenencies there, rather than editing this file | ||
# | ||
#require 'pathname' | ||
#NAME = 'win_gui' | ||
#BASE_PATH = Pathname.new(__FILE__).dirname | ||
#GEMSPEC_PATH = BASE_PATH + "#{NAME}.gemspec" | ||
# | ||
#source :gemcutter | ||
# | ||
## Setup gemspec dependencies | ||
#gemspec = eval(GEMSPEC_PATH.read) | ||
#gemspec.dependencies.each do |dep| | ||
# group = dep.type == :development ? :development : :default | ||
# gem dep.name, dep.requirement, :group => group | ||
#end | ||
#gem(gemspec.name, gemspec.version, :path => BASE_PATH) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
== 0.0.0 / 2010-01-08 | ||
|
||
* Birthday! Initial concept: Following "Scripted Gui testing with Ruby" by Ian Dees | ||
|
||
== 0.2.0 / 2010-05-15 | ||
|
||
* Window class extracted into a separate lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,24 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'pathname' | ||
NAME = 'win_gui' | ||
BASE_PATH = Pathname.new(__FILE__).dirname | ||
LIB_PATH = BASE_PATH + 'lib' | ||
PKG_PATH = BASE_PATH + 'pkg' | ||
DOC_PATH = BASE_PATH + 'rdoc' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "win_gui" | ||
gem.summary = %Q{Rubyesque interfaces and wrappers for Win32 API GUI functions} | ||
gem.description = %Q{Rubyesque interfaces and wrappers for Win32 API GUI functions} | ||
gem.email = "arvitallian@gmail.com" | ||
gem.homepage = "http://github.com/arvicco/win_gui" | ||
gem.authors = ["arvicco"] | ||
gem.add_dependency "win32-api", ">= 1.4.5" | ||
gem.add_development_dependency "rspec", ">= 1.2.9" | ||
gem.add_development_dependency "cucumber", ">= 0" | ||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings | ||
end | ||
Jeweler::GemcutterTasks.new | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" | ||
end | ||
|
||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.spec_files = FileList['spec/**/*_spec.rb'] | ||
end | ||
$LOAD_PATH.unshift LIB_PATH.to_s | ||
require 'version' | ||
|
||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
task :spec => :check_dependencies | ||
CLASS_NAME = WinGui | ||
VERSION = CLASS_NAME::VERSION | ||
|
||
begin | ||
require 'cucumber/rake/task' | ||
Cucumber::Rake::Task.new(:features) | ||
|
||
task :features => :check_dependencies | ||
require 'rake' | ||
rescue LoadError | ||
task :features do | ||
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" | ||
end | ||
require 'rubygems' | ||
gem 'rake', '~> 0.8.3.1' | ||
require 'rake' | ||
end | ||
|
||
task :default => :spec | ||
# Load rakefile tasks | ||
Dir['tasks/*.rake'].sort.each { |file| load file } | ||
|
||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "win_gui #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.6 | ||
0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib') | ||
require 'win_gui' | ||
|
||
require 'spec/expectations' | ||
require 'spec/stubs/cucumber' | ||
|
||
require 'pathname' | ||
BASE_PATH = Pathname.new(__FILE__).dirname + '../..' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'pathname' | ||
|
||
module WinGui | ||
|
||
VERSION_FILE = Pathname.new(__FILE__).dirname + '../VERSION' # :nodoc: | ||
VERSION = VERSION_FILE.exist? ? VERSION_FILE.read.strip : nil | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
win_gui_dir = File.join(File.dirname(__FILE__),"win_gui" ) | ||
$LOAD_PATH.unshift win_gui_dir unless $LOAD_PATH.include?(win_gui_dir) | ||
require 'win_gui' | ||
require 'version' | ||
|
||
module WinGui | ||
|
||
# require "bundler" | ||
# Bundler.setup | ||
|
||
# Requires ruby source file(s). Accepts either single filename/glob or Array of filenames/globs. | ||
# Accepts following options: | ||
# :*file*:: Lib(s) required relative to this file - defaults to __FILE__ | ||
# :*dir*:: Required lib(s) located under this dir name - defaults to gem name | ||
# | ||
def self.require_libs( libs, opts={} ) | ||
file = Pathname.new(opts[:file] || __FILE__) | ||
[libs].flatten.each do |lib| | ||
name = file.dirname + (opts[:dir] || file.basename('.*')) + lib.gsub(/(?<!.rb)$/, '.rb') | ||
Pathname.glob(name.to_s).sort.each {|rb| require rb} | ||
end | ||
end | ||
end # module WinGui | ||
|
||
# Require all ruby source files located under directory lib/win_gui | ||
# If you need files in specific order, you should specify it here before the glob | ||
WinGui.require_libs %W[**/*] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
win_gui_dir = File.join(File.dirname(__FILE__),"win_gui" ) | ||
$LOAD_PATH.unshift win_gui_dir unless $LOAD_PATH.include?(win_gui_dir) | ||
require 'win_gui' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.