bridge 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,21 +1,3 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source :rubygems
2
+
3
+ gem "test-unit", ">=2", :require => "test/unit"
4
+ gem "rake"
data/Gemfile.lock ADDED
@@ -0,0 +1,12 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ rake (0.8.7)
5
+ test-unit (2.1.1)
6
+
7
+ PLATFORMS
8
+ ruby
9
+
10
+ DEPENDENCIES
11
+ rake
12
+ test-unit (>= 2)
data/Rakefile CHANGED
@@ -1,55 +1,12 @@
1
- # -*- coding: utf-8 -*-
1
+ require "bundler"
2
+ Bundler::GemHelper.install_tasks
3
+ Bundler.setup
2
4
 
3
- require 'rubygems'
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 << 'lib' << 'test'
26
- test.pattern = 'test/**/test_*.rb'
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 = %q{bridge}
8
- s.version = "0.0.23"
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 = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Jakub Kuźma"]
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
- if s.respond_to? :specification_version then
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
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
61
- s.add_development_dependency(%q<test-unit>, [">= 2"])
62
- else
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
@@ -3,6 +3,7 @@ require "bridge/card"
3
3
  require "bridge/deal"
4
4
  require "bridge/score"
5
5
  require "bridge/trick"
6
+ require "bridge/version"
6
7
 
7
8
  module Bridge
8
9
  # Number of possible deals in bridge
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.inject([]) { |cards, color| cards << splitted_colors.delete(color) }.flatten
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
@@ -201,4 +201,4 @@ module Bridge
201
201
  result
202
202
  end
203
203
  end
204
- end
204
+ end
@@ -0,0 +1,3 @@
1
+ module Bridge
2
+ VERSION = "0.0.24"
3
+ end
data/test/helper.rb CHANGED
@@ -1,6 +1,4 @@
1
- require 'rubygems'
2
- gem "test-unit"
3
- require 'test/unit'
1
+ Bundler.require
4
2
 
5
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
4
  $LOAD_PATH.unshift(File.dirname(__FILE__))
data/test/test_deal.rb CHANGED
@@ -221,4 +221,4 @@ class TestDealSort < Test::Unit::TestCase
221
221
  @deal.sort_by_color
222
222
  assert_equal old_deal, @deal.to_hash
223
223
  end
224
- end
224
+ end
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
- - 23
9
- version: 0.0.23
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-03-28 00:00:00 +01:00
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
- - 2
29
- version: "2"
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
- - LICENSE
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
- - --charset=UTF-8
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
- - 0
84
- version: "0"
95
+ - 1
96
+ - 3
97
+ - 6
98
+ version: 1.3.6
85
99
  requirements: []
86
100
 
87
- rubyforge_project:
88
- rubygems_version: 1.3.6
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
- - test/test_bridge.rb
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
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.23