repofetch 0.5.0 → 0.5.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/Gemfile.lock +3 -3
- data/RELEASE_NOTES +3 -25
- data/lib/repofetch/VERSION +1 -0
- data/lib/repofetch/cli.rb +23 -8
- data/lib/repofetch/version.rb +5 -0
- data/lib/repofetch.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bfe2278b9a089681497c499e15573b0ccc6ad56aec6562a520f3a1e004bd8a2
|
4
|
+
data.tar.gz: abcf48633cf56efb233e9a9543a8b0e1a647b9c8209f9cd332b75fc13745972d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f9827c43998f71189b3e80a7e824a12b79ec941e83a756631aac8eafe51791674cb354452efc5265a022202c7d6134d34523bfb589d8236bf67fb0262949066
|
7
|
+
data.tar.gz: 70faf36fa9c88ab85ea7a0ae31b2b68f6b85159d02a48f0bad2e1a3d4b8bfa2071cefe449c64531b631b97b083229837068173b6af10f3db0a1a7ab799fb3718
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
repofetch (0.5.
|
4
|
+
repofetch (0.5.1)
|
5
5
|
actionview (~> 7.0, >= 7.0.4)
|
6
6
|
dotenv (~> 2.8)
|
7
7
|
faraday-retry (~> 2.0)
|
@@ -93,7 +93,7 @@ GEM
|
|
93
93
|
awesome_print (> 1.0.0)
|
94
94
|
rspec (> 3.0.0)
|
95
95
|
rspec-support (3.12.0)
|
96
|
-
rubocop (1.
|
96
|
+
rubocop (1.44.0)
|
97
97
|
json (~> 2.3)
|
98
98
|
parallel (~> 1.10)
|
99
99
|
parser (>= 3.2.0.0)
|
@@ -152,4 +152,4 @@ DEPENDENCIES
|
|
152
152
|
yard (~> 0.9.28)
|
153
153
|
|
154
154
|
BUNDLED WITH
|
155
|
-
2.4.
|
155
|
+
2.4.5
|
data/RELEASE_NOTES
CHANGED
@@ -1,28 +1,6 @@
|
|
1
|
-
|
1
|
+
Next
|
2
2
|
|
3
3
|
## Added
|
4
4
|
|
5
|
-
- `
|
6
|
-
- `
|
7
|
-
- `Plugin#matches_path?` and `Plugin#from_path` to allow plugins to initialize from paths, not
|
8
|
-
just git repositories
|
9
|
-
|
10
|
-
## Changed
|
11
|
-
|
12
|
-
- Bitbucket Cloud header to be bold and blue
|
13
|
-
- `Stat#style_label!` to accept one or more styles as parameters
|
14
|
-
- `Plugin#matches_repo?` to return `false` instead of raising an error when it is not overridden
|
15
|
-
|
16
|
-
## Fixed
|
17
|
-
|
18
|
-
- length of separator to match *visual* length of header
|
19
|
-
|
20
|
-
## Potentially Breaking for 3rd-party Plugins
|
21
|
-
|
22
|
-
### Changed
|
23
|
-
|
24
|
-
- `Repofetch::Util` to be a module
|
25
|
-
- `clean_s` to be called `remove_format_params`
|
26
|
-
- Moved `default_remote` and `default_remote_url` to be in `Repofetch::Util`
|
27
|
-
- `Stat#to_s` to return an unstyled value
|
28
|
-
- Header text and stats will now automatically be bold and use the value returned by `Plugin#primary_color`
|
5
|
+
- `-v`/`--version` to print the version from the CLI
|
6
|
+
- `Repofetch::VERSION` to get the version as a library
|
@@ -0,0 +1 @@
|
|
1
|
+
0.5.1
|
data/lib/repofetch/cli.rb
CHANGED
@@ -4,6 +4,7 @@ require 'optparse'
|
|
4
4
|
require 'repofetch'
|
5
5
|
require 'repofetch/config'
|
6
6
|
require 'repofetch/exceptions'
|
7
|
+
require 'repofetch/version'
|
7
8
|
|
8
9
|
class Repofetch
|
9
10
|
# Command line interface for repofetch.
|
@@ -27,15 +28,9 @@ class Repofetch
|
|
27
28
|
load_plugins
|
28
29
|
define_options.parse!(@args)
|
29
30
|
|
30
|
-
|
31
|
-
plugin = new_plugin
|
32
|
-
rescue Repofetch::PluginUsageError => e
|
33
|
-
warn e
|
34
|
-
return 1
|
35
|
-
end
|
31
|
+
return @exit unless @exit.nil?
|
36
32
|
|
37
|
-
|
38
|
-
0
|
33
|
+
start_plugin
|
39
34
|
end
|
40
35
|
|
41
36
|
def define_options
|
@@ -45,6 +40,7 @@ class Repofetch
|
|
45
40
|
add_repository_options(opts)
|
46
41
|
add_plugin_options(opts)
|
47
42
|
add_options_notes(opts)
|
43
|
+
add_version_option(opts)
|
48
44
|
end
|
49
45
|
end
|
50
46
|
|
@@ -60,6 +56,13 @@ class Repofetch
|
|
60
56
|
|
61
57
|
private
|
62
58
|
|
59
|
+
def add_version_option(opts)
|
60
|
+
opts.on('-v', '--version', 'Print the version number and exit.') do
|
61
|
+
puts "repofetch #{Repofetch::VERSION}"
|
62
|
+
@exit = 0
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
63
66
|
def add_repository_options(opts)
|
64
67
|
opts.on('-r', '--repository', '-p', '--path PATH',
|
65
68
|
'Use the provided path. Defaults to the current directory.') do |path|
|
@@ -91,5 +94,17 @@ class Repofetch
|
|
91
94
|
def available_plugins
|
92
95
|
Repofetch.plugins.to_h { |plugin| [plugin.name, plugin] }
|
93
96
|
end
|
97
|
+
|
98
|
+
def start_plugin
|
99
|
+
begin
|
100
|
+
plugin = new_plugin
|
101
|
+
rescue Repofetch::PluginUsageError => e
|
102
|
+
warn e
|
103
|
+
return 1
|
104
|
+
end
|
105
|
+
|
106
|
+
puts plugin
|
107
|
+
0
|
108
|
+
end
|
94
109
|
end
|
95
110
|
end
|
data/lib/repofetch.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repofetch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spenser Black
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -296,6 +296,7 @@ files:
|
|
296
296
|
- exe/repofetch
|
297
297
|
- lib/repofetch.rb
|
298
298
|
- lib/repofetch/DEFAULT_CONFIG
|
299
|
+
- lib/repofetch/VERSION
|
299
300
|
- lib/repofetch/bitbucketcloud.rb
|
300
301
|
- lib/repofetch/bitbucketcloud/ASCII
|
301
302
|
- lib/repofetch/bitbucketcloud/stats.rb
|
@@ -312,6 +313,7 @@ files:
|
|
312
313
|
- lib/repofetch/theme.rb
|
313
314
|
- lib/repofetch/timespan_stat.rb
|
314
315
|
- lib/repofetch/util.rb
|
316
|
+
- lib/repofetch/version.rb
|
315
317
|
homepage: https://github.com/spenserblack/repofetch
|
316
318
|
licenses:
|
317
319
|
- MIT
|