bashy 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.
- data/README.markdown +51 -0
- data/Rakefile +11 -9
- data/lib/bashy.rb +0 -1
- metadata +25 -11
- data/README +0 -3
data/README.markdown
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
A simple code snippet storage tool (whatever language you like), making it easy
|
2
|
+
to save, run, and manage your scripts from the Terminal.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
gem install bashy
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
Using `bashy` is simple! You can go about it two ways:
|
11
|
+
|
12
|
+
1. You can run it from the command line instead of adding aliases to your .bash_profile
|
13
|
+
2. You can use it as a class, and use it to run Bashy scripts within your program.
|
14
|
+
|
15
|
+
### Using `bashy` from the command line
|
16
|
+
|
17
|
+
Using `bashy` from the command line is too simple:
|
18
|
+
|
19
|
+
bashy COMMAND [ARGS]
|
20
|
+
|
21
|
+
#### Commands
|
22
|
+
add: Adds a snippet. You must provide a name. You can provide a path
|
23
|
+
to a file to import, but if ommited you can enter your snippet
|
24
|
+
into the STDIN
|
25
|
+
list: Lists all added snippets.
|
26
|
+
remove: Removes all snippets matching the names provided.
|
27
|
+
run: Runs the given command, passing it any arguments given after
|
28
|
+
the command name.
|
29
|
+
show: Shows the contents of the given command file.
|
30
|
+
help: Shows this help manual.
|
31
|
+
|
32
|
+
The only thing to watch out for: because bashy doesn't preserve file extentions,
|
33
|
+
you'll need to make sure you have a good shebang in your code. If you import a
|
34
|
+
file or enter a script without a shebang, we'll add the following automagically:
|
35
|
+
|
36
|
+
#!/usr/bin/env bash
|
37
|
+
|
38
|
+
### Using `bashy` as a class
|
39
|
+
|
40
|
+
To use `bashy` as a class, simply require the right files and you're away.
|
41
|
+
|
42
|
+
require 'rubygems'
|
43
|
+
require 'bashy'
|
44
|
+
|
45
|
+
You don't have to use RubyGems if you don't want to. Read the documentation
|
46
|
+
using RDoc for more information on using the Bashy interfaces.
|
47
|
+
|
48
|
+
## To-Do
|
49
|
+
|
50
|
+
* Catch all the exceptions so this can be used reliably.
|
51
|
+
* Write the Gist fetcher, which will use the `pull` command.
|
data/Rakefile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# To change this template, choose Tools | Templates
|
3
3
|
# and open the template in the editor.
|
4
|
-
|
5
4
|
|
6
5
|
require 'rubygems'
|
7
6
|
require 'rake'
|
@@ -12,17 +11,20 @@ require 'rake/testtask'
|
|
12
11
|
|
13
12
|
spec = Gem::Specification.new do |s|
|
14
13
|
s.name = 'bashy'
|
15
|
-
s.version = '0.0.
|
14
|
+
s.version = '0.0.2'
|
16
15
|
s.has_rdoc = true
|
17
|
-
s.extra_rdoc_files = ['README', 'LICENSE']
|
18
|
-
s.summary = '
|
19
|
-
s.description = s.summary
|
20
|
-
s.author = ''
|
21
|
-
s.email = ''
|
16
|
+
s.extra_rdoc_files = ['README.markdown', 'LICENSE']
|
17
|
+
s.summary = 'A simple code snippet storage tool (whatever language you like), making it easy to save, run, and manage your scripts from the Terminal.'
|
18
|
+
s.description = s.summary + ' See http://github.com/nathankleyn/bashy for more information.'
|
19
|
+
s.author = 'Nathan Kleyn'
|
20
|
+
s.email = 'nathan@unfinitydesign.com'
|
22
21
|
s.executables = ['bashy']
|
23
|
-
s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
|
22
|
+
s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
|
24
23
|
s.require_path = "lib"
|
25
24
|
s.bindir = "bin"
|
25
|
+
|
26
|
+
# Adding the dependencies we need.
|
27
|
+
s.add_dependency('highline', '>= 1.0')
|
26
28
|
end
|
27
29
|
|
28
30
|
Rake::GemPackageTask.new(spec) do |p|
|
@@ -32,7 +34,7 @@ Rake::GemPackageTask.new(spec) do |p|
|
|
32
34
|
end
|
33
35
|
|
34
36
|
Rake::RDocTask.new do |rdoc|
|
35
|
-
files =['README', 'LICENSE', 'lib/**/*.rb']
|
37
|
+
files =['README.markdown', 'LICENSE', 'lib/**/*.rb']
|
36
38
|
rdoc.rdoc_files.add(files)
|
37
39
|
rdoc.main = "README" # page to start on
|
38
40
|
rdoc.title = "Bashy Docs"
|
data/lib/bashy.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,50 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Nathan Kleyn
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
18
|
date: 2010-08-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: highline
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 0
|
33
|
+
version: "1.0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
description: A simple code snippet storage tool (whatever language you like), making it easy to save, run, and manage your scripts from the Terminal. See http://github.com/nathankleyn/bashy for more information.
|
37
|
+
email: nathan@unfinitydesign.com
|
24
38
|
executables:
|
25
39
|
- bashy
|
26
40
|
extensions: []
|
27
41
|
|
28
42
|
extra_rdoc_files:
|
29
|
-
- README
|
43
|
+
- README.markdown
|
30
44
|
- LICENSE
|
31
45
|
files:
|
32
46
|
- LICENSE
|
33
|
-
- README
|
47
|
+
- README.markdown
|
34
48
|
- Rakefile
|
35
49
|
- bin/bashy
|
36
50
|
- lib/bashy.rb
|
@@ -67,6 +81,6 @@ rubyforge_project:
|
|
67
81
|
rubygems_version: 1.3.7
|
68
82
|
signing_key:
|
69
83
|
specification_version: 3
|
70
|
-
summary:
|
84
|
+
summary: A simple code snippet storage tool (whatever language you like), making it easy to save, run, and manage your scripts from the Terminal.
|
71
85
|
test_files: []
|
72
86
|
|
data/README
DELETED