holywarez-mpt 0.1.3.13 → 0.1.3.14

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.
Files changed (5) hide show
  1. data/CHANGELOG +1 -0
  2. data/install_gem.bat +1 -1
  3. data/lib/event.rb +4 -3
  4. data/mpt.gemspec +1 -1
  5. metadata +1 -1
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.1.3.14 "subscribe instance methods" bugfix
1
2
  v0.1.3.13 reorganize alghoritm fixed
2
3
  v0.1.3.12 subscribe class instance methods for events is now supported
3
4
  v0.1.3.11 wrappable was renamed to wrapable. "wrappable" will be removed in future versions
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 mpt-0.1.3.13.gem
4
+ call gem install mpt-0.1.3.14.gem
5
5
  cd ..
data/lib/event.rb CHANGED
@@ -51,7 +51,6 @@ module MPT
51
51
  container = MPT::EventContainer.new(object)
52
52
  channel = @@mpt_subscribers[event_name]
53
53
  if !channel.nil? && channel.size > 0
54
-
55
54
  channel.each do |subscriber|
56
55
  container.instance_eval_with_args( *args, &subscriber[:proc] )
57
56
  end
@@ -93,8 +92,10 @@ class Class
93
92
 
94
93
  def new_with_subscribe_support(*constructor_arguments)
95
94
  instance = new_without_subscribe_support(*constructor_arguments)
96
- ::MPT::Event.subscribe( "#{options[:for]}", :owner => instance ) do |*args|
97
- instance.send( "trigger_event", "#{options[:for]}", *args )
95
+ @@event_subscribes.each_key do |event_name|
96
+ ::MPT::Event.subscribe( event_name, :owner => instance ) do |*args|
97
+ instance.send( "trigger_event", event_name, *args )
98
+ end
98
99
  end
99
100
  instance
100
101
  end
data/mpt.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mpt}
5
- s.version = "0.1.3.13"
5
+ s.version = "0.1.3.14"
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"]
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.13
4
+ version: 0.1.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoly Lapshin