longjump 0.1.0 → 0.1.1
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/Gemfile.lock +3 -3
- data/README.md +28 -3
- data/lib/longjump/opener.rb +1 -0
- data/lib/longjump/version.rb +1 -1
- data/longjump.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35536b6c6cce563749d8c734274598cad6cc7268ae120c63c7990c573f368920
|
|
4
|
+
data.tar.gz: c4c3ac8e99a527ea96bb6f6db5d9393cab4b93e7b66406c7b6cc57d37cecda33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25f788444f396e18c950b66367fd6a340847d406d58df6740a9c10f51f2f5036c76f2e189032887680dbdb07fccb03308d0b947c14a1137cdafd23bb7d1aab87
|
|
7
|
+
data.tar.gz: 5f5914fb866b67ce4467dadd7cb1822e7a14fdfcf4e5a578930351509ca1d57981b053921aec6d8a23254727336802bd0e6ce9353019f7ff015619ac425ab7b7
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
longjump (0.1.
|
|
4
|
+
longjump (0.1.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
minitest (5.14.4)
|
|
10
10
|
mocha (1.13.0)
|
|
11
|
-
rake (
|
|
11
|
+
rake (13.0.6)
|
|
12
12
|
|
|
13
13
|
PLATFORMS
|
|
14
14
|
ruby
|
|
@@ -18,7 +18,7 @@ DEPENDENCIES
|
|
|
18
18
|
longjump!
|
|
19
19
|
minitest (~> 5.0)
|
|
20
20
|
mocha (~> 1.13)
|
|
21
|
-
rake (~>
|
|
21
|
+
rake (~> 13.0)
|
|
22
22
|
|
|
23
23
|
BUNDLED WITH
|
|
24
24
|
1.17.2
|
data/README.md
CHANGED
|
@@ -20,9 +20,9 @@ Gems that contain jumpers begin with `longjumper`.
|
|
|
20
20
|
|
|
21
21
|
Remembering URI's is hard - and is mostly solved with tools like browser bookmarks. But there are still situations where a command-line launcher that generates URI's and opens them is useful. A few examples:
|
|
22
22
|
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* **Jump to a URL in a development environment**, where the environment's base URL is dynamic. You want something like `longjump myproject admin` to take you to the admin URL for your project, regardless of which environment you're currently using.
|
|
24
|
+
* **Open some internal tool with context** - maybe feeding a username into a URL structure with something like `longjump directory alex`.
|
|
25
|
+
* **Quickly jump from command line to a URL**, even if it's static.
|
|
26
26
|
|
|
27
27
|
## Writing Your Longjumper
|
|
28
28
|
|
|
@@ -62,6 +62,31 @@ def default_uri
|
|
|
62
62
|
end
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
### More than URL's
|
|
66
|
+
|
|
67
|
+
Longjump can open URI's in applications, not just URL's in browsers. Here is an example of a Spotify jumper:
|
|
68
|
+
|
|
69
|
+
```ruby
|
|
70
|
+
module Longjump
|
|
71
|
+
module Jumpers
|
|
72
|
+
class Spotify < Base
|
|
73
|
+
command :spotify
|
|
74
|
+
description "Just a demo with Spotify"
|
|
75
|
+
|
|
76
|
+
subcommand :gn, uri: "spotify:album:1do9XXkq2SLwDV7vsEjtjg"
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
For inspiration, here are some URI schemes to consider:
|
|
83
|
+
|
|
84
|
+
* discord
|
|
85
|
+
* postgres
|
|
86
|
+
* redis
|
|
87
|
+
* slack
|
|
88
|
+
* zoommtg
|
|
89
|
+
|
|
65
90
|
## Development
|
|
66
91
|
|
|
67
92
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/longjump/opener.rb
CHANGED
data/lib/longjump/version.rb
CHANGED
data/longjump.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.require_paths = ["lib"]
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.17"
|
|
24
|
-
spec.add_development_dependency "rake", "~>
|
|
24
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
|
25
25
|
spec.add_development_dependency "minitest", "~> 5.0"
|
|
26
26
|
spec.add_development_dependency "mocha", "~> 1.13"
|
|
27
27
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: longjump
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Watt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '13.0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '13.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: minitest
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
requirements: []
|
|
112
|
-
rubygems_version: 3.0.3
|
|
112
|
+
rubygems_version: 3.0.3.1
|
|
113
113
|
signing_key:
|
|
114
114
|
specification_version: 4
|
|
115
115
|
summary: Jump to URI's deep inside applications.
|