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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fafe4c9f6a40e514b259838ea5180f75217f7cb2
4
- data.tar.gz: 4534223fbf66588c2ced7d5686b4b9262c9058e4
3
+ metadata.gz: aa1ba220ac52fd36bcd0fba5106b33eee1d470b0
4
+ data.tar.gz: 93f146f185b63649778152e187fd5c7ff1fc67de
5
5
  SHA512:
6
- metadata.gz: bd540b2512452d40ebcf756b14b4e9964dabcbbeff28c0883c4d18d1e669ed0091260c42cd2d356297e57d4ccfd318f2b4ffeafbc84447df4202e237ba87d1e8
7
- data.tar.gz: 6f6babbe0d375bd9ab298b94ccfd6a088e8d623b0b07dc452b71f9fe6a52e4087d4581a0a77c3190d57c52f06af055ed315d954dd74d3993c28f5cc2d7adfc55
6
+ metadata.gz: 667df88a4ae9191048b275ccd9f69a2846f442c362afcc0c296a6208fd8c64400bcb33ec22d7778cf0e0ce972e176c88359268a23718bd07913650f06b164987
7
+ data.tar.gz: ded0a7e8a14163e6971f90b1965a9c6aa4fdf862ca79267ec62401f2f0537f3dc2fc00ebf011a7017e91b14decdfc007a1d135a19c673abf4df4711a1aade66d
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'y_support/core_ext/class'
4
+
3
5
  class Object
4
6
  # Assigns prescribed atrributes to the object and makes them accessible with
5
7
  # getter (reader) methods. Raises NameError should any of the getters shadow /
data/lib/y_support/kde.rb CHANGED
@@ -1,4 +1,5 @@
1
- # -*- coding: utf-8 -*-
1
+ # encoding: utf-8
2
+
2
3
  require 'y_support'
3
4
 
4
5
  module YSupport::KDE
@@ -1,4 +1,5 @@
1
- # -*- coding: utf-8 -*-
1
+ # encoding: utf-8
2
+
2
3
  require 'y_support'
3
4
 
4
5
  # Object, whose business is to stay local to methods. Optional signature
@@ -1,4 +1,4 @@
1
- # -*- coding: utf-8 -*-
1
+ # encoding: utf-8
2
2
 
3
3
  class Array
4
4
  # Maps an array to an array of the element names, obtained by applying +#name+
@@ -1,4 +1,4 @@
1
- # -*- coding: utf-8 -*-
1
+ # encoding: utf-8
2
2
 
3
3
  module NameMagic::ClassMethods
4
4
  # Presents the instances registered by the namespace. Takes one optional
@@ -1,4 +1,4 @@
1
- #encoding: utf-8
1
+ # encoding: utf-8
2
2
 
3
3
  require 'y_support'
4
4
 
@@ -1,3 +1,3 @@
1
1
  module YSupport
2
- VERSION = "2.0.30"
2
+ VERSION = "2.0.31"
3
3
  end
@@ -4,6 +4,8 @@
4
4
  require 'test/unit'
5
5
  require 'shoulda'
6
6
 
7
+ # This whole test is one big FIXME
8
+
7
9
  class AbstractAlgebraTest < Test::Unit::TestCase
8
10
  context "Algebra" do
9
11
  setup do
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 ) )
@@ -1,9 +1,6 @@
1
1
  #! /usr/bin/ruby
2
2
  #encoding: utf-8
3
3
 
4
- require 'test/unit'
5
- require 'shoulda'
6
- require 'minitest/spec'
7
4
  require 'minitest/autorun'
8
5
  require 'y_support/name_magic'
9
6
 
data/test/try_test.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  #! /usr/bin/ruby
2
2
 
3
- require 'minitest/spec'
4
3
  require 'minitest/autorun'
5
4
  # require 'y_support/try' # tested component itself
6
5
  require './../lib/y_support/try'
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 #aE raising ArgumentError if block falsey" do
41
- assert_raise TErr do 0.aT "yada yada" do self == 1 end end
42
- assert_nothing_raised do 0.aT "yada yada" do self == 0 end end
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 { self < 1 } end
54
- assert_nothing_raised do 1.aT_not { self == 2 } end
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
@@ -1,7 +1,6 @@
1
1
  #! /usr/bin/ruby
2
2
  #encoding: utf-8
3
3
 
4
- require 'minitest/spec'
5
4
  require 'minitest/autorun'
6
5
 
7
6
  describe "y_support/unicode" do
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.30
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-05 00:00:00.000000000 Z
11
+ date: 2013-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport