core_ex 0.6.6.2 → 0.6.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +8 -0
- data/NEWS +4 -0
- data/Rakefile +1 -1
- data/SPEC.gemspec +3 -3
- data/SPEC.yml +4 -4
- data/lib/core_ex.rb +8 -0
- data/lib/core_ex/enumerable.rb +0 -5
- data/lib/core_ex/pathname.rb +3 -1
- data/lib/core_ex/version_id.rb +1 -1
- data/lib/path_list.rb +7 -6
- data/test/sanity/multiple-requires.yml +1 -1
- metadata +3 -3
data/ChangeLog
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
2007-03-20 Nicolas Pouillard <nicolas.pouillard@gmail.com>
|
2
|
+
|
3
|
+
Bump to dev-ruby/core_ex-0.6_p2.
|
4
|
+
|
5
|
+
* NEWS,
|
6
|
+
* SPEC.yml,
|
7
|
+
* lib/core_ex/version_id.rb: Bump to dev-ruby/core_ex-0.6_p2.
|
8
|
+
|
1
9
|
2006-03-25 Nicolas Despr�s <nicolas.despres@gmail.com>
|
2
10
|
|
3
11
|
Display clobber tasks with rake -T.
|
data/NEWS
CHANGED
data/Rakefile
CHANGED
data/SPEC.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{core_ex}
|
3
|
-
s.version = "0.6.6.
|
4
|
-
s.date = %q{2007-
|
3
|
+
s.version = "0.6.6.3"
|
4
|
+
s.date = %q{2007-08-15}
|
5
5
|
s.summary = %q{CoreEx is a proposal for a standard library extension.}
|
6
6
|
s.email = ["nicolas.despres@gmail.com", "ertai@feydakins.org"]
|
7
7
|
s.homepage = %q{http://api.feydakins.org/core_ex}
|
@@ -9,5 +9,5 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.description = %q{CoreEx is designed to provide a simple but quite useful extension of the standard library of Ruby. So some classes and modules like Pathname, Time, Enumerable, Exception, FileUtils, String, and YAML are extended. There is also some new features like attr_once, DTime, TempPath, Version, embedded_tests, filelist (almost from rake), a common Rakefile, and an extension of the require system.}
|
10
10
|
s.authors = ["Nicolas Despr\350s", "Nicolas Pouillard"]
|
11
11
|
s.files = ["lib/core_ex.rb", "lib/d_time.rb", "lib/dumpable_proc.rb", "lib/path_list.rb", "lib/temp_path.rb", "lib/version.rb", "lib/yaml_extension.rb", "lib/core_ex/embedded_tests.rb", "lib/core_ex/enumerable.rb", "lib/core_ex/exception.rb", "lib/core_ex/file_utils.rb", "lib/core_ex/numeric.rb", "lib/core_ex/pathname.rb", "lib/core_ex/proc.rb", "lib/core_ex/rakefile_base.rf", "lib/core_ex/require.rb", "lib/core_ex/string.rb", "lib/core_ex/time.rb", "lib/core_ex/try_dup.rb", "lib/core_ex/version_id.rb", "lib/core_ex/yaml.rb", "lib/core_ex/dependencies_ext/constant_load_path.rb", "lib/core_ex/module/attr_once.rb", "lib/core_ex/module/import.rb", "lib/core_ex/module/in_place.rb", "lib/core_ex/module/mix_in_with_args.rb", "lib/core_ex/object/instance_eval_with_args.rb", "lib/core_ex/object/singleton_class.rb", "lib/core_ex/object/the_first_time.rb", "lib/test/unit/u_i/yaml/test_runner.rb", "test/check-core_ex.yml", "test/check-pkg-core_ex.yml", "test/fixtures", "test/sanity", "test/sanity-suite.yml", "test/unit-suite.yml", "test/fixtures/require", "test/fixtures/use-from-gems.rb", "test/fixtures/yaml_testrunner", "test/fixtures/require/test_require", "test/fixtures/require/test_require_rb.rb", "test/fixtures/require/test_require_so.so", "test/fixtures/yaml_testrunner/unit_test.rb", "test/sanity/multiple-requires.yml", "test/sanity/single-requires.yml", "AUTHORS", "ChangeLog", "NEWS", "Rakefile", "README", "SPEC.gemspec", "SPEC.yml"]
|
12
|
-
s.add_dependency(%q<activesupport>, ["~> 1.
|
12
|
+
s.add_dependency(%q<activesupport>, ["~> 1.4.2"])
|
13
13
|
end
|
data/SPEC.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
---
|
2
2
|
Author: The Uttk Team.
|
3
3
|
License: Ruby License
|
4
|
-
Revision: '$Id: /w/fey/ruby_ex/trunk/core_ex/SPEC.yml
|
4
|
+
Revision: '$Id: /w/fey/ruby_ex/trunk/core_ex/SPEC.yml 55720 2007-03-20T13:09:46.846764Z ertai $'
|
5
5
|
|
6
|
-
version: !feydakins.org,2006/version dev-ruby/core_ex-0.
|
6
|
+
version: !feydakins.org,2006/version dev-ruby/core_ex-0.6_p3
|
7
7
|
|
8
8
|
# XXX check also lib/core_ex/version_id.rb
|
9
9
|
|
@@ -40,7 +40,7 @@ pkg_files: !filelist
|
|
40
40
|
|
41
41
|
dependencies:
|
42
42
|
activesupport:
|
43
|
-
gem: ~> 1.
|
44
|
-
tarball: http://rubyforge.rubyuser.de/activesupport/activesupport-1.
|
43
|
+
gem: ~> 1.4.2
|
44
|
+
tarball: http://rubyforge.rubyuser.de/activesupport/activesupport-1.4.2.tgz
|
45
45
|
|
46
46
|
uttk_version: >= 0.3.6.1
|
data/lib/core_ex.rb
CHANGED
@@ -119,6 +119,8 @@ unless defined? CORE_EX_LOADED and CORE_EX_LOADED
|
|
119
119
|
|
120
120
|
$VERBOSE = verbose
|
121
121
|
|
122
|
+
Dependencies.loaded << 'core_ex' << (CORE_EX_DIR + 'core_ex').to_s
|
123
|
+
|
122
124
|
# <<< little active_support patch
|
123
125
|
silence_warnings do
|
124
126
|
module Inflector
|
@@ -279,6 +281,7 @@ module CoreEx
|
|
279
281
|
end # module CoreEx
|
280
282
|
|
281
283
|
$LOAD_PATH << CoreEx.dir
|
284
|
+
Dependencies.load_paths << CoreEx.dir
|
282
285
|
|
283
286
|
require 'core_ex/embedded_tests'
|
284
287
|
|
@@ -338,6 +341,11 @@ class Time
|
|
338
341
|
include CoreEx::Time
|
339
342
|
end # class Time
|
340
343
|
|
344
|
+
class Range
|
345
|
+
def size
|
346
|
+
(max.to_i - min.to_i).abs
|
347
|
+
end
|
348
|
+
end # class Range
|
341
349
|
|
342
350
|
CoreEx.dir.load_path!
|
343
351
|
|
data/lib/core_ex/enumerable.rb
CHANGED
data/lib/core_ex/pathname.rb
CHANGED
@@ -145,8 +145,10 @@ module CoreEx
|
|
145
145
|
def load_path!
|
146
146
|
string = expand_path.cleanpath.to_s
|
147
147
|
raise "bad path name `#{self}' need a directory" unless directory?
|
148
|
-
return false if $LOAD_PATH.include? string
|
148
|
+
return false if $LOAD_PATH.include? string and
|
149
|
+
Dependencies.load_paths.include? string
|
149
150
|
$LOAD_PATH.unshift string
|
151
|
+
Dependencies.load_paths.unshift string
|
150
152
|
return true
|
151
153
|
end
|
152
154
|
|
data/lib/core_ex/version_id.rb
CHANGED
data/lib/path_list.rb
CHANGED
@@ -79,14 +79,14 @@ class PathList
|
|
79
79
|
|
80
80
|
# List of array methods (that are not in +Object+) that need to be
|
81
81
|
# delegated.
|
82
|
-
ARRAY_METHODS = Array.instance_methods - Object.instance_methods
|
82
|
+
ARRAY_METHODS = Array.instance_methods - Object.instance_methods unless defined? ARRAY_METHODS
|
83
83
|
|
84
84
|
# List of additional methods that must be delegated.
|
85
|
-
MUST_DEFINE = %w[to_a inspect]
|
85
|
+
MUST_DEFINE = %w[to_a inspect] unless defined? MUST_DEFINE
|
86
86
|
|
87
87
|
# List of methods that should not be delegated here (we define
|
88
88
|
# special versions of them explicitly below).
|
89
|
-
MUST_NOT_DEFINE = %w[to_a to_ary partition *]
|
89
|
+
MUST_NOT_DEFINE = %w[to_a to_ary partition *] unless defined? MUST_NOT_DEFINE
|
90
90
|
|
91
91
|
# List of delegated methods that return new array values which
|
92
92
|
# need wrapping.
|
@@ -94,9 +94,10 @@ class PathList
|
|
94
94
|
map collect sort sort_by select find_all reject grep
|
95
95
|
compact flatten uniq values_at
|
96
96
|
+ - & |
|
97
|
-
]
|
97
|
+
] unless defined? SPECIAL_RETURN
|
98
98
|
|
99
|
-
DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).sort.uniq
|
99
|
+
DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).sort.uniq \
|
100
|
+
unless defined? DELEGATING_METHODS
|
100
101
|
|
101
102
|
# Now do the delegation.
|
102
103
|
DELEGATING_METHODS.each_with_index do |sym, i|
|
@@ -424,7 +425,7 @@ class PathList
|
|
424
425
|
/\.bak$/,
|
425
426
|
/~$/,
|
426
427
|
/(^|[\/\\])core$/
|
427
|
-
]
|
428
|
+
] unless defined? DEFAULT_IGNORE_PATTERNS
|
428
429
|
@exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
|
429
430
|
|
430
431
|
def import(array)
|
@@ -38,7 +38,7 @@ CoreEx Sanity Multiple Requires Test Suite: !S::Suite
|
|
38
38
|
path_list = PathList[lib_dir/'(**/*).rb']
|
39
39
|
path_list.each do |_, path|
|
40
40
|
require_dependency path
|
41
|
-
assert(Dependencies.loaded.
|
41
|
+
assert(Dependencies.loaded.to_a.grep(/(^|\/)#{Regexp.quote(path)}$/).size >= 1,
|
42
42
|
"#{path} not in Dependencies.loaded #{Dependencies.loaded.inspect}")
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: core_ex
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.6.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.6.6.3
|
7
|
+
date: 2007-08-15 00:00:00 +02:00
|
8
8
|
summary: CoreEx is a proposal for a standard library extension.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -104,5 +104,5 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - ~>
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 1.
|
107
|
+
version: 1.4.2
|
108
108
|
version:
|