boc 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.rdoc CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
2
  = boc Changes
3
3
 
4
+ == Version 0.4.3
5
+
6
+ * fix rake-compiler dependencies
7
+
4
8
  == Version 0.4.2
5
9
 
6
10
  * add jruby support
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ def config
5
5
  @s.developers << ["James M. Lawrence", "quixoticsycophant@gmail.com"]
6
6
  @s.username = "quix"
7
7
  @s.required_ruby_version = ">= 1.9.2"
8
- @s.development_dependencies << ["rake-compiler", "~> 0.7.6"]
8
+ @s.dependencies << ["rake-compiler", "~> 0.7.6"]
9
9
  @s.rdoc_files = %w[
10
10
  lib/boc.rb
11
11
  lib/boc/version.rb
@@ -15,7 +15,7 @@ end
15
15
  def mri_ext
16
16
  require 'rake/extensiontask'
17
17
 
18
- Rake::ExtensionTask.new @s.gem_name, @s.gemspec do |ext|
18
+ Rake::ExtensionTask.new @s.gem_name, binary_gemspec do |ext|
19
19
  ext.cross_compile = true
20
20
  ext.cross_platform = 'i386-mswin32'
21
21
  ext.lib_dir = "lib/#{@s.gem_name}"
@@ -39,7 +39,7 @@ def jruby_ext
39
39
  require "rake/javaextensiontask"
40
40
 
41
41
  Levitate.no_warnings do
42
- Rake::JavaExtensionTask.new @s.gem_name, @s.gemspec do |ext|
42
+ Rake::JavaExtensionTask.new @s.gem_name, binary_gemspec do |ext|
43
43
  ext.ext_dir = "jext"
44
44
  ext.lib_dir = "lib/#{@s.gem_name}"
45
45
  end
@@ -122,6 +122,13 @@ def config_extension
122
122
  end
123
123
  end
124
124
 
125
+ def binary_gemspec
126
+ @s.gemspec.dup.tap do |gemspec|
127
+ gemspec.dependencies.clear
128
+ gemspec.add_development_dependency(*@s.dependencies.first)
129
+ end
130
+ end
131
+
125
132
  Levitate.new "boc" do |s|
126
133
  @s = s
127
134
  config
data/lib/boc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Boc
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
data/test/basic_test.rb CHANGED
@@ -179,21 +179,6 @@ class BasicTest < BocTest
179
179
  assert_equal K, K.g
180
180
  end
181
181
 
182
- class L
183
- def f
184
- eval("self", Boc.value)
185
- end
186
-
187
- def self.g
188
- self.new.f
189
- end
190
- end
191
-
192
- def test_self
193
- Boc.enable L, :f
194
- assert_equal L, L.g
195
- end
196
-
197
182
  class K
198
183
  def k
199
184
  end
@@ -206,4 +191,31 @@ class BasicTest < BocTest
206
191
  end
207
192
  assert_match(/method `k'.*already/, error.message)
208
193
  end
194
+
195
+ class L
196
+ def f
197
+ eval("self", Boc.value)
198
+ end
199
+
200
+ class << self
201
+ def g
202
+ new.f
203
+ end
204
+
205
+ def h
206
+ Array.class_eval { L.new.f }
207
+ end
208
+
209
+ def i
210
+ Array.new.instance_eval { L.new.f }
211
+ end
212
+ end
213
+ end
214
+
215
+ def test_self
216
+ Boc.enable L, :f
217
+ assert_equal L, L.g
218
+ assert_equal Array, L.h
219
+ assert_equal Array, L.i.class
220
+ end
209
221
  end
data/test/main.rb CHANGED
@@ -4,6 +4,8 @@ require 'minitest/unit'
4
4
  require 'minitest/autorun' unless defined? Rake
5
5
 
6
6
  require 'pp'
7
+
8
+ $VERBOSE = true
7
9
  require 'boc'
8
10
 
9
11
  class JLMiniTest < MiniTest::Unit::TestCase
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: boc
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.2
5
+ version: 0.4.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - James M. Lawrence
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-21 00:00:00 -04:00
13
+ date: 2011-03-23 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
24
  version: 0.7.6
25
- type: :development
25
+ type: :runtime
26
26
  version_requirements: *id001
27
27
  description: "Binding of caller: obtain a caller's binding."
28
28
  email: