wtf-doc 0.1.0
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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +21 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bin/wtf +6 -0
- data/lib/wtf/cli/here.rb +26 -0
- data/lib/wtf/core.rb +48 -0
- data/lib/wtf/version.rb +3 -0
- data/lib/wtf.rb +6 -0
- data/wtf.gemspec +35 -0
- metadata +129 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 18144acf30d164920c60d87cf73263c1945b0a6f
|
4
|
+
data.tar.gz: 1a1a41bea9fcaf88b6137421b76880a154c14a02
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ad8366a8fc63074cc7425342ae2307aca7ceb69bc6b819f7da09ef361a38c373d49d10d4a58fbf8eb1f023cd34731348f299e765b6b4fe73b4674cc4f1240445
|
7
|
+
data.tar.gz: 1e9371509d7a33c90fd0baa44982875a68d85993e4df4ef0a49cffd4568446755eb14a158192c68ae7d435d4e3a69e8f711696de46adfb1194bb0d2f5c661c96
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Wtf
|
2
|
+
|
3
|
+
Never run into so many folders that you have no idea what contains what? This is a tool to add a descriptions to Mac OS Folders
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Iinstall it yourself as:
|
9
|
+
|
10
|
+
$ gem install wtf
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
TODO: instructions
|
15
|
+
|
16
|
+
|
17
|
+
## Contributing
|
18
|
+
|
19
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/lorenzosinisi/wtf.
|
20
|
+
|
21
|
+
# wtf
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "wtf"
|
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
|
data/bin/setup
ADDED
data/bin/wtf
ADDED
data/lib/wtf/cli/here.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module Wtf
|
4
|
+
module CLI
|
5
|
+
class Application < Thor
|
6
|
+
|
7
|
+
desc "here", "This will read you the description of this folder"
|
8
|
+
def here
|
9
|
+
puts Wtf::Core.new.content
|
10
|
+
end
|
11
|
+
default_task :here
|
12
|
+
|
13
|
+
desc "doc", "This will write the description of this folder.
|
14
|
+
\n\n Usage:
|
15
|
+
\n\n wtf document -c 'my documentation'"
|
16
|
+
option :c
|
17
|
+
def doc(*args)
|
18
|
+
content = options[:c] + " " + args.join(" ")
|
19
|
+
Wtf::Core.new.write(content) if options[:c]
|
20
|
+
puts "Folder documentation added:"
|
21
|
+
puts Wtf::Core.new.content
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/wtf/core.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
module Wtf
|
2
|
+
class Core
|
3
|
+
|
4
|
+
def current_path
|
5
|
+
Dir.pwd
|
6
|
+
end
|
7
|
+
|
8
|
+
def has_documentation?
|
9
|
+
File.exist?(current_path + wtf_file)
|
10
|
+
end
|
11
|
+
|
12
|
+
alias :is_documented? :has_documentation?
|
13
|
+
|
14
|
+
def wtf_file
|
15
|
+
'/.wtf'
|
16
|
+
end
|
17
|
+
|
18
|
+
def clean
|
19
|
+
if is_documented?
|
20
|
+
File.delete(current_path + wtf_file)
|
21
|
+
true
|
22
|
+
else
|
23
|
+
puts not_documented
|
24
|
+
nil
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def not_documented
|
29
|
+
"This folder is not documented."
|
30
|
+
end
|
31
|
+
|
32
|
+
def write(data)
|
33
|
+
File.open(current_path + '/.wtf', 'w') {|f| f.write(data) }
|
34
|
+
end
|
35
|
+
|
36
|
+
def content
|
37
|
+
if is_documented?
|
38
|
+
data = File.read(current_path + wtf_file)
|
39
|
+
data
|
40
|
+
else
|
41
|
+
puts not_documented
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
alias :read_documentation :content
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
data/lib/wtf/version.rb
ADDED
data/lib/wtf.rb
ADDED
data/wtf.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wtf/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wtf-doc"
|
8
|
+
spec.version = Wtf::VERSION
|
9
|
+
spec.authors = ["Lorenzo Sinisi"]
|
10
|
+
spec.email = ["lasslo.net@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Command line utility to add descriptions to folders.}
|
13
|
+
spec.description = %q{Command line utility to add descriptions to folders}
|
14
|
+
spec.homepage = "https://github.com/lorenzosinisi/wtf"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
17
|
+
# delete this section to allow pushing this gem to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
|
+
end
|
23
|
+
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
spec.bindir = "bin"
|
26
|
+
spec.executables = ["wtf"]
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_dependency 'thor', "0.19.1"
|
30
|
+
spec.add_dependency 'httparty'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec"
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wtf-doc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lorenzo Sinisi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
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.19.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.19.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
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'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Command line utility to add descriptions to folders
|
84
|
+
email:
|
85
|
+
- lasslo.net@gmail.com
|
86
|
+
executables:
|
87
|
+
- wtf
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
93
|
+
- ".travis.yml"
|
94
|
+
- Gemfile
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- bin/console
|
98
|
+
- bin/setup
|
99
|
+
- bin/wtf
|
100
|
+
- lib/wtf.rb
|
101
|
+
- lib/wtf/cli/here.rb
|
102
|
+
- lib/wtf/core.rb
|
103
|
+
- lib/wtf/version.rb
|
104
|
+
- wtf.gemspec
|
105
|
+
homepage: https://github.com/lorenzosinisi/wtf
|
106
|
+
licenses: []
|
107
|
+
metadata:
|
108
|
+
allowed_push_host: https://rubygems.org
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 2.2.2
|
126
|
+
signing_key:
|
127
|
+
specification_version: 4
|
128
|
+
summary: Command line utility to add descriptions to folders.
|
129
|
+
test_files: []
|