y_support 2.0.30 → 2.0.31
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.
- checksums.yaml +4 -4
- data/lib/y_support/core_ext/object/misc.rb +2 -0
- data/lib/y_support/kde.rb +2 -1
- data/lib/y_support/local_object.rb +2 -1
- data/lib/y_support/name_magic/array.rb +1 -1
- data/lib/y_support/name_magic/class_methods.rb +1 -1
- data/lib/y_support/unicode.rb +1 -1
- data/lib/y_support/version.rb +1 -1
- data/test/abstract_algebra_test.rb +2 -0
- data/test/kde_test.rb +0 -3
- data/test/misc_test.rb +0 -6
- data/test/name_magic_test.rb +0 -3
- data/test/try_test.rb +0 -1
- data/test/typing_test.rb +8 -8
- data/test/unicode_test.rb +0 -1
- data/test/x_test.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa1ba220ac52fd36bcd0fba5106b33eee1d470b0
|
4
|
+
data.tar.gz: 93f146f185b63649778152e187fd5c7ff1fc67de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667df88a4ae9191048b275ccd9f69a2846f442c362afcc0c296a6208fd8c64400bcb33ec22d7778cf0e0ce972e176c88359268a23718bd07913650f06b164987
|
7
|
+
data.tar.gz: ded0a7e8a14163e6971f90b1965a9c6aa4fdf862ca79267ec62401f2f0537f3dc2fc00ebf011a7017e91b14decdfc007a1d135a19c673abf4df4711a1aade66d
|
data/lib/y_support/kde.rb
CHANGED
data/lib/y_support/unicode.rb
CHANGED
data/lib/y_support/version.rb
CHANGED
data/test/kde_test.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
#! /usr/bin/ruby
|
2
2
|
#encoding: utf-8
|
3
3
|
|
4
|
-
require 'minitest/spec'
|
5
4
|
require 'minitest/autorun'
|
6
5
|
require './../lib/y_support/kde'
|
7
6
|
|
8
7
|
describe YSupport::KDE do
|
9
8
|
it "should at least respond to certain messages" do
|
10
9
|
assert_respond_to YSupport::KDE, :show_file_with_kioclient
|
11
|
-
assert_respond_to YSupport::KDE, :query_box
|
12
|
-
assert_respond_to YSupport::KDE, :message_box
|
13
10
|
end
|
14
11
|
end
|
data/test/misc_test.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#! /usr/bin/ruby
|
2
2
|
# -*- coding: utf-8 -*-
|
3
3
|
|
4
|
-
require 'minitest/spec'
|
5
4
|
require 'minitest/autorun'
|
6
5
|
|
7
6
|
describe Object do
|
@@ -77,11 +76,6 @@ describe Array do
|
|
77
76
|
require 'y_support/core_ext/array'
|
78
77
|
end
|
79
78
|
|
80
|
-
it "has #to_hash" do
|
81
|
-
assert_equal( {a: :b, c: :d}, [[:a, :b],[:c, :d]].to_hash )
|
82
|
-
assert_equal( {k: :kokot, p: :pica}, [[:k, :o, :kokot], [:p, :i, :pica]].to_hash(2) )
|
83
|
-
end
|
84
|
-
|
85
79
|
it "has #zip_to_hash" do
|
86
80
|
assert_equal( {a: 1, b: 2}, [:a, :b].zip_to_hash( [1, 2] ) )
|
87
81
|
assert_equal( {a: "a"}, [:a].zip_to_hash( &:to_s ) )
|
data/test/name_magic_test.rb
CHANGED
data/test/try_test.rb
CHANGED
data/test/typing_test.rb
CHANGED
@@ -37,12 +37,12 @@ class TypingTest < Test::Unit::TestCase
|
|
37
37
|
assert_equal ::ArgumentError, ::AErr
|
38
38
|
end
|
39
39
|
|
40
|
-
should "have #
|
41
|
-
assert_raise TErr do 0.aT "yada yada" do
|
42
|
-
assert_nothing_raised do 0.aT "yada yada" do
|
40
|
+
should "have #aT raising TypeError if block falsey" do
|
41
|
+
assert_raise TErr do 0.aT "yada yada" do |rcvr| rcvr == 1 end end
|
42
|
+
assert_nothing_raised do 0.aT "yada yada" do |rcvr| rcvr == 0 end end
|
43
43
|
assert_equal( "hello",
|
44
|
-
"hello".aT( "have 4 unique letters" ) {
|
45
|
-
each_char.map { |e| e }.uniq.join.size == 4
|
44
|
+
"hello".aT( "have 4 unique letters" ) { |str|
|
45
|
+
str.each_char.map { |e| e }.uniq.join.size == 4
|
46
46
|
} )
|
47
47
|
assert_nothing_raised do 2.aT &:even? end
|
48
48
|
assert_raise TErr do 3.aT &:even? end
|
@@ -50,9 +50,9 @@ class TypingTest < Test::Unit::TestCase
|
|
50
50
|
end
|
51
51
|
|
52
52
|
should "have #aT_not raising TypeError if block truey" do
|
53
|
-
assert_raise TErr do 0.aT_not {
|
54
|
-
assert_nothing_raised do 1.aT_not {
|
55
|
-
assert_equal( "hello", "hello".aT_not( "have x" ) { include? 'x' } )
|
53
|
+
assert_raise TErr do 0.aT_not { |rcvr| rcvr < 1 } end
|
54
|
+
assert_nothing_raised do 1.aT_not { |rcvr| rcvr == 2 } end
|
55
|
+
assert_equal( "hello", "hello".aT_not( "have x" ) { |rcvr| rcvr.include? 'x' } )
|
56
56
|
assert_nothing_raised do 3.aT_not &:even? end
|
57
57
|
assert_raise TErr do 2.aT_not &:even? end
|
58
58
|
assert_raise TErr do "".aT_not end
|
data/test/unicode_test.rb
CHANGED
data/test/x_test.rb
CHANGED
@@ -15,5 +15,10 @@ class XTest < Test::Unit::TestCase
|
|
15
15
|
should "have clipboard as expected" do
|
16
16
|
assert_equal '"foo" bar', [`xsel -b`, `xsel -s`].join(' ')
|
17
17
|
end
|
18
|
+
|
19
|
+
should "know #query_box and #message_box methods" do
|
20
|
+
assert_respond_to YSupport::X, :query_box
|
21
|
+
assert_respond_to YSupport::X, :message_box
|
22
|
+
end
|
18
23
|
end # context X
|
19
24
|
end # class XTest
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: y_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- boris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|