sanky-pf 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b98fdd94ac6e8f2c111c6650472fecf9f17f6b5
4
- data.tar.gz: 544b96dd9899811afc7c5c8504749a472e90bfdb
3
+ metadata.gz: 12060a4737e5b5875af067b501a0bb42068beac1
4
+ data.tar.gz: a978ea285cab7395aa826d4802baaa6a62b1ce6a
5
5
  SHA512:
6
- metadata.gz: 1972ac5a50d120774373564bf986f61b2d2009b34961805bd0d22988e07e1ec6084735610de8c6fde87ea90b46c96bc965fd8219ac1f678c156095fe3d2f1a92
7
- data.tar.gz: 3fdaf1906a6b96052a01e37b1dacd4716311abe2895d3ade357eeb98d328d39a7efde4a911731481c231199bc05b52c7539abd164a7a0b7bb2556a1dc05b2c03
6
+ metadata.gz: 76b269a1c85f31c8a9effa68530c82e4ad5e8e6d81cb74c384eb86a27e8f3b82a182cc6ead870af20001b11c03656a083cea1452c980b52f6697fa5ad5ac4033
7
+ data.tar.gz: ec02693a80c4fd964f1f5c9fcb78cfd6953b230398f5467d91dfc57966d369b7e79c328915e3fc7b7a3dd788acb35e4f433edd18386226972dd89f99340136d5
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanky-pf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ryan
@@ -54,32 +54,23 @@ executables:
54
54
  extensions: []
55
55
  extra_rdoc_files: []
56
56
  files:
57
- - Gemfile
58
- - Gemfile.lock
59
- - README.md
60
- - Rakefile
61
57
  - bin/sanky-pf
62
- - lib/sanky/pathfinder/finder.rb
63
- - lib/sanky/pathfinder/options.rb
64
- - lib/sanky/pathfinder/runner.rb
65
- - lib/sanky/pathfinder/version.rb
66
- - pkg/sanky-pf-0.0.3.gem
67
- - pkg/sanky-pf-0.0.4.gem
68
- - pkg/sanky-pf-0.0.5.gem
69
- - pkg/sanky-pf-0.0.6.gem
70
- - pkg/sanky-pf-0.0.7.gem
71
- - pkg/sanky-pf-0.0.8.gem
72
- - pkg/sanky-pf-0.0.9.gem
73
- - pkg/sanky-pf-0.1.0.gem
74
- - sanky-pf-0.0.8.gem
75
- - sanky-pf.gemspec
76
- - tags
77
58
  - test/test_finder.rb
78
59
  - test/test_options.rb
79
60
  homepage: https://github.com/sankynet/sankypf
80
61
  licenses: []
81
62
  metadata: {}
82
- post_install_message:
63
+ post_install_message: !ruby/string
64
+ str: "\e[0;32;49m\nYou are on the path, to find sanky files.\n\e[0m"
65
+ color: 2
66
+ background: 9
67
+ mode: 0
68
+ uncolorized: !ruby/string
69
+ str: |2
70
+
71
+ You are on the path, to find sanky files.
72
+ background: 9
73
+ mode: 0
83
74
  rdoc_options: []
84
75
  require_paths:
85
76
  - lib
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
data/Gemfile.lock DELETED
@@ -1,28 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sanky-pf (0.0.8)
5
- colorize
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (3.2.12)
11
- i18n (~> 0.6)
12
- multi_json (~> 1.0)
13
- colorize (0.6.0)
14
- i18n (0.6.4)
15
- multi_json (1.7.1)
16
- shoulda (3.5.0)
17
- shoulda-context (~> 1.0, >= 1.0.1)
18
- shoulda-matchers (>= 1.4.1, < 3.0)
19
- shoulda-context (1.1.6)
20
- shoulda-matchers (2.4.0)
21
- activesupport (>= 3.0.0)
22
-
23
- PLATFORMS
24
- ruby
25
-
26
- DEPENDENCIES
27
- sanky-pf!
28
- shoulda
data/README.md DELETED
@@ -1,9 +0,0 @@
1
- # SANKY PATHFINDER
2
-
3
- Installation is simple:
4
-
5
- `gem install sanky-pf`
6
-
7
- Usage is simple:
8
-
9
- `sanky-pf escaped\ path\ to/file.txt`
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler'
2
- require 'rake/testtask'
3
- Bundler::GemHelper.install_tasks
4
-
5
- Rake::TestTask.new do |t|
6
- t.libs << 'test'
7
- end
8
-
9
- desc "Run tests"
10
- task :default => :test
@@ -1,63 +0,0 @@
1
- require 'colorize'
2
-
3
- module Sanky
4
- module PathFinder
5
- class Finder
6
- def initialize(arguments)
7
- @found = nil
8
- @arguments = arguments
9
- end
10
-
11
- def to_s
12
- @arguments
13
- end
14
-
15
- def convert
16
- @arguments.map! do |original|
17
- set = Hash.new()
18
-
19
- # subsitute windows backslashes for forwardslashes and strip whitespace, add leading forwardslash, and /Volumes prefix
20
- set[:original] = original.strip.gsub(/\\/, "/")
21
-
22
- drive = /.{1,3}:/
23
- # are we talking about sankynet or sanky direct drives here? let's try both.
24
- if original.match(drive)
25
- set[:sanky_net] = set[:original].sub(drive, "/Volumes/SankyNet Drive")
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/")
29
- end
30
-
31
- set.map { |key, value| value.gsub!(/\/\//, "/") }
32
-
33
- set
34
- end
35
-
36
- self
37
- end
38
-
39
- def open
40
- @arguments.each do |target|
41
- target.each do |drive, file|
42
- unless @found
43
- begin
44
- # pipe STDERR to dev null in favor of custom prompt
45
- `open -g '#{file}' > /dev/null 2>/dev/null`
46
- ensure
47
- if $? == 0
48
- @found = true
49
- puts "Opening the file in the background...".yellow
50
- else
51
- puts "Failed to find #{file}!".red
52
- puts "Trying another likely location...".red
53
- end
54
- end
55
- end
56
- end
57
-
58
- puts "Hope you got lucky!".green
59
- end
60
- end
61
- end
62
- end
63
- end
@@ -1,40 +0,0 @@
1
- require 'optparse'
2
-
3
- module Sanky
4
- module PathFinder
5
- class Options
6
- attr_reader :arguments
7
-
8
- def initialize(argv)
9
- parse(argv)
10
- @arguments = argv
11
- end
12
-
13
- private
14
-
15
- def parse(argv)
16
- OptionParser.new do |opts|
17
- opts.banner = "Usage: sanky-pf file [ file ] ..."
18
-
19
- opts.on("-h", "--help", "Show this message") do
20
- puts opts
21
- exit
22
- end
23
-
24
- opts.on("-v", "--version", "Display the package version") do
25
- puts Sanky::PathFinder::VERSION
26
- exit
27
- end
28
-
29
- begin
30
- argv = ["-h"] if argv.empty?
31
- opts.parse!(argv)
32
- rescue OptionParser::ParseError => e
33
- STDERR.puts e.message, "\n", opts
34
- exit(1)
35
- end
36
- end
37
- end
38
- end
39
- end
40
- end
@@ -1,17 +0,0 @@
1
- require_relative 'options'
2
- require_relative 'finder'
3
- require_relative 'version'
4
-
5
- module Sanky
6
- module PathFinder
7
- class Runner
8
- def initialize(argv)
9
- @options = Options.new(argv)
10
- end
11
-
12
- def run
13
- Sanky::PathFinder::Finder.new(@options.arguments).convert.open
14
- end
15
- end
16
- end
17
- end
@@ -1,5 +0,0 @@
1
- module Sanky
2
- module PathFinder
3
- VERSION = "0.1.0"
4
- end
5
- end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/sanky-pf-0.0.8.gem DELETED
Binary file
data/sanky-pf.gemspec DELETED
@@ -1,20 +0,0 @@
1
- require File.expand_path('../lib/sanky/pathfinder/version', __FILE__)
2
-
3
- Gem::Specification.new do |s|
4
- s.name = "sanky-pf"
5
- s.summary = "Open files on the sanky server"
6
- s.description = File.read("./README.md")
7
- s.version = Sanky::PathFinder::VERSION
8
- s.author = "Matt Ryan"
9
- s.email = "m@mrevd.me"
10
- s.homepage = "https://github.com/sankynet/sankypf"
11
- s.platform = Gem::Platform::RUBY
12
- s.required_ruby_version = ">=1.9"
13
- s.files = Dir['**/**']
14
- s.executables = [ "sanky-pf" ]
15
- s.test_files = Dir['test/test*.rb']
16
- s.has_rdoc = false
17
-
18
- s.add_runtime_dependency 'colorize'
19
- s.add_development_dependency 'shoulda'
20
- end
data/tags DELETED
@@ -1,27 +0,0 @@
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