multitype-introspection 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,11 +1,11 @@
1
1
  source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
- # gem "activesupport", ">= 2.3.5"
4
+ gem "hash-utils", ">= 0.16.0"
5
5
 
6
6
  # Add dependencies to develop your gem here.
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
- gem "bundler", "~> 1.0.0"
10
- gem "jeweler", "~> 1.5.2"
9
+ gem "bundler", ">= 1.0.0"
10
+ gem "jeweler", ">= 1.5.2"
11
11
  end
@@ -2,15 +2,17 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  git (1.2.5)
5
- jeweler (1.5.2)
6
- bundler (~> 1.0.0)
5
+ hash-utils (0.16.0)
6
+ jeweler (1.6.2)
7
+ bundler (~> 1.0)
7
8
  git (>= 1.2.5)
8
9
  rake
9
- rake (0.8.7)
10
+ rake (0.9.2)
10
11
 
11
12
  PLATFORMS
12
13
  ruby
13
14
 
14
15
  DEPENDENCIES
15
- bundler (~> 1.0.0)
16
- jeweler (~> 1.5.2)
16
+ bundler (>= 1.0.0)
17
+ hash-utils (>= 0.16.0)
18
+ jeweler (>= 1.5.2)
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'rubygems'
3
3
  require 'bundler'
4
+
4
5
  begin
5
6
  Bundler.setup(:default, :development)
6
7
  rescue Bundler::BundlerError => e
@@ -8,15 +9,17 @@ rescue Bundler::BundlerError => e
8
9
  $stderr.puts "Run `bundle install` to install missing gems"
9
10
  exit e.status_code
10
11
  end
12
+
11
13
  require 'rake'
12
-
13
14
  require 'jeweler'
15
+
14
16
  Jeweler::Tasks.new do |gem|
15
17
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
16
18
  gem.name = "multitype-introspection"
17
19
  gem.homepage = "http://github.com/martinkozak/multitype-introspection"
18
20
  gem.license = "MIT"
19
- gem.summary = 'Allows multiple type introspection. Extends the Object class with #kind_of_any? and other appropriate methods of this family.'
21
+ gem.summary = 'Allows multiple type introspection. Currenty deprecated in favour to Hash Utils.'
22
+ gem.post_install_message = "\nMULTITYPE INTROSPECTION: Be warn, further development of just this gem is ceased because it has been integrated to the Hash Utils library. Upgrade according to Your needs.\n\n"
20
23
  gem.email = "martinkozak@martinkozak.net"
21
24
  gem.authors = ["Martin Kozák"]
22
25
  # Include your dependencies below. Runtime dependencies are required when using your gem,
@@ -24,14 +27,5 @@ Jeweler::Tasks.new do |gem|
24
27
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
28
  # gem.add_development_dependency 'rspec', '> 1.2.3'
26
29
  end
27
- Jeweler::RubygemsDotOrgTasks.new
28
30
 
29
- require 'rake/rdoctask'
30
- Rake::RDocTask.new do |rdoc|
31
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
32
-
33
- rdoc.rdoc_dir = 'rdoc'
34
- rdoc.title = "multitype-introspection #{version}"
35
- rdoc.rdoc_files.include('README*')
36
- rdoc.rdoc_files.include('lib/**/*.rb')
37
- end
31
+ Jeweler::RubygemsDotOrgTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.2.0
@@ -1,56 +1,4 @@
1
1
  # encoding: utf-8
2
2
  # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
3
3
 
4
- ##
5
- # Built-in Object class extension.
6
-
7
- class Object
8
-
9
- ##
10
- # Returns +true+ if object is an instance of the given classes.
11
- #
12
- # @see #kind_of_any?
13
- # @param [Array] classes array of class objects
14
- # @return [Boolean] +true+ if it is, +false+ in otherwise
15
- #
16
-
17
- def instance_of_any?(classes)
18
- if not classes.kind_of? Array
19
- raise Exception::new("Array expected.")
20
- end
21
-
22
- classes.each do |cls|
23
- if self.instance_of? cls
24
- return true
25
- end
26
- end
27
-
28
- return false
29
- end
30
-
31
- ##
32
- # Returns +true+ if one of classes are the class of object,
33
- # or if one of classes are one of the superclasses of object or
34
- # modules included in object.
35
- #
36
- # @param [Array] classes array of class objects
37
- # @return [Boolean] +true+ if it is, +false+ in otherwise
38
- #
39
-
40
- def kind_of_any?(classes)
41
- if not classes.kind_of? Array
42
- raise Exception::new("Array expected.")
43
- end
44
-
45
- classes.each do |cls|
46
- if self.kind_of? cls
47
- return true
48
- end
49
- end
50
-
51
- return false
52
- end
53
-
54
- alias :"is_a_any?" :"kind_of_any?"
55
-
56
- end
4
+ require "hash-utils/object" # >= 0.16.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{multitype-introspection}
8
- s.version = "0.1.2"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Martin Kozák"]
12
- s.date = %q{2011-01-27}
11
+ s.authors = [%q{Martin Kozák}]
12
+ s.date = %q{2011-06-23}
13
13
  s.email = %q{martinkozak@martinkozak.net}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -27,25 +27,31 @@ Gem::Specification.new do |s|
27
27
  "multitype-introspection.gemspec"
28
28
  ]
29
29
  s.homepage = %q{http://github.com/martinkozak/multitype-introspection}
30
- s.licenses = ["MIT"]
31
- s.require_paths = ["lib"]
32
- s.rubygems_version = %q{1.3.7}
33
- s.summary = %q{Allows multiple type introspection. Extends the Object class with #kind_of_any? and other appropriate methods of this family.}
30
+ s.licenses = [%q{MIT}]
31
+ s.post_install_message = %q{
32
+ MULTITYPE INTROSPECTION: Be warn, further development of just this gem is ceased because it has been integrated to the Hash Utils library. Upgrade according to Your needs.
33
+
34
+ }
35
+ s.require_paths = [%q{lib}]
36
+ s.rubygems_version = %q{1.8.5}
37
+ s.summary = %q{Allows multiple type introspection. Currenty deprecated in favour to Hash Utils.}
34
38
 
35
39
  if s.respond_to? :specification_version then
36
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
37
40
  s.specification_version = 3
38
41
 
39
42
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
40
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
41
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
43
+ s.add_runtime_dependency(%q<hash-utils>, [">= 0.16.0"])
44
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
45
+ s.add_development_dependency(%q<jeweler>, [">= 1.5.2"])
42
46
  else
43
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
44
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
47
+ s.add_dependency(%q<hash-utils>, [">= 0.16.0"])
48
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
49
+ s.add_dependency(%q<jeweler>, [">= 1.5.2"])
45
50
  end
46
51
  else
47
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
48
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
52
+ s.add_dependency(%q<hash-utils>, [">= 0.16.0"])
53
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
54
+ s.add_dependency(%q<jeweler>, [">= 1.5.2"])
49
55
  end
50
56
  end
51
57
 
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multitype-introspection
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
4
+ prerelease:
5
+ version: 0.2.0
10
6
  platform: ruby
11
7
  authors:
12
8
  - "Martin Koz\xC3\xA1k"
@@ -14,39 +10,41 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-27 00:00:00 +01:00
18
- default_executable:
13
+ date: 2011-06-23 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
- name: bundler
16
+ name: hash-utils
22
17
  requirement: &id001 !ruby/object:Gem::Requirement
23
18
  none: false
24
19
  requirements:
25
- - - ~>
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.16.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
26
32
  - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 0
30
- - 0
31
33
  version: 1.0.0
32
34
  type: :development
33
35
  prerelease: false
34
- version_requirements: *id001
36
+ version_requirements: *id002
35
37
  - !ruby/object:Gem::Dependency
36
38
  name: jeweler
37
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ requirement: &id003 !ruby/object:Gem::Requirement
38
40
  none: false
39
41
  requirements:
40
- - - ~>
42
+ - - ">="
41
43
  - !ruby/object:Gem::Version
42
- segments:
43
- - 1
44
- - 5
45
- - 2
46
44
  version: 1.5.2
47
45
  type: :development
48
46
  prerelease: false
49
- version_requirements: *id002
47
+ version_requirements: *id003
50
48
  description:
51
49
  email: martinkozak@martinkozak.net
52
50
  executables: []
@@ -66,11 +64,11 @@ files:
66
64
  - VERSION
67
65
  - lib/multitype-introspection.rb
68
66
  - multitype-introspection.gemspec
69
- has_rdoc: true
70
67
  homepage: http://github.com/martinkozak/multitype-introspection
71
68
  licenses:
72
69
  - MIT
73
- post_install_message:
70
+ post_install_message: "\n\
71
+ MULTITYPE INTROSPECTION: Be warn, further development of just this gem is ceased because it has been integrated to the Hash Utils library. Upgrade according to Your needs.\n\n"
74
72
  rdoc_options: []
75
73
 
76
74
  require_paths:
@@ -80,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
78
  requirements:
81
79
  - - ">="
82
80
  - !ruby/object:Gem::Version
83
- hash: -3993030152410539996
81
+ hash: -3929491186092762710
84
82
  segments:
85
83
  - 0
86
84
  version: "0"
@@ -89,15 +87,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
87
  requirements:
90
88
  - - ">="
91
89
  - !ruby/object:Gem::Version
92
- segments:
93
- - 0
94
90
  version: "0"
95
91
  requirements: []
96
92
 
97
93
  rubyforge_project:
98
- rubygems_version: 1.3.7
94
+ rubygems_version: 1.8.5
99
95
  signing_key:
100
96
  specification_version: 3
101
- summary: "Allows multiple type introspection. Extends the Object class with #kind_of_any? and other appropriate methods of this family."
97
+ summary: Allows multiple type introspection. Currenty deprecated in favour to Hash Utils.
102
98
  test_files: []
103
99