fling 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGES.md +4 -0
- data/lib/fling/cli.rb +2 -2
- data/lib/fling/config.rb +1 -1
- data/lib/fling/install.rb +8 -0
- data/lib/fling/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bd83ff50869806b658424f0520c554438159882
|
4
|
+
data.tar.gz: dc4f45c9f1f23d6309aab231e8da9c50078e69c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d07caf462fd01da2c45257af7a56c7551f8b3222593a47c11ce7938b379d2a9569aa0e82aac2207a6f2a37f452c750ae3d4cafed215f5ff6eade491c2e39ca
|
7
|
+
data.tar.gz: 033abdc5dc409df7cd547d9682a2190f28fa401e12c74ea6ae05b44561a7f9c9036373a9185483ff5979e39ab0a4cbf51850c1ebb16b92e5b35fa674fb895044
|
data/.rubocop.yml
CHANGED
data/CHANGES.md
CHANGED
data/lib/fling/cli.rb
CHANGED
@@ -39,10 +39,10 @@ module Fling
|
|
39
39
|
def config(file_or_uri)
|
40
40
|
require "fling/install"
|
41
41
|
|
42
|
-
if file_or_uri[
|
42
|
+
if file_or_uri[%r{\Ahttps://}]
|
43
43
|
uri = URI(file_or_uri)
|
44
44
|
ciphertext = Net::HTTP.get(uri)
|
45
|
-
elsif file_or_uri[
|
45
|
+
elsif file_or_uri[%r{\Ahttp://}] # ಠ_ಠ
|
46
46
|
say "Friends don't let friends use http://"
|
47
47
|
exit 1
|
48
48
|
else # Perhaps it's a file?
|
data/lib/fling/config.rb
CHANGED
@@ -37,7 +37,7 @@ module Fling
|
|
37
37
|
|
38
38
|
new(Box.decrypt(password, Base64.decode64(matches[1])))
|
39
39
|
rescue RbNaCl::CryptoError # bad password
|
40
|
-
|
40
|
+
raise ConfigError, "couldn't decrypt configuration (corrupted file or bad password?)"
|
41
41
|
end
|
42
42
|
|
43
43
|
# Generate a JSON configuration
|
data/lib/fling/install.rb
CHANGED
@@ -29,6 +29,14 @@ module Fling
|
|
29
29
|
ohai "Configuring Tahoe-LAFS"
|
30
30
|
system "cd #{dir} && python setup.py build"
|
31
31
|
|
32
|
+
ohai "Linking 'tahoe' executable to ~/bin/tahoe..."
|
33
|
+
|
34
|
+
user_bin = File.expand_path("~/bin")
|
35
|
+
tahoe_bin = File.expand_path("~/#{TAHOE_DIR}/bin")
|
36
|
+
|
37
|
+
FileUtils.mkdir_p(user_bin)
|
38
|
+
FileUtils.ln_sf(File.join(tahoe_bin, "tahoe"), File.join(user_bin, "tahoe"))
|
39
|
+
|
32
40
|
ohai "Tahoe-LAFS is ready to roll."
|
33
41
|
end
|
34
42
|
end
|
data/lib/fling/version.rb
CHANGED