dryrun 0.8.0 → 0.8.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 +4 -4
- data/lib/dryrun/github.rb +15 -5
- data/lib/dryrun/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 005bfb7f37647f9971b214b8830b486c565ecc12
|
4
|
+
data.tar.gz: ad829eaf19861597354b3566004c62232c374696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a085e052f943535a1f368ef88b37092a4031570873c18b7be6fa823be6d31fdecc526c4780c4c3dd9ac0e2a5bc8b259fe087c03361479da947a7eeb3f5ec1611
|
7
|
+
data.tar.gz: 1868495c41a7a841480858ece8966288ff81ef8891917c6835721c3ebd9211317671abb72f98812f684e46df47951aec34c16a8efb18ca2245db67dc637db669
|
data/lib/dryrun/github.rb
CHANGED
@@ -1,21 +1,31 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
require 'fileutils'
|
3
3
|
require 'uri'
|
4
|
-
require 'digest'
|
5
4
|
require_relative 'dryrun_utils'
|
6
5
|
|
7
6
|
module Dryrun
|
8
7
|
class Github
|
9
8
|
def initialize(url)
|
9
|
+
@base_url = sanitize_url(url)
|
10
|
+
@destination = destination
|
11
|
+
end
|
12
|
+
|
13
|
+
def sanitize_url(url)
|
10
14
|
url = url.split('?').first
|
11
15
|
url.chop! if url.end_with? '/'
|
12
|
-
|
13
|
-
@base_url = url
|
14
|
-
@destination = destination
|
16
|
+
return url
|
15
17
|
end
|
16
18
|
|
17
19
|
def destination
|
18
|
-
|
20
|
+
unless @base_url.include? 'github.com'
|
21
|
+
return Digest::SHA256.hexdigest @base_url
|
22
|
+
end
|
23
|
+
|
24
|
+
stripped_url = @base_url.gsub('.git', '')
|
25
|
+
stripped_url = stripped_url.gsub('.git', '')
|
26
|
+
stripped_url = stripped_url.gsub('git@github.com:', '')
|
27
|
+
stripped_url = stripped_url.gsub('https://github.com/', '')
|
28
|
+
stripped_url = stripped_url.gsub('http://github.com/', '')
|
19
29
|
end
|
20
30
|
|
21
31
|
def valid?
|
data/lib/dryrun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.5.1
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Tool to try any android library hosted online directly from the command line
|