hop 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -0
- data/lib/hop/version.rb +1 -1
- data/lib/hop.rb +9 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -52,6 +52,21 @@ And Hop will... well, you get the point.
|
|
52
52
|
|
53
53
|
And that's all there is to it. Enjoy!
|
54
54
|
|
55
|
+
Installation
|
56
|
+
------------
|
57
|
+
|
58
|
+
gem install hop
|
59
|
+
|
60
|
+
Or something to that effect. Requires Ruby and Rubygems.
|
61
|
+
|
62
|
+
Configuration
|
63
|
+
-------------
|
64
|
+
|
65
|
+
By default hop will store bookmarks in a .hop directory within your home
|
66
|
+
directory. This can be changed if you want by adding a config.yml file
|
67
|
+
in ~/.hop with the following contents:
|
68
|
+
|
69
|
+
bookmarks: /path/to/bookmarks.yml
|
55
70
|
|
56
71
|
Inspiration
|
57
72
|
-----------
|
data/lib/hop/version.rb
CHANGED
data/lib/hop.rb
CHANGED
@@ -3,6 +3,14 @@ require 'trollop'
|
|
3
3
|
|
4
4
|
class Hop
|
5
5
|
class << self
|
6
|
+
def default_config
|
7
|
+
{ 'bookmarks' => File.join(ENV['HOME'], '.hop', 'bookmarks.yml') }
|
8
|
+
end
|
9
|
+
|
10
|
+
def config
|
11
|
+
@config ||= YAML::load_file(File.join(ENV['HOME'], '.hop', 'config.yml')) || default_config
|
12
|
+
end
|
13
|
+
|
6
14
|
def run
|
7
15
|
ARGV[0] = '-h' unless ARGV[0]
|
8
16
|
opts = Trollop::options do
|
@@ -12,7 +20,7 @@ class Hop
|
|
12
20
|
opt :list
|
13
21
|
end
|
14
22
|
|
15
|
-
$bookmarks_file = File.
|
23
|
+
$bookmarks_file = File.expand_path(config['bookmarks'])
|
16
24
|
|
17
25
|
bookmarks = {}
|
18
26
|
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jacob Atzen
|