christ 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -11
- data/christ.gemspec +1 -1
- data/exe/christ +1 -1
- data/lib/christ/version.rb +1 -1
- data/lib/christ.rb +16 -7
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17572e3baa87a085f1fb34f6ff1e40df08ec7f72
|
4
|
+
data.tar.gz: c91f4dcc068c1ff2e5402a6083a3690f27f821b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732d587e30eb4d47dab7ac811b7a783f0f6ab6dbd0b5535c3fb506b10a55cca916588393c9cfd35197b121c5ec6e875d905f21d681c3457f8a371005ad201aa0
|
7
|
+
data.tar.gz: 857044a6fe76dea9c130a3d5376f59b6360ca33efdd9559430efb720397e35f5ad6cf24742f2a301ca522bf68ca8bc8cdda4515881f831b680b4e7075a80647d
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Christ
|
2
2
|
|
3
|
-
|
3
|
+
Pipe any output on the CLI and Christ will create a private GIST for it.
|
4
|
+
|
4
5
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,21 +22,17 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
Pipe any output to christ
|
26
|
+
```
|
27
|
+
ifconfig | christ
|
28
|
+
```
|
29
|
+
To create a gist tied to your github:
|
28
30
|
https://help.github.com/articles/creating-an-access-token-for-command-line-use/
|
29
31
|
|
30
|
-
It only needs Gist access
|
31
|
-
|
32
32
|
```
|
33
33
|
export OCTOKIT_ACCESS_TOKEN='000000000000'
|
34
34
|
```
|
35
35
|
|
36
|
-
then you pipe andy out put like so:
|
37
|
-
|
38
|
-
date | christ
|
39
|
-
|
40
36
|
## Development
|
41
37
|
|
42
38
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/christ.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.bindir = "exe"
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
|
-
|
27
|
+
spec.add_runtime_dependency 'octokit'
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.9"
|
29
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
30
|
end
|
data/exe/christ
CHANGED
data/lib/christ/version.rb
CHANGED
data/lib/christ.rb
CHANGED
@@ -2,13 +2,22 @@ require "christ/version"
|
|
2
2
|
require "octokit"
|
3
3
|
module Christ
|
4
4
|
class Gist
|
5
|
-
def
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
url = client.create_gist({files: input})
|
11
|
-
puts "👼" + " " + url[:html_url]
|
5
|
+
def initialization
|
6
|
+
file_content = ARGF.read
|
7
|
+
file_name = ARGF.filename
|
8
|
+
url = gist_url(file_content, file_name)
|
9
|
+
puts "👼" + " " + url
|
12
10
|
end
|
11
|
+
|
12
|
+
def github_connect
|
13
|
+
Octokit::Client.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def gist_url(file_content, file_name)
|
17
|
+
content = Hash[file_name => Hash[content: file_content]]
|
18
|
+
url = github_connect.create_gist({files: content})
|
19
|
+
return url[:html_url]
|
20
|
+
end
|
21
|
+
|
13
22
|
end
|
14
23
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: christ
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shannon Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: octokit
|
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'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|