rubyrun 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/bin/Rakefile +84 -5
  2. data/bin/rubyrun_native_test__.rb +1 -0
  3. data/doc/README +26 -0
  4. data/{docs/rubyrun-0.9.6.htm → doc/rubyrun-0.9.7.htm} +743 -686
  5. data/{docs/rubyrun-0.9.6.pdf → doc/rubyrun-0.9.7.pdf} +0 -0
  6. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/colorschememapping.xml +0 -0
  7. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/filelist.xml +1 -1
  8. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/header.htm +7 -8
  9. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image001.jpg +0 -0
  10. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image002.jpg +0 -0
  11. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image003.jpg +0 -0
  12. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image004.jpg +0 -0
  13. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image005.jpg +0 -0
  14. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image006.jpg +0 -0
  15. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image007.jpg +0 -0
  16. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image008.jpg +0 -0
  17. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image009.jpg +0 -0
  18. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image010.jpg +0 -0
  19. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image011.jpg +0 -0
  20. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image012.jpg +0 -0
  21. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image013.jpg +0 -0
  22. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image014.jpg +0 -0
  23. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image015.jpg +0 -0
  24. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image016.jpg +0 -0
  25. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image017.png +0 -0
  26. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image018.jpg +0 -0
  27. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image019.jpg +0 -0
  28. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image020.jpg +0 -0
  29. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image021.jpg +0 -0
  30. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/image022.png +0 -0
  31. data/{docs/rubyrun-0.9.6_files → doc/rubyrun-0.9.7_files}/themedata.thmx +0 -0
  32. data/etc/rubyrun_opts.yml +2 -2
  33. data/lib/rubyrun/rubyrun_boot__.rb +6 -1
  34. data/lib/rubyrun/rubyrun_commander__.rb +8 -6
  35. data/lib/rubyrun/rubyrun_globals.rb +1 -0
  36. data/lib/rubyrun/rubyrun_initializer__.rb +14 -56
  37. data/lib/rubyrun/rubyrun_instrumentor__.rb +14 -12
  38. data/lib/rubyrun/rubyrun_monitor__.rb +1 -1
  39. data/lib/rubyrun/rubyrun_report__.rb +1 -1
  40. data/lib/rubyrun/rubyrun_rss__.rb +19 -7
  41. metadata +52 -50
  42. data/README +0 -77
data/bin/Rakefile CHANGED
@@ -1,11 +1,90 @@
1
1
  require 'ftools'
2
+
3
+ LIB_WINDOWS = ['rubyrunnative__x86-mswin32.so','rubyrunnative__.so']
4
+ LIB_LINUX = ['rubyrunnative__x86-linux.so','rubyrunnative__.so']
5
+ LIB_OSX_X86 = ['rubyrunnative__x86-darwin.bundle','rubyrunnative__.bundle']
6
+ LIB_OSX_PPC = ['rubyrunnative__ppc-darwin.bundle','rubyrunnative__.bundle']
7
+
8
+ FOLDER_EXT = 'ext'
9
+ FOLDER_LIB = 'lib'
10
+ FOLDER_RUBYRUN = 'rubyrun'
11
+ FOLDER_BIN = 'bin'
12
+
2
13
  task :default do
14
+ copied = false
3
15
  $:.each {|path|
4
- (File.copy('../lib/rubyrun/rubyrun.rb',path); break) if path.include?('site_ruby')
16
+ begin
17
+ if path.downcase.include?('site')
18
+ File.copy(File.join('..',FOLDER_LIB,FOLDER_RUBYRUN,'rubyrun.rb'),path)
19
+ File.copy(File.join('..',FOLDER_LIB,FOLDER_RUBYRUN,'rubyrun.rb'),File.join(path,'ubyrun.rb'))
20
+ copied = true
21
+ end
22
+ rescue
23
+ end
24
+ break if copied
5
25
  }
6
- if RUBY_PLATFORM.include?('mswin') && File.exists?('../ext/rubyrunnative__.so')
7
- system('mt.exe -manifest ../ext/rubyrunnative__.so.manifest -outputresource:../ext/rubyrunnative__.so;2')
8
- File.copy('../ext/rubyrunnative__.so','../')
26
+ unless copied
27
+ $:.reverse.each {|path|
28
+ next if (path == '.' || path == '..')
29
+ begin
30
+ File.copy(File.join('..',FOLDER_LIB,FOLDER_RUBYRUN,'rubyrun.rb'),path)
31
+ File.copy(File.join('..',FOLDER_LIB,FOLDER_RUBYRUN,'rubyrun.rb'),File.join(path,'ubyrun.rb'))
32
+ copied = true
33
+ rescue
34
+ end
35
+ break if copied
36
+ }
9
37
  end
10
- FileUtils.mv(Dir.glob('../rubyrunnative__.*'),'../lib/rubyrun/')
38
+ unless copied
39
+ raise IOError.new("Unable to copy rubyrun.rb to Ruby path. Make sure Gem process has write permission in one of the following directories:\n#{$:.reverse.delete_if {|p| p == '.' || p == '..'}.join("\n")}")
40
+ end
41
+ Dir.chdir(File.join('..',FOLDER_EXT))
42
+ case RUBY_PLATFORM
43
+ when /mswin/
44
+ just_compiled? ? deploy_compiled_native(LIB_WINDOWS) : (deploy_precompiled_native(LIB_WINDOWS) if valid_lib?(LIB_WINDOWS))
45
+ when /linux/
46
+ just_compiled? ? deploy_compiled_native(LIB_LINUX) : (deploy_precompiled_native(LIB_LINUX) if valid_lib?(LIB_LINUX))
47
+ when /darwin8/
48
+ if just_compiled?
49
+ deploy_compiled_native(LIB_OSX_PPC)
50
+ else
51
+ if valid_lib?(LIB_OSX_PPC)
52
+ deploy_precompiled_native(LIB_OSX_PPC)
53
+ elsif valid_lib?(LIB_OSX_X86)
54
+ deploy_precompiled_native(LIB_OSX_X86)
55
+ end
56
+ end
57
+ when /darwin9/
58
+ if just_compiled?
59
+ deploy_compiled_native(LIB_OSX_X86)
60
+ else
61
+ if valid_lib?(LIB_OSX_X86)
62
+ deploy_precompiled_native(LIB_OSX_X86)
63
+ elsif valid_lib?(LIB_OSX_PPC)
64
+ deploy_precompiled_native(LIB_OSX_PPC)
65
+ end
66
+ end
67
+ end
68
+ Dir.chdir(File.join('..',FOLDER_BIN))
69
+ end
70
+
71
+ def just_compiled?
72
+ !Dir.glob('../rubyrunnative__.*').empty?
73
+ end
74
+
75
+ def valid_lib?(lib_name)
76
+ FileUtils.mv(lib_name.first,lib_name.last)
77
+ system("ruby #{File.join('..',FOLDER_BIN,'rubyrun_native_test__.rb')}")
78
+ end
79
+
80
+ def deploy_compiled_native(lib_name)
81
+ FileUtils.rm_rf(File.join('..',"#{lib_name.last}")) if File.exists?(File.join('..',"#{lib_name.last}"))
82
+ if RUBY_PLATFORM =~ /mswin/
83
+ system("mt.exe -manifest #{lib_name.last}.manifest -outputresource:#{lib_name.last};2")
84
+ end
85
+ FileUtils.mv(lib_name.last, File.join('..',FOLDER_LIB,FOLDER_RUBYRUN))
86
+ end
87
+
88
+ def deploy_precompiled_native(lib_name)
89
+ FileUtils.mv(lib_name.last,File.join('..',FOLDER_LIB,FOLDER_RUBYRUN))
11
90
  end
@@ -0,0 +1 @@
1
+ require 'rubyrunnative__'
data/doc/README ADDED
@@ -0,0 +1,26 @@
1
+ =Ruby<em>Run</em> Community Edition Quick Start Guide
2
+
3
+ This guide is for those who want to get Ruby<em>Run</em> up and running quickly. For complete details and other features of the product,
4
+ please look at the online documenation at http://www.rubysophic.com/download/files/rubyrun-0.9.7.htm
5
+
6
+ 1. To install the latest version of Ruby<em>Run</em>, issue the following command:
7
+
8
+ gem install rubyrun
9
+
10
+ 2. To start your Ruby or Rails application with Ruby<em>Run</em> enabled, use the '-rubyrun' option. Examples:
11
+
12
+ ruby -rubyrun script/server -e production
13
+ ruby -rubyrun helloworld.rb
14
+
15
+ 3. For Rails environment, run some transactions. To view the Performance Summary Report, wait for 60 seconds and open the following URL:
16
+
17
+ http://[hostname]:[port_number]/rubyrun_rss/perf_summary.xml
18
+
19
+ 4. To view the Method Trace, open the following file with a browser:
20
+
21
+ [APPS_DIR]/rubyrun/report/server_[ID]_trace.html
22
+
23
+ where APPS_DIR is the path where you start your Ruby or Rails application, e.g. /usr/apps/redmine-0.7.3
24
+ ID is either the process ID or the port number of the Ruby process
25
+
26
+ 5. To report defects or any other questions, please email mailto:support@rubysophic.com