added 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a35937cb5def349f87957a9051eda9b48e43232c
4
- data.tar.gz: 8624cfe16cf21d2ee5ef2c6c05f33bfb349ce97e
3
+ metadata.gz: 94f1810eec76e187c2b1e5ad9bffb94ec118611c
4
+ data.tar.gz: 2fabca3aae2827bab5b9fd81c276effe42503795
5
5
  SHA512:
6
- metadata.gz: 28d662efff045b68a7c1f06f897ad481bb4200dad1d47f42e0025e1c38cde46c18acccab844969e72b8e428aac8cd9dd1a168045f7d30e5ea2402094b5f49f36
7
- data.tar.gz: 21b0364c4be97b695bb2e71dd00390a7341b592ee4a63c3139fd392c1c66a93944592ff71ccf9bd5984e9c686a52d1c0b8246adf92a60cdd03d373162ffae221
6
+ metadata.gz: 70b4871e3e6482b712c632affb45df5aa43e3f8b12c4273f412dfe144f16bdbfcf2a373a6f89c3380126e6ca5f1bf2c33de129250cb7949428a2bf39324b63fe
7
+ data.tar.gz: 2a4175a8b52bd35698e5803132ce07389009624b4d96a7779c2ed883ebe960d3f01495e1ee53b7dc1a9f78064729c9c4a1c7b9f5c94868fc0aedaeead064dd9a
@@ -1,5 +1,10 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.0.1
4
+
5
+ * Support Ruby 2.0 (treat prepend as private)
6
+
7
+
3
8
  ### 1.0.0
4
9
 
5
10
  * Release
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ group :development do
6
+ gem 'minitest'
7
+ end
8
+
@@ -8,12 +8,12 @@ module Added
8
8
  super
9
9
  if respond_to? :added
10
10
  mod = self
11
- klass.prepend(Module.new do
11
+ klass.send(:prepend, Module.new{
12
12
  define_method(:initialize){ |*args, &block|
13
13
  super(*args, &block)
14
14
  mod.added(self)
15
15
  }
16
- end)
16
+ })
17
17
  ObjectSpace.each_object(klass){ |instance|
18
18
  added(instance)
19
19
  }
@@ -1,3 +1,3 @@
1
1
  module Added
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -67,7 +67,7 @@ describe Added do
67
67
  klass.send :define_method, :initialize do |*args|
68
68
  @my2 = args[0]
69
69
  end
70
- klass.include(mod)
70
+ klass.send :include, mod
71
71
  object = klass.new("state2")
72
72
 
73
73
  assert_equal "state", object.instance_variable_get(:@my)
@@ -75,7 +75,7 @@ describe Added do
75
75
  end
76
76
 
77
77
  it 'respects initializers after inclusion' do
78
- klass.include(mod)
78
+ klass.send :include, mod
79
79
  klass.send :define_method, :initialize do |*args|
80
80
  @my2 = args[0]
81
81
  end
@@ -87,7 +87,7 @@ describe Added do
87
87
 
88
88
  it 'works with sub-classed classes' do
89
89
  sub_klass = Class.new(klass)
90
- klass.include(mod)
90
+ klass.send :include, mod
91
91
  object = sub_klass.new
92
92
 
93
93
  assert_equal "state", object.instance_variable_get(:@my)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: added
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
@@ -26,7 +26,6 @@ files:
26
26
  - README.md
27
27
  - added.gemspec
28
28
  - lib/added.rb
29
- - lib/added/.implementation.rb.swp
30
29
  - lib/added/core_ext.rb
31
30
  - lib/added/implementation.rb
32
31
  - lib/added/version.rb