gistto 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
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=
2
+ SHA1:
3
+ metadata.gz: 59e7e487999b008846650f2c461285bfcc63a268
4
+ data.tar.gz: 92df1e91d5a0574d7b60459647a8eb888caab412
5
+ SHA512:
6
+ metadata.gz: 7ba1711766156dd594c0f7726a1a8dfea947208f78114ca1c65dd6d1c00ed4aeaa55b8bffb3213c94950b49072ce984cb792426ac4d0e4ffbffe3c4d4f7decf5
7
+ data.tar.gz: a53effb289c34d2b7f09ce2fbd434f15a598ce84eb7665a57dec698b1750157e6424d1ce09c6236a32ff9ddb272f077db9f8a963b9a57ad2a0f9fc7030734c97
data/README.md CHANGED
@@ -33,7 +33,20 @@ Now, to List all the gists that you already have generated you must run:
33
33
 
34
34
  $ gistto list
35
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),
36
+ This list all the gist availables, showing 30 gist at time.
37
+
38
+ 1 Public Gist :: First Gist
39
+ Files : file1-1.txt
40
+
41
+ 2 Private Gist :: Second Gist
42
+ Files : file2-1.txt
43
+
44
+ 3 Public Gist :: Third Gist
45
+ Files : file3-1.txt, file3-2.txt
46
+
47
+
48
+
49
+ To move an get the others (if you have more than 30),
37
50
  gistto show you at the end of the list the available commands, for example if you have 45 gists
38
51
  the available commands are :
39
52
 
@@ -101,3 +114,7 @@ you created on with get command and -l option
101
114
 
102
115
  ## License
103
116
  gistto is licensed under the MIT standard license. see LICENSE for further information.
117
+
118
+
119
+ ## Apologize
120
+ English is not my maternal language i'm still in the process of learning, please sorry and any correction or suggestion is welcome
@@ -8,8 +8,10 @@ Gistto is already configured on your MAC :) !!
8
8
 
9
9
  but
10
10
 
11
- if you want to overwrite the configuration run:
12
- gistto config -n
11
+ if you want to overwrite the configuration please follow the next steps:
12
+
13
+ 1.- Delete the personal token access from your profile in Github associated to Gistto
14
+ 2.- Run the next command : gistto config -n
13
15
 
14
16
  enjoy Gistto!! <3
15
17
  EOS
@@ -14,6 +14,7 @@ module Gistto
14
14
  # TODO: refactoring config method to separate responsabilities
15
15
  #
16
16
  def config
17
+
17
18
  puts "Please wait while we configure gistto in your Mac :)\n".cyan
18
19
  #
19
20
  # verify if configuration file exists : unless if only for degub purpose
@@ -22,21 +23,29 @@ module Gistto
22
23
  abort Gistto::MSG_CONFIG_EXISTS if File.exists?(File.join(Dir.home,'.gistto')) && !overwrite
23
24
  config_file_path = File.join(Dir.home, '.gistto')
24
25
  puts "configuration file \t[%s]" % "#{config_file_path}".cyan
26
+
27
+ # creating gisto configuration folder
28
+ gistto_folder = File.join(Dir.home, '/.gistto_home')
29
+ FileUtils.mkdir gistto_folder unless File.exists? gistto_folder
30
+
25
31
  #
26
32
  # validates cert and copy to temp
27
33
  #
28
- path_cert = File.join('/tmp','gistto.crt')
34
+ path_cert = File.join("#{Dir.home}/.gistto_home",'gistto.crt')
35
+
29
36
  unless File.exists? path_cert
30
- FileUtils.cp File.join(File.expand_path('../../../extras', __FILE__),'gistto.crt'), '/tmp'
37
+ FileUtils.cp File.join(File.expand_path('../../../extras', __FILE__),'gistto.crt'), "#{Dir.home}/.gistto_home"
31
38
  abort "Cert File can't be copied to temp dir" unless File.exists? path_cert
32
39
  end
33
40
  puts "Security Cert \t\t[%s] [%s]" % ["Configured".green, "#{path_cert}".cyan]
41
+
34
42
  #
35
43
  # creating home file
36
44
  #
37
45
  home_path = File.join(Dir.home, 'gistto')
38
46
  FileUtils.mkdir home_path unless File.exists? home_path
39
47
  puts "Gistto directory \t[%s] [%s]" % ["Configured".green, "#{home_path}".cyan]
48
+
40
49
  #
41
50
  # getting github user and ask for password if github --global user.name is not configured
42
51
  # the password will be asked for typing otherwise aborted
@@ -51,6 +60,7 @@ module Gistto
51
60
  # user still empty?
52
61
  abort "Please configure GitHub Account before continue, remember add git config --global user.name" if str_user.empty?
53
62
  end
63
+
54
64
  #
55
65
  # ask for password
56
66
  #
@@ -64,10 +74,6 @@ module Gistto
64
74
  # generate token
65
75
  #
66
76
  github_response = get_token_for str_user, str_pass
67
- #abort "\nAn error ocurred getting authorization token with GitHub API [status = %s]" % "#{github_response.status}".red unless github_response.status == 201
68
- #
69
- # if message is present and error ocurred
70
- #
71
77
  github_data = JSON.load github_response.body
72
78
  abort "\nAn error ocurred generating GitHub Token, please try again!\nGitHub Error = %s" % "#{github_data['message']}".red if github_data.has_key? 'message'
73
79
  puts "Token \t\t\t[%s]" % "Configured".green
@@ -304,4 +310,4 @@ module Gistto
304
310
  end
305
311
 
306
312
  end
307
- end
313
+ end
@@ -75,4 +75,4 @@ module Gistto
75
75
 
76
76
 
77
77
  end
78
- end
78
+ end
@@ -1,3 +1,3 @@
1
1
  module Gistto
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gistto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - erikwco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-03 00:00:00.000000000 Z
11
+ date: 2014-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gist Client with multiples and suitables functionalities
14
14
  email:
@@ -18,7 +18,7 @@ executables:
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - .gitignore
21
+ - ".gitignore"
22
22
  - Gemfile
23
23
  - LICENSE
24
24
  - README.md
@@ -47,17 +47,17 @@ require_paths:
47
47
  - lib
48
48
  required_ruby_version: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ! '>='
50
+ - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ! '>='
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 2.0.0
60
+ rubygems_version: 2.2.2
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Gist Client for GitHub