the_game 0.0.1 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +6 -4
- data/README.rdoc +17 -20
- data/bin/the_game +2 -1
- data/lib/the_game/cli.rb +0 -0
- data/lib/the_game/command.rb +49 -13
- data/lib/the_game/game.rb +49 -5
- data/lib/the_game/helpers/import.rb +9 -0
- data/lib/the_game/helpers/object.rb +5 -0
- data/lib/the_game/{string.rb → helpers/string.rb} +6 -7
- data/lib/the_game/helpers.rb +8 -0
- data/lib/the_game/license.rb +6 -10
- data/lib/the_game/version.rb +3 -3
- data/lib/the_game.rb +7 -19
- metadata +16 -19
- data/.document +0 -5
- data/Gemfile +0 -14
- data/Gemfile.lock +0 -20
- data/rakefile.rb +0 -57
- data/test/helper.rb +0 -18
- data/test/test_the_game.rb +0 -11
- data/the_game.gemspec +0 -65
data/LICENSE.txt
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
the_game Copyright (C) 2012 Shigeki Kitajima
|
2
2
|
|
3
|
-
|
4
|
-
the terms of the Creative Commons Public License 3.0 (BY-NC-SA). This program
|
5
|
-
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
|
3
|
+
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:
|
6
4
|
|
7
|
-
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
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.
|
8
|
+
|
9
|
+
<http://opensource.org/licenses/MIT/>
|
data/README.rdoc
CHANGED
@@ -1,24 +1,21 @@
|
|
1
1
|
= the_game
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
2
|
+
the_game is a text-based game, but it doesn't do much right now.
|
5
3
|
== Installation
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
==
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
4
|
+
Install the_game from rubygems:
|
5
|
+
gem install the_game [-v VERSION]
|
6
|
+
or from source:
|
7
|
+
rake install
|
8
|
+
== Usage
|
9
|
+
Run the executable +the_game+.
|
10
|
+
Usage: the_game.rb [options] [mode]
|
11
|
+
|
12
|
+
Options
|
13
|
+
-n, --name NAME Set character's name to NAME.
|
14
|
+
Modes
|
15
|
+
-p, --play Play the game
|
16
|
+
-h, --help Display this message and exit
|
17
|
+
-l, --license Display license and exit
|
18
|
+
-v, --version Display version and exit
|
20
19
|
== Copyright
|
21
|
-
|
22
|
-
Copyright (c) 2012 Shigeki Kitajima. See LICENSE.txt for
|
23
|
-
further details.
|
20
|
+
Copyright (c) 2012 Shigeki Kitajima. See LICENSE.txt for further details.
|
24
21
|
|
data/bin/the_game
CHANGED
data/lib/the_game/cli.rb
ADDED
File without changes
|
data/lib/the_game/command.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
class TheGame::Command
|
2
2
|
class << self
|
3
3
|
def send(game, input)
|
4
|
-
input.
|
4
|
+
input.strip!
|
5
5
|
|
6
6
|
# Allow interpolation in the form of $(command) => output of command
|
7
|
-
input.gsub!(/\$\((.*)\)/) { send($1.to_s) }
|
7
|
+
input.gsub!(/\$\((.*)\)/) { send(self, $1.to_s) }
|
8
8
|
|
9
|
-
unless input.
|
10
|
-
method
|
9
|
+
unless input.empty?
|
10
|
+
# The method to send to TheGame::Command with +_+ before it
|
11
|
+
method = input.words.first
|
12
|
+
|
13
|
+
# Not an array! Use String#args to get an argument array.
|
11
14
|
args = input.remove_first_word
|
12
15
|
|
13
|
-
__send__("_#{method}", game, args)
|
16
|
+
__send__("_#{method.command_sanitize.downcase}", game, args)
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
@@ -22,27 +25,60 @@ class TheGame::Command
|
|
22
25
|
a.args.inspect
|
23
26
|
end
|
24
27
|
|
25
|
-
def _echo(g, a)
|
26
|
-
|
28
|
+
def _echo(g, a); a; end
|
29
|
+
|
30
|
+
def _set(g, a)
|
31
|
+
value = a.remove_first_word
|
32
|
+
if value.blank?
|
33
|
+
"Usage: set [key] [value]"
|
34
|
+
else
|
35
|
+
key = a.words.first.to_s.downcase
|
36
|
+
r = g.set(key, value)
|
37
|
+
r == true ? "#{key.capitalize} set to #{value.inspect}" : r
|
38
|
+
end
|
27
39
|
end
|
28
40
|
|
29
41
|
def _lol(g, a)
|
30
|
-
|
42
|
+
iteration = 0
|
43
|
+
messages = [ "U MAD BRO?", "PROBLEM?" ]
|
44
|
+
loop do
|
45
|
+
message = messages[ iteration % messages.size ].center(10)
|
46
|
+
41.upto(45) do |code|
|
47
|
+
message.scan(/./).each do |char|
|
48
|
+
print "\e[#{code};39;1m"
|
49
|
+
print char * ((rand * 1.01) + 1)
|
50
|
+
print "\e[0m"
|
51
|
+
end
|
52
|
+
iteration += 1
|
53
|
+
end
|
54
|
+
sleep 0.005
|
55
|
+
end
|
31
56
|
end
|
32
57
|
|
33
58
|
def _help(g, a)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
59
|
+
commands = methods(false).select{|m|m.match(/^_/)}.map{|m|m.to_s.command_sanitize}
|
60
|
+
|
61
|
+
"Commands available: [ #{commands.join(', ')} ]"
|
62
|
+
end
|
63
|
+
|
64
|
+
def _version(g, a)
|
65
|
+
TheGame::Version::STRING
|
66
|
+
end
|
67
|
+
|
68
|
+
def _license(g, a)
|
69
|
+
TheGame::LICENSE
|
38
70
|
end
|
39
71
|
|
40
72
|
def _game(g, a)
|
41
73
|
g.inspect
|
42
74
|
end
|
75
|
+
|
76
|
+
def _save(g, a)
|
77
|
+
g.save
|
78
|
+
end
|
43
79
|
|
44
80
|
def _quit(g, a)
|
45
81
|
exit
|
46
82
|
end
|
47
83
|
end
|
48
|
-
end
|
84
|
+
end
|
data/lib/the_game/game.rb
CHANGED
@@ -1,14 +1,57 @@
|
|
1
1
|
require 'readline'
|
2
|
+
require 'yaml'
|
3
|
+
require 'zlib'
|
4
|
+
|
2
5
|
class TheGame::Game
|
3
6
|
attr_accessor :name, :level
|
4
7
|
|
5
8
|
def initialize
|
6
|
-
|
7
|
-
@
|
9
|
+
TheGame.initialize!
|
10
|
+
@created_at = Time.now
|
11
|
+
@name = "anonymous"
|
12
|
+
@level = 1
|
13
|
+
end
|
14
|
+
|
15
|
+
def yaml_dump
|
16
|
+
YAML.dump({
|
17
|
+
'created_at' => @created_at,
|
18
|
+
'name' => @name,
|
19
|
+
'level' => @level,
|
20
|
+
'config' => {},
|
21
|
+
'the_game' => {
|
22
|
+
'version' => TheGame::Version::STRING
|
23
|
+
}
|
24
|
+
})
|
25
|
+
end
|
26
|
+
|
27
|
+
def save(savefile = TheGame::SAVEFILE_PATH)
|
28
|
+
r = false
|
29
|
+
begin
|
30
|
+
Zlib::GzipWriter.open(savefile, Zlib::BEST_COMPRESSION) { |gz| gz << yaml_dump }
|
31
|
+
rescue => e
|
32
|
+
r = e
|
33
|
+
end
|
34
|
+
r || "Game saved."
|
35
|
+
end
|
36
|
+
|
37
|
+
# Try set name [NAME] and set level [VALUE]
|
38
|
+
def set(key, value)
|
39
|
+
begin
|
40
|
+
case key.downcase.to_sym
|
41
|
+
when :name then @name = value
|
42
|
+
when :level then @level = value
|
43
|
+
else raise ArgumentError, "No matching key for #{key}" end
|
44
|
+
rescue Exception => e
|
45
|
+
return e
|
46
|
+
end
|
47
|
+
true
|
8
48
|
end
|
9
49
|
|
50
|
+
# Names are green,
|
51
|
+
# locations are magenta,
|
52
|
+
# levels are blue.
|
10
53
|
def prompt
|
11
|
-
"\e[1;32m#{@name}
|
54
|
+
"\e[1;32m#{@name} \e[35m/ \e[34m#{@level} $\e[0m "
|
12
55
|
end
|
13
56
|
|
14
57
|
def start!
|
@@ -18,7 +61,8 @@ class TheGame::Game
|
|
18
61
|
trap(:INT) { puts; exit }
|
19
62
|
|
20
63
|
loop do
|
21
|
-
|
64
|
+
output = TheGame::Command.send(self, ::Readline.readline(prompt, true))
|
65
|
+
puts output unless output.blank?
|
22
66
|
end
|
23
67
|
end
|
24
|
-
end
|
68
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
module TheGame::Helpers::StringHelpers
|
2
2
|
TRUE_WORDS = %w{t true yes y}
|
3
3
|
FALSE_WORDS = %w{f false no n}
|
4
4
|
|
@@ -11,7 +11,7 @@ class String
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def to_bool
|
14
|
-
TRUE_WORDS.include?(
|
14
|
+
TRUE_WORDS.include?(downcase) ? true : FALSE_WORDS.include?(downcase) ? false : nil
|
15
15
|
end
|
16
16
|
|
17
17
|
def bool?
|
@@ -21,7 +21,7 @@ class String
|
|
21
21
|
def args
|
22
22
|
strip!
|
23
23
|
|
24
|
-
|
24
|
+
words.map do |arg|
|
25
25
|
arg = arg.to_s
|
26
26
|
next if arg.empty?
|
27
27
|
arg.bool? ? arg.to_bool : arg.numeric? ? Float(arg) : arg
|
@@ -35,9 +35,8 @@ class String
|
|
35
35
|
def words
|
36
36
|
scan(/\S+/)
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
def remove_first_word
|
40
|
-
|
41
|
-
words.length == 2 ? words.last : ''
|
40
|
+
gsub(/^\S+\s*/,'')
|
42
41
|
end
|
43
|
-
end
|
42
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Contains TheGame::Helpers::StringHelpers and TheGame::Helpers::ObjectHelpers. Using
|
2
|
+
# require 'the_game/helpers/import'
|
3
|
+
# will bring include these helpers within their respective classes.
|
4
|
+
|
5
|
+
module TheGame::Helpers; end
|
6
|
+
|
7
|
+
require 'the_game/helpers/string'
|
8
|
+
require 'the_game/helpers/object'
|
data/lib/the_game/license.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
module TheGame
|
2
|
-
LICENSE =
|
3
|
-
the_game.rb Copyright (C) 2012 Shigeki Kitajima
|
2
|
+
LICENSE = "the_game Copyright (C) 2012 Shigeki Kitajima
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
ENDLICENSE
|
11
|
-
LICENSE.gsub!(/^ +/,'')
|
12
|
-
LICENSE.freeze
|
4
|
+
This program is open source: you can redistribute it and/or modify it under the
|
5
|
+
terms of the MIT License. This program is distributed in the hope that it will
|
6
|
+
be useful, but WITHOUT ANY WARRANTY.
|
7
|
+
|
8
|
+
<http://opensource.org/licenses/MIT/>"
|
13
9
|
end
|
data/lib/the_game/version.rb
CHANGED
data/lib/the_game.rb
CHANGED
@@ -1,32 +1,20 @@
|
|
1
1
|
require 'the_game/version'
|
2
2
|
require 'the_game/license'
|
3
|
-
require 'the_game/
|
3
|
+
require 'the_game/helpers/import'
|
4
4
|
require 'the_game/game'
|
5
5
|
require 'the_game/command'
|
6
6
|
|
7
7
|
module TheGame
|
8
|
+
THEGAME_DIR = File.expand_path("~/.the_game")
|
9
|
+
SAVEFILE_PATH = THEGAME_DIR + "/savefile.yml.gz"
|
10
|
+
|
8
11
|
class << self
|
9
|
-
@inited = @game = @mode = @opts = nil
|
10
|
-
|
11
|
-
attr_accessor :mode, :opts
|
12
|
-
|
13
|
-
# Unless we already did this,
|
14
|
-
# store a new Game in @game.
|
15
12
|
def initialize!
|
16
|
-
unless
|
17
|
-
|
18
|
-
@game = Game.new
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# Get @@game or make it.
|
23
|
-
def game
|
24
|
-
@inited ? @game : initialize!
|
13
|
+
Dir.mkdir(THEGAME_DIR) unless File.directory? THEGAME_DIR
|
14
|
+
File.open(SAVEFILE_PATH,"w"){|f|f<<""} unless File.file? SAVEFILE_PATH
|
25
15
|
end
|
26
16
|
|
27
17
|
def start!
|
28
|
-
initialize!
|
29
|
-
|
30
18
|
case @mode
|
31
19
|
when :play then @game.start!
|
32
20
|
when :license then puts LICENSE
|
@@ -34,4 +22,4 @@ module TheGame
|
|
34
22
|
else puts @opts end
|
35
23
|
end
|
36
24
|
end
|
37
|
-
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_game
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &15777180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *15777180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &15736780 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *15736780
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &15736140 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.6.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *15736140
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rcov
|
49
|
-
requirement: &
|
49
|
+
requirement: &15735200 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *15735200
|
58
58
|
description: The Game.
|
59
59
|
email: shigeki.kitajima@gmail.com
|
60
60
|
executables:
|
@@ -64,22 +64,19 @@ extra_rdoc_files:
|
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.rdoc
|
66
66
|
files:
|
67
|
-
- .document
|
68
|
-
- Gemfile
|
69
|
-
- Gemfile.lock
|
70
67
|
- LICENSE.txt
|
71
68
|
- README.rdoc
|
72
69
|
- bin/the_game
|
73
70
|
- lib/the_game.rb
|
71
|
+
- lib/the_game/cli.rb
|
74
72
|
- lib/the_game/command.rb
|
75
73
|
- lib/the_game/game.rb
|
74
|
+
- lib/the_game/helpers.rb
|
75
|
+
- lib/the_game/helpers/import.rb
|
76
|
+
- lib/the_game/helpers/object.rb
|
77
|
+
- lib/the_game/helpers/string.rb
|
76
78
|
- lib/the_game/license.rb
|
77
|
-
- lib/the_game/string.rb
|
78
79
|
- lib/the_game/version.rb
|
79
|
-
- rakefile.rb
|
80
|
-
- test/helper.rb
|
81
|
-
- test/test_the_game.rb
|
82
|
-
- the_game.gemspec
|
83
80
|
homepage: https://rubygems.org/gems/the_game
|
84
81
|
licenses:
|
85
82
|
- CC 3.0 (BY-NC-SA)
|
@@ -95,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
92
|
version: '0'
|
96
93
|
segments:
|
97
94
|
- 0
|
98
|
-
hash: -
|
95
|
+
hash: -3350087069672982418
|
99
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
97
|
none: false
|
101
98
|
requirements:
|
data/.document
DELETED
data/Gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
source "http://rubygems.org"
|
3
|
-
# Add dependencies required to use your gem here.
|
4
|
-
# Example:
|
5
|
-
# gem "activesupport", ">= 2.3.5"
|
6
|
-
|
7
|
-
# Add dependencies to develop your gem here.
|
8
|
-
# Include everything needed to run rake, tests, features, etc.
|
9
|
-
group :development do
|
10
|
-
gem "shoulda", ">= 0"
|
11
|
-
gem "bundler", "~> 1.0.0"
|
12
|
-
gem "jeweler", "~> 1.6.4"
|
13
|
-
gem "rcov", ">= 0"
|
14
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
git (1.2.5)
|
5
|
-
jeweler (1.6.4)
|
6
|
-
bundler (~> 1.0)
|
7
|
-
git (>= 1.2.5)
|
8
|
-
rake
|
9
|
-
rake (0.9.2.2)
|
10
|
-
rcov (0.9.11)
|
11
|
-
shoulda (2.11.3)
|
12
|
-
|
13
|
-
PLATFORMS
|
14
|
-
ruby
|
15
|
-
|
16
|
-
DEPENDENCIES
|
17
|
-
bundler (~> 1.0.0)
|
18
|
-
jeweler (~> 1.6.4)
|
19
|
-
rcov
|
20
|
-
shoulda
|
data/rakefile.rb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'rubygems'
|
3
|
-
require 'bundler'
|
4
|
-
|
5
|
-
$: << File.expand_path("lib")
|
6
|
-
require 'the_game/version'
|
7
|
-
|
8
|
-
begin
|
9
|
-
Bundler.setup(:default, :development)
|
10
|
-
rescue Bundler::BundlerError => e
|
11
|
-
$stderr.puts e.message
|
12
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
13
|
-
exit e.status_code
|
14
|
-
end
|
15
|
-
|
16
|
-
require 'rake'
|
17
|
-
|
18
|
-
require 'jeweler'
|
19
|
-
Jeweler::Tasks.new do |gem|
|
20
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
21
|
-
gem.name = "the_game"
|
22
|
-
gem.homepage = "https://rubygems.org/gems/the_game"
|
23
|
-
gem.license = "CC 3.0 (BY-NC-SA)"
|
24
|
-
gem.summary = "It's the_game."
|
25
|
-
gem.description = "The Game."
|
26
|
-
gem.email = "shigeki.kitajima@gmail.com"
|
27
|
-
gem.authors = ["Shigeki Kitajima"]
|
28
|
-
gem.executables = ['the_game']
|
29
|
-
gem.version = TheGame::Version::STRING
|
30
|
-
# dependencies defined in Gemfile
|
31
|
-
end
|
32
|
-
Jeweler::RubygemsDotOrgTasks.new
|
33
|
-
|
34
|
-
require 'rake/testtask'
|
35
|
-
Rake::TestTask.new(:test) do |test|
|
36
|
-
test.libs << 'lib' << 'test'
|
37
|
-
test.pattern = 'test/**/test_*.rb'
|
38
|
-
test.verbose = true
|
39
|
-
end
|
40
|
-
|
41
|
-
require 'rcov/rcovtask'
|
42
|
-
Rcov::RcovTask.new do |test|
|
43
|
-
test.libs << 'test'
|
44
|
-
test.pattern = 'test/**/test_*.rb'
|
45
|
-
test.verbose = true
|
46
|
-
test.rcov_opts << '--exclude "gems/*"'
|
47
|
-
end
|
48
|
-
|
49
|
-
task :default => :test
|
50
|
-
|
51
|
-
require 'rdoc/task'
|
52
|
-
Rake::RDocTask.new do |rdoc|
|
53
|
-
rdoc.rdoc_dir = 'rdoc'
|
54
|
-
rdoc.title = "the_game v#{TheGame::Version::STRING}"
|
55
|
-
rdoc.rdoc_files.include('README*')
|
56
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
-
end
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'the_game'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|
data/test/test_the_game.rb
DELETED
data/the_game.gemspec
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in rakefile.rb, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = "the_game"
|
8
|
-
s.version = "0.0.1"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Shigeki Kitajima"]
|
12
|
-
s.date = "2012-01-04"
|
13
|
-
s.description = "The Game."
|
14
|
-
s.email = "shigeki.kitajima@gmail.com"
|
15
|
-
s.executables = ["the_game"]
|
16
|
-
s.extra_rdoc_files = [
|
17
|
-
"LICENSE.txt",
|
18
|
-
"README.rdoc"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".document",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"LICENSE.txt",
|
25
|
-
"README.rdoc",
|
26
|
-
"bin/the_game",
|
27
|
-
"lib/the_game.rb",
|
28
|
-
"lib/the_game/command.rb",
|
29
|
-
"lib/the_game/game.rb",
|
30
|
-
"lib/the_game/license.rb",
|
31
|
-
"lib/the_game/string.rb",
|
32
|
-
"lib/the_game/version.rb",
|
33
|
-
"rakefile.rb",
|
34
|
-
"test/helper.rb",
|
35
|
-
"test/test_the_game.rb",
|
36
|
-
"the_game.gemspec"
|
37
|
-
]
|
38
|
-
s.homepage = "https://rubygems.org/gems/the_game"
|
39
|
-
s.licenses = ["CC 3.0 (BY-NC-SA)"]
|
40
|
-
s.require_paths = ["lib"]
|
41
|
-
s.rubygems_version = "1.8.13"
|
42
|
-
s.summary = "It's the_game."
|
43
|
-
|
44
|
-
if s.respond_to? :specification_version then
|
45
|
-
s.specification_version = 3
|
46
|
-
|
47
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
|
-
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
49
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
50
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
51
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
52
|
-
else
|
53
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
54
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
56
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
57
|
-
end
|
58
|
-
else
|
59
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
60
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
61
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
62
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|