git.io 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +5 -1
- data/README.md +2 -2
- data/lib/gitio.rb +2 -2
- data/lib/gitio/version.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- data/spec/gitio_spec.rb +1 -1
- metadata +23 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d5ca4d9879307c4ac9f562ae39862b79f60a93e8
|
4
|
+
data.tar.gz: 92d9d8838129476eec4a232b39c97730f7ec78d9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3365935c3d31568321c216421c633e14ef43b0ff3284e1af0b2d53260048c05fa3a7e5e5351ad63fcd037c355c78530706319b2970f87054fea2fece6c573d64
|
7
|
+
data.tar.gz: 614753a54cf696b76e9373c51729df2ef1e61e1ade7dc3976f05c056030ad9229ff75831bc0bb164eaa6b5ad3ca6da22308ce56343e317e740680afd195201a5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -6,10 +6,10 @@ Command-line client for GitHub's URL shortener.
|
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
9
|
-
$ git.io
|
9
|
+
$ git.io https://github.com/jgorset/git.io
|
10
10
|
http://git.io/J6MbsQ
|
11
11
|
|
12
|
-
$ git.io
|
12
|
+
$ git.io https://github.com/jgorset/git.io --code=git.io
|
13
13
|
http://git.io/git.io
|
14
14
|
|
15
15
|
## Installation
|
data/lib/gitio.rb
CHANGED
@@ -12,7 +12,7 @@ module Gitio
|
|
12
12
|
# to use it in place of a random value for the
|
13
13
|
# shortened URL.
|
14
14
|
def self.shorten(url, code=nil)
|
15
|
-
Net::HTTP.start "git.io",
|
15
|
+
Net::HTTP.start "git.io", 443, :use_ssl => true do |http|
|
16
16
|
request = Net::HTTP::Post.new "/"
|
17
17
|
request.content_type = "application/x-www-form-urlencoded"
|
18
18
|
|
@@ -37,7 +37,7 @@ module Gitio
|
|
37
37
|
def self.lengthen(url)
|
38
38
|
url = URI(url)
|
39
39
|
|
40
|
-
Net::HTTP.start url.host,
|
40
|
+
Net::HTTP.start url.host, 443, :use_ssl => true do |http|
|
41
41
|
request = Net::HTTP::Get.new url.path
|
42
42
|
|
43
43
|
response = http.request(request)
|
data/lib/gitio/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe Gitio::CLI do
|
|
8
8
|
Gitio::CLI.new ["https://github.com/jgorset/git.io"]
|
9
9
|
end
|
10
10
|
|
11
|
-
output.should eq "
|
11
|
+
output.should eq "https://git.io/Vhp6yw\n"
|
12
12
|
end
|
13
13
|
|
14
14
|
it "accepts an URL with a code" do
|
@@ -16,7 +16,7 @@ describe Gitio::CLI do
|
|
16
16
|
Gitio::CLI.new ["https://github.com/jgorset/git.io", "git.io"]
|
17
17
|
end
|
18
18
|
|
19
|
-
output.should eq "
|
19
|
+
output.should eq "https://git.io/Vhp6yw\n"
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
data/spec/gitio_spec.rb
CHANGED
metadata
CHANGED
@@ -1,38 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git.io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Johannes Gorset
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
description: Command-line client for GitHub's URL shortener, git.io.
|
37
42
|
email:
|
38
43
|
- jgorset@gmail.com
|
@@ -41,8 +46,8 @@ executables:
|
|
41
46
|
extensions: []
|
42
47
|
extra_rdoc_files: []
|
43
48
|
files:
|
44
|
-
- .gitignore
|
45
|
-
- .travis.yml
|
49
|
+
- ".gitignore"
|
50
|
+
- ".travis.yml"
|
46
51
|
- Gemfile
|
47
52
|
- README.md
|
48
53
|
- Rakefile
|
@@ -57,27 +62,26 @@ files:
|
|
57
62
|
- spec/support.rb
|
58
63
|
homepage: http://github.com/jgorset/git.io
|
59
64
|
licenses: []
|
65
|
+
metadata: {}
|
60
66
|
post_install_message:
|
61
67
|
rdoc_options: []
|
62
68
|
require_paths:
|
63
69
|
- lib
|
64
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
71
|
requirements:
|
67
|
-
- -
|
72
|
+
- - ">="
|
68
73
|
- !ruby/object:Gem::Version
|
69
74
|
version: '0'
|
70
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
76
|
requirements:
|
73
|
-
- -
|
77
|
+
- - ">="
|
74
78
|
- !ruby/object:Gem::Version
|
75
79
|
version: '0'
|
76
80
|
requirements: []
|
77
81
|
rubyforge_project: git.io
|
78
|
-
rubygems_version:
|
82
|
+
rubygems_version: 2.5.1
|
79
83
|
signing_key:
|
80
|
-
specification_version:
|
84
|
+
specification_version: 4
|
81
85
|
summary: Command-line client for git.io
|
82
86
|
test_files:
|
83
87
|
- spec/cli_spec.rb
|