labrat 1.2.1 → 1.2.3
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/.github/workflows/main.yml +27 -0
- data/.github/workflows/ruby.yml +38 -0
- data/.rubocop.yml +177 -2
- data/Gemfile +11 -5
- data/Gemfile.lock +108 -70
- data/README.org +52 -39
- data/Rakefile +1 -1
- data/bin/labrat +0 -1
- data/labrat.gemspec +5 -13
- data/lib/config_files/labeldb.yml +17 -0
- data/lib/labrat/arg_parser.rb +202 -96
- data/lib/labrat/config.rb +32 -12
- data/lib/labrat/hash.rb +2 -8
- data/lib/labrat/label.rb +28 -12
- data/lib/labrat/label_db.rb +2 -2
- data/lib/labrat/options.rb +48 -22
- data/lib/labrat/read_files.rb +3 -2
- data/lib/labrat/version.rb +1 -1
- data/lib/labrat.rb +1 -0
- data/texlabels/sample.pdf +0 -0
- data/texlabels/sample.tex +9 -5
- metadata +17 -116
- data/texlabels/sample.synctex.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f670030c9b1823ffc3cd869dd6f765294960b52d0102ec197b626c23d1a1eb53
|
4
|
+
data.tar.gz: 54a962fe1c2756107d0176a833fdc5620fd6742b67552a34aa73efbf1f4f7a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e44478bd2593586dc2922b1aa0bb82ab38cdf9c49644dc1fb9835ed15990031c726bd5e9188289af1fabd81872e19194a9d5119085b89338de5a9705719fad
|
7
|
+
data.tar.gz: d0b6fe7f577acc010e47769c63c85b59f82c5038851204766bab8e7847f9e9f0e7625575ab9ac376b5217514a311486233e77e8bf1bc6d476ff3b12d0787527e
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
pull_request:
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
name: Ruby ${{ matrix.ruby }}
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby:
|
17
|
+
- '3.3.5'
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Run the default task
|
27
|
+
run: bundle exec rake
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby Versions
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['3.2', '3.3', '3.4']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@v1 # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/.rubocop.yml
CHANGED
@@ -1,2 +1,177 @@
|
|
1
|
-
|
2
|
-
-
|
1
|
+
plugins:
|
2
|
+
- rubocop-rspec
|
3
|
+
- rubocop-performance
|
4
|
+
|
5
|
+
inherit_gem:
|
6
|
+
rubocop-shopify: rubocop.yml
|
7
|
+
|
8
|
+
AllCops:
|
9
|
+
NewCops: enable
|
10
|
+
TargetRubyVersion: 3.1
|
11
|
+
|
12
|
+
Style/DateTime:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Style/StringLiteralsInInterpolation:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedStyle: single_quotes
|
18
|
+
|
19
|
+
Style/MethodCallWithArgsParentheses:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/StringLiterals:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/WordArray:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/SymbolArray:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/TrailingCommaInHashLiteral:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/TrailingCommaInArrayLiteral:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Style/HashSyntax:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Style/ClassMethodsDefinitions:
|
41
|
+
Enabled: true
|
42
|
+
EnforcedStyle: def_self
|
43
|
+
|
44
|
+
Layout/LineLength:
|
45
|
+
Enabled: true
|
46
|
+
Max: 120
|
47
|
+
# To make it possible to copy or click on URIs in the code, we allow lines
|
48
|
+
# containing a URI to be longer than Max.
|
49
|
+
AllowHeredoc: true
|
50
|
+
AllowURI: true
|
51
|
+
URISchemes:
|
52
|
+
- http
|
53
|
+
- https
|
54
|
+
|
55
|
+
Layout/ArgumentAlignment:
|
56
|
+
Enabled: true
|
57
|
+
EnforcedStyle: with_first_argument
|
58
|
+
|
59
|
+
Naming/InclusiveLanguage:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Metrics/AbcSize:
|
63
|
+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
64
|
+
# a Float.
|
65
|
+
Enabled: false
|
66
|
+
Max: 50
|
67
|
+
|
68
|
+
Metrics/BlockNesting:
|
69
|
+
Enabled: false
|
70
|
+
Max: 3
|
71
|
+
|
72
|
+
Metrics/BlockLength:
|
73
|
+
Enabled: false
|
74
|
+
Max: 25
|
75
|
+
|
76
|
+
Metrics/ClassLength:
|
77
|
+
Enabled: false
|
78
|
+
CountComments: false # count full line comments?
|
79
|
+
Max: 100
|
80
|
+
|
81
|
+
Metrics/ModuleLength:
|
82
|
+
Enabled: false
|
83
|
+
CountComments: false # count full line comments?
|
84
|
+
Max: 100
|
85
|
+
|
86
|
+
Metrics/MethodLength:
|
87
|
+
Enabled: false
|
88
|
+
CountComments: false # count full line comments?
|
89
|
+
Max: 10
|
90
|
+
|
91
|
+
# Avoid complex methods.
|
92
|
+
Metrics/CyclomaticComplexity:
|
93
|
+
Enabled: false
|
94
|
+
Max: 20
|
95
|
+
|
96
|
+
Metrics/ParameterLists:
|
97
|
+
Max: 5
|
98
|
+
CountKeywordArgs: false
|
99
|
+
|
100
|
+
Metrics/PerceivedComplexity:
|
101
|
+
Enabled: false
|
102
|
+
Max: 8
|
103
|
+
|
104
|
+
Layout/MultilineOperationIndentation:
|
105
|
+
EnforcedStyle: aligned
|
106
|
+
|
107
|
+
Layout/MultilineMethodCallIndentation:
|
108
|
+
EnforcedStyle: indented_relative_to_receiver
|
109
|
+
SupportedStyles:
|
110
|
+
- aligned
|
111
|
+
- indented
|
112
|
+
- indented_relative_to_receiver
|
113
|
+
# By default, the indentation width from Style/IndentationWidth is used
|
114
|
+
# But it can be overridden by setting this parameter
|
115
|
+
IndentationWidth: ~
|
116
|
+
|
117
|
+
# Though the style guides recommend against them, I like perl back references.
|
118
|
+
# They are much more concise than the recommended: $2 vs. Regexp.last_match(2).
|
119
|
+
# Two characters versus 18!
|
120
|
+
# Cop supports --auto-correct.
|
121
|
+
Style/PerlBackrefs:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
# Cop supports --auto-correct.
|
125
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
126
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
127
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
128
|
+
# FunctionalMethods: let, let!, subject, watch
|
129
|
+
# IgnoredMethods: lambda, proc, it
|
130
|
+
Style/BlockDelimiters:
|
131
|
+
EnforcedStyle: braces_for_chaining
|
132
|
+
ProceduralMethods: expect
|
133
|
+
|
134
|
+
# Cop supports --auto-correct.
|
135
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
136
|
+
Layout/ExtraSpacing:
|
137
|
+
AllowForAlignment: true
|
138
|
+
|
139
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
140
|
+
# SupportedStyles: format, sprintf, percent
|
141
|
+
Style/FormatString:
|
142
|
+
Enabled: false
|
143
|
+
|
144
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
145
|
+
# NamePrefix: is_, has_, have_
|
146
|
+
# NamePrefixBlacklist: is_, has_, have_
|
147
|
+
# NameWhitelist: is_a?
|
148
|
+
Naming/PredicateName:
|
149
|
+
AllowedMethods: has_overlaps_within?
|
150
|
+
Exclude:
|
151
|
+
- 'spec/**/*'
|
152
|
+
|
153
|
+
# Cop supports --auto-correct.
|
154
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
155
|
+
# SupportedStyles: always, never
|
156
|
+
Style/FrozenStringLiteralComment:
|
157
|
+
Enabled: false
|
158
|
+
EnforcedStyle: always
|
159
|
+
|
160
|
+
# I like using !! to convert a value to boolean.
|
161
|
+
Style/DoubleNegation:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
RSpec/MultipleExpectations:
|
165
|
+
Enabled: false
|
166
|
+
|
167
|
+
RSpec/ExampleLength:
|
168
|
+
Enabled: false
|
169
|
+
|
170
|
+
RSpec/DescribedClass:
|
171
|
+
Enabled: false
|
172
|
+
|
173
|
+
RSpec/MultipleMemoizedHelpers:
|
174
|
+
Max: 10
|
175
|
+
|
176
|
+
RSpec/NestedGroups:
|
177
|
+
Max: 5
|
data/Gemfile
CHANGED
@@ -5,8 +5,14 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in labrat.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
gem
|
11
|
-
|
12
|
-
gem
|
8
|
+
group :development do
|
9
|
+
gem 'debug', '>= 1.0.0'
|
10
|
+
gem 'pry'
|
11
|
+
gem 'rake'
|
12
|
+
gem 'rspec'
|
13
|
+
gem 'rubocop'
|
14
|
+
gem 'rubocop-performance'
|
15
|
+
gem 'rubocop-rspec'
|
16
|
+
gem 'rubocop-shopify'
|
17
|
+
gem 'simplecov'
|
18
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
labrat (1.2.
|
4
|
+
labrat (1.2.3)
|
5
5
|
activesupport
|
6
|
+
fat_config (>= 0.4.2)
|
6
7
|
fat_core
|
7
8
|
matrix
|
8
9
|
prawn (~> 2.0)
|
@@ -10,103 +11,140 @@ PATH
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
activesupport (
|
14
|
+
activesupport (8.0.2)
|
14
15
|
base64
|
16
|
+
benchmark (>= 0.3)
|
15
17
|
bigdecimal
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
17
19
|
connection_pool (>= 2.2.5)
|
18
20
|
drb
|
19
21
|
i18n (>= 1.6, < 2)
|
22
|
+
logger (>= 1.4.2)
|
20
23
|
minitest (>= 5.1)
|
21
|
-
|
22
|
-
tzinfo (~> 2.0)
|
23
|
-
|
24
|
+
securerandom (>= 0.3)
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
26
|
+
uri (>= 0.13.1)
|
27
|
+
ast (2.4.3)
|
24
28
|
base64 (0.2.0)
|
25
|
-
|
29
|
+
benchmark (0.4.0)
|
30
|
+
bigdecimal (3.1.9)
|
26
31
|
coderay (1.1.3)
|
27
|
-
concurrent-ruby (1.
|
28
|
-
connection_pool (2.
|
32
|
+
concurrent-ruby (1.3.5)
|
33
|
+
connection_pool (2.5.0)
|
29
34
|
damerau-levenshtein (1.3.3)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
date (3.4.1)
|
36
|
+
debug (1.10.0)
|
37
|
+
irb (~> 1.10)
|
38
|
+
reline (>= 0.3.8)
|
39
|
+
diff-lcs (1.6.0)
|
40
|
+
docile (1.4.1)
|
41
|
+
drb (2.2.1)
|
42
|
+
fat_config (0.4.2)
|
43
|
+
activesupport
|
44
|
+
fat_core (>= 5.6.1)
|
45
|
+
inifile
|
46
|
+
tomlib
|
47
|
+
fat_core (5.6.1)
|
38
48
|
activesupport
|
39
49
|
damerau-levenshtein
|
40
|
-
|
50
|
+
ostruct
|
51
|
+
stringio (>= 3.1.2)
|
52
|
+
i18n (1.14.7)
|
41
53
|
concurrent-ruby (~> 1.0)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
54
|
+
inifile (3.0.0)
|
55
|
+
io-console (0.8.0)
|
56
|
+
irb (1.15.1)
|
57
|
+
pp (>= 0.6.0)
|
58
|
+
rdoc (>= 4.0.0)
|
59
|
+
reline (>= 0.4.2)
|
60
|
+
json (2.10.2)
|
61
|
+
language_server-protocol (3.17.0.4)
|
62
|
+
lint_roller (1.1.0)
|
63
|
+
logger (1.6.6)
|
46
64
|
matrix (0.4.2)
|
47
|
-
method_source (1.
|
48
|
-
minitest (5.
|
49
|
-
|
50
|
-
parallel (1.
|
51
|
-
parser (3.
|
65
|
+
method_source (1.1.0)
|
66
|
+
minitest (5.25.5)
|
67
|
+
ostruct (0.6.1)
|
68
|
+
parallel (1.26.3)
|
69
|
+
parser (3.3.7.1)
|
52
70
|
ast (~> 2.4.1)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
71
|
+
racc
|
72
|
+
pdf-core (0.10.0)
|
73
|
+
pp (0.6.2)
|
74
|
+
prettyprint
|
75
|
+
prawn (2.5.0)
|
76
|
+
matrix (~> 0.4)
|
77
|
+
pdf-core (~> 0.10.0)
|
78
|
+
ttfunk (~> 1.8)
|
79
|
+
prettyprint (0.2.0)
|
80
|
+
pry (0.15.2)
|
58
81
|
coderay (~> 1.1)
|
59
82
|
method_source (~> 1.0)
|
83
|
+
psych (5.2.3)
|
84
|
+
date
|
85
|
+
stringio
|
86
|
+
racc (1.8.1)
|
60
87
|
rainbow (3.1.1)
|
61
|
-
rake (13.
|
62
|
-
|
63
|
-
|
88
|
+
rake (13.2.1)
|
89
|
+
rdoc (6.12.0)
|
90
|
+
psych (>= 4.0.0)
|
91
|
+
regexp_parser (2.10.0)
|
92
|
+
reline (0.6.0)
|
64
93
|
io-console (~> 0.5)
|
65
|
-
|
66
|
-
|
67
|
-
rspec-
|
68
|
-
rspec-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
rspec-expectations (3.12.1)
|
94
|
+
rspec (3.13.0)
|
95
|
+
rspec-core (~> 3.13.0)
|
96
|
+
rspec-expectations (~> 3.13.0)
|
97
|
+
rspec-mocks (~> 3.13.0)
|
98
|
+
rspec-core (3.13.3)
|
99
|
+
rspec-support (~> 3.13.0)
|
100
|
+
rspec-expectations (3.13.3)
|
73
101
|
diff-lcs (>= 1.2.0, < 2.0)
|
74
|
-
rspec-support (~> 3.
|
75
|
-
rspec-mocks (3.
|
102
|
+
rspec-support (~> 3.13.0)
|
103
|
+
rspec-mocks (3.13.2)
|
76
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-support (3.
|
79
|
-
rubocop (1.
|
105
|
+
rspec-support (~> 3.13.0)
|
106
|
+
rspec-support (3.13.2)
|
107
|
+
rubocop (1.74.0)
|
80
108
|
json (~> 2.3)
|
109
|
+
language_server-protocol (~> 3.17.0.2)
|
110
|
+
lint_roller (~> 1.1.0)
|
81
111
|
parallel (~> 1.10)
|
82
|
-
parser (>= 3.
|
112
|
+
parser (>= 3.3.0.2)
|
83
113
|
rainbow (>= 2.2.2, < 4.0)
|
84
|
-
regexp_parser (>=
|
85
|
-
|
86
|
-
rubocop-ast (>= 1.24.1, < 2.0)
|
114
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
115
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
87
116
|
ruby-progressbar (~> 1.7)
|
88
|
-
unicode-display_width (>=
|
89
|
-
rubocop-ast (1.
|
90
|
-
parser (>= 3.
|
91
|
-
rubocop-performance (1.
|
92
|
-
|
93
|
-
rubocop
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
rubocop (~> 1.
|
98
|
-
|
99
|
-
|
117
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
118
|
+
rubocop-ast (1.40.0)
|
119
|
+
parser (>= 3.3.1.0)
|
120
|
+
rubocop-performance (1.24.0)
|
121
|
+
lint_roller (~> 1.1)
|
122
|
+
rubocop (>= 1.72.1, < 2.0)
|
123
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
124
|
+
rubocop-rspec (3.5.0)
|
125
|
+
lint_roller (~> 1.1)
|
126
|
+
rubocop (~> 1.72, >= 1.72.1)
|
127
|
+
rubocop-shopify (2.16.0)
|
128
|
+
rubocop (~> 1.62)
|
129
|
+
ruby-progressbar (1.13.0)
|
130
|
+
securerandom (0.4.1)
|
100
131
|
simplecov (0.22.0)
|
101
132
|
docile (~> 1.1)
|
102
133
|
simplecov-html (~> 0.11)
|
103
134
|
simplecov_json_formatter (~> 0.1)
|
104
|
-
simplecov-html (0.
|
135
|
+
simplecov-html (0.13.1)
|
105
136
|
simplecov_json_formatter (0.1.4)
|
106
|
-
|
137
|
+
stringio (3.1.5)
|
138
|
+
tomlib (0.7.3)
|
139
|
+
bigdecimal
|
140
|
+
ttfunk (1.8.0)
|
141
|
+
bigdecimal (~> 3.1)
|
107
142
|
tzinfo (2.0.6)
|
108
143
|
concurrent-ruby (~> 1.0)
|
109
|
-
unicode-display_width (
|
144
|
+
unicode-display_width (3.1.4)
|
145
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
146
|
+
unicode-emoji (4.0.4)
|
147
|
+
uri (1.0.3)
|
110
148
|
|
111
149
|
PLATFORMS
|
112
150
|
x86_64-linux
|
@@ -115,9 +153,9 @@ DEPENDENCIES
|
|
115
153
|
debug (>= 1.0.0)
|
116
154
|
labrat!
|
117
155
|
pry
|
118
|
-
rake
|
119
|
-
rspec
|
120
|
-
rubocop
|
156
|
+
rake
|
157
|
+
rspec
|
158
|
+
rubocop
|
121
159
|
rubocop-performance
|
122
160
|
rubocop-rspec
|
123
161
|
rubocop-shopify
|