fling 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 +4 -4
- data/CHANGES.md +8 -0
- data/fling.gemspec +1 -0
- data/lib/fling/cli.rb +25 -0
- data/lib/fling/version.rb +1 -1
- metadata +16 -5
- data/bin/console +0 -14
- data/bin/setup +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7df2cfce81f8bc91edafec002a4bd43f7c8e79d8
|
4
|
+
data.tar.gz: feb872e6df8bac63996ba4d04aa4e247aab92f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a09c95581f3b431d955508b715c9cfa9d97184ad2dbddd425499cf17989002849981803dbca97e5d98c4127e747e0ea69ecee2e6669448bbbce04f81df6eb9f
|
7
|
+
data.tar.gz: 55e17adb57e47aae7011cbfa37336b56cfc5f7916eff9198bfe8bedec9d13eb637ebc2fd072d9424b778e5a455c067269055f27a5a268754a0333fb52e1d8a85
|
data/CHANGES.md
CHANGED
data/fling.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency "colorize"
|
23
23
|
spec.add_runtime_dependency "base32"
|
24
24
|
spec.add_runtime_dependency "rbnacl-libsodium"
|
25
|
+
spec.add_runtime_dependency "launchy"
|
25
26
|
|
26
27
|
spec.add_development_dependency "bundler", "~> 1.9"
|
27
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/fling/cli.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "fling"
|
2
2
|
require "thor"
|
3
3
|
require "uri"
|
4
|
+
require "cgi"
|
4
5
|
require "net/http"
|
5
6
|
require "yaml"
|
6
7
|
|
@@ -82,5 +83,29 @@ module Fling
|
|
82
83
|
say "Created #{config_dir}!"
|
83
84
|
say "Start Tahoe by running 'tahoe start'"
|
84
85
|
end
|
86
|
+
|
87
|
+
desc "open [ALIAS]", "Open the Tahoe-LAFS web UI (possibly showing a particular alias)"
|
88
|
+
def open(alias_name = nil)
|
89
|
+
require "launchy"
|
90
|
+
uri = "http://127.0.0.1:3456"
|
91
|
+
|
92
|
+
if alias_name
|
93
|
+
aliases = YAML.load_file(File.expand_path("~/.tahoe/private/aliases"))
|
94
|
+
unless aliases[alias_name]
|
95
|
+
say "Error: no such alias: #{alias_name}"
|
96
|
+
say "Valid aliases are:"
|
97
|
+
|
98
|
+
aliases.keys.each do |key|
|
99
|
+
say " #{key}"
|
100
|
+
end
|
101
|
+
|
102
|
+
exit 1
|
103
|
+
end
|
104
|
+
|
105
|
+
uri += "/uri/#{CGI.escape(aliases[alias_name])}"
|
106
|
+
end
|
107
|
+
|
108
|
+
Launchy.open(uri)
|
109
|
+
end
|
85
110
|
end
|
86
111
|
end
|
data/lib/fling/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: launchy
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,9 +127,7 @@ description: Fling is a system for automating the exchange of files and director
|
|
113
127
|
email:
|
114
128
|
- bascule@gmail.com
|
115
129
|
executables:
|
116
|
-
- console
|
117
130
|
- fling
|
118
|
-
- setup
|
119
131
|
extensions: []
|
120
132
|
extra_rdoc_files: []
|
121
133
|
files:
|
@@ -128,9 +140,7 @@ files:
|
|
128
140
|
- Guardfile
|
129
141
|
- README.md
|
130
142
|
- Rakefile
|
131
|
-
- bin/console
|
132
143
|
- bin/fling
|
133
|
-
- bin/setup
|
134
144
|
- fling.gemspec
|
135
145
|
- lib/fling.rb
|
136
146
|
- lib/fling/box.rb
|
@@ -172,3 +182,4 @@ signing_key:
|
|
172
182
|
specification_version: 4
|
173
183
|
summary: Simple secret sharing over Tahoe-LAFS
|
174
184
|
test_files: []
|
185
|
+
has_rdoc:
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "fling"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|