pry-de 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/,retest ADDED
File without changes
data/.document CHANGED
@@ -1,5 +1,5 @@
1
1
  lib/**/*.rb
2
2
  bin/*
3
- -
3
+ -
4
4
  features/**/*.feature
5
5
  LICENSE.txt
@@ -0,0 +1 @@
1
+ *.gem
data/Gemfile CHANGED
@@ -1,18 +1,9 @@
1
- source 'http://rubygems.org'
1
+ source :rubygems
2
+ gemspec
2
3
 
3
- def hubgem user_repo, branch = 'master'
4
- user, repo = user_repo.split ?/
5
- gem repo, git: "git@github.com:#{user}/#{repo}", branch: branch
6
- end
7
-
8
- hubgem 'pry/pry'
9
- hubgem 'guard/guard', 'interactor/pry'
10
- gem 'pry-full'
4
+ gem 'pry', github: 'pry'
11
5
 
12
- group :development do
13
- gem 'rspec'
14
- gem 'yard'
15
- gem 'rdoc'
16
- gem 'bundler'
17
- gem 'jeweler'
6
+ case RUBY_PLATFORM
7
+ when /linux/i; gem 'rb-inotify'
8
+ when /darwin/i; gem 'rb-fsevent'
18
9
  end
@@ -1,23 +1,19 @@
1
1
  GIT
2
- remote: git@github.com:guard/guard
3
- revision: 2837fbd084b4e8e2127ecea92a50d71fec3e4aa7
4
- branch: interactor/pry
5
- specs:
6
- guard (1.3.2)
7
- listen (>= 0.4.2)
8
- pry
9
- thor (>= 0.14.6)
10
-
11
- GIT
12
- remote: git@github.com:pry/pry
13
- revision: bc4fb838eb48b5fb7419c5f2320e88ec1101e95c
14
- branch: master
2
+ remote: git://github.com/pry/pry.git
3
+ revision: 24d9e486d75c3ec9a17e2ef2b1d88c119edf286f
15
4
  specs:
16
5
  pry (0.9.10)
17
6
  coderay (~> 1.0.5)
18
7
  method_source (~> 0.8)
19
8
  slop (~> 3.3.1)
20
9
 
10
+ PATH
11
+ remote: .
12
+ specs:
13
+ pry-de (0.0.3)
14
+ guard
15
+ pry-full
16
+
21
17
  GEM
22
18
  remote: http://rubygems.org/
23
19
  specs:
@@ -36,22 +32,22 @@ GEM
36
32
  diff-lcs (1.1.3)
37
33
  diffy (2.0.8)
38
34
  eventmachine (1.0.0)
39
- git (1.2.5)
35
+ ffi (1.1.5)
40
36
  grit (2.5.0)
41
37
  diff-lcs (~> 1.1)
42
38
  mime-types (~> 1.15)
43
39
  posix-spawn (~> 0.3.6)
40
+ guard (1.3.3)
41
+ listen (>= 0.4.2)
42
+ thor (>= 0.14.6)
43
+ guard-minitest (0.5.0)
44
+ guard (>= 0.4)
44
45
  highline (1.6.15)
45
- interception (0.1)
46
- jeweler (1.8.4)
47
- bundler (~> 1.0)
48
- git (>= 1.2.5)
49
- rake
50
- rdoc
46
+ interception (0.3)
51
47
  jist (1.0.1)
52
48
  json
53
- json (1.7.3)
54
- listen (0.5.1)
49
+ json (1.7.5)
50
+ listen (0.5.2)
55
51
  method_source (0.8)
56
52
  mime-types (1.19)
57
53
  nokogiri (1.5.5)
@@ -111,19 +107,10 @@ GEM
111
107
  binding_of_caller (~> 0.6.2)
112
108
  pry-syntax-hacks (0.0.6)
113
109
  pry (>= 0.9.8)
114
- pry-theme (0.1.2)
110
+ pry-theme (0.1.3)
115
111
  json
116
- rake (0.9.2.2)
117
- rdoc (3.12)
118
- json (~> 1.4)
119
- rspec (2.11.0)
120
- rspec-core (~> 2.11.0)
121
- rspec-expectations (~> 2.11.0)
122
- rspec-mocks (~> 2.11.0)
123
- rspec-core (2.11.1)
124
- rspec-expectations (2.11.1)
125
- diff-lcs (~> 1.1.3)
126
- rspec-mocks (2.11.1)
112
+ rb-inotify (0.8.8)
113
+ ffi (>= 0.5.0)
127
114
  slop (3.3.3)
128
115
  thor (0.16.0)
129
116
  yard (0.8.2.1)
@@ -132,11 +119,7 @@ PLATFORMS
132
119
  ruby
133
120
 
134
121
  DEPENDENCIES
135
- bundler
136
- guard!
137
- jeweler
122
+ guard-minitest
138
123
  pry!
139
- pry-full
140
- rdoc
141
- rspec
142
- yard
124
+ pry-de!
125
+ rb-inotify
@@ -0,0 +1,11 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'minitest' do
5
+ watch %r|^test/.*\/?test_.*\.rb|
6
+ watch %r|^lib/pry-de/([^/]+)\.rb| do |m| "test/test_#{m[1]}.rb" end
7
+ watch %r|^lib/pry-de.rb| do |m| "test/test_pry_de.rb" end
8
+ watch %r|^test/test_helper\.rb| do 'test' end
9
+ end
10
+
11
+ # vim:ft=ruby
@@ -1,20 +1 @@
1
- Copyright (c) 2012 ☈king
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyleft () 2012 ☈king — Absolutely CC0 / Public Domain / Whateverness.
@@ -1,6 +1,5 @@
1
- = pry-de
1
+ # pry-de
2
2
 
3
3
  Run-time Ruby Development Environment based on Pry. [Maturity: Infantile]
4
4
 
5
5
  See: https://github.com/pry/pry/wiki/pry-de
6
-
data/Rakefile CHANGED
@@ -1,49 +1,11 @@
1
1
  # encoding: utf-8
2
+ require 'bundler/gem_tasks'
2
3
 
3
- task :'pry-de' do
4
- sh *%w(bundle exec pry -Ilib -rpry-de) + ARGV[1..-1]
5
- end
6
-
7
- require 'bundler'
8
- begin
9
- Bundler.setup(:default, :development)
10
- rescue Bundler::BundlerError => e
11
- $stderr.puts e.message
12
- $stderr.puts "Run `bundle install` to install missing gems"
13
- exit e.status_code
14
- end
15
- require 'rake'
16
-
17
- require 'jeweler'
18
- Jeweler::Tasks.new do |gem|
19
- gem.name = 'pry-de'
20
- gem.homepage = 'http://github.com/rking/pry-de'
21
- gem.license = 'CC0'
22
- gem.summary = %Q{Run-time Ruby Development Environment based on Pry. [Maturity: Fœtal. Only use if you're adventurous]}
23
- gem.description = %Q{For the concept, see: https://github.com/pry/pry/wiki/pry-de}
24
- gem.email = 'pry-de@sharpsaw.org'
25
- gem.authors = ['☈king', 'Banisterfiend']
26
- end
27
- Jeweler::RubygemsDotOrgTasks.new
28
-
29
- task :default => :spec
30
-
31
- require 'rspec/core'
32
- require 'rspec/core/rake_task'
33
- RSpec::Core::RakeTask.new(:spec) do |spec|
34
- spec.pattern = FileList['spec/**/*_spec.rb']
35
- end
36
-
37
- RSpec::Core::RakeTask.new(:rcov) do |spec|
38
- spec.pattern = 'spec/**/*_spec.rb'
39
- spec.rcov = true
4
+ task default: :test
5
+ task :test do
6
+ sh 'testrb test'
40
7
  end
41
8
 
42
- #require 'yard'
43
- #YARD::Rake::YardocTask.new
44
-
45
- task :install do
46
- Rake::Task['gemspec'].invoke
47
- sh 'gem build *.gemspec'
48
- sh 'gem install *.gem'
9
+ task :'pry-de' do
10
+ sh *%w(bundle exec pry -Ilib -rpry-de) + ARGV[1..-1]
49
11
  end
@@ -0,0 +1,2 @@
1
+ class Pry::HistoryArray; def inspect; to_a …? end end
2
+ clipit doesn't add "\n"
@@ -2,10 +2,16 @@ require 'pry'
2
2
 
3
3
  module PryDe
4
4
 
5
+ def self.version_warny_input_pop _pry_
6
+ fail 'Newer (possibly Github) pry needed' unless
7
+ _pry_.input_array.respond_to? :pop!
8
+ _pry_.input_array.pop!
9
+ end
10
+
5
11
  Commands = Pry::CommandSet.new do
6
12
  def psuedo_alias dest, src
7
13
  command dest, "Alias for `#{src}`" do
8
- run src
14
+ run src + ' ' + arg_string
9
15
  end
10
16
  end
11
17
  # pry-debugger shortcuts:
@@ -32,9 +38,7 @@ module PryDe
32
38
 
33
39
  command ',-',
34
40
  'Remove last item from history, in preparation for a `play` command' do
35
- fail 'Newer (possibly Github) pry needed' unless
36
- _pry_.input_array.respond_to? :pop!
37
- _pry_.input_array.pop!
41
+ PryDe.version_warny_input_pop _pry_
38
42
  end
39
43
 
40
44
  command ',m', 'play method body only' do
@@ -46,13 +50,12 @@ module PryDe
46
50
  command ',lib', 'edit lib/' do
47
51
  run 'edit lib/'
48
52
  IO.popen('git status --porcelain -- lib').readlines.each do |dirty|
49
- load dirty.split(' ').last
53
+ entry = dirty.split(' ').last
54
+ load entry if File.file? entry
50
55
  end
51
56
  end
52
57
 
53
- command ',r', 'Rerun previous command, like "r" in zsh' do
54
- run 'history --replay -1'
55
- end
58
+ # alias_command ',r', 'hist --replay -1'
56
59
 
57
60
  command '?$', 'show-doc + show-source' do
58
61
  begin
@@ -65,13 +68,6 @@ module PryDe
65
68
 
66
69
  # TODO: ,clip ⇒ cat -i; clipit -i $stdin.readline.chomp
67
70
 
68
- command /(.+,;.+)/ do |line|
69
- cmds = line.split /\s*,;\s*/
70
- cmds.each do |cmd|
71
- run cmd
72
- end
73
- end
74
-
75
71
  # ,, aliases all the ",cmd"s to "cmd". Undo with a second ",,"
76
72
  # I'll promise not to use x and y, so they can always be metasyntactic.
77
73
  # …but the rest are fair game.
@@ -86,7 +82,7 @@ module PryDe
86
82
  Pry.commands.alias_command terse, e
87
83
  abbreviations << terse
88
84
  end
89
- command ',,', 'unsplat all ,-commands' do
85
+ Pry.commands.command ',,', 'unsplat all ,-commands' do
90
86
  abbreviations.each do |too_terse|
91
87
  Pry.commands.delete too_terse
92
88
  end
@@ -0,0 +1,9 @@
1
+ module PryDe
2
+ class BacktraceEdit
3
+ def self.parse_line input
4
+ r = Hash[[:file, :line, :method, :error].zip(input.split(?:))]
5
+ r[:method].sub! /^in `(.+)'$/, '\1'
6
+ r
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module PryDe
2
+ VERSION = '0.0.3'
3
+ end
@@ -1,73 +1,23 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # encoding: utf-8
2
+ lib = File.expand_path '../lib', __FILE__
3
+ $:.unshift lib unless $:.include? lib
4
+ require 'pry-de/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "pry-de"
8
- s.version = "0.0.2"
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'pry-de'
8
+ gem.homepage = 'http://github.com/rking/pry-de'
9
+ gem.summary = %Q{Run-time Ruby Development Environment based on Pry. [Maturity: Fœtal. Only use if you're adventurous]}
10
+ gem.description = %Q{For the concept, see: https://github.com/pry/pry/wiki/pry-de}
11
+ gem.version = PryDe::VERSION
12
+ gem.license = 'CC0'
13
+ gem.email = 'pry-de@sharpsaw.org'
14
+ gem.authors = %w(☈king Banisterfiend)
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["\u{2608}king", "Banisterfiend"]
12
- s.date = "2012-09-25"
13
- s.description = "For the concept, see: https://github.com/pry/pry/wiki/pry-de"
14
- s.email = "pry-de@sharpsaw.org"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rspec",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "lib/pry-de.rb",
29
- "pry-de.gemspec",
30
- "spec/pry-de_spec.rb",
31
- "spec/spec_helper.rb",
32
- "vim/pry-de.vim"
33
- ]
34
- s.homepage = "http://github.com/rking/pry-de"
35
- s.licenses = ["CC0"]
36
- s.require_paths = ["lib"]
37
- s.rubygems_version = "1.8.24"
38
- s.summary = "Run-time Ruby Development Environment based on Pry. [Maturity: F\u{153}tal. Only use if you're adventurous]"
39
-
40
- if s.respond_to? :specification_version then
41
- s.specification_version = 3
42
-
43
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
- s.add_runtime_dependency(%q<pry>, [">= 0"])
45
- s.add_runtime_dependency(%q<guard>, [">= 0"])
46
- s.add_runtime_dependency(%q<pry-full>, [">= 0"])
47
- s.add_development_dependency(%q<rspec>, [">= 0"])
48
- s.add_development_dependency(%q<yard>, [">= 0"])
49
- s.add_development_dependency(%q<rdoc>, [">= 0"])
50
- s.add_development_dependency(%q<bundler>, [">= 0"])
51
- s.add_development_dependency(%q<jeweler>, [">= 0"])
52
- else
53
- s.add_dependency(%q<pry>, [">= 0"])
54
- s.add_dependency(%q<guard>, [">= 0"])
55
- s.add_dependency(%q<pry-full>, [">= 0"])
56
- s.add_dependency(%q<rspec>, [">= 0"])
57
- s.add_dependency(%q<yard>, [">= 0"])
58
- s.add_dependency(%q<rdoc>, [">= 0"])
59
- s.add_dependency(%q<bundler>, [">= 0"])
60
- s.add_dependency(%q<jeweler>, [">= 0"])
61
- end
62
- else
63
- s.add_dependency(%q<pry>, [">= 0"])
64
- s.add_dependency(%q<guard>, [">= 0"])
65
- s.add_dependency(%q<pry-full>, [">= 0"])
66
- s.add_dependency(%q<rspec>, [">= 0"])
67
- s.add_dependency(%q<yard>, [">= 0"])
68
- s.add_dependency(%q<rdoc>, [">= 0"])
69
- s.add_dependency(%q<bundler>, [">= 0"])
70
- s.add_dependency(%q<jeweler>, [">= 0"])
71
- end
16
+ gem.files = `git ls-files`.split $/
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename f }
18
+ gem.test_files = gem.files.grep %r{^(test|spec|features)/}
19
+ gem.require_paths = %w(lib)
20
+ %w(pry-full guard).each do |dep| gem.add_dependency dep end
21
+ %w(guard-minitest).each do |dep|
22
+ gem.add_development_dependency dep end
72
23
  end
73
-
@@ -0,0 +1,17 @@
1
+ require 'test_helper'
2
+
3
+ require 'pry-de/backtrace_edit'
4
+
5
+ class TestBacktraceEdit < MiniTest::Unit::TestCase
6
+ def test_first_line_parse
7
+ input = '/blah/src/scrap/foo.rb:4:in `jump\': foo (RuntimeError)'
8
+ expected = {
9
+ file: '/blah/src/scrap/foo.rb',
10
+ line: '4',
11
+ method: 'jump',
12
+ error: ' foo (RuntimeError)'
13
+ }
14
+ actual = PryDe::BacktraceEdit.parse_line input
15
+ assert_equal expected, actual
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ #require 'pry-rescue'
2
+ require 'minitest/unit'
3
+ $:.unshift './lib'
4
+ #Pry.rescue do
5
+ #begin
6
+ MiniTest::Unit.autorun
7
+ #rescue SystemExit => e
8
+ #p e
9
+ #end
10
+ #end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+ require 'pry-de/backtrace_edit'
3
+
4
+ class TestBacktraceEdit < MiniTest::Unit::TestCase
5
+ def test_first_line_parse
6
+ input = '/blah/src/scrap/foo.rb:4:in `jump\': foo (RuntimeError)'
7
+ expected = {
8
+ file: '/blah/src/scrap/foo.rb',
9
+ line: '4',
10
+ method: 'jump',
11
+ error: ' foo (RuntimeError)'
12
+ }
13
+ actual = PryDe::BacktraceEdit.parse_line input
14
+ assert_equal expected, actual
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ " Add this as ~/.vim/ftplugin/ruby_pry-de.vim (and make sure you've done:
2
+ " filetype plugin on
3
+ " in your vim startup files.
4
+
5
+ " Add the pry debug line with \\p (or <Space><Space>p, if you mapped it)
6
+ map <Leader><Leader>p orequire 'pry';binding.pry<esc>:w<cr>
7
+ " …also, allow bpry<space> (or bpry<C-]>) from Insert Mode:
8
+ iabbr bpry require 'pry';binding.pry
9
+
10
+ " Nab the last line from ~/.pry_history.
11
+ map <leader>pry1 o<esc>:.!tail -1 ~/.pry_history<cr>==
12
+
13
+ " Recommended: Play with tslime.vim, vimux, et. al.
14
+ " I plan to really work out a good flow with the best parts of those, and put
15
+ " it here. In the meantime, these paltry snippets will have to do. ☹
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-de
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,10 +10,10 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-25 00:00:00.000000000 Z
13
+ date: 2012-10-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: pry
16
+ name: pry-full
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
@@ -45,87 +45,7 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: pry-full
49
- requirement: !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- - !ruby/object:Gem::Dependency
64
- name: rspec
65
- requirement: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- type: :development
72
- prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
79
- - !ruby/object:Gem::Dependency
80
- name: yard
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ! '>='
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- type: :development
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
96
- name: rdoc
97
- requirement: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- type: :development
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: bundler
113
- requirement: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- - !ruby/object:Gem::Dependency
128
- name: jeweler
48
+ name: guard-minitest
129
49
  requirement: !ruby/object:Gem::Requirement
130
50
  none: false
131
51
  requirements:
@@ -144,23 +64,28 @@ description: ! 'For the concept, see: https://github.com/pry/pry/wiki/pry-de'
144
64
  email: pry-de@sharpsaw.org
145
65
  executables: []
146
66
  extensions: []
147
- extra_rdoc_files:
148
- - LICENSE.txt
149
- - README.rdoc
67
+ extra_rdoc_files: []
150
68
  files:
69
+ - ! ',refactor'
70
+ - ! ',retest'
151
71
  - .document
152
- - .rspec
72
+ - .gitignore
153
73
  - Gemfile
154
74
  - Gemfile.lock
75
+ - Guardfile
155
76
  - LICENSE.txt
156
- - README.rdoc
77
+ - README.md
157
78
  - Rakefile
79
+ - TODO-Pry
158
80
  - VERSION
159
81
  - lib/pry-de.rb
82
+ - lib/pry-de/backtrace_edit.rb
83
+ - lib/pry-de/version.rb
160
84
  - pry-de.gemspec
161
- - spec/pry-de_spec.rb
162
- - spec/spec_helper.rb
163
- - vim/pry-de.vim
85
+ - test/test_backtrace_edit.rb
86
+ - test/test_helper.rb
87
+ - test/test_pry_de.rb
88
+ - vim/ftplugin/ruby_pry-de.vim
164
89
  homepage: http://github.com/rking/pry-de
165
90
  licenses:
166
91
  - CC0
@@ -174,9 +99,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
99
  - - ! '>='
175
100
  - !ruby/object:Gem::Version
176
101
  version: '0'
177
- segments:
178
- - 0
179
- hash: 2228762582552018732
180
102
  required_rubygems_version: !ruby/object:Gem::Requirement
181
103
  none: false
182
104
  requirements:
@@ -190,5 +112,8 @@ signing_key:
190
112
  specification_version: 3
191
113
  summary: ! 'Run-time Ruby Development Environment based on Pry. [Maturity: Fœtal.
192
114
  Only use if you''re adventurous]'
193
- test_files: []
115
+ test_files:
116
+ - test/test_backtrace_edit.rb
117
+ - test/test_helper.rb
118
+ - test/test_pry_de.rb
194
119
  has_rdoc:
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1,5 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe 'PryDe' do
4
-
5
- end
@@ -1,11 +0,0 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
- require 'pry-de'
5
-
6
- # Requires supporting files with custom matchers and macros, etc,
7
- # in ./support/ and its subdirectories.
8
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
-
10
- RSpec.configure do |config|
11
- end
@@ -1,63 +0,0 @@
1
- " Tslime.vim. Send portion of buffer to tmux instance
2
- " Maintainer: C.Coutinho <kikijump [at] gmail [dot] com>
3
- " Licence: DWTFYWTPL
4
-
5
- if exists("g:tslime_loaded")
6
- finish
7
- endif
8
-
9
- let g:tslime_loaded = 1
10
-
11
- " Main function.
12
- " Use it in your script if you want to send text to a tmux session.
13
- function! Send_to_Tmux(text)
14
- if !exists("b:tmux_sessionname") || !exists("b:tmux_windowname") || !exists("b:tmux_panenumber")
15
- if exists("g:tmux_sessionname") && exists("g:tmux_windowname") && exist("g:tmux_panenumber")
16
- let b:tmux_sessionname = g:tmux_sessionname
17
- let b:tmux_windowname = g:tmux_windowname
18
- let b:tmux_panenumber = g:tmux_panenumber
19
- else
20
- call <SID>Tmux_Vars()
21
- end
22
- end
23
-
24
- let target = b:tmux_sessionname . ":" . b:tmux_windowname . "." . b:tmux_panenumber
25
-
26
- call system("tmux set-buffer '" . substitute(a:text, "'", "'\\\\''", 'g') . "'" )
27
- call system("tmux paste-buffer -t " . target)
28
- endfunction
29
-
30
- " Session completion
31
- function! Tmux_Session_Names(A,L,P)
32
- return system("tmux list-sessions | sed -e 's/:.*$//'")
33
- endfunction
34
-
35
- " Window completion
36
- function! Tmux_Window_Names(A,L,P)
37
- return system("tmux list-windows -t" . b:tmux_sessionname . ' | grep -e "^\w:" | sed -e "s/ \[[0-9x]*\]$//"')
38
- endfunction
39
-
40
- " Pane completion
41
- function! Tmux_Pane_Numbers(A,L,P)
42
- return system("tmux list-panes -t " . b:tmux_sessionname . ":" . b:tmux_windowname . " | sed -e 's/:.*$//'")
43
- endfunction
44
-
45
- " set tslime.vim variables
46
- function! s:Tmux_Vars()
47
- let b:tmux_sessionname = input("session name: ", "", "custom,Tmux_Session_Names")
48
- let b:tmux_windowname = substitute(input("window name: ", "", "custom,Tmux_Window_Names"), ":.*$" , '', 'g')
49
- let b:tmux_panenumber = input("pane number: ", "", "custom,Tmux_Pane_Numbers")
50
-
51
- if !exists("g:tmux_sessionname") || !exists("g:tmux_windowname") || !exists("g:tmux_panenumber")
52
- let g:tmux_sessionname = b:tmux_sessionname
53
- let g:tmux_windowname = b:tmux_windowname
54
- let g:tmux_panenumber = b:tmux_panenumber
55
- end
56
- endfunction
57
-
58
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
59
-
60
- vmap <C-c><C-c> "ry :call Send_to_Tmux(@r)<CR>
61
- nmap <C-c><C-c> vip<C-c><C-c>
62
-
63
- nmap <C-c>v :call <SID>Tmux_Vars()<CR>