Skip to content

Commit

Permalink
Adding gemspec and using bundler.
Browse files Browse the repository at this point in the history
  • Loading branch information
gimite committed Apr 25, 2012
1 parent ec24ec2 commit 38158b4
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ mjlog
tmp
resource
.sass-cache
Gemfile.lock
*.gem
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "http://rubygems.org"
gemspec :name => "mjai"
3 changes: 2 additions & 1 deletion bin/mjai
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib")
require "rubygems"
require "bundler/setup"

require "mjai/mjai_command"

Expand Down
3 changes: 2 additions & 1 deletion bin/mjai-shanten
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib")
require "rubygems"
require "bundler/setup"

require "mjai/mjai_command"

Expand Down
3 changes: 2 additions & 1 deletion bin/mjai-tsumogiri
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib")
require "rubygems"
require "bundler/setup"

require "mjai/mjai_command"

Expand Down
1 change: 1 addition & 0 deletions lib/mjai/jsonizable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "rubygems"
require "json"

require "mjai/pai"
Expand Down
2 changes: 0 additions & 2 deletions lib/mjai/tenhou_archive.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require "zlib"
require "uri"
require "nokogiri"
require "with_progress"

require "mjai/archive"
require "mjai/pai"
Expand Down Expand Up @@ -402,7 +401,6 @@ def play()
@doc = Nokogiri.XML(@xml)
elems = @doc.root.children
elems.each_with_index() do |elem, j|
#puts(elem) # kari
if on_tenhou_event(elem, elems[j + 1]) == :broken
break # Something is wrong.
end
Expand Down
23 changes: 23 additions & 0 deletions mjai.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Gem::Specification.new do |s|

s.name = "mjai"
s.version = "0.0.1"
s.authors = ["Hiroshi Ichikawa"]
s.email = ["gimite+github@gmail.com"]
s.summary = "Game server for Japanese Mahjong AI."
s.description = "Game server for Japanese Mahjong AI."
s.homepage = "https://github.com/gimite/mjai"
s.rubygems_version = "1.2.0"

s.files = Dir["bin/*"] + Dir["lib/**/*"] + Dir["share/**/*"]
s.require_paths = ["lib"]
s.executables = Dir["bin/*"].map(){ |s| File.basename(s) }
s.has_rdoc = true
s.extra_rdoc_files = []
s.rdoc_options = []

s.add_dependency("json", [">= 1.6.0"])
s.add_dependency("nokogiri", [">= 1.5.0"])
s.add_dependency("bundler", [">= 1.0.0"])

end

0 comments on commit 38158b4

Please sign in to comment.