pebbles-compgacha 0.1.0

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.
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
File without changes
@@ -0,0 +1,6 @@
1
+ === 0.1.0 / 2012-05-12
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/pebbles_compgacha
7
+ lib/pebbles/compgacha.rb
8
+ test/test_pebbles_compgacha.rb
@@ -0,0 +1,40 @@
1
+ = pebbles-compgacha
2
+
3
+ * http://github.com/kwappa/pebbles-compgacha
4
+
5
+ == DESCRIPTION:
6
+
7
+ Simulator of Comp-gacha
8
+
9
+ == REQUIREMENTS:
10
+
11
+ * pebbles
12
+
13
+ == INSTALL:
14
+
15
+ * gem install pebbles-compgacha
16
+
17
+ == LICENSE:
18
+
19
+ (The MIT License)
20
+
21
+ Copyright (c) 2012 SHIOYA, Hiromu (@kwappa)
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining
24
+ a copy of this software and associated documentation files (the
25
+ 'Software'), to deal in the Software without restriction, including
26
+ without limitation the rights to use, copy, modify, merge, publish,
27
+ distribute, sublicense, and/or sell copies of the Software, and to
28
+ permit persons to whom the Software is furnished to do so, subject to
29
+ the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be
32
+ included in all copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
35
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
37
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
38
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
39
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ # -*- ruby -*-
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.spec 'pebbles-compgacha' do
7
+ developer('SHIOYA, Hiromu', 'kwappa.856@gmail.com')
8
+ extra_deps << ['pebbles', '>= 0']
9
+ end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.join(File.dirname(File.expand_path(__FILE__)), %w{ .. lib pebbles compgacha })
3
+ Pebbles::Compgacha.complete ARGV[0].to_i || 12
@@ -0,0 +1,13 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'pebbles'
3
+ class Pebbles::Compgacha
4
+ VERSION = '0.1.0'
5
+
6
+ def self.complete deck = 12
7
+ r = Array.new(deck).fill(0)
8
+ while (r.include?(0)) do
9
+ r[rand(r.count)] += 1
10
+ end
11
+ puts "#{r.count}個のガチャをコンプするために #{r.inject(:+)}回抽選しました。"
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # -*- coding: utf-8 -*-
2
+ $: << File.join(File.dirname(File.expand_path(__FILE__)), %w(.. lib))
3
+ require "pebbles/compgacha"
4
+
5
+ require "minitest/unit"
6
+ MiniTest::Unit.autorun
7
+
8
+ class TestPebblesCompgacha < MiniTest::Unit::TestCase
9
+ def test_to_resopond_method
10
+ assert Pebbles::Compgacha.respond_to?(:complete)
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pebbles-compgacha
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - SHIOYA, Hiromu
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: pebbles
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rdoc
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '3.10'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.10'
46
+ - !ruby/object:Gem::Dependency
47
+ name: hoe
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ description: Simulator of Comp-gacha
63
+ email:
64
+ - kwappa.856@gmail.com
65
+ executables:
66
+ - pebbles_compgacha
67
+ extensions: []
68
+ extra_rdoc_files:
69
+ - History.txt
70
+ - Manifest.txt
71
+ - README.txt
72
+ files:
73
+ - .autotest
74
+ - History.txt
75
+ - Manifest.txt
76
+ - README.txt
77
+ - Rakefile
78
+ - bin/pebbles_compgacha
79
+ - lib/pebbles/compgacha.rb
80
+ - test/test_pebbles_compgacha.rb
81
+ - .gemtest
82
+ homepage: http://github.com/kwappa/pebbles-compgacha
83
+ licenses: []
84
+ post_install_message:
85
+ rdoc_options:
86
+ - --main
87
+ - README.txt
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project: pebbles-compgacha
104
+ rubygems_version: 1.8.24
105
+ signing_key:
106
+ specification_version: 3
107
+ summary: Simulator of Comp-gacha
108
+ test_files:
109
+ - test/test_pebbles_compgacha.rb