Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced hyphens with underscores in file and command names.
Moved lib & model dirs to be under life_game_viewer dir. Used bundle gem style of directory structure, etc. Moved commands to main.rb. Added version.rb. Added Rakefile, Gemfile, and LICENSE.
- Loading branch information
1 parent
f746548
commit 10d6966
Showing
22 changed files
with
94 additions
and
38 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,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in life_game_viewer.gemspec | ||
gemspec |
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,22 @@ | ||
Copyright (c) 2012 Keith Bennett | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,2 @@ | ||
#!/usr/bin/env rake | ||
require "bundler/gem_tasks" |
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,6 @@ | ||
#!/usr/bin/env jruby | ||
|
||
|
||
require 'life_game_viewer' | ||
|
||
LifeGameViewer::Main.view_sample |
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,16 +1,27 @@ | ||
#!/usr/bin/env ruby | ||
|
||
#require_relative 'model/sample_life_model' | ||
#require_relative 'view/life_table_model' | ||
require_relative 'view/life_game_viewer_frame' | ||
|
||
class LifeGameViewer | ||
module LifeGameViewer | ||
|
||
def self.view_sample | ||
LifeGameViewerFrame.view_sample | ||
unless /java$/ === RUBY_PLATFORM | ||
puts "This program must be run in JRuby." | ||
exit -1 | ||
end | ||
|
||
def self.view(model) | ||
LifeGameViewerFrame.new(model).visible = true | ||
end | ||
require 'java' | ||
|
||
%w( | ||
life_game_viewer/version.rb | ||
life_game_viewer/model/life_calculator | ||
life_game_viewer/model/life_visualizer | ||
life_game_viewer/model/model_validation | ||
life_game_viewer/model/sample_life_model | ||
life_game_viewer/view/actions | ||
life_game_viewer/view/clipboard_helper | ||
life_game_viewer/view/generations | ||
life_game_viewer/view/main | ||
life_game_viewer/view/life_game_viewer_frame | ||
life_game_viewer/view/life_table_model | ||
).each { |file| require_relative(file) } | ||
|
||
end |
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
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 @@ | ||
module LifeGameViewer | ||
VERSION = "0.9.0" | ||
end |
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
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,16 @@ | ||
|
||
# Main entry point into the application. | ||
module LifeGameViewer | ||
class Main | ||
|
||
|
||
def self.view_sample | ||
LifeGameViewerFrame.view_sample | ||
end | ||
|
||
def self.view(model) | ||
LifeGameViewerFrame.new(model).visible = true | ||
end | ||
|
||
end | ||
end |
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,17 @@ | ||
# -*- encoding: utf-8 -*- | ||
require File.expand_path('../lib/life_game_viewer/version', __FILE__) | ||
|
||
Gem::Specification.new do |gem| | ||
gem.authors = ["Keith Bennett"] | ||
gem.email = ["keithrbennett@gmail.com"] | ||
gem.summary = "Game of Life Viewer" | ||
gem.description = "Game of Life Viewer written in JRuby using Java Swing" | ||
gem.homepage = 'https://github.com/keithrbennett/life_game_viewer' | ||
|
||
gem.files = `git ls-files`.split($\) | ||
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } | ||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) | ||
gem.name = "life_game_viewer" | ||
gem.require_paths = ["lib"] | ||
gem.version = LifeGameViewer::VERSION | ||
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 @@ | ||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') | ||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib', 'life_game_viewer') |