repofetch 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/RELEASE_NOTES +2 -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: c3aa2f5af5b1ecf4bee7de5b68c3dd28b0fb22f8d38b0f45b7d1efaa3d0836e0
|
4
|
+
data.tar.gz: a399b44bd5781a21961d0a0b2e585eb59295c936770068b8b3d3e1bb3705d6f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af92ff3bc77e859581b7100f0ea4fe6ecdfa78ae56616f357cf9a519eae5f2770bdc883833fbad5a655cbf5d16b1605b8f4b219cecd23fe9012631791049a988
|
7
|
+
data.tar.gz: d336b0ace082947104f328f132bbac64c90d447c8e98c28280bb1d659c1cc931e2aed6df10d5888ba3ff668f953efe9864947d9d0054766c3d606e64f45c2cb0
|
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.2)
|
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,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
## Added
|
4
|
-
|
5
|
-
- `Stat#format(theme)` to create styled stats
|
6
|
-
- `Stat#style_label` to style the label without mutating the original `Stat` instance
|
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
|
1
|
+
Next
|
15
2
|
|
16
3
|
## Fixed
|
17
4
|
|
18
|
-
-
|
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
|
+
- Placement of `-v, --version` help in the help message
|
@@ -0,0 +1 @@
|
|
1
|
+
0.5.2
|
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
|
@@ -44,6 +39,7 @@ class Repofetch
|
|
44
39
|
|
45
40
|
add_repository_options(opts)
|
46
41
|
add_plugin_options(opts)
|
42
|
+
add_version_option(opts)
|
47
43
|
add_options_notes(opts)
|
48
44
|
end
|
49
45
|
end
|
@@ -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.2
|
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
|