read_source 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +3 -0
- data/lib/read_source/version.rb +1 -1
- data/lib/read_source/vim_source.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336cda1615c6ad734c6d8078a3a7841de8641a33
|
4
|
+
data.tar.gz: 7fa35d043f09e885bb887fff8a7f3300a7fb38c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1156c517b8f865fcaed3bc66bf36d35073b579591349dbaf75b9c934f139abe24b7f7f0f5c5905277800a8a67b0f6daf6463689dceed6e3b11a42fb4eda8dfa
|
7
|
+
data.tar.gz: 8d51cd63a5e7c72679dba678618b914d0cba0d09a95dcab08001fa63d13989f8e49f019fb54c470e60b2276cc5d8330bf3424be6ff72412fc2bda871ba7c60cd
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
# ReadSource
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/read_source.svg)](https://badge.fury.io/rb/read_source)
|
3
|
+
[![Build Status](https://travis-ci.org/danielpclark/read_source.svg?branch=master)](https://travis-ci.org/danielpclark/read_source)
|
4
|
+
[![SayThanks.io](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg)](https://saythanks.io/to/danielpclark)
|
2
5
|
|
3
6
|
Haha! This little gem was a distraction from my duties but I had to make it.
|
4
7
|
|
data/lib/read_source/version.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
# TODO: Save irb history if in irb session.
|
2
|
+
|
1
3
|
module ReadSource
|
2
4
|
module VimSource
|
3
|
-
def vim
|
5
|
+
def vim servername=nil
|
4
6
|
file, line_num = send :source_location
|
5
7
|
read_only = !!/#{ENV["GEM_HOME"]}/.match(file) ? "-M" : ""
|
6
|
-
|
8
|
+
remote = "#{('--servername ' + servername.to_s) if servername} --remote-silent"
|
9
|
+
exec("vim #{remote} %s +%s %s" % [read_only, line_num, file]) if file
|
7
10
|
end
|
8
11
|
end
|
9
12
|
end
|