object_proxy 1.0.2 → 1.1.2

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/Manifest.txt CHANGED
@@ -2,6 +2,10 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ init.rb
6
+ install.rb
5
7
  lib/object_proxy.rb
6
8
  lib/object_proxy_safe_hash.rb
7
- test/test_object_proxy.rb
9
+ rails/init.rb
10
+ test/test_object_proxy.rb
11
+ test/test_object_proxy_safe_hash.rb
data/Rakefile CHANGED
@@ -1,13 +1,26 @@
1
- # -*- ruby -*-
1
+ begin
2
+ require 'jeweler'
3
+ Jeweler::Tasks.new do |gem|
4
+ gem.name = "object_proxy"
5
+ gem.summary = %Q{An even lighter-weight version of BlankSlate for wrapping Ruby objects}
6
+ gem.description = %Q{Tiny class that defers nearly all method calls to an object of your choice}
7
+ gem.email = "rubygems@6brand.com"
8
+ gem.homepage = "http://github.com/JackDanger/object_proxy"
9
+ gem.authors = ["Jack Danger Canty"]
10
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
11
+ end
12
+ Jeweler::GemcutterTasks.new
13
+ rescue LoadError
14
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
15
+ end
2
16
 
3
- require 'rubygems'
4
- require 'hoe'
5
- require './lib/object_proxy.rb'
6
17
 
7
- Hoe.new('object_proxy', ObjectProxy::VERSION) do |p|
8
- # p.rubyforge_name = 'ObjectProxyx' # if different than lowercase project name
9
- p.remote_rdoc_dir = '' # Release to root
10
- p.developer('Jack Danger Canty', 'rubygems_object_proxy@6brand.com')
11
- end
12
18
 
13
- # vim: syntax=Ruby
19
+ task :default => :test
20
+
21
+ require 'rake/testtask'
22
+ Rake::TestTask.new(:test) do |test|
23
+ test.libs << '.'
24
+ test.pattern = 'test/test_*.rb'
25
+ test.verbose = true
26
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.1.2
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'object_proxy'
data/install.rb ADDED
@@ -0,0 +1 @@
1
+ puts IO.read(File.join(File.dirname(__FILE__), 'README.txt'))
data/lib/object_proxy.rb CHANGED
@@ -4,8 +4,6 @@ require 'object_proxy_safe_hash'
4
4
 
5
5
  class ObjectProxy
6
6
 
7
- VERSION = '1.0.2'
8
-
9
7
  SAFE_METHODS = [:__id__, :__send__, :nil, :nil?, :send, :send!, :proxy_class, :proxy_respond_to?]
10
8
 
11
9
  alias_method :proxy_class, :class
@@ -28,13 +26,18 @@ class ObjectProxy
28
26
  end
29
27
 
30
28
  def respond_to?(*args)
31
- proxy_respond_to?(*args) || @target.respond_to?(*args)
29
+ proxy_respond_to?(*args) || target.respond_to?(*args)
30
+ end
31
+
32
+ # defining this explicitly to make pp.rb happy
33
+ def inspect
34
+ @target.inspect
32
35
  end
33
36
 
34
37
  protected
35
38
 
36
39
  # delegate nearly all method calls to the @target object
37
40
  def method_missing(method, *args, &block)
38
- @target.send(method, *args, &block)
41
+ target.send(method, *args, &block)
39
42
  end
40
43
  end
@@ -0,0 +1,53 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{object_proxy}
8
+ s.version = "1.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Jack Danger Canty"]
12
+ s.date = %q{2010-05-03}
13
+ s.description = %q{Tiny class that defers nearly all method calls to an object of your choice}
14
+ s.email = %q{rubygems@6brand.com}
15
+ s.extra_rdoc_files = [
16
+ "README.txt"
17
+ ]
18
+ s.files = [
19
+ "History.txt",
20
+ "Manifest.txt",
21
+ "README.txt",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "init.rb",
25
+ "install.rb",
26
+ "lib/object_proxy.rb",
27
+ "lib/object_proxy_safe_hash.rb",
28
+ "object_proxy.gemspec",
29
+ "rails/init.rb",
30
+ "test/test_object_proxy.rb",
31
+ "test/test_object_proxy_safe_hash.rb"
32
+ ]
33
+ s.homepage = %q{http://github.com/JackDanger/object_proxy}
34
+ s.rdoc_options = ["--charset=UTF-8"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = %q{1.3.6}
37
+ s.summary = %q{An even lighter-weight version of BlankSlate for wrapping Ruby objects}
38
+ s.test_files = [
39
+ "test/test_object_proxy.rb",
40
+ "test/test_object_proxy_safe_hash.rb"
41
+ ]
42
+
43
+ if s.respond_to? :specification_version then
44
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
+ s.specification_version = 3
46
+
47
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
48
+ else
49
+ end
50
+ else
51
+ end
52
+ end
53
+
data/rails/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'object_proxy'
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: object_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 1
8
+ - 2
9
+ version: 1.1.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Jack Danger Canty
@@ -9,64 +14,62 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2008-03-06 00:00:00 -08:00
17
+ date: 2010-05-03 00:00:00 -07:00
13
18
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hoe
17
- version_requirement:
18
- version_requirements: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.5.1
23
- version:
24
- description: ObjectProxy provides a proxied interface to Ruby objects. It lets you add methods to objects that don't normally support them.
25
- email:
26
- - rubygems_object_proxy@6brand.com
19
+ dependencies: []
20
+
21
+ description: Tiny class that defers nearly all method calls to an object of your choice
22
+ email: rubygems@6brand.com
27
23
  executables: []
28
24
 
29
25
  extensions: []
30
26
 
31
27
  extra_rdoc_files:
32
- - History.txt
33
- - Manifest.txt
34
28
  - README.txt
35
29
  files:
36
30
  - History.txt
37
31
  - Manifest.txt
38
32
  - README.txt
39
33
  - Rakefile
34
+ - VERSION
35
+ - init.rb
36
+ - install.rb
40
37
  - lib/object_proxy.rb
41
38
  - lib/object_proxy_safe_hash.rb
39
+ - object_proxy.gemspec
40
+ - rails/init.rb
42
41
  - test/test_object_proxy.rb
42
+ - test/test_object_proxy_safe_hash.rb
43
43
  has_rdoc: true
44
- homepage: http://github.com/JackDanger/object_proxy/tree/master
44
+ homepage: http://github.com/JackDanger/object_proxy
45
+ licenses: []
46
+
45
47
  post_install_message:
46
48
  rdoc_options:
47
- - --main
48
- - README.txt
49
+ - --charset=UTF-8
49
50
  require_paths:
50
51
  - lib
51
52
  required_ruby_version: !ruby/object:Gem::Requirement
52
53
  requirements:
53
54
  - - ">="
54
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
55
58
  version: "0"
56
- version:
57
59
  required_rubygems_version: !ruby/object:Gem::Requirement
58
60
  requirements:
59
61
  - - ">="
60
62
  - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
61
65
  version: "0"
62
- version:
63
66
  requirements: []
64
67
 
65
- rubyforge_project: object_proxy
66
- rubygems_version: 1.0.1
68
+ rubyforge_project:
69
+ rubygems_version: 1.3.6
67
70
  signing_key:
68
- specification_version: 2
69
- summary: ObjectProxy provides a proxied interface to Ruby objects
71
+ specification_version: 3
72
+ summary: An even lighter-weight version of BlankSlate for wrapping Ruby objects
70
73
  test_files:
71
74
  - test/test_object_proxy.rb
72
75
  - test/test_object_proxy_safe_hash.rb