-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Button, Animation moved into place, then moved to ./todo
- Loading branch information
1 parent
3d6d098
commit 519dbd1
Showing
29 changed files
with
338 additions
and
76 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,19 @@ | ||
# A sample Guardfile | ||
# More info at https://github.com/guard/guard#readme | ||
|
||
guard 'rspec', :version => 2 do | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | ||
watch('spec/spec_helper.rb') { "spec" } | ||
|
||
# Rails example | ||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | ||
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } | ||
watch('config/routes.rb') { "spec/routing" } | ||
watch('app/controllers/application_controller.rb') { "spec/controllers" } | ||
# Capybara request specs | ||
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.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
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 @@ | ||
/Users/peterfitzgibbons/.rvm/gems/jruby-1.6.5@shoes/bin/rspec |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'shoes/timer_base' | ||
#require 'runnable_block' | ||
|
||
module Shoes | ||
class Animation < TimerBase | ||
|
||
import javax.swing.Timer | ||
|
||
attr_reader :jtimer | ||
|
||
def initialize this, fps, &blk | ||
ms_per_frame = 1000 / fps | ||
|
||
if block_given? | ||
@runnable = RunnableBlock.new(this, blk) | ||
@jtimer = Timer.new(ms_per_frame, @runnable ) | ||
|
||
#@runnable.init | ||
@jtimer.start | ||
end | ||
end | ||
|
||
def stop | ||
#@runnable.stop | ||
@jtimer.stop | ||
end | ||
|
||
def start | ||
#@runnable.start | ||
@jtimer.start | ||
end | ||
|
||
end | ||
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
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
|
||
$:<< '../lib' | ||
require 'java' | ||
|
||
require 'rspec' | ||
|
||
require 'shoes' | ||
|
||
Dir["./spec/white_shoes/shared_examples/**/*.rb"].each {|f| require f} |
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 |
---|---|---|
|
@@ -6,4 +6,9 @@ | |
it_behaves_like "A WhiteShoes Shoes::App" | ||
|
||
|
||
after :each do | ||
debugger | ||
subject | ||
end | ||
|
||
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
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
spec/white_shoes/shared_examples/shared_shoes_animation_spec.rb
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,24 @@ | ||
|
||
shared_examples_for "A WhiteShoes Shoes::Animation" do | ||
class ShoeLacesAnimation | ||
#attr_accessor :blk, :gui_container | ||
#attr_accessor :width, :height, :margin | ||
#attr_accessor :parent_gui_container | ||
end | ||
|
||
let(:shoelaces) { | ||
shoelaces = ShoeLacesAnimation.new({}) {} | ||
#shoelaces.stub_chain(:logger, :debug) | ||
shoelaces.extend described_class | ||
shoelaces | ||
} | ||
|
||
subject { shoelaces } | ||
|
||
describe "gui_animation_init" do | ||
#it "should leave a reference to the container" do | ||
# subject.should_receive(:gui_container=).with(anything) | ||
# subject.gui_flow_init | ||
#end | ||
end | ||
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
24 changes: 24 additions & 0 deletions
24
spec/white_shoes/shared_examples/shared_shoes_button_spec.rb
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,24 @@ | ||
|
||
shared_examples_for "A WhiteShoes Shoes::Button" do | ||
class ShoeLacesButton | ||
attr_accessor :parent_gui_container, :blk | ||
attr_accessor :gui_element | ||
attr_accessor :text, :width, :height | ||
end | ||
|
||
let(:shoelaces) { | ||
shoelaces = ShoeLacesButton.new({}) {} | ||
#shoelaces.stub_chain(:logger, :debug) | ||
shoelaces.extend described_class | ||
shoelaces | ||
} | ||
|
||
subject { shoelaces } | ||
|
||
describe "gui_button_init" do | ||
it "should leave a reference to the container" do | ||
subject.should_receive(:gui_container=).with(anything) | ||
subject.gui_button_init | ||
end | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'java' | ||
require 'swt' | ||
class Object | ||
include_package 'org.eclipse.swt' | ||
include_package 'org.eclipse.swt.widgets' | ||
end | ||
display = Swt.display | ||
shell = Shell.new display | ||
shell.setSize 300, 300 | ||
shell.open | ||
while !shell.isDisposed do | ||
display.sleep unless display.readAndDispatch | ||
end | ||
display.dispose |
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,16 @@ | ||
#debugger | ||
#require 'native' | ||
module Shoes | ||
class Button | ||
|
||
attr_accessor :parent_gui_container, :blk | ||
attr_accessor :gui_element | ||
attr_accessor :text, :width, :height | ||
|
||
def initialize(parent_gui_container, text = 'Button', opts={}, &blk) | ||
|
||
gui_button_init | ||
end | ||
|
||
end | ||
end |
File renamed without changes.
Oops, something went wrong.