spruz 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +5 -0
- data/{README → README.rdoc} +0 -0
- data/Rakefile +25 -88
- data/VERSION +1 -1
- data/lib/spruz/go.rb +5 -1
- data/lib/spruz/time_dummy.rb +4 -4
- data/lib/spruz/version.rb +1 -1
- data/spruz.gemspec +14 -10
- data/tests/test_spruz_memoize.rb +1 -1
- metadata +90 -19
- data/install.rb +0 -33
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/{README → README.rdoc}
RENAMED
File without changes
|
data/Rakefile
CHANGED
@@ -1,93 +1,30 @@
|
|
1
1
|
# vim: set filetype=ruby et sw=2 ts=2:
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
task :test do
|
28
|
-
ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -Ilib"
|
29
|
-
sh 'testrb ./tests/test_*.rb'
|
30
|
-
end
|
31
|
-
|
32
|
-
desc "Testing library with coverage"
|
33
|
-
task :coverage do
|
34
|
-
sh "rcov -Ilib -x '/gems/' -x 'tests/.*\.rb' tests/test_*.rb"
|
35
|
-
end
|
36
|
-
|
37
|
-
if defined? Gem
|
38
|
-
spec = Gem::Specification.new do |s|
|
39
|
-
s.name = PKG_NAME
|
40
|
-
s.version = PKG_VERSION
|
41
|
-
s.summary = "Useful stuff."
|
42
|
-
s.description = "All the stuff that isn't good/big enough for a real library."
|
43
|
-
|
44
|
-
s.files = PKG_FILES
|
45
|
-
|
46
|
-
s.require_path = 'lib'
|
47
|
-
|
48
|
-
s.bindir = "bin"
|
49
|
-
s.executables << "enum"
|
50
|
-
|
51
|
-
s.extra_rdoc_files << 'README'
|
52
|
-
s.rdoc_options << '--title' << 'Spruz' << '--main' << 'README'
|
53
|
-
s.test_files.concat Dir['tests/test_*.rb']
|
54
|
-
|
55
|
-
s.author = "Florian Frank"
|
56
|
-
s.email = "flori@ping.de"
|
57
|
-
s.homepage = "http://flori.github.com/spruz"
|
58
|
-
end
|
59
|
-
|
60
|
-
task :gemspec do
|
61
|
-
File.open('spruz.gemspec', 'w') do |output|
|
62
|
-
output.write spec.to_ruby
|
3
|
+
require 'gem_hadar'
|
4
|
+
|
5
|
+
GemHadar do
|
6
|
+
name 'spruz'
|
7
|
+
author 'Florian Frank'
|
8
|
+
email 'flori@ping.de'
|
9
|
+
homepage "http://flori.github.com/#{name}"
|
10
|
+
summary 'Useful stuff.'
|
11
|
+
description 'All the stuff that isn\'t good/big enough for a real library.'
|
12
|
+
bindir 'bin'
|
13
|
+
executables << 'enum'
|
14
|
+
test_dir 'tests'
|
15
|
+
ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock'
|
16
|
+
readme 'README.rdoc'
|
17
|
+
|
18
|
+
|
19
|
+
install_library do
|
20
|
+
libdir = CONFIG["sitelibdir"]
|
21
|
+
cd 'lib' do
|
22
|
+
for file in Dir['**/*.rb']
|
23
|
+
dst = File.join(libdir, file)
|
24
|
+
mkdir_p File.dirname(dst)
|
25
|
+
install file, dst
|
26
|
+
end
|
63
27
|
end
|
64
|
-
|
65
|
-
|
66
|
-
Gem::PackageTask.new(spec) do |pkg|
|
67
|
-
pkg.need_tar = true
|
68
|
-
pkg.package_files += PKG_FILES
|
28
|
+
install 'bin/enum', File.join(CONFIG['bindir'], 'enum')
|
69
29
|
end
|
70
30
|
end
|
71
|
-
|
72
|
-
desc m = "Writing version information for #{PKG_VERSION}"
|
73
|
-
task :version do
|
74
|
-
puts m
|
75
|
-
File.open(File.join('lib', PKG_NAME, 'version.rb'), 'w') do |v|
|
76
|
-
v.puts <<EOT
|
77
|
-
module Spruz
|
78
|
-
# Spruz version
|
79
|
-
VERSION = '#{PKG_VERSION}'
|
80
|
-
VERSION_ARRAY = VERSION.split(/\\./).map { |x| x.to_i } # :nodoc:
|
81
|
-
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
|
82
|
-
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
|
83
|
-
VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
|
84
|
-
end
|
85
|
-
EOT
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
desc "Default task: write version and test"
|
90
|
-
task :default => [ :version, :test ]
|
91
|
-
|
92
|
-
desc "Prepare a release"
|
93
|
-
task :release => [ :clean, :version, :package ]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.11
|
data/lib/spruz/go.rb
CHANGED
data/lib/spruz/time_dummy.rb
CHANGED
@@ -4,13 +4,11 @@ module Spruz
|
|
4
4
|
modul.module_eval do
|
5
5
|
class << self
|
6
6
|
alias really_new new
|
7
|
+
remove_method :now rescue nil
|
8
|
+
remove_method :new rescue nil
|
7
9
|
end
|
8
10
|
|
9
11
|
extend ClassMethods
|
10
|
-
|
11
|
-
class << self
|
12
|
-
alias now new
|
13
|
-
end
|
14
12
|
end
|
15
13
|
end
|
16
14
|
|
@@ -24,6 +22,8 @@ module Spruz
|
|
24
22
|
really_new
|
25
23
|
end
|
26
24
|
end
|
25
|
+
|
26
|
+
alias now new
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/spruz/version.rb
CHANGED
data/spruz.gemspec
CHANGED
@@ -2,29 +2,33 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{spruz}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.11"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [
|
9
|
-
s.date = %q{2011-07-
|
8
|
+
s.authors = ["Florian Frank"]
|
9
|
+
s.date = %q{2011-07-16}
|
10
|
+
s.default_executable = %q{enum}
|
10
11
|
s.description = %q{All the stuff that isn't good/big enough for a real library.}
|
11
12
|
s.email = %q{flori@ping.de}
|
12
|
-
s.executables = [
|
13
|
-
s.extra_rdoc_files = [
|
14
|
-
s.files = [
|
13
|
+
s.executables = ["enum"]
|
14
|
+
s.extra_rdoc_files = ["README.rdoc", "lib/spruz.rb", "lib/spruz/hash_symbolize_keys_recursive.rb", "lib/spruz/string_underscore.rb", "lib/spruz/hash_union.rb", "lib/spruz/write.rb", "lib/spruz/version.rb", "lib/spruz/round.rb", "lib/spruz/go.rb", "lib/spruz/generator.rb", "lib/spruz/string_camelize.rb", "lib/spruz/shuffle.rb", "lib/spruz/deep_dup.rb", "lib/spruz/memoize.rb", "lib/spruz/subhash.rb", "lib/spruz/bijection.rb", "lib/spruz/limited.rb", "lib/spruz/attempt.rb", "lib/spruz/to_proc.rb", "lib/spruz/module_group.rb", "lib/spruz/null.rb", "lib/spruz/xt.rb", "lib/spruz/once.rb", "lib/spruz/xt/named.rb", "lib/spruz/xt/hash_symbolize_keys_recursive.rb", "lib/spruz/xt/string_underscore.rb", "lib/spruz/xt/hash_union.rb", "lib/spruz/xt/write.rb", "lib/spruz/xt/irb.rb", "lib/spruz/xt/round.rb", "lib/spruz/xt/string_camelize.rb", "lib/spruz/xt/shuffle.rb", "lib/spruz/xt/deep_dup.rb", "lib/spruz/xt/symbol_to_proc.rb", "lib/spruz/xt/subhash.rb", "lib/spruz/xt/attempt.rb", "lib/spruz/xt/null.rb", "lib/spruz/xt/p.rb", "lib/spruz/xt/partial_application.rb", "lib/spruz/xt/time_dummy.rb", "lib/spruz/xt/string.rb", "lib/spruz/xt/full.rb", "lib/spruz/xt/range_plus.rb", "lib/spruz/xt/count_by.rb", "lib/spruz/xt/blank.rb", "lib/spruz/xt/uniq_by.rb", "lib/spruz/p.rb", "lib/spruz/minimize.rb", "lib/spruz/partial_application.rb", "lib/spruz/time_dummy.rb", "lib/spruz/range_plus.rb", "lib/spruz/count_by.rb", "lib/spruz/uniq_by.rb"]
|
15
|
+
s.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE", "README.rdoc", "Rakefile", "VERSION", "bin/enum", "lib/spruz.rb", "lib/spruz/attempt.rb", "lib/spruz/bijection.rb", "lib/spruz/count_by.rb", "lib/spruz/deep_dup.rb", "lib/spruz/generator.rb", "lib/spruz/go.rb", "lib/spruz/hash_symbolize_keys_recursive.rb", "lib/spruz/hash_union.rb", "lib/spruz/limited.rb", "lib/spruz/memoize.rb", "lib/spruz/minimize.rb", "lib/spruz/module_group.rb", "lib/spruz/null.rb", "lib/spruz/once.rb", "lib/spruz/p.rb", "lib/spruz/partial_application.rb", "lib/spruz/range_plus.rb", "lib/spruz/round.rb", "lib/spruz/shuffle.rb", "lib/spruz/string_camelize.rb", "lib/spruz/string_underscore.rb", "lib/spruz/subhash.rb", "lib/spruz/time_dummy.rb", "lib/spruz/to_proc.rb", "lib/spruz/uniq_by.rb", "lib/spruz/version.rb", "lib/spruz/write.rb", "lib/spruz/xt.rb", "lib/spruz/xt/attempt.rb", "lib/spruz/xt/blank.rb", "lib/spruz/xt/count_by.rb", "lib/spruz/xt/deep_dup.rb", "lib/spruz/xt/full.rb", "lib/spruz/xt/hash_symbolize_keys_recursive.rb", "lib/spruz/xt/hash_union.rb", "lib/spruz/xt/irb.rb", "lib/spruz/xt/named.rb", "lib/spruz/xt/null.rb", "lib/spruz/xt/p.rb", "lib/spruz/xt/partial_application.rb", "lib/spruz/xt/range_plus.rb", "lib/spruz/xt/round.rb", "lib/spruz/xt/shuffle.rb", "lib/spruz/xt/string.rb", "lib/spruz/xt/string_camelize.rb", "lib/spruz/xt/string_underscore.rb", "lib/spruz/xt/subhash.rb", "lib/spruz/xt/symbol_to_proc.rb", "lib/spruz/xt/time_dummy.rb", "lib/spruz/xt/uniq_by.rb", "lib/spruz/xt/write.rb", "spruz.gemspec", "tests/test_spruz.rb", "tests/test_spruz_memoize.rb"]
|
15
16
|
s.homepage = %q{http://flori.github.com/spruz}
|
16
|
-
s.rdoc_options = [
|
17
|
-
s.require_paths = [
|
18
|
-
s.rubygems_version = %q{1.
|
17
|
+
s.rdoc_options = ["--title", "Spruz - Useful stuff.", "--main", "README.rdoc"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
s.rubygems_version = %q{1.6.2}
|
19
20
|
s.summary = %q{Useful stuff.}
|
20
|
-
s.test_files = [
|
21
|
+
s.test_files = ["tests/test_spruz_memoize.rb", "tests/test_spruz.rb"]
|
21
22
|
|
22
23
|
if s.respond_to? :specification_version then
|
23
24
|
s.specification_version = 3
|
24
25
|
|
25
26
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
27
|
+
s.add_development_dependency(%q<gem_hadar>, ["~> 0.0.4"])
|
26
28
|
else
|
29
|
+
s.add_dependency(%q<gem_hadar>, ["~> 0.0.4"])
|
27
30
|
end
|
28
31
|
else
|
32
|
+
s.add_dependency(%q<gem_hadar>, ["~> 0.0.4"])
|
29
33
|
end
|
30
34
|
end
|
data/tests/test_spruz_memoize.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spruz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Florian Frank
|
@@ -15,9 +15,25 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
19
|
-
|
20
|
-
|
18
|
+
date: 2011-07-16 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: gem_hadar
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 23
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
- 4
|
34
|
+
version: 0.0.4
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
21
37
|
description: All the stuff that isn't good/big enough for a real library.
|
22
38
|
email: flori@ping.de
|
23
39
|
executables:
|
@@ -25,13 +41,7 @@ executables:
|
|
25
41
|
extensions: []
|
26
42
|
|
27
43
|
extra_rdoc_files:
|
28
|
-
- README
|
29
|
-
files:
|
30
|
-
- tests/test_spruz_memoize.rb
|
31
|
-
- tests/test_spruz.rb
|
32
|
-
- LICENSE
|
33
|
-
- Rakefile
|
34
|
-
- spruz.gemspec
|
44
|
+
- README.rdoc
|
35
45
|
- lib/spruz.rb
|
36
46
|
- lib/spruz/hash_symbolize_keys_recursive.rb
|
37
47
|
- lib/spruz/string_underscore.rb
|
@@ -84,19 +94,80 @@ files:
|
|
84
94
|
- lib/spruz/range_plus.rb
|
85
95
|
- lib/spruz/count_by.rb
|
86
96
|
- lib/spruz/uniq_by.rb
|
87
|
-
|
88
|
-
-
|
97
|
+
files:
|
98
|
+
- .gitignore
|
99
|
+
- .travis.yml
|
100
|
+
- Gemfile
|
101
|
+
- LICENSE
|
102
|
+
- README.rdoc
|
103
|
+
- Rakefile
|
89
104
|
- VERSION
|
90
|
-
-
|
105
|
+
- bin/enum
|
106
|
+
- lib/spruz.rb
|
107
|
+
- lib/spruz/attempt.rb
|
108
|
+
- lib/spruz/bijection.rb
|
109
|
+
- lib/spruz/count_by.rb
|
110
|
+
- lib/spruz/deep_dup.rb
|
111
|
+
- lib/spruz/generator.rb
|
112
|
+
- lib/spruz/go.rb
|
113
|
+
- lib/spruz/hash_symbolize_keys_recursive.rb
|
114
|
+
- lib/spruz/hash_union.rb
|
115
|
+
- lib/spruz/limited.rb
|
116
|
+
- lib/spruz/memoize.rb
|
117
|
+
- lib/spruz/minimize.rb
|
118
|
+
- lib/spruz/module_group.rb
|
119
|
+
- lib/spruz/null.rb
|
120
|
+
- lib/spruz/once.rb
|
121
|
+
- lib/spruz/p.rb
|
122
|
+
- lib/spruz/partial_application.rb
|
123
|
+
- lib/spruz/range_plus.rb
|
124
|
+
- lib/spruz/round.rb
|
125
|
+
- lib/spruz/shuffle.rb
|
126
|
+
- lib/spruz/string_camelize.rb
|
127
|
+
- lib/spruz/string_underscore.rb
|
128
|
+
- lib/spruz/subhash.rb
|
129
|
+
- lib/spruz/time_dummy.rb
|
130
|
+
- lib/spruz/to_proc.rb
|
131
|
+
- lib/spruz/uniq_by.rb
|
132
|
+
- lib/spruz/version.rb
|
133
|
+
- lib/spruz/write.rb
|
134
|
+
- lib/spruz/xt.rb
|
135
|
+
- lib/spruz/xt/attempt.rb
|
136
|
+
- lib/spruz/xt/blank.rb
|
137
|
+
- lib/spruz/xt/count_by.rb
|
138
|
+
- lib/spruz/xt/deep_dup.rb
|
139
|
+
- lib/spruz/xt/full.rb
|
140
|
+
- lib/spruz/xt/hash_symbolize_keys_recursive.rb
|
141
|
+
- lib/spruz/xt/hash_union.rb
|
142
|
+
- lib/spruz/xt/irb.rb
|
143
|
+
- lib/spruz/xt/named.rb
|
144
|
+
- lib/spruz/xt/null.rb
|
145
|
+
- lib/spruz/xt/p.rb
|
146
|
+
- lib/spruz/xt/partial_application.rb
|
147
|
+
- lib/spruz/xt/range_plus.rb
|
148
|
+
- lib/spruz/xt/round.rb
|
149
|
+
- lib/spruz/xt/shuffle.rb
|
150
|
+
- lib/spruz/xt/string.rb
|
151
|
+
- lib/spruz/xt/string_camelize.rb
|
152
|
+
- lib/spruz/xt/string_underscore.rb
|
153
|
+
- lib/spruz/xt/subhash.rb
|
154
|
+
- lib/spruz/xt/symbol_to_proc.rb
|
155
|
+
- lib/spruz/xt/time_dummy.rb
|
156
|
+
- lib/spruz/xt/uniq_by.rb
|
157
|
+
- lib/spruz/xt/write.rb
|
158
|
+
- spruz.gemspec
|
159
|
+
- tests/test_spruz.rb
|
160
|
+
- tests/test_spruz_memoize.rb
|
161
|
+
has_rdoc: true
|
91
162
|
homepage: http://flori.github.com/spruz
|
92
163
|
licenses: []
|
93
164
|
|
94
165
|
post_install_message:
|
95
166
|
rdoc_options:
|
96
167
|
- --title
|
97
|
-
- Spruz
|
168
|
+
- Spruz - Useful stuff.
|
98
169
|
- --main
|
99
|
-
- README
|
170
|
+
- README.rdoc
|
100
171
|
require_paths:
|
101
172
|
- lib
|
102
173
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -120,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
191
|
requirements: []
|
121
192
|
|
122
193
|
rubyforge_project:
|
123
|
-
rubygems_version: 1.
|
194
|
+
rubygems_version: 1.6.2
|
124
195
|
signing_key:
|
125
196
|
specification_version: 3
|
126
197
|
summary: Useful stuff.
|
data/install.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rbconfig'
|
4
|
-
include Config
|
5
|
-
require 'fileutils'
|
6
|
-
include FileUtils::Verbose
|
7
|
-
|
8
|
-
if $DEBUG
|
9
|
-
def install(*a)
|
10
|
-
p [ :install ] + a
|
11
|
-
end
|
12
|
-
|
13
|
-
def mkdir_p(*a)
|
14
|
-
p [ :mkdir_p ] + a
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
file = File.join('lib', 'spruz.rb')
|
19
|
-
dst = CONFIG["sitelibdir"]
|
20
|
-
install file, File.join(dst, File.join('lib/spruz.rb'))
|
21
|
-
src = File.join(*%w[lib spruz *.rb])
|
22
|
-
dst = File.join(CONFIG["sitelibdir"], 'spruz')
|
23
|
-
mkdir_p dst
|
24
|
-
for file in Dir[src]
|
25
|
-
install file, File.join(dst, file)
|
26
|
-
end
|
27
|
-
src = File.join(*%w[lib spruz xt *.rb])
|
28
|
-
dst = File.join(CONFIG["sitelibdir"], 'spruz', 'xt')
|
29
|
-
mkdir_p dst
|
30
|
-
for file in Dir[src]
|
31
|
-
install file, File.join(dst, file)
|
32
|
-
end
|
33
|
-
install 'bin/enum', File.join(CONFIG['bindir'], 'enum')
|