lilutils 0.0.1 → 0.0.2
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/Gemfile +14 -0
- data/Gemfile.lock +22 -0
- data/History.txt +6 -0
- data/Rakefile +1 -0
- data/VERSION +1 -0
- data/lib/lilutils/algo_test_utils/data_sets.rb +37 -2
- data/lib/lilutils/algo_test_utils_entry.rb +1 -1
- data/lib/lilutils/misc/binary_search.rb +43 -0
- data/lib/lilutils/misc/pascal.rb +4 -2
- data/lib/lilutils/misc_entry.rb +2 -2
- data/lilutils.gemspec +88 -0
- data/test/algo_test_utils/data_sets_test.rb +21 -1
- data/test/misc/binary_search_test.rb +37 -0
- data/test/test_lilutils.rb +1 -0
- metadata +71 -73
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.5.2"
|
12
|
+
gem "rcov", ">= 0"
|
13
|
+
gem "test-unit"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.5.2)
|
6
|
+
bundler (~> 1.0.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rake (0.8.7)
|
10
|
+
rcov (0.9.9)
|
11
|
+
shoulda (2.11.3)
|
12
|
+
test-unit (2.1.2)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
bundler (~> 1.0.0)
|
19
|
+
jeweler (~> 1.5.2)
|
20
|
+
rcov
|
21
|
+
shoulda
|
22
|
+
test-unit
|
data/History.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
=== 0.0.2
|
2
|
+
* Utility to test whether an array is in order. The comparator is defined by the block.
|
3
|
+
* Utility to find out the sandwiching indexes for an element in a given collection that is supposed to be sorted.
|
4
|
+
* Utility to generate random strings of specified length.
|
5
|
+
* Utility to generate k integers (each e of which is such that 0 <= e < n) in sorted manner. The recipe is in Jon Bentley's
|
6
|
+
Programming Pearls.
|
1
7
|
=== 0.0.1 2011-02-08
|
2
8
|
|
3
9
|
* 1 major enhancement:
|
data/Rakefile
CHANGED
@@ -13,6 +13,7 @@ require 'jeweler'
|
|
13
13
|
Jeweler::Tasks.new do |gem|
|
14
14
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
15
|
gem.name = "lilutils"
|
16
|
+
gem.version = "0.0.2"
|
16
17
|
gem.homepage = "http://github.com/kedarmhaswade/lilutils"
|
17
18
|
gem.license = "MIT"
|
18
19
|
gem.summary = %Q{Little utilities for everyone}
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -11,8 +11,8 @@ module LilUtils
|
|
11
11
|
# The length of each string is determined by the parameter passed.
|
12
12
|
# The characters that can appear in returned strings are defined by
|
13
13
|
# the {#ALPHABET}.
|
14
|
-
# @param
|
15
|
-
# @param
|
14
|
+
# @param [Integer] howmany How many random strings do you need?
|
15
|
+
# @param [Integer] rest Optional arguments. First argument should be the length of
|
16
16
|
# each string in returned set. If unspecified, this is calculated from first
|
17
17
|
# argument, howmany, such that the length is enough to generate strings from the
|
18
18
|
# entire ALPHABET.
|
@@ -28,6 +28,41 @@ module LilUtils
|
|
28
28
|
strings
|
29
29
|
end
|
30
30
|
|
31
|
+
# Returns an array of k randomly chosen numbers between [0, n) where each number will be chosen with
|
32
|
+
# equal probability. Note that returned array will be sorted. The algorithm is taken from Jon Bentley's excellent
|
33
|
+
# Programming Pearls. To make the method to what you mean, both select_random(n, k) and select_random(k, n) do
|
34
|
+
# the same thing, i.e. return an array of size k, each element of array is between 0 and n-1.
|
35
|
+
# @param [Integer] k the number of numbers to choose. May not be > n
|
36
|
+
# @param [Integer] n the upper limit, never included in returned array
|
37
|
+
# @return [Array] Integer array of size k such that 0 <= Array[i] < n for all 0 <=i <= k
|
38
|
+
# @see #random_enumerator
|
39
|
+
def self.select_random_array(k, n)
|
40
|
+
a = []
|
41
|
+
random_enumerator(k, n).each {|random_selection| a << random_selection}
|
42
|
+
a
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.select_random_array_to_file(k, n, file)
|
46
|
+
File.open(file, "w") do |f|
|
47
|
+
random_enumerator(k, n).each {|random_selection| f.puts random_selection}
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.random_enumerator(k, n)
|
52
|
+
k <= n ? (select, remaining = k, n) : (select, remaining = n, k)
|
53
|
+
raise ArgumentError, "k, n should be non-negative" if k < 0 or n < 0
|
54
|
+
Enumerator.new do |yielder|
|
55
|
+
big = 1 << 32 # 4B is a big number?
|
56
|
+
0.upto(n-1) do |num|
|
57
|
+
if ((rand(big) % remaining) < select)
|
58
|
+
yielder.yield num
|
59
|
+
select -= 1
|
60
|
+
end
|
61
|
+
remaining -= 1
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
31
66
|
private
|
32
67
|
|
33
68
|
def self.get_ascii_string(length)
|
@@ -1,4 +1,4 @@
|
|
1
1
|
# used to include code from all of the algo_test_utils classes
|
2
2
|
# Add a line here when you add a new class that should be available to clients. Then, clients can just
|
3
3
|
# require this one file.
|
4
|
-
require '
|
4
|
+
require File.dirname(__FILE__) + '/algo_test_utils/data_sets'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module LilUtils
|
2
|
+
module Misc
|
3
|
+
module BinarySearch
|
4
|
+
|
5
|
+
def self.sandwiching_indexes_for(value, array, fi=0, li=array.length-1, check_if_in_order=true)
|
6
|
+
# it is __not__ assumed that the array is sorted, we skip the check if we are asked to
|
7
|
+
if check_if_in_order
|
8
|
+
raise ArgumentError, "Unordered array provided to this routine based on binary search" unless in_order? array
|
9
|
+
end
|
10
|
+
# make other checks
|
11
|
+
while true
|
12
|
+
i = fi + (li-fi+1)/2 # Google "nearly all binary searches are broken"
|
13
|
+
return [i, i] if array[i] == value
|
14
|
+
return [fi, li] if (fi+1) >= li and value >= array[fi] and value <=array[li]
|
15
|
+
return [fi-1, fi] if (fi+1) >= li and value <= array[fi]
|
16
|
+
return [li, li+1] if (fi+1) >= li and value >= array[fi]
|
17
|
+
value < array[i] ? li = i : fi = i
|
18
|
+
#puts "fi=#{fi}, li=#{li}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.in_order?(array, &block)
|
23
|
+
block = Proc.new {|x, y| x <=> y} unless block_given?
|
24
|
+
old_order = new_order = 0
|
25
|
+
array.each_cons(2) do |a|
|
26
|
+
new_order = block.call(a[0], a[1])
|
27
|
+
return false if (new_order > 0 and old_order < 0) or (new_order < 0 and old_order > 0)
|
28
|
+
old_order = new_order if new_order != 0
|
29
|
+
end
|
30
|
+
true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
#puts LilUtils::Misc::BinarySearch.in_order? ["rujuta", "kedar", "deepa", "apoorv"] {|x, y| x.length <=> y.length}
|
36
|
+
#puts LilUtils::Misc::BinarySearch.in_order? ["rujuta", "kedar", "apoorv", "deepa"]
|
37
|
+
#puts LilUtils::Misc::BinarySearch.in_order? ["rujuta", "kedar", "deepa", "apoorv"]
|
38
|
+
#puts LilUtils::Misc::BinarySearch.in_order? [6, 5, 5, 4]
|
39
|
+
#puts LilUtils::Misc::BinarySearch.in_order? [2, 1]
|
40
|
+
#puts LilUtils::Misc::BinarySearch.in_order? [1]
|
41
|
+
#puts LilUtils::Misc::BinarySearch.in_order? [1, 2]
|
42
|
+
#puts LilUtils::Misc::BinarySearch.sandwiching_indexes_for(25.2, [1, 4, 8, 8, 9, 12, 15, 23.4, 44])
|
43
|
+
#puts LilUtils::Misc::BinarySearch.sandwiching_indexes_for(0, [1])
|
data/lib/lilutils/misc/pascal.rb
CHANGED
@@ -3,15 +3,17 @@ module LilUtils
|
|
3
3
|
module Pascal
|
4
4
|
# Returns the nth row of the Pascal's triangle as an array of n+1 elements.
|
5
5
|
# This is an O(n) algorithm. Uses: nCr = nCr-1*(n-r+1)/r which calculates
|
6
|
+
# an element using the previous element (which is already initialized or
|
7
|
+
# calculated). Thus, it does not throw away any computation. The constant
|
8
|
+
# factors of this alogirthm are also good (~0.5).
|
6
9
|
# @param [Integer] n starts at 1
|
7
10
|
# @return [Array] of Integers representing numbers in given row.
|
8
11
|
def self.row(n)
|
9
12
|
raise ArgumentError, "#{n} is not valid" if !n.is_a?(Integer) || n < 1
|
10
13
|
len = n == 1 ? 1 : n + 1
|
11
|
-
a = Array.new(len); a[0] = a[-1] = 1
|
14
|
+
a = Array.new(len); a[0] = a[-1] = 1 # by definition
|
12
15
|
1.upto n/2 do |r|
|
13
16
|
a[r] = a[-r-1] = a[r-1] * (n-r+1)/r
|
14
|
-
r += 1
|
15
17
|
end
|
16
18
|
a
|
17
19
|
end
|
data/lib/lilutils/misc_entry.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# used to include code from all of the misc classes
|
2
2
|
# Add a line here when you add a new class that should be available to clients. Then, clients can just
|
3
3
|
# require this one file.
|
4
|
-
require '
|
5
|
-
require '
|
4
|
+
require File.dirname(__FILE__) + '/misc/pascal'
|
5
|
+
require File.dirname(__FILE__) + '/misc/binary_search'
|
data/lilutils.gemspec
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{lilutils}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kedar Mhaswade"]
|
12
|
+
s.date = %q{2011-03-12}
|
13
|
+
s.default_executable = %q{cli-demo}
|
14
|
+
s.description = %q{Provides little utilties. It's a gem by a newbie, but I think it is quite useful. As of now, it provides a nicely abstracted out yes/no/cancel dialog box on a console.}
|
15
|
+
s.email = %q{kedar.mhaswade@gmail.com}
|
16
|
+
s.executables = ["cli-demo"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"History.txt",
|
24
|
+
"Manifest.txt",
|
25
|
+
"PostInstall.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/cli-demo",
|
30
|
+
"lib/lilutils.rb",
|
31
|
+
"lib/lilutils/algo_test_utils/data_sets.rb",
|
32
|
+
"lib/lilutils/algo_test_utils_entry.rb",
|
33
|
+
"lib/lilutils/cli/cli.rb",
|
34
|
+
"lib/lilutils/cli_entry.rb",
|
35
|
+
"lib/lilutils/misc/binary_search.rb",
|
36
|
+
"lib/lilutils/misc/misc.rb",
|
37
|
+
"lib/lilutils/misc/pascal.rb",
|
38
|
+
"lib/lilutils/misc_entry.rb",
|
39
|
+
"lilutils.gemspec",
|
40
|
+
"script/console",
|
41
|
+
"script/destroy",
|
42
|
+
"script/generate",
|
43
|
+
"test/algo_test_utils/data_sets_test.rb",
|
44
|
+
"test/cli/cli_basic_test.rb",
|
45
|
+
"test/misc/binary_search_test.rb",
|
46
|
+
"test/misc/misc_pascal_test.rb",
|
47
|
+
"test/test_helper.rb",
|
48
|
+
"test/test_lilutils.rb"
|
49
|
+
]
|
50
|
+
s.homepage = %q{http://github.com/kedarmhaswade/lilutils}
|
51
|
+
s.licenses = ["MIT"]
|
52
|
+
s.require_paths = ["lib"]
|
53
|
+
s.rubygems_version = %q{1.6.2}
|
54
|
+
s.summary = %q{Little utilities for everyone}
|
55
|
+
s.test_files = [
|
56
|
+
"test/algo_test_utils/data_sets_test.rb",
|
57
|
+
"test/cli/cli_basic_test.rb",
|
58
|
+
"test/misc/binary_search_test.rb",
|
59
|
+
"test/misc/misc_pascal_test.rb",
|
60
|
+
"test/test_helper.rb",
|
61
|
+
"test/test_lilutils.rb"
|
62
|
+
]
|
63
|
+
|
64
|
+
if s.respond_to? :specification_version then
|
65
|
+
s.specification_version = 3
|
66
|
+
|
67
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
68
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
69
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
70
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
71
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
72
|
+
s.add_development_dependency(%q<test-unit>, [">= 0"])
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
75
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
76
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
77
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
78
|
+
s.add_dependency(%q<test-unit>, [">= 0"])
|
79
|
+
end
|
80
|
+
else
|
81
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
82
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
83
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
84
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
85
|
+
s.add_dependency(%q<test-unit>, [">= 0"])
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "test/unit"
|
2
|
-
require "
|
2
|
+
require "minitest/unit"
|
3
|
+
require File.dirname(__FILE__) + '/../../lib/lilutils/algo_test_utils/data_sets'
|
3
4
|
|
4
5
|
class DataSetsTest < Test::Unit::TestCase
|
5
6
|
|
@@ -9,4 +10,23 @@ class DataSetsTest < Test::Unit::TestCase
|
|
9
10
|
strs = DS.ascii_strings(100, 5)
|
10
11
|
assert_equal(100, strs.size)
|
11
12
|
end
|
13
|
+
|
14
|
+
def test_select_random_array
|
15
|
+
assert_equal((0...5).to_a, DS.select_random_array(5, 5))
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_select_random_array_1_of_4
|
19
|
+
a0, a1, a2, a3 = [0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]
|
20
|
+
probables = [a0, a1, a2, a3]
|
21
|
+
actual = DS.select_random_array(3, 4)
|
22
|
+
assert_true(probables.member? actual)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_select_random_array_to_file
|
26
|
+
require 'tmpdir'
|
27
|
+
fn = File.join(Dir.tmpdir, "foo")
|
28
|
+
DS.select_random_array_to_file(1_000, 10_000, fn)
|
29
|
+
# DS.select_random_array_to_file(1_000_000, 10_000_000, fn)
|
30
|
+
File.delete(fn)
|
31
|
+
end
|
12
32
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require File.dirname(__FILE__) + '/../../lib/lilutils/misc_entry'
|
3
|
+
require File.dirname(__FILE__) + '/../../lib/lilutils/algo_test_utils_entry'
|
4
|
+
|
5
|
+
class BinarySearchTest < Test::Unit::TestCase
|
6
|
+
|
7
|
+
# Called before every test method runs. Can be used
|
8
|
+
# to set up fixture information.
|
9
|
+
def setup
|
10
|
+
# Do nothing
|
11
|
+
end
|
12
|
+
|
13
|
+
# Called after every test method runs. Can be used to tear
|
14
|
+
# down fixture information.
|
15
|
+
|
16
|
+
def teardown
|
17
|
+
# Do nothing
|
18
|
+
end
|
19
|
+
BinarySearch = LilUtils::Misc::BinarySearch
|
20
|
+
def test_1_numbers_in_order?
|
21
|
+
a = []
|
22
|
+
1.upto(100_000) { |n| a << n}
|
23
|
+
assert_equal(true, BinarySearch.in_order?(a))
|
24
|
+
a << -1 # now they are unsorted
|
25
|
+
assert_equal(false, BinarySearch.in_order?(a))
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_sandwich_1
|
29
|
+
a = []
|
30
|
+
0.upto(999) {|x| a << x} # a 1000 element array with a[i] = i
|
31
|
+
assert_equal([-1, 0], BinarySearch.sandwiching_indexes_for(-1, a))
|
32
|
+
assert_equal([999, 1000], BinarySearch.sandwiching_indexes_for(1001, a))
|
33
|
+
assert_equal([499, 500], BinarySearch.sandwiching_indexes_for(499.4, a))
|
34
|
+
assert_equal([2, 2], BinarySearch.sandwiching_indexes_for(2, a))
|
35
|
+
assert_equal([22, 22], BinarySearch.sandwiching_indexes_for(22.0, a))
|
36
|
+
end
|
37
|
+
end
|
data/test/test_lilutils.rb
CHANGED
metadata
CHANGED
@@ -1,145 +1,143 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: lilutils
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Kedar Mhaswade
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2011-02-08 00:00:00 -08:00
|
12
|
+
date: 2011-03-12 00:00:00.000000000 -08:00
|
18
13
|
default_executable: cli-demo
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
21
16
|
name: shoulda
|
22
|
-
requirement: &
|
17
|
+
requirement: &15751660 !ruby/object:Gem::Requirement
|
23
18
|
none: false
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
30
23
|
type: :development
|
31
24
|
prerelease: false
|
32
|
-
version_requirements: *
|
33
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *15751660
|
26
|
+
- !ruby/object:Gem::Dependency
|
34
27
|
name: bundler
|
35
|
-
requirement: &
|
28
|
+
requirement: &15750340 !ruby/object:Gem::Requirement
|
36
29
|
none: false
|
37
|
-
requirements:
|
30
|
+
requirements:
|
38
31
|
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 1
|
42
|
-
- 0
|
43
|
-
- 0
|
32
|
+
- !ruby/object:Gem::Version
|
44
33
|
version: 1.0.0
|
45
34
|
type: :development
|
46
35
|
prerelease: false
|
47
|
-
version_requirements: *
|
48
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *15750340
|
37
|
+
- !ruby/object:Gem::Dependency
|
49
38
|
name: jeweler
|
50
|
-
requirement: &
|
39
|
+
requirement: &15748560 !ruby/object:Gem::Requirement
|
51
40
|
none: false
|
52
|
-
requirements:
|
41
|
+
requirements:
|
53
42
|
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 1
|
57
|
-
- 5
|
58
|
-
- 2
|
43
|
+
- !ruby/object:Gem::Version
|
59
44
|
version: 1.5.2
|
60
45
|
type: :development
|
61
46
|
prerelease: false
|
62
|
-
version_requirements: *
|
63
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *15748560
|
48
|
+
- !ruby/object:Gem::Dependency
|
64
49
|
name: rcov
|
65
|
-
requirement: &
|
50
|
+
requirement: &15502600 !ruby/object:Gem::Requirement
|
66
51
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
- 0
|
72
|
-
version: "0"
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
73
56
|
type: :development
|
74
57
|
prerelease: false
|
75
|
-
version_requirements: *
|
76
|
-
|
58
|
+
version_requirements: *15502600
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: test-unit
|
61
|
+
requirement: &15497500 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
type: :development
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *15497500
|
70
|
+
description: Provides little utilties. It's a gem by a newbie, but I think it is quite
|
71
|
+
useful. As of now, it provides a nicely abstracted out yes/no/cancel dialog box
|
72
|
+
on a console.
|
77
73
|
email: kedar.mhaswade@gmail.com
|
78
|
-
executables:
|
74
|
+
executables:
|
79
75
|
- cli-demo
|
80
76
|
extensions: []
|
81
|
-
|
82
|
-
extra_rdoc_files:
|
77
|
+
extra_rdoc_files:
|
83
78
|
- README.rdoc
|
84
|
-
files:
|
79
|
+
files:
|
80
|
+
- Gemfile
|
81
|
+
- Gemfile.lock
|
85
82
|
- History.txt
|
86
83
|
- Manifest.txt
|
87
84
|
- PostInstall.txt
|
88
85
|
- README.rdoc
|
89
86
|
- Rakefile
|
87
|
+
- VERSION
|
90
88
|
- bin/cli-demo
|
91
89
|
- lib/lilutils.rb
|
92
90
|
- lib/lilutils/algo_test_utils/data_sets.rb
|
93
91
|
- lib/lilutils/algo_test_utils_entry.rb
|
94
92
|
- lib/lilutils/cli/cli.rb
|
95
93
|
- lib/lilutils/cli_entry.rb
|
94
|
+
- lib/lilutils/misc/binary_search.rb
|
96
95
|
- lib/lilutils/misc/misc.rb
|
97
96
|
- lib/lilutils/misc/pascal.rb
|
98
97
|
- lib/lilutils/misc_entry.rb
|
98
|
+
- lilutils.gemspec
|
99
99
|
- script/console
|
100
100
|
- script/destroy
|
101
101
|
- script/generate
|
102
102
|
- test/algo_test_utils/data_sets_test.rb
|
103
103
|
- test/cli/cli_basic_test.rb
|
104
|
+
- test/misc/binary_search_test.rb
|
104
105
|
- test/misc/misc_pascal_test.rb
|
105
106
|
- test/test_helper.rb
|
106
107
|
- test/test_lilutils.rb
|
107
108
|
has_rdoc: true
|
108
109
|
homepage: http://github.com/kedarmhaswade/lilutils
|
109
|
-
licenses:
|
110
|
+
licenses:
|
110
111
|
- MIT
|
111
112
|
post_install_message:
|
112
113
|
rdoc_options: []
|
113
|
-
|
114
|
-
require_paths:
|
114
|
+
require_paths:
|
115
115
|
- lib
|
116
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
122
|
-
segments:
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
segments:
|
123
123
|
- 0
|
124
|
-
|
125
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
hash: -890236444021516907
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
126
|
none: false
|
127
|
-
requirements:
|
128
|
-
- -
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
- 0
|
132
|
-
version: "0"
|
127
|
+
requirements:
|
128
|
+
- - ! '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
133
131
|
requirements: []
|
134
|
-
|
135
132
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.
|
133
|
+
rubygems_version: 1.6.2
|
137
134
|
signing_key:
|
138
135
|
specification_version: 3
|
139
136
|
summary: Little utilities for everyone
|
140
|
-
test_files:
|
137
|
+
test_files:
|
141
138
|
- test/algo_test_utils/data_sets_test.rb
|
142
139
|
- test/cli/cli_basic_test.rb
|
140
|
+
- test/misc/binary_search_test.rb
|
143
141
|
- test/misc/misc_pascal_test.rb
|
144
142
|
- test/test_helper.rb
|
145
143
|
- test/test_lilutils.rb
|