hop 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/hop.gemspec +1 -1
  2. data/lib/hop/version.rb +1 -1
  3. data/lib/hop.rb +3 -1
  4. metadata +4 -4
data/hop.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Jacob Atzen"]
10
10
  s.email = ["jacob@jacobatzen.dk"]
11
- s.homepage = ""
11
+ s.homepage = "https://github.com/jacobat/hop"
12
12
  s.summary = %q{Shortcut aliases to open from the commandline}
13
13
  s.description = %q{Shortcut aliases to open from the commandline, yay!}
14
14
 
data/lib/hop/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hop
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/hop.rb CHANGED
@@ -39,8 +39,10 @@ class Hop
39
39
  printf("%-16s %s\n", key, bookmark)
40
40
  end
41
41
  else
42
+ parts = ARGV[0].split(//).map{|part| Regexp.escape(part) }
43
+ regex = Regexp.new(/.*#{parts.join('.*')}.*/)
42
44
  urls = bookmarks.keys.select do |u|
43
- u.to_s.match(/.*#{ARGV[0].split(//).join('.*')}.*/)
45
+ u.to_s.match(regex)
44
46
  end
45
47
 
46
48
  if(ARGV[1] &&
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob Atzen
@@ -39,7 +39,7 @@ files:
39
39
  - lib/hop/version.rb
40
40
  - lib/trollop.rb
41
41
  has_rdoc: true
42
- homepage: ""
42
+ homepage: https://github.com/jacobat/hop
43
43
  licenses: []
44
44
 
45
45
  post_install_message: