y_support 2.4.5 → 2.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efb272c5a64d6c3e2445a0196993be87b3bca7f1
4
- data.tar.gz: 71b2ec446b5c48c42ed4776e7f0602a55fe5eb00
3
+ metadata.gz: eb3706957a1022fffe6b271c1585bf23dc27a922
4
+ data.tar.gz: 9a632cf5c99aef509bc144adf2f179e3d51331ff
5
5
  SHA512:
6
- metadata.gz: c4f2fd5cd0bc150b1f46616d11d6c82c5fa27ac188c3c00c7169fa4aec161eaaf4eac31a66c031db5454b077591893b9e4d09f62670f4717e9c42602d38376ed
7
- data.tar.gz: 3b7e1aeaa93ac9d3135f1dfe6c25af4fb0e0c2e274221ddccb06c3cc8eda86374b7ec2e905b82c202f4429ca3d307fa554af7ba57a17f8411ad9c547f7669bb2
6
+ metadata.gz: 811f88237a88ec79297ba24a517d4f8923333e5cf49a97759e95eca881a124975b2d754addcd288fa414780ea93e18cb47d3f2c46c89e6526f9319b314e6407b
7
+ data.tar.gz: c8d6ed7aa7cac621d6e576fa1ddf939c359e561a3de2f4846e34802ec4ac7d18cad42eb26d0e532915c560d88ec0cf5425a5965e90ce7b75ab6031091f204705
@@ -2,4 +2,4 @@
2
2
 
3
3
  # YSupport is a collection of methods used in Y gems.
4
4
  #
5
- require "y_support/version"
5
+ require_relative "y_support/version"
@@ -11,5 +11,4 @@ require 'y_support/inert_recorder'
11
11
  require 'y_support/local_object'
12
12
  require 'y_support/literate'
13
13
  require 'y_support/kde'
14
- require 'y_support/x'
15
14
  require 'y_support/misc'
@@ -1,4 +1,4 @@
1
- require 'y_support/core_ext/string'
1
+ require_relative '../string'
2
2
 
3
3
  class Symbol
4
4
  # This method applies +String#default!+ method to the receiver converted to
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'y_support'
3
+ require_relative '../y_support'
4
4
 
5
5
  # Inert recorder is similar to a null object in the sense, that in response to
6
6
  # almost all messages it returns self. But in addition, it records received
@@ -392,7 +392,7 @@ module NameMagic
392
392
  #
393
393
  def make_avid!
394
394
  namespace.__avid_instances__ << self unless
395
- namespace.__avid_instances__.include? self
395
+ namespace.__avid_instances__.any? { |i| i.equal? self }
396
396
  return nil
397
397
  end
398
398
 
@@ -224,7 +224,7 @@ module NameMagic::Namespace
224
224
  # Get the list of all instances.
225
225
  ii = instances
226
226
  # If arg belongs to the list, just return it back.
227
- return arg if ii.include? arg
227
+ return arg if ii.any? { |i| arg.equal? i }
228
228
  # Assume that arg is an instance name.
229
229
  name = arg.to_sym
230
230
  registry = __instances__
@@ -396,7 +396,12 @@ module NameMagic::Namespace
396
396
  # Some constants cause unexpected problems. The line
397
397
  # below is the result of trial-and-error programming
398
398
  # and I am afraid to delete it quite yet.
399
- next if ɱ == Object && const_ß == :Config
399
+
400
+ ɱ == Object and case const_ß
401
+ when :Config then next
402
+ when :TimeoutError then next
403
+ end
404
+
400
405
  # Those constants that raise certain errors upon attempts
401
406
  # to access their contents are handled by this
402
407
  # begin-rescue-end statement.
@@ -1,4 +1,4 @@
1
1
  module YSupport
2
- VERSION = "2.4.5"
2
+ VERSION = "2.4.6"
3
3
  DEBUG = false
4
4
  end
@@ -1,9 +1,21 @@
1
- require 'gtk2'
2
1
  require_relative '../y_support'
2
+ require 'gtk2'
3
3
 
4
4
  # Assets related to X windows control.
5
5
  #
6
6
  module YSupport::X
7
+ # ==================================================================
8
+ #
9
+ # Notice: Assets related to X windows control do not really belong
10
+ # to YSupport. I should keep them somewhere else. I will keep this
11
+ # file in YSupport 2.x for historical reasons. Module YSupport::X
12
+ # will be removed in YSupport 3.0, which will no longer cover tools
13
+ # for X windows control.
14
+ #
15
+ warn "YSupport::X is obsolete!"
16
+ #
17
+ # ==================================================================
18
+
7
19
  # Echo a string to the primary X clip; `xsel -b -i`.
8
20
  #
9
21
  def echo_primary_clipboard string
@@ -361,7 +361,7 @@ end
361
361
 
362
362
  describe Symbol do
363
363
  before do
364
- require './../lib/y_support/core_ext/symbol'
364
+ require_relative '../lib/y_support/core_ext/symbol'
365
365
  end
366
366
 
367
367
  it "should have #default! defaulter going through String#default!" do
@@ -5,7 +5,7 @@ require 'minitest/autorun'
5
5
 
6
6
  describe "y_support/unicode" do
7
7
  before do
8
- require 'y_support/unicode'
8
+ require_relative '../lib/y_support/unicode'
9
9
  end
10
10
 
11
11
  it "should define a tiny number of Unicode aliases" do
@@ -22,5 +22,4 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
25
- spec.add_development_dependency "shoulda"
26
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - boris
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: shoulda
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Methods and assets of general utility. NameMagic, core extensions, typing
70
56
  etc.
71
57
  email:
@@ -169,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
155
  version: '0'
170
156
  requirements: []
171
157
  rubyforge_project:
172
- rubygems_version: 2.2.2
158
+ rubygems_version: 2.5.1
173
159
  signing_key:
174
160
  specification_version: 4
175
161
  summary: Support library used by Y gems.