fustigit 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2521507f0a39cbeab8a60b250612e02c0bf5e42fc38afa9be6a16f348bfd3078
4
- data.tar.gz: f892592872e5592f192720c5175542d804dce14daf7a1d56084073e2f6225c1b
3
+ metadata.gz: a001868c87f7c087d968121a2fda96b844ea25913e7dcdb72eb1693a758aeec7
4
+ data.tar.gz: 7b62afbd47f09af6912c714f99fc4eee50f0389318250c06b5ad9bdd8aa218bb
5
5
  SHA512:
6
- metadata.gz: 7c4a55288990b7c8eb454d1a01ee6be7fffae687a9d4ab2470e6e69972e662806075c37f726f5eea7fda49219b61a22d5535fee5093bb40d0fee4e20e5810680
7
- data.tar.gz: 1cf5ef69b396d5b7d1203d468f6a29ba6b26910480ab15a9db26f088264098a0ba868798fe6da0e1f546f2e2e5fb5abd10b21a6311b9dba72c1dd25aa0b98aa7
6
+ metadata.gz: b8e293b6873be3478c0217713d6863be53589a1e06726bda8697be709ae8f4167198243824527342f75d739d8c5562f2739fcd4df1949b8582ad397e07da3b6f
7
+ data.tar.gz: 014c3dfcf9a79842a31df6cdd035ad4395dde4b6ab4496261ef76657635d1a66405bb1ecbd3d45f4479e0649cbe519068ec13cfaa2e96eba78e34b718926825b
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014-2016 Ryan McKern
1
+ Copyright 2014-2022 Ryan McKern
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
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/Ruby%20CI/badge.svg?branch=master)
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 &lt;ryan@orangefort.com&gt;
86
+ Ryan McKern &lt;ryan@mckern.sh&gt;
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fustigit
4
4
  module Version
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
data/lib/uri/git.rb CHANGED
@@ -15,5 +15,9 @@ module URI
15
15
  host port path
16
16
  ].freeze
17
17
  end
18
- @@schemes["GIT"] = Git
18
+ if respond_to? :register_scheme
19
+ register_scheme "GIT", Git
20
+ else
21
+ @@schemes["GIT"] = Git
22
+ end
19
23
  end
data/lib/uri/rsync.rb CHANGED
@@ -6,5 +6,9 @@ module URI
6
6
  class RSYNC < Generic
7
7
  DEFAULT_PORT = 873
8
8
  end
9
- @@schemes["RSYNC"] = RSYNC
9
+ if respond_to? :register_scheme
10
+ register_scheme "RSYNC", RSYNC
11
+ else
12
+ @@schemes["RSYNC"] = RSYNC
13
+ end
10
14
  end
data/lib/uri/scp.rb CHANGED
@@ -14,5 +14,9 @@ module URI
14
14
  host port path
15
15
  ].freeze
16
16
  end
17
- @@schemes["SCP"] = SCP
17
+ if respond_to? :register_scheme
18
+ register_scheme "SCP", SCP
19
+ else
20
+ @@schemes["SCP"] = SCP
21
+ end
18
22
  end
data/lib/uri/ssh.rb CHANGED
@@ -14,5 +14,9 @@ module URI
14
14
  host port path
15
15
  ].freeze
16
16
  end
17
- @@schemes["SSH"] = SSH
17
+ if respond_to? :register_scheme
18
+ register_scheme "SSH", SSH
19
+ else
20
+ @@schemes["SSH"] = SSH
21
+ end
18
22
  end
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>.+)[@]+)?(?<host>[\w.-]+):(?<path>.*)\z}.freeze
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
- Hash[parts.names.map(&:to_sym).zip(parts.captures)]
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.2.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: 2019-10-24 00:00:00.000000000 Z
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@orangefort.com
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
- post_install_message:
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.5.0
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.0.6
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
@@ -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