sanky-pf 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/lib/sanky/pathfinder/finder.rb +8 -4
- data/lib/sanky/pathfinder/version.rb +1 -1
- data/pkg/sanky-pf-0.0.5.gem +0 -0
- data/tags +27 -0
- data/test/test_finder.rb +16 -10
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9a288ce101758705b80d0e3e580d2208ab4ccc5
|
4
|
+
data.tar.gz: 46110b89050167e5b51d9c410d72bd47ddf536a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68ee50cefd2f34f1ce4c4636d44f1667151eca854670a8f4d5933399b751b45907d2d6a5b3755fc41577a774cdbf7b65f4535c18b9cc1d9397683e57b8b4258
|
7
|
+
data.tar.gz: 1878f31d443a00e33b7176440d6264d869873220ab4a8f4bf1a486c07cec0cb17568ec993195606b70fdb84a02c3437eb01d0b67d9afc592a5443bd29cc0d779
|
@@ -4,7 +4,7 @@ module Sanky
|
|
4
4
|
module PathFinder
|
5
5
|
class Finder
|
6
6
|
def initialize(arguments)
|
7
|
-
@found
|
7
|
+
@found = nil
|
8
8
|
@arguments = arguments
|
9
9
|
end
|
10
10
|
|
@@ -16,16 +16,20 @@ module Sanky
|
|
16
16
|
@arguments.map! do |original|
|
17
17
|
set = Hash.new()
|
18
18
|
|
19
|
-
# subsitute windows backslashes for forwardslashes and strip whitespace, add leading forwardslash
|
19
|
+
# subsitute windows backslashes for forwardslashes and strip whitespace, add leading forwardslash, and /Volumes prefix
|
20
20
|
set[:original] = original.strip.gsub(/\\/, "/")
|
21
21
|
|
22
22
|
drive = /.{1,3}:/
|
23
|
-
# are we talking about sankynet or sanky direct drives here?
|
23
|
+
# are we talking about sankynet or sanky direct drives here? let's try both.
|
24
24
|
if original.match(drive)
|
25
|
-
set[:sanky_net]
|
25
|
+
set[:sanky_net] = set[:original].sub(drive, "/Volumes/SankyNet Drive")
|
26
26
|
set[:sanky_direct] = set[:original].sub(drive, "/Volumes/Sanky Direct Drive/Sanky Shared")
|
27
|
+
else
|
28
|
+
set[:volume] = set[:original].sub(/^(?!\/Volumes)/i, "/Volumes/")
|
27
29
|
end
|
28
30
|
|
31
|
+
set.map { |key, value| value.gsub!(/\/\//, "/") }
|
32
|
+
|
29
33
|
set
|
30
34
|
end
|
31
35
|
|
data/pkg/sanky-pf-0.0.5.gem
CHANGED
Binary file
|
data/tags
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.8 //
|
7
|
+
Finder lib/sanky/pathfinder/finder.rb /^ class Finder$/;" c class:Sanky.PathFinder
|
8
|
+
Options lib/sanky/pathfinder/options.rb /^ class Options$/;" c class:Sanky.PathFinder
|
9
|
+
PathFinder lib/sanky/pathfinder/finder.rb /^ module PathFinder$/;" m class:Sanky
|
10
|
+
PathFinder lib/sanky/pathfinder/options.rb /^ module PathFinder$/;" m class:Sanky
|
11
|
+
PathFinder lib/sanky/pathfinder/runner.rb /^ module PathFinder$/;" m class:Sanky
|
12
|
+
PathFinder lib/sanky/pathfinder/version.rb /^ module PathFinder$/;" m class:Sanky
|
13
|
+
Runner lib/sanky/pathfinder/runner.rb /^ class Runner$/;" c class:Sanky.PathFinder
|
14
|
+
Sanky lib/sanky/pathfinder/finder.rb /^module Sanky$/;" m
|
15
|
+
Sanky lib/sanky/pathfinder/options.rb /^module Sanky$/;" m
|
16
|
+
Sanky lib/sanky/pathfinder/runner.rb /^module Sanky$/;" m
|
17
|
+
Sanky lib/sanky/pathfinder/version.rb /^module Sanky$/;" m
|
18
|
+
TestFinder test/test_finder.rb /^class TestFinder < Test::Unit::TestCase$/;" c
|
19
|
+
TestOptions test/test_options.rb /^class TestOptions < Test::Unit::TestCase$/;" c
|
20
|
+
convert lib/sanky/pathfinder/finder.rb /^ def convert$/;" f class:Sanky.PathFinder.Finder
|
21
|
+
initialize lib/sanky/pathfinder/finder.rb /^ def initialize(arguments)$/;" f class:Sanky.PathFinder.Finder
|
22
|
+
initialize lib/sanky/pathfinder/options.rb /^ def initialize(argv)$/;" f class:Sanky.PathFinder.Options
|
23
|
+
initialize lib/sanky/pathfinder/runner.rb /^ def initialize(argv)$/;" f class:Sanky.PathFinder.Runner
|
24
|
+
open lib/sanky/pathfinder/finder.rb /^ def open$/;" f class:Sanky.PathFinder.Finder
|
25
|
+
parse lib/sanky/pathfinder/options.rb /^ def parse(argv)$/;" f class:Sanky.PathFinder.Options
|
26
|
+
run lib/sanky/pathfinder/runner.rb /^ def run$/;" f class:Sanky.PathFinder.Runner
|
27
|
+
to_s lib/sanky/pathfinder/finder.rb /^ def to_s$/;" f class:Sanky.PathFinder.Finder
|
data/test/test_finder.rb
CHANGED
@@ -17,20 +17,26 @@ class TestFinder < Test::Unit::TestCase
|
|
17
17
|
should "include arguements" do
|
18
18
|
assert_equal @args, @finder.to_s
|
19
19
|
end
|
20
|
-
|
20
|
+
end
|
21
21
|
|
22
22
|
context "conversion" do
|
23
23
|
should "properly parse paths" do
|
24
24
|
expected_results = [
|
25
|
-
{ :original
|
26
|
-
|
27
|
-
|
28
|
-
{ :original
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
:
|
33
|
-
|
25
|
+
{ :original=>"/test/doc1.txt",
|
26
|
+
:volume=>"/Volumes/test/doc1.txt" },
|
27
|
+
|
28
|
+
{ :original=>"test/doc2.txt",
|
29
|
+
:volume=>"/Volumes/test/doc2.txt" },
|
30
|
+
|
31
|
+
{ :original=>"volumes/doc3.txt",
|
32
|
+
:volume=>"/Volumes/volumes/doc3.txt" },
|
33
|
+
|
34
|
+
{ :original=>"/Volumes/doc4.txt",
|
35
|
+
:volume=>"/Volumes/doc4.txt" },
|
36
|
+
|
37
|
+
{ :original=>"L:/CCBQ/0-HTML-CCBQ/Email/2013/2013-12-11_CCBQ_Holiday_Appeal-2",
|
38
|
+
:sanky_net=> "/Volumes/SankyNet Drive/CCBQ/0-HTML-CCBQ/Email/2013/2013-12-11_CCBQ_Holiday_Appeal-2",
|
39
|
+
:sanky_direct=> "/Volumes/Sanky Direct Drive/Sanky Shared/CCBQ/0-HTML-CCBQ/Email/2013/2013-12-11_CCBQ_Holiday_Appeal-2" }
|
34
40
|
]
|
35
41
|
|
36
42
|
assert_equal expected_results, @finder.convert.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanky-pf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Ryan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- Rakefile
|
68
68
|
- README.md
|
69
69
|
- sanky-pf.gemspec
|
70
|
+
- tags
|
70
71
|
- test/test_finder.rb
|
71
72
|
- test/test_options.rb
|
72
73
|
homepage: https://github.com/sankynet/sankypf
|