redcar-dev 0.12.17dev → 0.12.18dev

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 (155) hide show
  1. data/CHANGES +4 -2
  2. data/README.md +5 -41
  3. data/Rakefile +3 -35
  4. data/lib/redcar.rb +19 -17
  5. data/lib/redcar/runner.rb +1 -7
  6. data/lib/redcar_quick_start.rb +5 -5
  7. data/plugins/application/features/main_menu.feature +1 -1
  8. data/plugins/application/features/step_definitions/command_steps.rb +8 -7
  9. data/plugins/application/features/step_definitions/filter_list_dialog_steps.rb +25 -10
  10. data/plugins/application/features/step_definitions/key_steps.rb +6 -4
  11. data/plugins/application/features/step_definitions/menu_steps.rb +27 -26
  12. data/plugins/application/features/step_definitions/speedbar_steps.rb +28 -16
  13. data/plugins/application/features/step_definitions/tree_steps.rb +88 -64
  14. data/plugins/application/features/step_definitions/window_steps.rb +14 -10
  15. data/plugins/application/features/support/env.rb +85 -83
  16. data/plugins/application/spec/application/application_spec.rb +1 -1
  17. data/plugins/application/spec/application/clipboard_spec.rb +1 -1
  18. data/plugins/application/spec/application/command/executor_spec.rb +1 -1
  19. data/plugins/application/spec/application/command/history_spec.rb +1 -1
  20. data/plugins/application/spec/application/command_spec.rb +1 -1
  21. data/plugins/application/spec/application/keymap/builder_spec.rb +1 -1
  22. data/plugins/application/spec/application/menu/builder_spec.rb +1 -1
  23. data/plugins/application/spec/application/menu/menu_item_spec.rb +1 -1
  24. data/plugins/application/spec/application/menu_spec.rb +1 -1
  25. data/plugins/application/spec/application/navigation_history_spec.rb +2 -0
  26. data/plugins/application/spec/application/notebook_spec.rb +1 -1
  27. data/plugins/application/spec/application/sensitive_spec.rb +1 -1
  28. data/plugins/application/spec/application/speedbar_spec.rb +1 -1
  29. data/plugins/application/spec/application/treebook_spec.rb +1 -1
  30. data/plugins/application/spec/application/window_spec.rb +1 -1
  31. data/plugins/application/spec/spec_helper.rb +4 -6
  32. data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +1 -1
  33. data/plugins/application_swt/lib/application_swt/gradient.rb +15 -5
  34. data/plugins/application_swt/lib/application_swt/window.rb +1 -1
  35. data/plugins/application_swt/spec/application_swt/gradient_spec.rb +13 -14
  36. data/plugins/application_swt/spec/application_swt/menu/binding_translator_spec.rb +1 -1
  37. data/plugins/application_swt/spec/application_swt/menu_spec.rb +1 -1
  38. data/plugins/application_swt/spec/spec_helper.rb +1 -19
  39. data/plugins/auto_completer/features/auto_complete.feature +7 -7
  40. data/plugins/auto_completer/features/step_definitions/auto_complete_steps.rb +3 -1
  41. data/plugins/auto_completer/features/step_definitions/dependency_steps.rb +0 -0
  42. data/plugins/auto_indenter/features/java_style_indentation.feature +5 -3
  43. data/plugins/auto_indenter/features/ruby_style_indentation.feature +13 -13
  44. data/plugins/auto_indenter/features/step_definitions/indentation_steps.rb +3 -1
  45. data/plugins/auto_indenter/spec/auto_indenter/analyzer_spec.rb +1 -1
  46. data/plugins/auto_indenter/spec/spec_helper.rb +1 -5
  47. data/plugins/auto_pairer/features/auto_pairer.feature +1 -1
  48. data/plugins/comment/features/line_comment.feature +31 -26
  49. data/plugins/comment/features/selection_comment.feature +1 -1
  50. data/plugins/comment/features/step_definitions/comment_steps.rb +6 -2
  51. data/plugins/comment/vendor/comment_lib.json +2 -0
  52. data/plugins/core/lib/core.rb +26 -0
  53. data/plugins/core/spec/core/base_storage_spec.rb +1 -1
  54. data/plugins/core/spec/core/gui_spec.rb +1 -1
  55. data/plugins/core/spec/core/observable_spec.rb +2 -1
  56. data/plugins/core/spec/core/persistent_cache_spec.rb +1 -1
  57. data/plugins/core/spec/core/shared_storage_spec.rb +1 -1
  58. data/plugins/core/spec/core/storage_spec.rb +1 -1
  59. data/plugins/core/spec/core/task_queue_spec.rb +1 -3
  60. data/plugins/core/spec/spec_helper.rb +1 -4
  61. data/plugins/declarations/spec/declarations/file_spec.rb +1 -1
  62. data/plugins/declarations/spec/spec_helper.rb +1 -5
  63. data/plugins/document_search/features/find.feature +39 -39
  64. data/plugins/document_search/features/step_definitions/find_steps.rb +6 -2
  65. data/plugins/edit_view/features/align_assignment.feature +6 -82
  66. data/plugins/edit_view/features/case_change.feature +22 -22
  67. data/plugins/edit_view/features/cursor_navigation.feature +2 -2
  68. data/plugins/edit_view/features/cut_and_paste.feature +9 -9
  69. data/plugins/edit_view/features/indentation_commands.feature +8 -8
  70. data/plugins/edit_view/features/line_delimiter.feature +7 -7
  71. data/plugins/edit_view/features/multiple_windows.feature +48 -48
  72. data/plugins/edit_view/features/step_definitions/dependency_steps.rb +0 -0
  73. data/plugins/edit_view/features/step_definitions/editing_steps.rb +237 -127
  74. data/plugins/edit_view/features/step_definitions/grammar_steps.rb +5 -1
  75. data/plugins/edit_view/features/step_definitions/notebook_steps.rb +38 -24
  76. data/plugins/edit_view/features/step_definitions/tab_steps.rb +83 -45
  77. data/plugins/edit_view/features/step_definitions/window_steps.rb +75 -54
  78. data/plugins/edit_view/features/support/env.rb +4 -23
  79. data/plugins/edit_view/lib/edit_view/commands/align_assignment_command.rb +29 -30
  80. data/plugins/edit_view/lib/edit_view/document.rb +23 -0
  81. data/plugins/edit_view/spec/edit_view/commands/align_assignment_command_spec.rb +83 -0
  82. data/plugins/edit_view/spec/edit_view/document/indentation_spec.rb +1 -1
  83. data/plugins/edit_view/spec/edit_view/document_spec.rb +1 -1
  84. data/plugins/edit_view/spec/spec_helper.rb +1 -4
  85. data/plugins/edit_view_swt/spec/edit_view_swt/word_movement_spec.rb +1 -1
  86. data/plugins/edit_view_swt/spec/spec_helper.rb +1 -4
  87. data/plugins/html_view/features/fixtures/sample.html +1 -1
  88. data/plugins/html_view/features/step_definitions/html_view_steps.rb +40 -39
  89. data/plugins/java/features/syntax_check_java.feature +18 -16
  90. data/plugins/line_tools/features/step_definitions/line_tools_steps.rb +18 -6
  91. data/plugins/macros/features/block_selection_in_macros.feature +47 -47
  92. data/plugins/macros/features/step_definitions/macro_steps.rb +9 -3
  93. data/plugins/macros/features/step_definitions/prediction_steps.rb +6 -2
  94. data/plugins/macros/plugin.rb +2 -1
  95. data/plugins/macros/spec/macros/predictive/sequence_finder_spec.rb +1 -1
  96. data/plugins/macros/spec/spec_helper.rb +1 -6
  97. data/plugins/outline_view/features/outline_view.feature +5 -5
  98. data/plugins/outline_view/features/step_definitions/outline_steps.rb +29 -17
  99. data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +1 -1
  100. data/plugins/project/features/close_directory_tree.feature +0 -12
  101. data/plugins/project/features/open_directory_tree.feature +1 -2
  102. data/plugins/project/features/step_definitions/directory_steps.rb +13 -5
  103. data/plugins/project/features/step_definitions/file_steps.rb +23 -9
  104. data/plugins/project/features/step_definitions/find_file_steps.rb +6 -2
  105. data/plugins/project/features/step_definitions/project_tree_steps.rb +6 -2
  106. data/plugins/project/features/watch_for_modified_files.feature +1 -1
  107. data/plugins/project/spec/project/adapters/remote_protocols/ftp_spec.rb +1 -1
  108. data/plugins/project/spec/project/adapters/remote_protocols/sftp_spec.rb +1 -1
  109. data/plugins/project/spec/project/adapters/remote_spec.rb +1 -1
  110. data/plugins/project/spec/project/dir_mirror_spec.rb +1 -1
  111. data/plugins/project/spec/project/file_list_spec.rb +1 -1
  112. data/plugins/project/spec/project/file_mirror_spec.rb +2 -1
  113. data/plugins/project/spec/spec_helper.rb +1 -4
  114. data/plugins/project_search/spec/project_search/binary_data_detector_spec.rb +1 -1
  115. data/plugins/project_search/spec/project_search/word_search_spec.rb +1 -1
  116. data/plugins/project_search/spec/spec_helper.rb +1 -4
  117. data/plugins/{application → redcar}/features/navigation_history.feature +8 -8
  118. data/plugins/redcar/features/step_definitions/font_steps.rb +9 -5
  119. data/plugins/redcar/redcar.rb +0 -26
  120. data/plugins/repl/features/step_definitions/repl_steps.rb +15 -5
  121. data/plugins/repl/plugin.rb +1 -1
  122. data/plugins/repl/spec/repl/repl_mirror_spec.rb +1 -1
  123. data/plugins/repl/spec/spec_helper.rb +1 -4
  124. data/plugins/ruby/spec/ruby/repl_mirror_spec.rb +1 -1
  125. data/plugins/ruby/spec/spec_helper.rb +1 -5
  126. data/plugins/runnables/features/parameter_input.feature +43 -43
  127. data/plugins/runnables/features/step_definitions/runnable_steps.rb +9 -3
  128. data/plugins/runnables/plugin.rb +2 -2
  129. data/plugins/runnables/spec/runnables/output_processor_spec.rb +1 -1
  130. data/plugins/runnables/spec/spec_helper.rb +1 -5
  131. data/plugins/scm_svn/features/add_and_commit.feature +1 -0
  132. data/plugins/scm_svn/features/checkout.feature +1 -0
  133. data/plugins/scm_svn/features/edit_and_index.feature +1 -0
  134. data/plugins/scm_svn/features/ignore_files.feature +1 -0
  135. data/plugins/scm_svn/features/merge.feature +1 -0
  136. data/plugins/scm_svn/features/resolve_conflict.feature +1 -0
  137. data/plugins/scm_svn/features/revert_and_delete.feature +1 -0
  138. data/plugins/scm_svn/features/step_definitions/branch_and_merge_steps.rb +14 -9
  139. data/plugins/scm_svn/features/support/env.rb +4 -4
  140. data/plugins/scm_svn/features/switch_branches.feature +1 -0
  141. data/plugins/scm_svn/features/update.feature +1 -0
  142. data/plugins/strip_trailing_spaces/features/strip_trailing_spaces.feature +4 -4
  143. data/plugins/test_runner/plugin.rb +3 -1
  144. data/plugins/test_runner/spec/run_test_command_spec.rb +58 -50
  145. data/plugins/test_runner/spec/spec_helper.rb +1 -5
  146. data/plugins/textmate/features/step_definitions/tree_steps.rb +2 -0
  147. data/plugins/todo_list/features/todo_list.feature +1 -1
  148. data/plugins/todo_list/spec/spec_helper.rb +1 -4
  149. data/plugins/todo_list/spec/todo_list/file_parser_spec.rb +1 -1
  150. data/plugins/tree_view_swt/lib/tree_view_swt.rb +2 -1
  151. data/plugins/web_bookmarks/features/step_definitions/web_steps.rb +1 -1
  152. metadata +48 -48
  153. data/lib/redcar/installer.rb +0 -178
  154. data/plugins/key_bindings/spec/spec_helper.rb +0 -5
  155. data/plugins/scm/spec/spec_helper.rb +0 -5
@@ -1,178 +0,0 @@
1
-
2
- require 'net/http'
3
- require 'fileutils'
4
-
5
- if Redcar.platform == :windows
6
- require "rubygems"
7
- require "zip/zipfilesystem"
8
- end
9
-
10
- module Redcar
11
- class Installer
12
- def initialize
13
- if ENV['http_proxy']
14
- proxy = URI.parse(ENV['http_proxy'])
15
- @connection = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password)
16
- else
17
- @connection = Net::HTTP
18
- end
19
- puts "found latest XULRunner release version: #{xulrunner_version}" if Redcar.platform == :windows
20
- end
21
-
22
- def install
23
- Redcar.environment = :user
24
- puts "Downloading >10MB of necessary assets..."
25
- fetch_all_assets
26
- precache_textmate_bundles
27
- ensure_user_plugins_directory_exists
28
- replace_windows_batch_file
29
- puts "Success!"
30
- puts ""
31
- puts "To open just the editor: redcar"
32
- puts "To open the current directory: redcar ."
33
- puts "More information: http://redcareditor.com/"
34
- end
35
-
36
- def plugins_dir
37
- File.expand_path(File.join(File.dirname(__FILE__), %w(.. .. plugins)))
38
- end
39
-
40
- def fetch_all_assets
41
- assets = assets_by_platform[:all].merge(assets_by_platform[Redcar.platform])
42
- assets.each {|source, target| fetch_asset(source, target) }
43
- end
44
-
45
- def assets_by_platform
46
- { :all => {
47
- "http://redcar.s3.amazonaws.com/jruby/jcodings.jar" => "/jcodings.jar",
48
- "http://redcar.s3.amazonaws.com/jruby/jdom.jar" => "/jdom.jar",
49
- "http://redcar.s3.amazonaws.com/jruby/joni.jar" => "/joni.jar",
50
- "http://redcar.s3.amazonaws.com/jruby/bcmail-jdk14-139-redcar1.jar" => "/bcmail-jdk14-139.jar",
51
- "http://redcar.s3.amazonaws.com/jruby/bcprov-jdk14-139-redcar1.jar" => "/bcprov-jdk14-139.jar",
52
- "http://redcar.s3.amazonaws.com/jruby/jopenssl-redcar1.jar" => "/jopenssl.jar",
53
- "http://redcar.s3.amazonaws.com/java-mateview-#{Redcar::VERSION}.jar" => nil,
54
- "http://redcar.s3.amazonaws.com/application_swt-#{Redcar::VERSION}.jar" => nil,
55
- "http://redcar.s3.amazonaws.com/clojure-1.2beta1.jar" => "/clojure.jar",
56
- "http://redcar.s3.amazonaws.com/clojure-contrib-1.2beta1.jar" => "/clojure-contrib.jar",
57
- "http://redcar.s3.amazonaws.com/org-enclojure-repl-server.jar" => nil,
58
- "http://mirrors.ibiblio.org/pub/mirrors/maven2/org/tmatesoft/svnkit/svnkit/1.3.4/svnkit-1.3.4.jar" => "/svnkit.jar",
59
- # "http://mirrors.ibiblio.org/pub/mirrors/maven2/rhino/js/1.7R2/js-1.7R2.jar" => "/js.jar",
60
- "http://redcar.s3.amazonaws.com/deps/rhino-js-1.7R2.jar" => "/js.jar",
61
- },
62
- :windows => {
63
- "http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/#{xulrunner_version}/runtimes/xulrunner-#{xulrunner_version}.en-US.win32.zip" => "xulrunner-#{xulrunner_version}.en-US.win32.zip",
64
- },
65
- :linux => {
66
- },
67
- :osx => {
68
- }
69
- }
70
- end
71
-
72
- def fetch_asset(source, target)
73
- relative_target = target || implicit_target(source)
74
- absolute_target = File.join(Redcar.asset_dir, relative_target)
75
- if File.exist?(absolute_target)
76
- unless source =~ /dev\.jar/
77
- return
78
- end
79
- end
80
- download_file_to(source, absolute_target)
81
- unzip_file(absolute_target) if absolute_target =~ /\.zip$/
82
- end
83
-
84
- def replace_windows_batch_file
85
- if RUBY_PLATFORM.downcase =~ /mswin|mingw|win32/
86
- require 'rbconfig'
87
- bin_dir = Config::CONFIG["bindir"]
88
- ruby_path = File.join(bin_dir,
89
- "rubyw.exe")
90
- script_path = File.join(bin_dir,"redcar.bat")
91
- File.open script_path, 'w' do |file|
92
- file.puts <<-TEXT
93
- @Echo Off
94
- IF NOT "%~f0" == "~f0" GOTO :WinNT
95
- @"#{ruby_path}" "#{File.join(bin_dir,"redcar")}" %1 %2 %3 %4 %5 %6 %7 %8 %9
96
- GOTO :EOF
97
- :WinNT
98
- SET STARTUP=%*
99
- SET RUBY="rubyw.exe"
100
-
101
- :LOOP
102
- if "%1"=="--with-windows-console" GOTO USERUBY
103
- if "%1"=="" GOTO STARTREDCAR
104
- shift
105
- GOTO LOOP
106
-
107
- :USERUBY
108
- SET RUBY="ruby.exe"
109
-
110
- :STARTREDCAR
111
- IF NOT "X"%STARTUP% == "X" SET STARTUP=%STARTUP:"="""%
112
- start "RedCar" %RUBY% "#{File.join(bin_dir,"redcar")}" %STARTUP%
113
- TEXT
114
- end
115
- end
116
- end
117
-
118
- def implicit_target(source)
119
- URI.parse(source).path.gsub(/^\//, "")
120
- end
121
-
122
- def download_file_to(uri, destination_file)
123
- print " downloading #{uri}... "; $stdout.flush
124
- temporary_target = destination_file + ".part"
125
- FileUtils.mkdir_p(File.dirname(destination_file))
126
- File.open(temporary_target, "wb") do |write_out|
127
- write_out.print @connection.get(URI.parse(uri))
128
- end
129
-
130
- if File.open(temporary_target).read(200) =~ /Access Denied/
131
- puts "\n\n*** Error downloading #{uri}, got Access Denied from S3."
132
- FileUtils.rm_rf(temporary_target)
133
- exit
134
- end
135
-
136
- FileUtils.cp(temporary_target, destination_file)
137
- FileUtils.rm_rf(temporary_target)
138
- puts "done!"
139
- end
140
-
141
- # unzip a .zip file into the directory it is located
142
- def unzip_file(path)
143
- print "unzipping #{path}..."; $stdout.flush
144
- source = File.expand_path(path)
145
- Dir.chdir(File.dirname(source)) do
146
- Zip::ZipFile.open(source) do |zipfile|
147
- zipfile.entries.each do |entry|
148
- FileUtils.mkdir_p(File.dirname(entry.name))
149
- begin
150
- entry.extract
151
- rescue Zip::ZipDestinationFileExistsError
152
- end
153
- end
154
- end
155
- end
156
- end
157
-
158
- def precache_textmate_bundles
159
- puts "Precaching textmate bundles..."
160
- Runner.new.construct_command(["--no-gui", "--compute-textmate-cache-and-quit", "--multiple-instance"]) do |cmd|
161
- %x{#{cmd.join(' ')}}
162
- end
163
- end
164
-
165
- def ensure_user_plugins_directory_exists
166
- FileUtils.mkpath File.join(Redcar.user_dir, 'plugins')
167
- end
168
-
169
- # Xulrunner releases don't hang around very long, so we scrape their site to figure out
170
- # which one to download this time.
171
- def xulrunner_version
172
- @xulrunner_version ||= begin
173
- html = @connection.get(URI.parse("http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/"))
174
- html.scan(/\d\.\d\.\d\.\d+/).sort.reverse.first
175
- end
176
- end
177
- end
178
- end
@@ -1,5 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')
2
-
3
- require 'redcar'
4
- Redcar.environment = :test
5
- Redcar.load_unthreaded
@@ -1,5 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')
2
-
3
- require 'redcar'
4
- Redcar.environment = :test
5
- Redcar.load_unthreaded