redcar-dev 0.12.6dev-java → 0.12.7dev-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/redcar.rb +1 -1
  2. metadata +1 -2
  3. data/rubygems_plugin.rb +0 -81
data/lib/redcar.rb CHANGED
@@ -56,7 +56,7 @@ end
56
56
  #
57
57
  # and so on.
58
58
  module Redcar
59
- VERSION = '0.12.6dev' # also change in the gemspec!
59
+ VERSION = '0.12.7dev' # also change in the gemspec!
60
60
  VERSION_MAJOR = 0
61
61
  VERSION_MINOR = 12
62
62
  VERSION_RELEASE = 0
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: redcar-dev
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.12.6dev
5
+ version: 0.12.7dev
6
6
  platform: java
7
7
  authors:
8
8
  - Daniel Lucraft
@@ -228,7 +228,6 @@ files:
228
228
  - LICENSE
229
229
  - Rakefile
230
230
  - README.md
231
- - rubygems_plugin.rb
232
231
  - bin/redcar
233
232
  - share/LICENSE
234
233
  - share/icons/address-book--arrow.png
data/rubygems_plugin.rb DELETED
@@ -1,81 +0,0 @@
1
-
2
- Gem.post_install_hooks << lambda do |gem|
3
- bindir = Gem.bindir(gem.gem_home)
4
- File.open(bindir + "/redcar", "w") do |f|
5
- cmd = Redcar::Runner.command(gem.instance_variable_get("@gem_dir") + "/bin/redcar")
6
- f.puts <<-SH
7
- #{cmd} "$@"
8
- SH
9
- end
10
- end
11
-
12
- module Redcar
13
- class Runner
14
-
15
- def self.command(bin)
16
- # TODO: Windows XP updates
17
- # if [:windows].include?(Redcar.platform)
18
- # bin = "\"#{bin}\""
19
- # end
20
-
21
- command = [Config::CONFIG["bindir"] + "/jruby"]
22
- command.push(*java_args)
23
- # command.push("-J-Xbootclasspath/a:#{jruby_complete}")
24
- command.push("-J-Dfile.encoding=UTF8", "-J-Xmx320m", "-J-Xss1024k", "-J-Djruby.memory.max=320m", "-J-Djruby.stack.max=1024k")
25
- command.push(bin)
26
- command.push("--no-sub-jruby", "--ignore-stdin")
27
- command.push "--start-time=#{$redcar_process_start_time.to_i}"
28
- # command.push "--debug" if debug_mode?
29
- # command.push(*cleaned_args)
30
- # command.push(*args)
31
- command.join(" ")
32
- end
33
-
34
- def self.cleaned_args
35
- # We should never pass --fork to a subprocess
36
- result = ARGV.find_all {|arg| arg != '--fork'}.map do |arg|
37
- if arg =~ /--(.+)=(.+)/
38
- "--" + $1 + "=\"" + $2 + "\""
39
- else
40
- arg
41
- end
42
- end
43
- result.delete("install")
44
- result
45
- end
46
-
47
- def self.debug_mode?
48
- ARGV.include?("--debug")
49
- end
50
-
51
- def self.java_args
52
- str = []
53
- if Config::CONFIG["host_os"] =~ /darwin/
54
- str.push "-J-XstartOnFirstThread"
55
- end
56
-
57
- if ARGV.include?("--load-timings")
58
- str.push "-J-Djruby.debug.loadService.timing=true"
59
- end
60
-
61
- str.push "-J-d32" if JvmOptionsProbe.d32
62
- str.push "-J-client" if JvmOptionsProbe.client
63
-
64
- str
65
- end
66
-
67
- class JvmOptionsProbe
68
- def self.redirect
69
- @redirect ||= "> /dev/null 2>&1" # TODO: fix for windows
70
- end
71
-
72
- def self.d32
73
- @d32 ||= system("java -d32 #{redirect}")
74
- end
75
-
76
- def self.client
77
- @client ||= system("java -client #{redirect}")
78
- end
79
- end
80
- end
81
- end