githubrepo 0.1.0 → 0.2.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 +4 -4
- data/Gemfile.lock +5 -1
- data/Rakefile +8 -0
- data/bin/githubrepo +6 -3
- data/githubrepo.gemspec +3 -1
- data/lib/githubrepo/version.rb +1 -1
- data/lib/githubrepo.rb +22 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fefd7e19d278696a851e054a0dc95e4099331f0
|
4
|
+
data.tar.gz: 238645e3f462c687a3643cb77bd04205406c6b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1cbf7b989dbddb493f310d4917fe17b4e550ab630429d1d52538cd851c16da947e80805d3efc13b76e094f9bac0ae3ab0449d42fda9e9ff0e0b1ee577d15db5
|
7
|
+
data.tar.gz: 8aad4f4c22976404019f953213ef4b2f28949e0bb4383856e9fdf6f382d25705289206312660cf5e58f00927d3aeb39d6e2429958e35b2c1159402f5d9910b11
|
data/Gemfile.lock
CHANGED
@@ -2,23 +2,27 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
githubrepo (0.1.0)
|
5
|
+
clipboard (~> 1.0.5)
|
5
6
|
commander (~> 4.1.6)
|
6
7
|
httparty (~> 0.13.0)
|
7
8
|
json (~> 1.8.1)
|
8
9
|
json_pure (~> 1.8.1)
|
10
|
+
os (~> 0.9.6)
|
9
11
|
|
10
12
|
GEM
|
11
13
|
remote: https://rubygems.org/
|
12
14
|
specs:
|
15
|
+
clipboard (1.0.5)
|
13
16
|
commander (4.1.6)
|
14
17
|
highline (~> 1.6.11)
|
15
18
|
highline (1.6.21)
|
16
|
-
httparty (0.13.
|
19
|
+
httparty (0.13.1)
|
17
20
|
json (~> 1.8)
|
18
21
|
multi_xml (>= 0.5.2)
|
19
22
|
json (1.8.1)
|
20
23
|
json_pure (1.8.1)
|
21
24
|
multi_xml (0.5.5)
|
25
|
+
os (0.9.6)
|
22
26
|
rake (10.1.1)
|
23
27
|
|
24
28
|
PLATFORMS
|
data/Rakefile
CHANGED
data/bin/githubrepo
CHANGED
@@ -4,8 +4,11 @@ require File.expand_path '../lib/githubrepo', File.dirname(__FILE__)
|
|
4
4
|
require 'commander/import'
|
5
5
|
|
6
6
|
program :name, 'githubrepo'
|
7
|
-
program :version, '0.
|
8
|
-
program :description, 'Create GitHub repositories from the command line
|
7
|
+
program :version, '0.2.0'
|
8
|
+
program :description, 'Create GitHub repositories from the command line.
|
9
|
+
OSX: repository URL is automatically copied to clipboard.
|
10
|
+
Linux: install xclip (sudo apt-get xclip) and URL will auto copy to clipboard.
|
11
|
+
Windows: run "gem install ffi" and URL will auto copy to clipboard.'
|
9
12
|
program :help, 'Author', 'Elikem Adadevoh <elikem@gmail.com>'
|
10
13
|
|
11
14
|
command :create do |c|
|
@@ -43,4 +46,4 @@ default_command :create
|
|
43
46
|
|
44
47
|
def cli(attributes)
|
45
48
|
Githubrepo.create(attributes)
|
46
|
-
end
|
49
|
+
end
|
data/githubrepo.gemspec
CHANGED
@@ -26,4 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_runtime_dependency 'httparty', '~> 0.13.0'
|
27
27
|
spec.add_runtime_dependency 'json', '~> 1.8.1'
|
28
28
|
spec.add_runtime_dependency 'json_pure', '~> 1.8.1'
|
29
|
-
|
29
|
+
spec.add_runtime_dependency 'clipboard', '~> 1.0.5'
|
30
|
+
spec.add_runtime_dependency 'os', '~> 0.9.6'
|
31
|
+
end
|
data/lib/githubrepo/version.rb
CHANGED
data/lib/githubrepo.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'httparty'
|
3
|
+
require 'clipboard'
|
4
|
+
require 'os'
|
3
5
|
|
4
6
|
module Githubrepo
|
5
7
|
|
@@ -57,7 +59,26 @@ module Githubrepo
|
|
57
59
|
end
|
58
60
|
|
59
61
|
# messages to console
|
60
|
-
|
62
|
+
if clone_url
|
63
|
+
if OS.mac?
|
64
|
+
puts "#{clone_url} --- COPIED TO CLIPBOARD"
|
65
|
+
Clipboard.copy clone_url
|
66
|
+
elsif OS.linux?
|
67
|
+
puts clone_url
|
68
|
+
Clipboard.copy clone_url
|
69
|
+
puts "If xclip is installed, repository URL has been added to your clipboard."
|
70
|
+
puts "debian/ubuntu: apt-get install xclip"
|
71
|
+
# elsif OS.windows?
|
72
|
+
# Clipboard.copy clone_url
|
73
|
+
# # Will Clipboard output clone_url to console if ffi is not installed?
|
74
|
+
# # Below is what it looks like when Clipboard requirements are met
|
75
|
+
# # https://github.com/user/*.git --- COPIED TO CLIPBOARD
|
76
|
+
# puts "If ffi is installed, repository URL has been added to your clipboard."
|
77
|
+
# puts "for installation: gem install ffi"
|
78
|
+
else
|
79
|
+
puts clone_url
|
80
|
+
end
|
81
|
+
end
|
61
82
|
puts message.capitalize if message
|
62
83
|
puts error_message.capitalize if error_message
|
63
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githubrepo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elikem Adadevoh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.8.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: clipboard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.0.5
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.0.5
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: os
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.9.6
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.9.6
|
97
125
|
description: Create GitHub repositories from the command line
|
98
126
|
email:
|
99
127
|
- elikem@gmail.com
|