fustigit 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/fustigit/version.rb +1 -1
- data/lib/uri/git.rb +5 -1
- data/lib/uri/rsync.rb +5 -1
- data/lib/uri/scp.rb +5 -1
- data/lib/uri/ssh.rb +5 -1
- data/lib/uri/triplets.rb +4 -4
- metadata +11 -16
- data/Rakefile +0 -32
- data/spec/spec_helper.rb +0 -24
- data/spec/uri/fustigit_spec.rb +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a001868c87f7c087d968121a2fda96b844ea25913e7dcdb72eb1693a758aeec7
|
4
|
+
data.tar.gz: 7b62afbd47f09af6912c714f99fc4eee50f0389318250c06b5ad9bdd8aa218bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8e293b6873be3478c0217713d6863be53589a1e06726bda8697be709ae8f4167198243824527342f75d739d8c5562f2739fcd4df1949b8582ad397e07da3b6f
|
7
|
+
data.tar.gz: 014c3dfcf9a79842a31df6cdd035ad4395dde4b6ab4496261ef76657635d1a66405bb1ecbd3d45f4479e0649cbe519068ec13cfaa2e96eba78e34b718926825b
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<dd>To criticize harshly.</dd>
|
7
7
|
</dl>
|
8
8
|
|
9
|
-
![](https://github.com/mckern/fustigit/workflows/
|
9
|
+
[![Test & Lint](https://github.com/mckern/fustigit/actions/workflows/tests.yaml/badge.svg)](https://github.com/mckern/fustigit/actions/workflows/tests.yaml)
|
10
10
|
|
11
11
|
### TL;DR
|
12
12
|
|
@@ -83,4 +83,4 @@ Fustigate is licensed under the Apache License, Version 2.0.
|
|
83
83
|
|
84
84
|
### Maintainer
|
85
85
|
|
86
|
-
Ryan McKern <ryan@
|
86
|
+
Ryan McKern <ryan@mckern.sh>
|
data/lib/fustigit/version.rb
CHANGED
data/lib/uri/git.rb
CHANGED
data/lib/uri/rsync.rb
CHANGED
data/lib/uri/scp.rb
CHANGED
data/lib/uri/ssh.rb
CHANGED
data/lib/uri/triplets.rb
CHANGED
@@ -14,7 +14,7 @@ module Triplets
|
|
14
14
|
str = []
|
15
15
|
str << "#{user}@" if user && !user.empty?
|
16
16
|
str << "#{host}:#{path}".squeeze("/")
|
17
|
-
str.join
|
17
|
+
str.join
|
18
18
|
end
|
19
19
|
private :triplet
|
20
20
|
|
@@ -31,7 +31,7 @@ module Triplets
|
|
31
31
|
else
|
32
32
|
str << [host, path].join("/").squeeze("/")
|
33
33
|
end
|
34
|
-
str.join
|
34
|
+
str.join
|
35
35
|
end
|
36
36
|
private :rfc_uri
|
37
37
|
# rubocop:enable Metrics/AbcSize
|
@@ -60,7 +60,7 @@ end
|
|
60
60
|
# they're passed.
|
61
61
|
module TripletInterruptus
|
62
62
|
# Determine if a string can be teased apart into URI-like components
|
63
|
-
TRIPLET = %r{\A(?:(?<userinfo>.+)
|
63
|
+
TRIPLET = %r{\A(?:(?<userinfo>.+)@+)?(?<host>[\w.-]+):(?<path>.*)\z}.freeze
|
64
64
|
|
65
65
|
# Determine if a string is prefixed with a URI scheme like http:// or ssh://
|
66
66
|
SCHEME = %r{\A(?:(?<scheme>[a-z]+)://)}.freeze
|
@@ -95,7 +95,7 @@ module TripletInterruptus
|
|
95
95
|
parts = address.match(TRIPLET)
|
96
96
|
return nil unless parts
|
97
97
|
|
98
|
-
|
98
|
+
parts.names.map(&:to_sym).zip(parts.captures).to_h
|
99
99
|
end
|
100
100
|
private :parse_triplet
|
101
101
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fustigit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan McKern
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: '"Parse" SCP-like address triplets with the Standard Ruby URI Library.'
|
14
|
-
email: ryan@
|
14
|
+
email: ryan@mckern.sh
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
@@ -19,7 +19,6 @@ files:
|
|
19
19
|
- CHANGELOG.md
|
20
20
|
- LICENSE
|
21
21
|
- README.md
|
22
|
-
- Rakefile
|
23
22
|
- lib/fustigit.rb
|
24
23
|
- lib/fustigit/version.rb
|
25
24
|
- lib/uri/git.rb
|
@@ -27,13 +26,12 @@ files:
|
|
27
26
|
- lib/uri/scp.rb
|
28
27
|
- lib/uri/ssh.rb
|
29
28
|
- lib/uri/triplets.rb
|
30
|
-
- spec/spec_helper.rb
|
31
|
-
- spec/uri/fustigit_spec.rb
|
32
29
|
homepage: http://github.com/mckern/fustigit
|
33
30
|
licenses:
|
34
31
|
- Apache-2.0
|
35
|
-
metadata:
|
36
|
-
|
32
|
+
metadata:
|
33
|
+
rubygems_mfa_required: 'true'
|
34
|
+
post_install_message:
|
37
35
|
rdoc_options: []
|
38
36
|
require_paths:
|
39
37
|
- lib
|
@@ -41,18 +39,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
39
|
requirements:
|
42
40
|
- - ">="
|
43
41
|
- !ruby/object:Gem::Version
|
44
|
-
version: 2.
|
42
|
+
version: 2.7.0
|
45
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
44
|
requirements:
|
47
45
|
- - ">="
|
48
46
|
- !ruby/object:Gem::Version
|
49
47
|
version: '0'
|
50
48
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
52
|
-
signing_key:
|
49
|
+
rubygems_version: 3.3.11
|
50
|
+
signing_key:
|
53
51
|
specification_version: 3
|
54
52
|
summary: Use URI to "parse" SCP-like triplets
|
55
|
-
test_files:
|
56
|
-
- Rakefile
|
57
|
-
- spec/spec_helper.rb
|
58
|
-
- spec/uri/fustigit_spec.rb
|
53
|
+
test_files: []
|
data/Rakefile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "bundler/gem_tasks"
|
5
|
-
require "rake/testtask"
|
6
|
-
require "rubocop/rake_task"
|
7
|
-
|
8
|
-
desc "Test fustigit"
|
9
|
-
namespace :test do
|
10
|
-
Rake::TestTask.new(:spec) do |test|
|
11
|
-
test.libs << "spec"
|
12
|
-
test.pattern = "spec/**/*_spec.rb"
|
13
|
-
test.verbose = false
|
14
|
-
test.warning = false
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Test fustigit and calculate test coverage"
|
18
|
-
task :coverage do
|
19
|
-
ENV["COVERAGE"] = "true"
|
20
|
-
Rake::Task["test:spec"].invoke
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
desc "Run RuboCop"
|
25
|
-
RuboCop::RakeTask.new(:rubocop) do |task|
|
26
|
-
task.options << "--display-cop-names"
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "Run all spec tests and linters"
|
30
|
-
task check: %w[test:spec rubocop]
|
31
|
-
|
32
|
-
task default: :check
|
data/spec/spec_helper.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "minitest/spec"
|
5
|
-
require "minitest/autorun"
|
6
|
-
require "minitest/reporters"
|
7
|
-
require "json"
|
8
|
-
|
9
|
-
Minitest::Reporters.use! Minitest::Reporters::DefaultReporter.new
|
10
|
-
|
11
|
-
if ENV["COVERAGE"]
|
12
|
-
require "simplecov"
|
13
|
-
SimpleCov.start do
|
14
|
-
# exclude common Bundler locations
|
15
|
-
%w[.bundle vendor].each { |dir| add_filter dir }
|
16
|
-
# exclude test code
|
17
|
-
add_filter "spec"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def fixture(path)
|
22
|
-
path = File.join(File.dirname(__FILE__), "fixtures", path)
|
23
|
-
File.read(path)
|
24
|
-
end
|
data/spec/uri/fustigit_spec.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
require "fustigit"
|
5
|
-
|
6
|
-
describe URI do # rubocop:disable Metrics/BlockLength
|
7
|
-
@git_repos = JSON.parse(fixture("formats.json"))
|
8
|
-
@git_repos["URIs"].each do |protocol, repos|
|
9
|
-
repos.each do |repo|
|
10
|
-
describe %(#parse takes given URI "#{repo}") do
|
11
|
-
it "returns URI::#{protocol}" do
|
12
|
-
_(URI.parse(repo).is_a?(URI.const_get(protocol))).must_equal true
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
@git_repos["paths"].each do |repo|
|
19
|
-
describe %(#parse takes path "#{repo}") do
|
20
|
-
it "returns URI::Generic" do
|
21
|
-
_(URI.parse(repo).is_a?(URI::Generic)).must_equal true
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
@git_repos["triplets"].each do |repo|
|
27
|
-
describe %(#parse takes triplet "#{repo}") do
|
28
|
-
it "returns URI::#{URI.default_triplet_type}" do
|
29
|
-
_(URI.parse(repo).is_a?(URI.const_get(URI.default_triplet_type))).must_equal true
|
30
|
-
end
|
31
|
-
|
32
|
-
it "recognizes URI::#{URI.default_triplet_type} as a triplet" do
|
33
|
-
_(URI.parse(repo).triplet?).must_equal true
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|