ruby-nuggets 0.0.1.126 → 0.0.2.145

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.
data/HEADER CHANGED
@@ -4,7 +4,7 @@
4
4
  # A component of ruby-nuggets, some extensions to the Ruby programming #
5
5
  # language. #
6
6
  # #
7
- # Copyright (C) 2007 Jens Wille #
7
+ # Copyright (C) 2007-2008 Jens Wille #
8
8
  # #
9
9
  # Authors: #
10
10
  # Jens Wille <jens.wille@uni-koeln.de> #
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to ruby-nuggets version 0.0.1
5
+ This documentation refers to ruby-nuggets version 0.0.2
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -17,7 +17,7 @@ TODO: well, the description... ;-)
17
17
 
18
18
  == LICENSE AND COPYRIGHT
19
19
 
20
- Copyright (C) 2007 Jens Wille
20
+ Copyright (C) 2007-2008 Jens Wille
21
21
 
22
22
  ruby-nuggets is free software: you can redistribute it and/or modify it under
23
23
  the terms of the GNU General Public License as published by the Free Software
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ task(:doc_spec) {{
15
15
  task(:gem_spec) {{
16
16
  :name => 'ruby-nuggets',
17
17
  :version => Nuggets::VERSION,
18
- :summary => 'Some extensions to the Ruby programming language',
18
+ :summary => 'Some extensions to the Ruby programming language.',
19
19
  :files => FILES + OTHER,
20
20
  :require_path => 'lib',
21
21
  :extra_rdoc_files => RDOCS
@@ -0,0 +1,63 @@
1
+ #--
2
+ ###############################################################################
3
+ # #
4
+ # A component of ruby-nuggets, some extensions to the Ruby programming #
5
+ # language. #
6
+ # #
7
+ # Copyright (C) 2007-2008 Jens Wille #
8
+ # #
9
+ # Authors: #
10
+ # Jens Wille <jens.wille@uni-koeln.de> #
11
+ # #
12
+ # ruby-nuggets is free software; you can redistribute it and/or modify it #
13
+ # under the terms of the GNU General Public License as published by the Free #
14
+ # Software Foundation; either version 3 of the License, or (at your option) #
15
+ # any later version. #
16
+ # #
17
+ # ruby-nuggets is distributed in the hope that it will be useful, but WITHOUT #
18
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
19
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
20
+ # more details. #
21
+ # #
22
+ # You should have received a copy of the GNU General Public License along #
23
+ # with ruby-nuggets. If not, see <http://www.gnu.org/licenses/>. #
24
+ # #
25
+ ###############################################################################
26
+ #++
27
+
28
+ require 'open-uri'
29
+
30
+ module URI
31
+
32
+ class << self
33
+
34
+ # call-seq:
35
+ # URI.exist?(uri) => true or false
36
+ #
37
+ # Return +true+ if the named URI exists.
38
+ def exist?(uri)
39
+ open(uri.to_s)
40
+ true
41
+ rescue OpenURI::HTTPError, SocketError, Errno::ENOENT
42
+ false
43
+ end
44
+ alias_method :exists?, :exist?
45
+
46
+ end
47
+
48
+ end
49
+
50
+ if $0 == __FILE__
51
+ %w[
52
+ http://www.google.de
53
+ htp://www.google.de
54
+ www.google.de
55
+ http://xuugle.de
56
+ http://blackwinter.de
57
+ http://blackwinter.de/bla
58
+ http://blackwinter.de/index.html
59
+ http://blackwinter.de/index.htm
60
+ ].each { |u|
61
+ p [u, URI.exist?(u)]
62
+ }
63
+ end
@@ -4,7 +4,7 @@ module Nuggets
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 0
7
- TINY = 1
7
+ TINY = 2
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,33 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: ruby-nuggets
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.0.1.126
7
- date: 2007-12-05 00:00:00 +01:00
8
- summary: Some extensions to the Ruby programming language
9
- require_paths:
10
- - lib
11
- email: jens.wille@uni-koeln.de
12
- homepage:
13
- rubyforge_project:
14
- description:
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.0.2.145
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Jens Wille
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-02 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: jens.wille@uni-koeln.de
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - COPYING
25
+ - ChangeLog
31
26
  files:
32
27
  - lib/nuggets/version.rb
33
28
  - lib/nuggets/object/singleton_class.rb
@@ -48,24 +43,45 @@ files:
48
43
  - lib/nuggets/array/format.rb
49
44
  - lib/nuggets/array/combination.rb
50
45
  - lib/nuggets/util/i18n.rb
46
+ - lib/nuggets/uri/exist.rb
51
47
  - COPYING
52
48
  - HEADER
53
49
  - README
54
50
  - ChangeLog
55
51
  - Rakefile
56
- test_files: []
57
-
58
- rdoc_options: []
59
-
60
- extra_rdoc_files:
52
+ has_rdoc: true
53
+ homepage:
54
+ post_install_message:
55
+ rdoc_options:
56
+ - --title
57
+ - ruby-nuggets Application documentation
58
+ - --line-numbers
59
+ - --main
61
60
  - README
62
- - COPYING
63
- - ChangeLog
64
- executables: []
65
-
66
- extensions: []
67
-
61
+ - --inline-source
62
+ - --all
63
+ - --charset
64
+ - UTF-8
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "0"
72
+ version:
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
68
79
  requirements: []
69
80
 
70
- dependencies: []
81
+ rubyforge_project:
82
+ rubygems_version: 1.0.1
83
+ signing_key:
84
+ specification_version: 2
85
+ summary: Some extensions to the Ruby programming language.
86
+ test_files: []
71
87