bridge 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -21
- data/Gemfile +4 -0
- data/Gemfile.lock +12 -0
- data/Rakefile +6 -49
- data/bridge.gemspec +16 -62
- data/lib/bridge.rb +1 -0
- data/lib/bridge/deal.rb +1 -1
- data/lib/bridge/score.rb +1 -1
- data/lib/bridge/version.rb +3 -0
- data/test/helper.rb +1 -3
- data/test/test_deal.rb +1 -1
- metadata +34 -26
- data/.document +0 -5
- data/VERSION +0 -1
data/.gitignore
CHANGED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/Rakefile
CHANGED
@@ -1,55 +1,12 @@
|
|
1
|
-
|
1
|
+
require "bundler"
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
Bundler.setup
|
2
4
|
|
3
|
-
require
|
4
|
-
require 'rake'
|
5
|
-
|
6
|
-
begin
|
7
|
-
require 'jeweler'
|
8
|
-
Jeweler::Tasks.new do |gem|
|
9
|
-
gem.name = "bridge"
|
10
|
-
gem.summary = %Q{Contract bridge utilities}
|
11
|
-
gem.description = %Q{Useful contract bridge utilities - deal generator, id to deal and deal to id conversion}
|
12
|
-
gem.email = "qoobaa+github@gmail.com"
|
13
|
-
gem.homepage = "http://github.com/qoobaa/bridge"
|
14
|
-
gem.authors = ["Jakub Kuźma"]
|
15
|
-
gem.add_development_dependency "test-unit", ">= 2"
|
16
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
-
end
|
22
|
-
|
23
|
-
require 'rake/testtask'
|
5
|
+
require "rake/testtask"
|
24
6
|
Rake::TestTask.new(:test) do |test|
|
25
|
-
test.libs <<
|
26
|
-
test.pattern =
|
7
|
+
test.libs << "lib" << "test"
|
8
|
+
test.pattern = "test/**/test_*.rb"
|
27
9
|
test.verbose = true
|
28
10
|
end
|
29
11
|
|
30
|
-
begin
|
31
|
-
require 'rcov/rcovtask'
|
32
|
-
Rcov::RcovTask.new do |test|
|
33
|
-
test.libs << 'test'
|
34
|
-
test.pattern = 'test/**/test_*.rb'
|
35
|
-
test.verbose = true
|
36
|
-
end
|
37
|
-
rescue LoadError
|
38
|
-
task :rcov do
|
39
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
task :test => :check_dependencies
|
44
|
-
|
45
12
|
task :default => :test
|
46
|
-
|
47
|
-
require 'rake/rdoctask'
|
48
|
-
Rake::RDocTask.new do |rdoc|
|
49
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
50
|
-
|
51
|
-
rdoc.rdoc_dir = 'rdoc'
|
52
|
-
rdoc.title = "bridge #{version}"
|
53
|
-
rdoc.rdoc_files.include('README*')
|
54
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
55
|
-
end
|
data/bridge.gemspec
CHANGED
@@ -1,69 +1,23 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
3
|
+
require "bridge/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "bridge"
|
7
|
+
s.version = Bridge::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.summary = "Contract bridge utilities"
|
10
|
+
s.description = "Useful contract bridge utilities - deal generator, id to deal and deal to id conversion"
|
11
|
+
s.email = "qoobaa+github@gmail.com"
|
12
|
+
s.homepage = "http://github.com/qoobaa/bridge"
|
13
|
+
s.authors = ["Jakub Kuźma", "Wojciech Wnętrzak"]
|
9
14
|
|
10
|
-
s.required_rubygems_version =
|
11
|
-
s.
|
12
|
-
s.date = %q{2010-03-28}
|
13
|
-
s.description = %q{Useful contract bridge utilities - deal generator, id to deal and deal to id conversion}
|
14
|
-
s.email = %q{qoobaa+github@gmail.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"bridge.gemspec",
|
27
|
-
"lib/bridge.rb",
|
28
|
-
"lib/bridge/bid.rb",
|
29
|
-
"lib/bridge/card.rb",
|
30
|
-
"lib/bridge/deal.rb",
|
31
|
-
"lib/bridge/score.rb",
|
32
|
-
"lib/bridge/trick.rb",
|
33
|
-
"test/helper.rb",
|
34
|
-
"test/test_bid.rb",
|
35
|
-
"test/test_bridge.rb",
|
36
|
-
"test/test_card.rb",
|
37
|
-
"test/test_deal.rb",
|
38
|
-
"test/test_score.rb",
|
39
|
-
"test/test_trick.rb"
|
40
|
-
]
|
41
|
-
s.homepage = %q{http://github.com/qoobaa/bridge}
|
42
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
-
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version = %q{1.3.6}
|
45
|
-
s.summary = %q{Contract bridge utilities}
|
46
|
-
s.test_files = [
|
47
|
-
"test/test_bridge.rb",
|
48
|
-
"test/test_trick.rb",
|
49
|
-
"test/test_deal.rb",
|
50
|
-
"test/helper.rb",
|
51
|
-
"test/test_score.rb",
|
52
|
-
"test/test_bid.rb",
|
53
|
-
"test/test_card.rb"
|
54
|
-
]
|
15
|
+
s.required_rubygems_version = ">= 1.3.6"
|
16
|
+
s.rubyforge_project = "bridge"
|
55
17
|
|
56
|
-
|
57
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
58
|
-
s.specification_version = 3
|
18
|
+
s.add_development_dependency "bundler", ">= 1.0.0.rc.5"
|
59
19
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
s.add_dependency(%q<test-unit>, [">= 2"])
|
64
|
-
end
|
65
|
-
else
|
66
|
-
s.add_dependency(%q<test-unit>, [">= 2"])
|
67
|
-
end
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/}
|
22
|
+
s.require_path = "lib"
|
68
23
|
end
|
69
|
-
|
data/lib/bridge.rb
CHANGED
data/lib/bridge/deal.rb
CHANGED
@@ -144,7 +144,7 @@ module Bridge
|
|
144
144
|
DIRECTIONS.inject({}) do |sorted, direction|
|
145
145
|
splitted_colors = split_colors(direction)
|
146
146
|
sorted_colors = sort_colors(splitted_colors.keys, trump)
|
147
|
-
sorted[direction] = sorted_colors.
|
147
|
+
sorted[direction] = sorted_colors.map { |color| splitted_colors.delete(color) }.flatten
|
148
148
|
sorted
|
149
149
|
end
|
150
150
|
end
|
data/lib/bridge/score.rb
CHANGED
data/test/helper.rb
CHANGED
data/test/test_deal.rb
CHANGED
metadata
CHANGED
@@ -1,33 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 47
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
9
|
+
- 24
|
10
|
+
version: 0.0.24
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- "Jakub Ku\xC5\xBAma"
|
14
|
+
- "Wojciech Wn\xC4\x99trzak"
|
13
15
|
autorequire:
|
14
16
|
bindir: bin
|
15
17
|
cert_chain: []
|
16
18
|
|
17
|
-
date: 2010-
|
19
|
+
date: 2010-08-20 00:00:00 +02:00
|
18
20
|
default_executable:
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: test-unit
|
22
|
-
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
26
|
- - ">="
|
26
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 15424063
|
27
29
|
segments:
|
28
|
-
-
|
29
|
-
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
- rc
|
34
|
+
- 5
|
35
|
+
version: 1.0.0.rc.5
|
30
36
|
type: :development
|
37
|
+
name: bundler
|
38
|
+
prerelease: false
|
31
39
|
version_requirements: *id001
|
32
40
|
description: Useful contract bridge utilities - deal generator, id to deal and deal to id conversion
|
33
41
|
email: qoobaa+github@gmail.com
|
@@ -35,16 +43,15 @@ executables: []
|
|
35
43
|
|
36
44
|
extensions: []
|
37
45
|
|
38
|
-
extra_rdoc_files:
|
39
|
-
|
40
|
-
- README.rdoc
|
46
|
+
extra_rdoc_files: []
|
47
|
+
|
41
48
|
files:
|
42
|
-
- .document
|
43
49
|
- .gitignore
|
50
|
+
- Gemfile
|
51
|
+
- Gemfile.lock
|
44
52
|
- LICENSE
|
45
53
|
- README.rdoc
|
46
54
|
- Rakefile
|
47
|
-
- VERSION
|
48
55
|
- bridge.gemspec
|
49
56
|
- lib/bridge.rb
|
50
57
|
- lib/bridge/bid.rb
|
@@ -52,6 +59,7 @@ files:
|
|
52
59
|
- lib/bridge/deal.rb
|
53
60
|
- lib/bridge/score.rb
|
54
61
|
- lib/bridge/trick.rb
|
62
|
+
- lib/bridge/version.rb
|
55
63
|
- test/helper.rb
|
56
64
|
- test/test_bid.rb
|
57
65
|
- test/test_bridge.rb
|
@@ -64,36 +72,36 @@ homepage: http://github.com/qoobaa/bridge
|
|
64
72
|
licenses: []
|
65
73
|
|
66
74
|
post_install_message:
|
67
|
-
rdoc_options:
|
68
|
-
|
75
|
+
rdoc_options: []
|
76
|
+
|
69
77
|
require_paths:
|
70
78
|
- lib
|
71
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
72
81
|
requirements:
|
73
82
|
- - ">="
|
74
83
|
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
75
85
|
segments:
|
76
86
|
- 0
|
77
87
|
version: "0"
|
78
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ">="
|
81
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 23
|
82
94
|
segments:
|
83
|
-
-
|
84
|
-
|
95
|
+
- 1
|
96
|
+
- 3
|
97
|
+
- 6
|
98
|
+
version: 1.3.6
|
85
99
|
requirements: []
|
86
100
|
|
87
|
-
rubyforge_project:
|
88
|
-
rubygems_version: 1.3.
|
101
|
+
rubyforge_project: bridge
|
102
|
+
rubygems_version: 1.3.7
|
89
103
|
signing_key:
|
90
104
|
specification_version: 3
|
91
105
|
summary: Contract bridge utilities
|
92
|
-
test_files:
|
93
|
-
|
94
|
-
- test/test_trick.rb
|
95
|
-
- test/test_deal.rb
|
96
|
-
- test/helper.rb
|
97
|
-
- test/test_score.rb
|
98
|
-
- test/test_bid.rb
|
99
|
-
- test/test_card.rb
|
106
|
+
test_files: []
|
107
|
+
|
data/.document
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.23
|