ride 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -13,6 +13,7 @@ app_generators/ride/templates/.vim/syntax/eruby.vim
13
13
  app_generators/ride/templates/RIDE_History.txt
14
14
  app_generators/ride/templates/RIDE_License.txt
15
15
  app_generators/ride/templates/RIDE_README.txt
16
+ app_generators/ride/templates/.irbrc
16
17
  app_generators/ride/templates/config/.screenrc.code.erb
17
18
  app_generators/ride/templates/config/code_template.erb
18
19
  app_generators/ride/templates/script/console
@@ -23,6 +24,7 @@ bin/ride
23
24
  config/hoe.rb
24
25
  config/requirements.rb
25
26
  lib/ride.rb
27
+ lib/std_err_hooks.rb
26
28
  lib/ride/version.rb
27
29
  script/console
28
30
  script/destroy
@@ -33,7 +33,7 @@ class RideGenerator < RubiGen::Base
33
33
 
34
34
  m.dependency "install_rubigen_scripts", [destination_root, 'ride'],
35
35
  :shebang => options[:shebang], :collision => :force
36
- m.file_copy_each %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt}
36
+ m.file_copy_each %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .irbrc}
37
37
  m.file_copy_each [%w{ftplugin ruby ruby.vim}, %w{plugin taglist.vim}, %w{syntax eruby.vim}, %w{ftdetect ruby.vim}].map { |vimfile| File.join(".vim", *vimfile) }
38
38
  script_options = { :chmod => 0755, :shebang => options[:shebang] == RideGenerator::DEFAULT_SHEBANG ? nil : options[:shebang] }
39
39
  m.file_copy_each %w{tasks/rspec.rake tasks/ride.rake}
@@ -0,0 +1,9 @@
1
+ unless ENV["REAL_HOME"].nil?
2
+ if File.directory?(ENV["REAL_HOME"]) && File.exists?(home_rcfile = File.join(ENV["REAL_HOME"], ".irbrc"))
3
+ load home_rcfile
4
+ end
5
+ end
6
+
7
+ require "rubygems"
8
+ require "ride"
9
+ require "std_err_hooks"
data/lib/ride/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Ride
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 2
4
+ MINOR = 3
5
5
  TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
data/lib/ride.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
-
4
3
  module Ride
5
-
6
- end
4
+ end
5
+
@@ -0,0 +1,29 @@
1
+ # This hooks into standard error to open backtraces in vim
2
+ class StandardError
3
+ alias _backtrace backtrace
4
+ def backtrace
5
+ old = _backtrace
6
+ @old_backtrace ||= nil
7
+ if old.kind_of?(Array) and @old_backtrace.nil?
8
+ open_vims(old)
9
+ @old_backtrace = true
10
+ end
11
+ old
12
+ end
13
+
14
+ def open_vims(lines)
15
+ good_lines = lines.select { |l| l.match(/^[\/\w][^:\s]*:\d+(?::.*)?$/) }.map do |line|
16
+ file, line_number, rest = line.split(":")
17
+ [file, line_number]
18
+ end.uniq
19
+ s = "screen vim -p"
20
+ file, line = good_lines.shift
21
+ s << " +#{line} #{file}"
22
+ good_lines.each do |l|
23
+ file, line = l
24
+ s << " -c tabnext -c #{line} #{file} "
25
+ end
26
+ s << " -c tabnext " if good_lines.size > 0
27
+ %x{screen -X #{s}}
28
+ end
29
+ end
@@ -31,7 +31,7 @@ describe "Ride Generator", "when application is generated" do
31
31
  end
32
32
  end
33
33
 
34
- %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt}.each do |file|
34
+ %w{RIDE_History.txt RIDE_License.txt RIDE_README.txt .irbrc}.each do |file|
35
35
  it "should create #{file}" do
36
36
  File.exists?(full_path(file)).should == true
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ride
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Vanderpoel
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-12 00:00:00 -05:00
12
+ date: 2008-10-14 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -75,6 +75,7 @@ files:
75
75
  - app_generators/ride/templates/RIDE_History.txt
76
76
  - app_generators/ride/templates/RIDE_License.txt
77
77
  - app_generators/ride/templates/RIDE_README.txt
78
+ - app_generators/ride/templates/.irbrc
78
79
  - app_generators/ride/templates/config/.screenrc.code.erb
79
80
  - app_generators/ride/templates/config/code_template.erb
80
81
  - app_generators/ride/templates/script/console
@@ -85,6 +86,7 @@ files:
85
86
  - config/hoe.rb
86
87
  - config/requirements.rb
87
88
  - lib/ride.rb
89
+ - lib/std_err_hooks.rb
88
90
  - lib/ride/version.rb
89
91
  - script/console
90
92
  - script/destroy