holywarez-mpt 0.1.3.1 → 0.1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Manifest +8 -7
- data/README +1 -1
- data/{samples → examples}/call_experiment.rb +0 -0
- data/{samples → examples}/declarations.rb +0 -0
- data/examples/instance_eval_with_args.rb +13 -0
- data/{samples → examples}/ordered_subscribers.rb +0 -0
- data/{samples → examples}/run_experiments.rb +3 -2
- data/{samples → examples}/unordered_subscribers.rb +0 -0
- data/{samples → examples}/wrap_method_experiment.rb +0 -0
- data/install_gem.bat +1 -1
- data/lib/event.rb +1 -1
- data/lib/system.rb +2 -2
- data/mpt.gemspec +5 -5
- data/{run_samples.bat → run_examples.bat} +1 -1
- metadata +11 -10
data/CHANGELOG
CHANGED
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
|
-
|
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
|
-
Примеры использования либы можно посмотреть в директории '
|
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 "
|
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
data/lib/event.rb
CHANGED
data/lib/system.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
2
|
class Object
|
3
|
-
def instance_eval_with_args(
|
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
|
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.
|
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-
|
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", "
|
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.
|
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 =
|
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"])
|
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.
|
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-
|
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
|
-
-
|
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:
|
98
|
+
specification_version: 2
|
98
99
|
summary: Monkey Patching Toolkit
|
99
100
|
test_files: []
|
100
101
|
|