fling 0.0.0 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dab46f2af38a530cb411e37f7250857671a11015
4
- data.tar.gz: 255c405c06072a992d6155f2617ceb0bb0210c40
3
+ metadata.gz: 025180763b1e29c3751da37ee53da75fb94f1064
4
+ data.tar.gz: ce374526dfcd1a443e5cbfbec4d76e511031d230
5
5
  SHA512:
6
- metadata.gz: 704f9f0bad377f1d6d90ff79368910abc49ffc30e97131b802898c8c59786e8dae74b161eebab3c5067003e00153b4139aa92a1b01c7941ed1d4dc670165d921
7
- data.tar.gz: 2487c2a8c47ca6bdfc0daaefeec53ff65718d3eb3781322a4e90685137e0450cda7cc3db73d8d750faa379bfeb79285e510f558e983bd8231f0dbfa277f48bea
6
+ metadata.gz: 05f49608a59177601392ab3f659020de35ab84df19cd8028c4a2bfe3b5f02021de143dbfc125e0be8722c092ad5726ec76417ea8fd0c1e4162461607b2a491a0
7
+ data.tar.gz: 9d2e9fbd812e42b3bc2a3234dc5743292236b61dcfd320a39201ed3b24734fa0bd74e391c5bcbf049e051eaaed3d4d541ce7ed6feaa1f18ced9bd6569ae8a298
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ LineLength:
2
+ Max: 100
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
data/CHANGES.md ADDED
@@ -0,0 +1,3 @@
1
+ 0.0.1 (2014-04-22)
2
+ ------------------
3
+ * Initial release with support for "fling setup"
data/Gemfile CHANGED
@@ -1,4 +1,12 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
3
+ group :development, :test do
4
+ gem "guard-rspec"
5
+ gem "rubocop"
6
+ end
7
+
8
+ group :test do
9
+ gem "coveralls", require: false
10
+ end
2
11
 
3
- # Specify your gem's dependencies in fling.gemspec
4
12
  gemspec
data/Guardfile ADDED
@@ -0,0 +1,8 @@
1
+ directories %w(lib spec)
2
+ clearing :on
3
+
4
+ guard :rspec, cmd: "bundle exec rspec" do
5
+ watch(%r{^spec/.+_spec\.rb$})
6
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
+ watch("spec/spec_helper.rb") { "spec" }
8
+ end
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  Fling
2
2
  =====
3
+ [![Build Status](https://travis-ci.org/cryptosphere/fling.svg)](https://travis-ci.org/cryptosphere/fling)
4
+ [![Code Climate](https://codeclimate.com/github/cryptosphere/fling/badges/gpa.svg)](https://codeclimate.com/github/cryptosphere/fling)
5
+ [![Coverage Status](https://coveralls.io/repos/cryptosphere/fling/badge.svg)](https://coveralls.io/r/cryptosphere/fling)
3
6
 
4
7
  Simple secret sharing over Tahoe-LAFS.
5
8
 
@@ -32,7 +35,14 @@ Or install it yourself as:
32
35
 
33
36
  ## Usage
34
37
 
35
- Coming soon!
38
+ Once fling has been installed, you can use it to install a local Tahoe-LAFS
39
+ client by running the following command:
40
+
41
+ $ fling setup
42
+
43
+ (NOTE: This command is presently only supported on OS X)
44
+
45
+ This will download and install a local copy of Tahoe-LAFS.
36
46
 
37
47
  ## Contributing
38
48
 
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ Dir["tasks/**/*.rake"].each { |task| load task }
4
+
5
+ task default: %w(spec rubocop)
6
+ task ci: :default
data/bin/fling ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "fling/cli"
4
+
5
+ Fling::CLI.start(ARGV)
data/fling.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'fling/version'
4
+ require "fling/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fling"
@@ -10,14 +10,19 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["bascule@gmail.com"]
11
11
 
12
12
  spec.summary = "Simple secret sharing over Tahoe-LAFS"
13
- spec.description = "Fling is a system for automating the exchange of files and directories over Tahoe-LAFS, a distributed encrypted filesystem."
13
+ spec.description = "Fling is a system for automating the exchange of files and directories" \
14
+ "over Tahoe-LAFS, a distributed encrypted filesystem."
14
15
  spec.homepage = "https://github.com/tarcieri/fling"
15
16
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
18
  spec.bindir = "exe"
18
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
20
  spec.require_paths = ["lib"]
20
21
 
22
+ spec.add_runtime_dependency "thor"
23
+ spec.add_runtime_dependency "colorize"
24
+
21
25
  spec.add_development_dependency "bundler", "~> 1.9"
22
26
  spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.2"
23
28
  end
data/lib/fling/cli.rb ADDED
@@ -0,0 +1,13 @@
1
+ require "fling"
2
+ require "thor"
3
+
4
+ module Fling
5
+ # The Fling Command Line Interface
6
+ class CLI < Thor
7
+ desc :setup, "Install Tahoe-LAFS"
8
+ def setup
9
+ require "fling/setup"
10
+ Setup.run
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,35 @@
1
+ require "colorize"
2
+ require "fileutils"
3
+
4
+ module Fling
5
+ # Central utilities for Tahoe-LAFS setup
6
+ module Setup
7
+ module_function
8
+
9
+ TAHOE_VERSION = "1.10.0"
10
+ TAHOE_DIR = "allmydata-tahoe-#{TAHOE_VERSION}"
11
+ TAHOE_ZIP = "#{TAHOE_DIR}.zip"
12
+ TAHOE_SRC = "https://tahoe-lafs.org/source/tahoe-lafs/releases/#{TAHOE_ZIP}"
13
+
14
+ # Note something important just happened
15
+ def ohai(msg)
16
+ STDOUT.puts "#{'***'.blue} #{msg.light_white}"
17
+ end
18
+
19
+ def run
20
+ zip = "/tmp/#{TAHOE_ZIP}"
21
+ dir = File.join(Dir.home, TAHOE_DIR)
22
+
23
+ ohai "Downloading #{TAHOE_ZIP}"
24
+ system "curl -o #{zip} #{TAHOE_SRC}"
25
+
26
+ ohai "Extracting #{TAHOE_ZIP} into #{dir}"
27
+ system "cd #{Dir.home} && unzip -q #{zip}"
28
+
29
+ ohai "Configuring Tahoe-LAFS"
30
+ system "cd #{dir} && python setup.py build"
31
+
32
+ ohai "Tahoe-LAFS is ready to roll."
33
+ end
34
+ end
35
+ end
data/lib/fling/version.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # Simple secret sharing over Tahoe-LAFS
1
2
  module Fling
2
- VERSION = "0.0.0"
3
+ VERSION = "0.0.1"
3
4
  end
data/lib/fling.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require "fling/version"
2
2
 
3
+ # Simple secret sharing over Tahoe-LAFS
3
4
  module Fling
4
- # Your code goes here...
5
5
  end
@@ -0,0 +1,7 @@
1
+ require "spec_helper"
2
+
3
+ describe Fling do
4
+ it "has a version number" do
5
+ expect(Fling::VERSION).not_to be nil
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ require "coveralls"
2
+ Coveralls.wear!
3
+
4
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
5
+ require "fling"
data/tasks/rspec.rake ADDED
@@ -0,0 +1,3 @@
1
+ require "rspec/core/rake_task"
2
+
3
+ RSpec::Core::RakeTask.new
@@ -0,0 +1,2 @@
1
+ require "rubocop/rake_task"
2
+ RuboCop::RakeTask.new
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-21 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: colorize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: bundler
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,8 +66,22 @@ dependencies:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
68
  version: '10.0'
41
- description: Fling is a system for automating the exchange of files and directories
42
- over Tahoe-LAFS, a distributed encrypted filesystem.
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.2'
83
+ description: Fling is a system for automating the exchange of files and directoriesover
84
+ Tahoe-LAFS, a distributed encrypted filesystem.
43
85
  email:
44
86
  - bascule@gmail.com
45
87
  executables: []
@@ -48,15 +90,25 @@ extra_rdoc_files: []
48
90
  files:
49
91
  - ".gitignore"
50
92
  - ".rspec"
93
+ - ".rubocop.yml"
51
94
  - ".travis.yml"
95
+ - CHANGES.md
52
96
  - Gemfile
97
+ - Guardfile
53
98
  - README.md
54
99
  - Rakefile
55
100
  - bin/console
101
+ - bin/fling
56
102
  - bin/setup
57
103
  - fling.gemspec
58
104
  - lib/fling.rb
105
+ - lib/fling/cli.rb
106
+ - lib/fling/setup.rb
59
107
  - lib/fling/version.rb
108
+ - spec/fling_spec.rb
109
+ - spec/spec_helper.rb
110
+ - tasks/rspec.rake
111
+ - tasks/rubocop.rake
60
112
  homepage: https://github.com/tarcieri/fling
61
113
  licenses: []
62
114
  metadata: {}