kyanite 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Div +1 -7
- data/History.txt +3 -0
- data/Manifest.txt +0 -5
- data/README.txt +6 -6
- data/Rakefile.rb +27 -34
- data/lib/kyanite/array/array.rb +2 -9
- data/lib/kyanite/array/array2.rb +5 -5
- data/lib/kyanite/array/matrix2.rb +13 -13
- data/lib/kyanite/array.rb +1 -0
- data/lib/kyanite/array_of_enumerables.rb +1 -1
- data/lib/kyanite/array_of_numerics.rb +1 -1
- data/lib/kyanite/array_of_strings.rb +1 -1
- data/lib/kyanite/basics.rb +1 -2
- data/lib/kyanite/dictionary.rb +4 -4
- data/lib/kyanite/enumerable/enumerable_enumerables.rb +5 -5
- data/lib/kyanite/enumerable/enumerable_numerics.rb +4 -4
- data/lib/kyanite/enumerable/enumerable_strings.rb +6 -5
- data/lib/kyanite/enumerable/structure.rb +28 -25
- data/lib/kyanite/enumerable.rb +1 -1
- data/lib/kyanite/general/callerutils.rb +1 -1
- data/lib/kyanite/general/classutils.rb +23 -24
- data/lib/kyanite/general/kernel.rb +6 -6
- data/lib/kyanite/general/nil.rb +4 -4
- data/lib/kyanite/general/object.rb +1 -1
- data/lib/kyanite/general/true_false.rb +1 -1
- data/lib/kyanite/general/undoable.rb +7 -7
- data/lib/kyanite/general.rb +1 -1
- data/lib/kyanite/hash.rb +22 -22
- data/lib/kyanite/matrix2.rb +1 -1
- data/lib/kyanite/nil.rb +1 -1
- data/lib/kyanite/numeric/float.rb +1 -1
- data/lib/kyanite/numeric/integer.rb +7 -7
- data/lib/kyanite/numeric/numeric.rb +9 -9
- data/lib/kyanite/numeric.rb +1 -1
- data/lib/kyanite/operation/call_tracker.rb +1 -1
- data/lib/kyanite/operation/regexp.rb +1 -1
- data/lib/kyanite/operation/unit_test.rb +1 -1
- data/lib/kyanite/operation.rb +1 -1
- data/lib/kyanite/optimizer.rb +4 -4
- data/lib/kyanite/rake.rb +1 -1
- data/lib/kyanite/range.rb +4 -4
- data/lib/kyanite/set.rb +4 -6
- data/lib/kyanite/string/cast.rb +4 -4
- data/lib/kyanite/string/chars.rb +5 -5
- data/lib/kyanite/string/diff.rb +1 -1
- data/lib/kyanite/string/div.rb +1 -1
- data/lib/kyanite/string/include.rb +6 -6
- data/lib/kyanite/string/list.rb +1 -1
- data/lib/kyanite/string/nested.rb +1 -1
- data/lib/kyanite/string/split.rb +3 -3
- data/lib/kyanite/string.rb +1 -1
- data/lib/kyanite/symbol.rb +1 -1
- data/lib/kyanite/tree.rb +1 -1
- data/lib/kyanite/undoable.rb +1 -1
- data/lib/kyanite/unit_test.rb +1 -1
- data/lib/kyanite.rb +6 -6
- data/test/string/test_list.rb +2 -1
- data/test/test_hash.rb +1 -1
- data/test/test_range.rb +2 -1
- metadata +3 -8
- data/0_rake_test.bat +0 -13
- data/1_rake_install_gem.bat +0 -20
- data/3_rake_deploy.bat +0 -4
- data/4_ruby_script_console.bat +0 -13
- data/lib/kyanite/operation/rake.rb +0 -119
data/lib/kyanite/string.rb
CHANGED
data/lib/kyanite/symbol.rb
CHANGED
data/lib/kyanite/tree.rb
CHANGED
data/lib/kyanite/undoable.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
# ruby encoding: utf-8
|
2
2
|
require 'kyanite/general/undoable'
|
data/lib/kyanite/unit_test.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
# ruby encoding: utf-8
|
2
2
|
require 'kyanite/operation/unit_test'
|
data/lib/kyanite.rb
CHANGED
@@ -34,17 +34,17 @@ end
|
|
34
34
|
#
|
35
35
|
#
|
36
36
|
# == License
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
37
|
+
# cc-by-sa
|
38
|
+
# Creative Commons Attribution-Share Alike 3.0 Germany
|
39
|
+
# http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
|
40
40
|
#
|
41
41
|
#
|
42
42
|
# == Homepage
|
43
|
-
#
|
43
|
+
# http://kyanite.rubyforge.org
|
44
44
|
#
|
45
45
|
#
|
46
46
|
# == Author
|
47
|
-
#
|
47
|
+
# Björn Klippstein
|
48
48
|
#
|
49
49
|
#
|
50
50
|
# == Disclaimer
|
@@ -57,7 +57,7 @@ end
|
|
57
57
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
58
58
|
#
|
59
59
|
module Kyanite
|
60
|
-
VERSION = '0.5.
|
60
|
+
VERSION = '0.5.1'
|
61
61
|
end
|
62
62
|
|
63
63
|
|
data/test/string/test_list.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# ruby encoding: utf-8
|
2
|
+
|
2
3
|
require File.join(File.dirname(__FILE__), '..', '..', 'smart_load_path.rb' ); smart_load_path if $0 == __FILE__
|
3
4
|
require 'kyanite/unit_test'
|
4
5
|
require 'kyanite/dictionary'
|
@@ -76,7 +77,7 @@ class TestKyaniteStringList < UnitTest
|
|
76
77
|
assert_equal "kisses_from = 'anna' OR kisses_from = 'birte' OR kisses_from = 'charlie'",
|
77
78
|
"kisses_from = ".list_with(array) { |e| e.downcase2 }
|
78
79
|
|
79
|
-
# ohne Block: Objekte sind
|
80
|
+
# ohne Block: Objekte sind unverändert geblieben
|
80
81
|
assert_equal "kisses_from='Anna' AND kisses_from='Birte' AND kisses_from='Charlie'",
|
81
82
|
"kisses_from=".list_with(array, :sep => ' AND ')
|
82
83
|
|
data/test/test_hash.rb
CHANGED
data/test/test_range.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# ruby encoding: utf-8
|
1
2
|
|
2
3
|
require File.join(File.dirname(__FILE__), '..', 'smart_load_path.rb' ); smart_load_path if $0 == __FILE__
|
3
4
|
require 'kyanite/unit_test'
|
@@ -26,7 +27,7 @@ class TestKyaniteRange < UnitTest
|
|
26
27
|
assert_equal (-1..-1), (0..-2).invert_index
|
27
28
|
assert_equal (-2..-1), (0..-3).invert_index
|
28
29
|
|
29
|
-
#
|
30
|
+
# außen
|
30
31
|
assert_equal [0..1, 5..-1], (2..4).invert_index
|
31
32
|
assert_equal [0..-6, -2..-1], (-5..-3).invert_index
|
32
33
|
assert_equal [0..1, -2..-1], (2..-3).invert_index
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kyanite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -102,10 +102,6 @@ extra_rdoc_files:
|
|
102
102
|
- Manifest.txt
|
103
103
|
- README.txt
|
104
104
|
files:
|
105
|
-
- 0_rake_test.bat
|
106
|
-
- 1_rake_install_gem.bat
|
107
|
-
- 3_rake_deploy.bat
|
108
|
-
- 4_ruby_script_console.bat
|
109
105
|
- Div
|
110
106
|
- History.txt
|
111
107
|
- License.txt
|
@@ -146,7 +142,6 @@ files:
|
|
146
142
|
- lib/kyanite/numeric/numeric.rb
|
147
143
|
- lib/kyanite/operation.rb
|
148
144
|
- lib/kyanite/operation/call_tracker.rb
|
149
|
-
- lib/kyanite/operation/rake.rb
|
150
145
|
- lib/kyanite/operation/regexp.rb
|
151
146
|
- lib/kyanite/operation/unit_test.rb
|
152
147
|
- lib/kyanite/optimizer.rb
|
@@ -194,7 +189,7 @@ files:
|
|
194
189
|
- test/test_set.rb
|
195
190
|
- test/test_tree.rb
|
196
191
|
- .gemtest
|
197
|
-
homepage:
|
192
|
+
homepage:
|
198
193
|
licenses: []
|
199
194
|
post_install_message:
|
200
195
|
rdoc_options:
|
@@ -219,7 +214,7 @@ rubyforge_project: kyanite
|
|
219
214
|
rubygems_version: 1.8.24
|
220
215
|
signing_key:
|
221
216
|
specification_version: 3
|
222
|
-
summary:
|
217
|
+
summary: General toolbox like Facets or ActiveSupport.
|
223
218
|
test_files:
|
224
219
|
- test/array/test_array.rb
|
225
220
|
- test/array/test_matrix2.rb
|
data/0_rake_test.bat
DELETED
data/1_rake_install_gem.bat
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
|
2
|
-
@echo off
|
3
|
-
set MYDIR=C:\Ruby-Projekte\kyanite
|
4
|
-
@cmd /C chcp 1252 > NUL
|
5
|
-
set RUBYOPT=-rubygems
|
6
|
-
echo.
|
7
|
-
|
8
|
-
rem Manifest.txt aktualisieren
|
9
|
-
call rake check_manifest | patch
|
10
|
-
|
11
|
-
rem Windows native
|
12
|
-
call rake install_gem_no_doc
|
13
|
-
wait 3
|
14
|
-
|
15
|
-
rem Cygwin
|
16
|
-
C:\cygwin\bin\bash --login -c "cd $MYDIR; rake install_gem_no_doc"
|
17
|
-
wait 5
|
18
|
-
|
19
|
-
|
20
|
-
rem C:\cygwin\bin\bash --login -c "cd $MYDIR && echo 'Now in' `pwd`; sleep 15"
|
data/3_rake_deploy.bat
DELETED
data/4_ruby_script_console.bat
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
|
2
|
-
# Dirty patch unter Windows um rake doc:plugins zum Laufen zu bringen: http://dev.rubyonrails.org/ticket/6608
|
3
|
-
|
4
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
5
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
6
|
-
# Doku der M�glichkeiten in einem RakeTask siehe http://rake.rubyforge.org/files/doc/rakefile_rdoc.html
|
7
|
-
|
8
|
-
|
9
|
-
# ----------------------------------------------------------------------------------------------
|
10
|
-
# Rake initialisieren
|
11
|
-
#
|
12
|
-
|
13
|
-
require 'rake'
|
14
|
-
require 'rake/testtask'
|
15
|
-
require 'rake/rdoctask'
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# ----------------------------------------------------------------------------------------------
|
20
|
-
# Erg�nzung: Alte Tasks entfernen
|
21
|
-
# sonst kann man sie n�mlich nicht �berschreiben!
|
22
|
-
# Beispiel: remove_task 'test:plugins'
|
23
|
-
# Quelle: http://matthewbass.com/2007/03/07/overriding-existing-rake-tasks/
|
24
|
-
# dies hier stimmt nicht: http://www.dcmanges.com/blog/modifying-rake-tasks
|
25
|
-
|
26
|
-
Rake::TaskManager.class_eval do
|
27
|
-
def remove_task(task_name)
|
28
|
-
@tasks.delete(task_name.to_s)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def remove_task(task_name)
|
33
|
-
Rake.application.remove_task(task_name)
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
# Task :sleep_5
|
39
|
-
#
|
40
|
-
desc 'Sleep 5 seconds'
|
41
|
-
task :sleep_5 do
|
42
|
-
puts
|
43
|
-
puts
|
44
|
-
puts
|
45
|
-
if Hoe::WINDOZE
|
46
|
-
sh "wait 5"
|
47
|
-
else
|
48
|
-
sh "sleep 5"
|
49
|
-
end
|
50
|
-
puts '---------------------------------------------------'
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# ----------------------------------------------------------------------------------------------
|
56
|
-
# Taskliste versch�nern und als Default Task
|
57
|
-
#
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
remove_task 'default' # wichtig!
|
62
|
-
# desc 'Zeige eine Liste aller verfuegbaren Rake-Tasks'
|
63
|
-
task :default do
|
64
|
-
Rake.application.options.show_task_pattern = //
|
65
|
-
Rake.application.display_tasks_and_comments(:kurz)
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
module Rake # :nodoc:
|
70
|
-
class Application # :nodoc:
|
71
|
-
# Display the tasks and dependencies.
|
72
|
-
def display_tasks_and_comments( myoptions = nil )
|
73
|
-
$rake_tasks_ausblenden = [] unless defined? $rake_tasks_ausblenden
|
74
|
-
namespace_akt = ''
|
75
|
-
namespace_prev = ''
|
76
|
-
newline_allowed = true
|
77
|
-
displayable_tasks = tasks.select { |t| t.comment && t.name =~ options.show_task_pattern }
|
78
|
-
width = displayable_tasks.collect { |t| t.name.length }.max
|
79
|
-
all_namespaces = []
|
80
|
-
skipped_tasks = []
|
81
|
-
displayable_tasks.each do |t|
|
82
|
-
foo = t.name.split(':')
|
83
|
-
next if foo.size < 2
|
84
|
-
all_namespaces << foo[0]
|
85
|
-
end
|
86
|
-
all_namespaces.uniq!
|
87
|
-
#puts all_namespaces.join(',')
|
88
|
-
|
89
|
-
|
90
|
-
# Mit Namespace oder Taskname == Namespace
|
91
|
-
displayable_tasks.each do |t|
|
92
|
-
next if ( myoptions == :kurz && $rake_tasks_ausblenden.include?(t.name) )
|
93
|
-
foo = t.name.split(':')
|
94
|
-
if foo.size < 2
|
95
|
-
unless all_namespaces.include?(foo[0]) # Taskname == Namespace
|
96
|
-
skipped_tasks << t
|
97
|
-
next
|
98
|
-
end
|
99
|
-
end
|
100
|
-
namespace_akt = foo[0]
|
101
|
-
puts "\n" if namespace_akt != namespace_prev
|
102
|
-
printf "#{name} %-#{width}s # %s\n", t.name, t.comment
|
103
|
-
namespace_prev = namespace_akt.dup
|
104
|
-
end # do
|
105
|
-
|
106
|
-
puts "\n"
|
107
|
-
skipped_tasks.each do |t|
|
108
|
-
next if ( myoptions == :kurz && $rake_tasks_ausblenden.include?(t.name) )
|
109
|
-
printf "#{name} %-#{width}s # %s\n", t.name, t.comment
|
110
|
-
end # do
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
puts "\nsee full task list with rake -T" #unless ($rake_tasks_ausblenden.empty? || myoptions == :kurz )
|
115
|
-
puts "\nsee full task list with rake -T" unless ($rake_tasks_ausblenden.empty? || myoptions == :kurz )
|
116
|
-
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|