leif 0.0.1 → 0.0.2
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/README.md +5 -11
- data/bin/leif +16 -7
- data/leif.gemspec +3 -1
- data/lib/leif/version.rb +1 -1
- data/man/leif.1 +32 -0
- data/man/leif.1.html +109 -0
- data/man/leif.1.ronn +26 -0
- metadata +18 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1797138f211bfbb414f907b9b2ec4b03341e14a0
|
|
4
|
+
data.tar.gz: 596ebf85889c706e6681435e2311f4aa6a04f0bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 371586765c6584c61486ccdfaeeca69268c6738acac464fef4197aac8c7ad9a0bb8704a897f8b171ac8c4f1d405675100ea8b37c6c119f45164f6bb8486ff373
|
|
7
|
+
data.tar.gz: 09852a6c60e78b330e16632b18c8207c58d01a19d9e43822ece83e12c7d307d54fb202774ff0d3bc5678dfe6aef889231d7ff0a7922a2f56f49f3e2db667c931
|
data/README.md
CHANGED
|
@@ -2,23 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
A hypermedia browser for the CloudApp Collection+JSON API.
|
|
4
4
|
|
|
5
|
-
## Commands
|
|
5
|
+
## Interactive Commands
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
r
|
|
9
|
-
root
|
|
7
|
+
- `root`:
|
|
10
8
|
Go back to the root
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
follow <rel>
|
|
10
|
+
- `follow` <u>rel</u>:
|
|
14
11
|
Follow link with the given relation.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
basic <username> [<password>]
|
|
13
|
+
- `basic` <u>username</u> [<u>password</u>]:
|
|
18
14
|
Authenticate with HTTP Basic and reload the current resource. Will be
|
|
19
15
|
prompted for password if it is omitted.
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
token <token>
|
|
17
|
+
- `token` <u>token</u>:
|
|
23
18
|
Authenticate using the given token and reload the current resource.
|
|
24
|
-
```
|
data/bin/leif
CHANGED
|
@@ -106,12 +106,8 @@ def print_response
|
|
|
106
106
|
out.print_lines JSON.pretty_generate(@response.body).lines
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
section '
|
|
110
|
-
|
|
111
|
-
out.print 'Re-request using HTTP Basic Auth'
|
|
112
|
-
end
|
|
113
|
-
out.print "Links: #{link_relations}" unless link_relations.empty?
|
|
114
|
-
out.print 'Go to root'
|
|
109
|
+
section 'Links' do |out|
|
|
110
|
+
out.print link_relations unless link_relations.empty?
|
|
115
111
|
end
|
|
116
112
|
end
|
|
117
113
|
|
|
@@ -136,7 +132,20 @@ def follow_link(relation = :ask)
|
|
|
136
132
|
end
|
|
137
133
|
|
|
138
134
|
def print_help
|
|
139
|
-
puts
|
|
135
|
+
puts <<EOS
|
|
136
|
+
root:
|
|
137
|
+
Go back to the root
|
|
138
|
+
|
|
139
|
+
follow <rel>:
|
|
140
|
+
Follow link with the given relation.
|
|
141
|
+
|
|
142
|
+
basic <username> [<password>]:
|
|
143
|
+
Authenticate with HTTP Basic and reload the current resource. Will be
|
|
144
|
+
prompted for password if it is omitted.
|
|
145
|
+
|
|
146
|
+
token <token>:
|
|
147
|
+
Authenticate using the given token and reload the current resource.
|
|
148
|
+
EOS
|
|
140
149
|
end
|
|
141
150
|
|
|
142
151
|
def get_next_action
|
data/leif.gemspec
CHANGED
|
@@ -15,13 +15,15 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
spec.add_dependency 'faraday', '~> 0.8.8'
|
|
16
16
|
spec.add_dependency 'faraday_middleware', '~> 0.9.0'
|
|
17
17
|
spec.add_dependency 'highline', '~> 1.6.19'
|
|
18
|
+
spec.add_development_dependency 'ronn'
|
|
18
19
|
|
|
19
20
|
spec.bindir = 'bin'
|
|
20
21
|
spec.executables = ['leif']
|
|
21
22
|
|
|
22
23
|
spec.files = %w(LICENSE README.md leif.gemspec)
|
|
23
|
-
spec.files += Dir.glob('lib/**/*.rb')
|
|
24
24
|
spec.files += Dir.glob('bin/*')
|
|
25
|
+
spec.files += Dir.glob('lib/**/*.rb')
|
|
26
|
+
spec.files += Dir.glob('man/*')
|
|
25
27
|
|
|
26
28
|
spec.required_rubygems_version = '>= 1.3.6'
|
|
27
29
|
end
|
data/lib/leif/version.rb
CHANGED
data/man/leif.1
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
|
+
.
|
|
4
|
+
.TH "LEIF" "1" "August 2013" "" ""
|
|
5
|
+
.
|
|
6
|
+
.SH "NAME"
|
|
7
|
+
\fBleif\fR \- A hypermedia browser for the CloudApp Collection+JSON API\.
|
|
8
|
+
.
|
|
9
|
+
.SH "SYNOPSIS"
|
|
10
|
+
\fBleif\fR
|
|
11
|
+
.
|
|
12
|
+
.SH "DESCRIPTION"
|
|
13
|
+
\fBleif\fR is a program to explore the CloudApp hypermedia API\. It was built so developers could feel how the API flows to help them consume it in their programs\.
|
|
14
|
+
.
|
|
15
|
+
.SH "INTERACTIVE COMMANDS"
|
|
16
|
+
.
|
|
17
|
+
.TP
|
|
18
|
+
\fBroot\fR
|
|
19
|
+
Go back to the root
|
|
20
|
+
.
|
|
21
|
+
.TP
|
|
22
|
+
\fBfollow\fR \fIrel\fR
|
|
23
|
+
Follow link with the given relation\.
|
|
24
|
+
.
|
|
25
|
+
.TP
|
|
26
|
+
\fBbasic\fR \fIusername\fR [\fIpassword\fR]
|
|
27
|
+
Authenticate with HTTP Basic and reload the current resource\. Will be prompted for password if it is omitted\.
|
|
28
|
+
.
|
|
29
|
+
.TP
|
|
30
|
+
\fBtoken\fR \fItoken\fR
|
|
31
|
+
Authenticate using the given token and reload the current resource\.
|
|
32
|
+
|
data/man/leif.1.html
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
|
5
|
+
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
|
6
|
+
<title>leif(1) - A hypermedia browser for the CloudApp Collection+JSON API.</title>
|
|
7
|
+
<style type='text/css' media='all'>
|
|
8
|
+
/* style: man */
|
|
9
|
+
body#manpage {margin:0}
|
|
10
|
+
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
|
11
|
+
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
|
12
|
+
.mp h2 {margin:10px 0 0 0}
|
|
13
|
+
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
|
14
|
+
.mp h3 {margin:0 0 0 4ex}
|
|
15
|
+
.mp dt {margin:0;clear:left}
|
|
16
|
+
.mp dt.flush {float:left;width:8ex}
|
|
17
|
+
.mp dd {margin:0 0 0 9ex}
|
|
18
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
|
19
|
+
.mp pre {margin-bottom:20px}
|
|
20
|
+
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
|
21
|
+
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
|
22
|
+
.mp img {display:block;margin:auto}
|
|
23
|
+
.mp h1.man-title {display:none}
|
|
24
|
+
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
|
25
|
+
.mp h2 {font-size:16px;line-height:1.25}
|
|
26
|
+
.mp h1 {font-size:20px;line-height:2}
|
|
27
|
+
.mp {text-align:justify;background:#fff}
|
|
28
|
+
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
|
29
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
|
30
|
+
.mp u {text-decoration:underline}
|
|
31
|
+
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
|
32
|
+
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
|
33
|
+
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
|
34
|
+
.mp b.man-ref {font-weight:normal;color:#434241}
|
|
35
|
+
.mp pre {padding:0 4ex}
|
|
36
|
+
.mp pre code {font-weight:normal;color:#434241}
|
|
37
|
+
.mp h2+pre,h3+pre {padding-left:0}
|
|
38
|
+
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
|
39
|
+
ol.man-decor {width:100%}
|
|
40
|
+
ol.man-decor li.tl {text-align:left}
|
|
41
|
+
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
|
42
|
+
ol.man-decor li.tr {text-align:right;float:right}
|
|
43
|
+
</style>
|
|
44
|
+
<style type='text/css' media='all'>
|
|
45
|
+
/* style: toc */
|
|
46
|
+
.man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
|
|
47
|
+
.man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
|
|
48
|
+
.man-navigation a:hover {color:#111;text-decoration:underline}
|
|
49
|
+
</style>
|
|
50
|
+
</head>
|
|
51
|
+
<!--
|
|
52
|
+
The following styles are deprecated and will be removed at some point:
|
|
53
|
+
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
|
54
|
+
|
|
55
|
+
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
|
56
|
+
.man-navigation should be used instead.
|
|
57
|
+
-->
|
|
58
|
+
<body id='manpage'>
|
|
59
|
+
<div class='mp' id='man'>
|
|
60
|
+
|
|
61
|
+
<div class='man-navigation' style='display:none'>
|
|
62
|
+
<a href="#NAME">NAME</a>
|
|
63
|
+
<a href="#SYNOPSIS">SYNOPSIS</a>
|
|
64
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
|
65
|
+
<a href="#INTERACTIVE-COMMANDS">INTERACTIVE COMMANDS</a>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<ol class='man-decor man-head man head'>
|
|
69
|
+
<li class='tl'>leif(1)</li>
|
|
70
|
+
<li class='tc'></li>
|
|
71
|
+
<li class='tr'>leif(1)</li>
|
|
72
|
+
</ol>
|
|
73
|
+
|
|
74
|
+
<h2 id="NAME">NAME</h2>
|
|
75
|
+
<p class="man-name">
|
|
76
|
+
<code>leif</code> - <span class="man-whatis">A hypermedia browser for the CloudApp Collection+JSON API.</span>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
|
80
|
+
|
|
81
|
+
<p><code>leif</code></p>
|
|
82
|
+
|
|
83
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
|
84
|
+
|
|
85
|
+
<p><code>leif</code> is a program to explore the CloudApp hypermedia API. It was built so
|
|
86
|
+
developers could feel how the API flows to help them consume it in their
|
|
87
|
+
programs.</p>
|
|
88
|
+
|
|
89
|
+
<h2 id="INTERACTIVE-COMMANDS">INTERACTIVE COMMANDS</h2>
|
|
90
|
+
|
|
91
|
+
<dl>
|
|
92
|
+
<dt class="flush"><code>root</code></dt><dd><p>Go back to the root</p></dd>
|
|
93
|
+
<dt><code>follow</code> <var>rel</var></dt><dd><p>Follow link with the given relation.</p></dd>
|
|
94
|
+
<dt><code>basic</code> <var>username</var> [<var>password</var>]</dt><dd><p>Authenticate with HTTP Basic and reload the current resource. Will be
|
|
95
|
+
prompted for password if it is omitted.</p></dd>
|
|
96
|
+
<dt><code>token</code> <var>token</var></dt><dd><p>Authenticate using the given token and reload the current resource.</p></dd>
|
|
97
|
+
</dl>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<ol class='man-decor man-foot man foot'>
|
|
102
|
+
<li class='tl'></li>
|
|
103
|
+
<li class='tc'>August 2013</li>
|
|
104
|
+
<li class='tr'>leif(1)</li>
|
|
105
|
+
</ol>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
</body>
|
|
109
|
+
</html>
|
data/man/leif.1.ronn
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# leif(1) -- A hypermedia browser for the CloudApp Collection+JSON API.
|
|
2
|
+
|
|
3
|
+
## SYNOPSIS
|
|
4
|
+
|
|
5
|
+
`leif`
|
|
6
|
+
|
|
7
|
+
## DESCRIPTION
|
|
8
|
+
|
|
9
|
+
`leif` is a program to explore the CloudApp hypermedia API. It was built so
|
|
10
|
+
developers could feel how the API flows to help them consume it in their
|
|
11
|
+
programs.
|
|
12
|
+
|
|
13
|
+
## INTERACTIVE COMMANDS
|
|
14
|
+
|
|
15
|
+
- `root`:
|
|
16
|
+
Go back to the root
|
|
17
|
+
|
|
18
|
+
- `follow` <rel>:
|
|
19
|
+
Follow link with the given relation.
|
|
20
|
+
|
|
21
|
+
- `basic` <username> [<password>]:
|
|
22
|
+
Authenticate with HTTP Basic and reload the current resource. Will be
|
|
23
|
+
prompted for password if it is omitted.
|
|
24
|
+
|
|
25
|
+
- `token` <token>:
|
|
26
|
+
Authenticate using the given token and reload the current resource.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leif
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Larry Marburger
|
|
@@ -52,6 +52,20 @@ dependencies:
|
|
|
52
52
|
- - ~>
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: 1.6.19
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: ronn
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - '>='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
55
69
|
description: A hypermedia browser for the CloudApp Collection+JSON API.
|
|
56
70
|
email: larry@marburger.cc
|
|
57
71
|
executables:
|
|
@@ -64,6 +78,9 @@ files:
|
|
|
64
78
|
- leif.gemspec
|
|
65
79
|
- bin/leif
|
|
66
80
|
- lib/leif/version.rb
|
|
81
|
+
- man/leif.1
|
|
82
|
+
- man/leif.1.html
|
|
83
|
+
- man/leif.1.ronn
|
|
67
84
|
homepage: https://github.com/cloudapp/leif
|
|
68
85
|
licenses:
|
|
69
86
|
- MIT
|