gistto 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 +15 -0
- data/.gitignore +17 -0
- data/Gemfile +9 -0
- data/LICENSE +22 -0
- data/README.md +103 -0
- data/Rakefile +1 -0
- data/bin/gistto +6 -0
- data/extras/gistto.bck +3895 -0
- data/extras/gistto.crt +66 -0
- data/gistto.gemspec +20 -0
- data/lib/gistto/client.rb +109 -0
- data/lib/gistto/enhancements/color.rb +42 -0
- data/lib/gistto/enhancements/json.rb +1304 -0
- data/lib/gistto/messages.rb +48 -0
- data/lib/gistto/modules/actions.rb +307 -0
- data/lib/gistto/modules/constants.rb +12 -0
- data/lib/gistto/modules/https.rb +78 -0
- data/lib/gistto/modules/utils.rb +140 -0
- data/lib/gistto/version.rb +3 -0
- data/lib/gistto.rb +9 -0
- metadata +64 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWFhODJiNjgwNDRhZGZiYjI3NmI5MjZlYzA5MzYzN2UxNTE4ODI2Mw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjZlODlhYjBlZjA2MWMxY2NmMTYyNGMyYzBhZGNkZjdjODQxYzE2Yw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDkwYjNjOGFlZTI5YmRmMTk4YzIwZjViYzQ1Njc3ZDJkNGI0MDczMzVjYTdh
|
10
|
+
NWU4NzRjYjcxOWQyNWVlZjQyMDJiMjVkNjc3MTA0NDhlN2EwNzU4ZTM0YjZh
|
11
|
+
YmNmZDliMWFmMWVjMGFkY2ZkYzAwNzhmMjJmOTgxNDFmZDQ1ZmU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NWE0NzYzYWE2NDdkOGViYjlmMTgwOTIzZjJlZTc0NDkwNGQ3NjYzMDZkZGRl
|
14
|
+
NjYzOGUzMTVhOWRiN2JiZDljMjY3ZTRmYTRiM2MzZDVlYjViNmIxOTQzMjZi
|
15
|
+
ZjY2YTY0NzQ3YTk2ZTE1Y2QxNmQ0NTM0ZjhhYzgzZWRmMzEyYjg=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 castivo networks
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
# Gistto
|
2
|
+
|
3
|
+
Gistto is a gist client for command interface in mac, it's born under the need to have quick access to gist
|
4
|
+
allowing to handle the basic operations and save thats pieces of code that it will be used later
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Install it yourself as:
|
9
|
+
|
10
|
+
$ gem install gistto
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
The first step is configure gistto to create the enviroment using:
|
15
|
+
|
16
|
+
$ gistto config
|
17
|
+
|
18
|
+
this will create some configurations:
|
19
|
+
|
20
|
+
1 - gistto home folder under your user home directory as: ~/gistto
|
21
|
+
2 - gistto configuration file under your user home directory as : ~/.gistto
|
22
|
+
3 - copy gistto.crt to /tmp folder for oAuth v3 Authentication under https
|
23
|
+
4 - verify for git global configuration for username or ask him if git is not present
|
24
|
+
5 - generate authentication token for oAuth v3
|
25
|
+
|
26
|
+
Once your configuration is done and if you want to reconfigure on change user to save gists
|
27
|
+
you can run the command config again but with option (-n) that allows you to overwrite configuration
|
28
|
+
asking for username and password to generate token :
|
29
|
+
|
30
|
+
$ gistto config -n
|
31
|
+
|
32
|
+
Now, to List all the gists that you already have generated you must run:
|
33
|
+
|
34
|
+
$ gistto list
|
35
|
+
|
36
|
+
This list all the gist availables, showing 30 gist at time, to move an get the others (if you have more than 30),
|
37
|
+
gistto show you at the end of the list the available commands, for example if you have 45 gists
|
38
|
+
the available commands are :
|
39
|
+
|
40
|
+
$ gistto list 1 or gistto list 2
|
41
|
+
|
42
|
+
1 or 2 are references for page number.
|
43
|
+
|
44
|
+
|
45
|
+
If you want to add a new gist to your account you have some options:
|
46
|
+
|
47
|
+
$ gistto add [-p] <file_path_1> <file_path_N>
|
48
|
+
|
49
|
+
Add action allow you to add any number of files, you only need to provide the path of every file
|
50
|
+
by default the gist to create is public but if you add -p option the gist will be created private
|
51
|
+
this return the gist-ID.
|
52
|
+
|
53
|
+
Also you can type the content of the gist instead of set file_path using:
|
54
|
+
|
55
|
+
$ gistto type [-p] <filename> <file description (this must be quoted)>
|
56
|
+
|
57
|
+
After the command you will be asked for type the content of the gist directly in the command line when
|
58
|
+
you are done and want to end to type you must to add a new line with enter and type ::eof
|
59
|
+
|
60
|
+
But if you want to get a gist that you already have get command if what you need:
|
61
|
+
|
62
|
+
$ gistto get [-o|--open] [-c|--clipboard] [-l|--local] [-s|--show] gist-ID
|
63
|
+
|
64
|
+
Get have different options
|
65
|
+
|
66
|
+
* -o : if you want to open in the browser in the raw format
|
67
|
+
* -c : if you want to copy the content of gist directly to the clipboard (don't worry if the gist contains more than one file every file will be identified to ease handle)
|
68
|
+
* -l : if you want to make a local copy, this will be saved in the gistto folder under ~/gistto. A new folder will be created with the gist-ID as name, to easyly identification
|
69
|
+
* -s : allows you to display the content of the gist in the screen to easy review.
|
70
|
+
|
71
|
+
|
72
|
+
One more option is allowed by the moment, delete a gist, using:
|
73
|
+
|
74
|
+
$ gistto delete <gist-ID1> <gist-ID2> <gist-IDN>
|
75
|
+
|
76
|
+
This command allows you to delete one or many gist, this only delete from gist but not from your local copy if
|
77
|
+
you created on with get command and -l option
|
78
|
+
|
79
|
+
|
80
|
+
## Todo
|
81
|
+
|
82
|
+
1 - Implement sync method to sync local copy with online copy
|
83
|
+
2 - Implement pull method to update all the local changes to online
|
84
|
+
3 - Implement update method to update a gist from command line directly to online
|
85
|
+
4 - Make some improvements to code
|
86
|
+
5 - Fix some typos
|
87
|
+
6 - Complete all rspec definitions
|
88
|
+
7 - Complete all rdoc documentation
|
89
|
+
8 - Test and implement for Linux/Unix/Windows
|
90
|
+
9 - Some new features to add in the future :)
|
91
|
+
|
92
|
+
|
93
|
+
## Contributing
|
94
|
+
|
95
|
+
1. Fork it
|
96
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
97
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
98
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
99
|
+
5. Create new Pull Request
|
100
|
+
|
101
|
+
|
102
|
+
## License
|
103
|
+
gistto is licensed under the MIT standard license. see LICENSE for further information.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|