holywarez-mpt 0.1.3.1 → 0.1.3.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/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.1.3.2 Added new example
1
2
  v0.1.3.1 Added dependencies for gem
2
3
  v0.1.3 Wrap helpers support added
3
4
  v0.1.2 Instance eval with arguments is now supported for any object
data/Manifest CHANGED
@@ -1,4 +1,11 @@
1
1
  CHANGELOG
2
+ examples/call_experiment.rb
3
+ examples/declarations.rb
4
+ examples/instance_eval_with_args.rb
5
+ examples/ordered_subscribers.rb
6
+ examples/run_experiments.rb
7
+ examples/unordered_subscribers.rb
8
+ examples/wrap_method_experiment.rb
2
9
  install_gem.bat
3
10
  lib/event.rb
4
11
  lib/mpt.rb
@@ -9,10 +16,4 @@ Manifest
9
16
  mpt.gemspec
10
17
  Rakefile
11
18
  README
12
- run_samples.bat
13
- samples/call_experiment.rb
14
- samples/declarations.rb
15
- samples/ordered_subscribers.rb
16
- samples/run_experiments.rb
17
- samples/unordered_subscribers.rb
18
- samples/wrap_method_experiment.rb
19
+ run_examples.bat
data/README CHANGED
@@ -1,2 +1,2 @@
1
1
  = Russian =
2
- Примеры использования либы можно посмотреть в директории 'samples'
2
+ Примеры использования либы можно посмотреть в директории 'examples'
File without changes
File without changes
@@ -0,0 +1,13 @@
1
+ module InstanceEvalWithArgumentsExperiment
2
+ include ::MPT
3
+
4
+ experiment "Instaince eval with arguments experiment" do
5
+ proc = Proc.new do |argument|
6
+ puts "this proc called in instance context of <##{self.object_id.to_s}@#{self.class.name}> \n\twith argument value: #{argument}"
7
+ end
8
+
9
+ container = "Some string for example"
10
+ container.instance_eval_with_args "ArgumentExperimentValue", &proc
11
+ end
12
+
13
+ end
File without changes
@@ -1,6 +1,6 @@
1
1
  require "rubygems"
2
2
 
3
- gem "holywarez-mpt"
3
+ gem "mpt"
4
4
  require "mpt"
5
5
 
6
6
 
@@ -8,4 +8,5 @@ require "declarations.rb"
8
8
  require "call_experiment.rb"
9
9
  require "unordered_subscribers.rb"
10
10
  require "ordered_subscribers.rb"
11
- require "wrap_method_experiment.rb"
11
+ require "wrap_method_experiment.rb"
12
+ require "instance_eval_with_args.rb"
File without changes
File without changes
data/install_gem.bat CHANGED
@@ -1,5 +1,5 @@
1
1
  call rake manifest
2
2
  call rake install
3
3
  cd pkg
4
- call gem install holywarez-mpt-0.1.3.gem
4
+ call gem install mpt-0.1.3.2.gem
5
5
  cd ..
data/lib/event.rb CHANGED
@@ -53,7 +53,7 @@ module MPT
53
53
  if channel.size > 0
54
54
 
55
55
  channel.each do |subscriber|
56
- container.instance_eval_with_args( subscriber[:proc], *args )
56
+ container.instance_eval_with_args( *args, &subscriber[:proc] )
57
57
  end
58
58
  end
59
59
 
data/lib/system.rb CHANGED
@@ -1,10 +1,10 @@
1
1
 
2
2
  class Object
3
- def instance_eval_with_args(proc, *args, &block)
3
+ def instance_eval_with_args(*args, &proc)
4
4
  mod = @mpt_injection_module ||= Module.new
5
5
  self.extend mod
6
6
  mod.send :define_method, :mpt_instance_with_args_handler, proc
7
- self.mpt_instance_with_args_handler( *args, &block )
7
+ self.mpt_instance_with_args_handler( *args )
8
8
  mod.send :undef_method, :mpt_instance_with_args_handler
9
9
  end
10
10
  end
data/mpt.gemspec CHANGED
@@ -2,26 +2,26 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mpt}
5
- s.version = "0.1.3.1"
5
+ s.version = "0.1.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Anatoly Lapshin"]
9
- s.date = %q{2009-07-01}
9
+ s.date = %q{2009-07-05}
10
10
  s.description = %q{Monkey Patching Toolkit}
11
11
  s.email = %q{}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/event.rb", "lib/mpt.rb", "lib/system.rb", "lib/wrap.rb", "LICENSE", "README"]
13
- s.files = ["CHANGELOG", "install_gem.bat", "lib/event.rb", "lib/mpt.rb", "lib/system.rb", "lib/wrap.rb", "LICENSE", "Manifest", "mpt.gemspec", "Rakefile", "README", "run_samples.bat", "samples/call_experiment.rb", "samples/declarations.rb", "samples/ordered_subscribers.rb", "samples/run_experiments.rb", "samples/unordered_subscribers.rb", "samples/wrap_method_experiment.rb"]
13
+ s.files = ["CHANGELOG", "examples/call_experiment.rb", "examples/declarations.rb", "examples/instance_eval_with_args.rb", "examples/ordered_subscribers.rb", "examples/run_experiments.rb", "examples/unordered_subscribers.rb", "examples/wrap_method_experiment.rb", "install_gem.bat", "lib/event.rb", "lib/mpt.rb", "lib/system.rb", "lib/wrap.rb", "LICENSE", "Manifest", "mpt.gemspec", "Rakefile", "README", "run_examples.bat"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Mpt", "--main", "README"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = %q{mpt}
19
- s.rubygems_version = %q{1.3.2}
19
+ s.rubygems_version = %q{1.3.1}
20
20
  s.summary = %q{Monkey Patching Toolkit}
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
- s.specification_version = 3
24
+ s.specification_version = 2
25
25
 
26
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
27
  s.add_runtime_dependency(%q<activesupport>, [">= 0"])
@@ -1,3 +1,3 @@
1
- cd samples
1
+ cd examples
2
2
  call ruby run_experiments.rb
3
3
  cd ..
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holywarez-mpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoly Lapshin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-01 00:00:00 -07:00
12
+ date: 2009-07-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -48,6 +48,13 @@ extra_rdoc_files:
48
48
  - README
49
49
  files:
50
50
  - CHANGELOG
51
+ - examples/call_experiment.rb
52
+ - examples/declarations.rb
53
+ - examples/instance_eval_with_args.rb
54
+ - examples/ordered_subscribers.rb
55
+ - examples/run_experiments.rb
56
+ - examples/unordered_subscribers.rb
57
+ - examples/wrap_method_experiment.rb
51
58
  - install_gem.bat
52
59
  - lib/event.rb
53
60
  - lib/mpt.rb
@@ -58,13 +65,7 @@ files:
58
65
  - mpt.gemspec
59
66
  - Rakefile
60
67
  - README
61
- - run_samples.bat
62
- - samples/call_experiment.rb
63
- - samples/declarations.rb
64
- - samples/ordered_subscribers.rb
65
- - samples/run_experiments.rb
66
- - samples/unordered_subscribers.rb
67
- - samples/wrap_method_experiment.rb
68
+ - run_examples.bat
68
69
  has_rdoc: true
69
70
  homepage: ""
70
71
  post_install_message:
@@ -94,7 +95,7 @@ requirements: []
94
95
  rubyforge_project: mpt
95
96
  rubygems_version: 1.2.0
96
97
  signing_key:
97
- specification_version: 3
98
+ specification_version: 2
98
99
  summary: Monkey Patching Toolkit
99
100
  test_files: []
100
101