suma 0.1.9 → 0.1.10

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: 52f25d69f23dba6c3d0c420c241279354bc8e838ac1f1e58d32e1392408da68e
4
- data.tar.gz: 5cfa1b2e128694c04c75a0ca3eda31be63c90e2c5759ee564230525529edf07c
3
+ metadata.gz: 9c08dd5c9b1e53371518104f17eaa1b0ae59590069e15239051f2619e3083086
4
+ data.tar.gz: f4aa885d0259c98ee8f00eefdb21b2fd6d4c2b9ac2e64d6987ce55fe362b5bab
5
5
  SHA512:
6
- metadata.gz: 7db5c9725523372171efb9d4234cbf9e7819c0ac0093128e92dcaa737cf34653d33573df97816c9253645d0f6abce7e9e96d4ca503f787336ec4dd3824641db8
7
- data.tar.gz: 8095d98452ac83ab609466df69ee064b9202342d9dfd1842262a2edf571002b2e76f1855b47582cda228f7f321904b1927a46d6b14b7ff2318f0e11cf4e2afa5
6
+ metadata.gz: a0fcddad0380d5c5e0a714729c0fc59e8195f83f7af1c40fe29caf8fd124cc75fffdaceaeb973b5d4f6cedd0ab526695b7019b5d2391faa94a9b4735267b389f
7
+ data.tar.gz: 6f667b5a28f8807980351345dc49ab4959a01b35a1d5463a2afb1851fa2718c55d53916248e2f92eca58d8f899466752d2bd51579747e8d74a8391ba43f3309f
data/.rubocop.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  inherit_from:
2
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
2
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
3
3
  - .rubocop_todo.yml
4
4
 
5
- require:
5
+ plugins:
6
6
  - rubocop-performance
7
7
  - rubocop-rake
8
8
  - rubocop-rspec
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-03-21 11:43:08 UTC using RuboCop version 1.74.0.
3
+ # on 2025-03-23 10:59:23 UTC using RuboCop version 1.74.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -13,47 +13,6 @@ Gemspec/DuplicatedAssignment:
13
13
  Exclude:
14
14
  - 'suma.gemspec'
15
15
 
16
- # Offense count: 2
17
- # This cop supports safe autocorrection (--autocorrect).
18
- # Configuration parameters: EnforcedStyle, IndentationWidth.
19
- # SupportedStyles: outdent, indent
20
- Layout/AccessModifierIndentation:
21
- Exclude:
22
- - 'lib/suma/cli/build.rb'
23
- - 'lib/suma/cli/links.rb'
24
-
25
- # Offense count: 1
26
- # This cop supports safe autocorrection (--autocorrect).
27
- # Configuration parameters: EnforcedStyle, IndentationWidth.
28
- # SupportedStyles: with_first_argument, with_fixed_indentation
29
- Layout/ArgumentAlignment:
30
- Exclude:
31
- - 'lib/suma/cli/links.rb'
32
-
33
- # Offense count: 19
34
- # This cop supports safe autocorrection (--autocorrect).
35
- # Configuration parameters: AllowForAlignment.
36
- Layout/CommentIndentation:
37
- Exclude:
38
- - 'lib/suma/cli/build.rb'
39
- - 'lib/suma/cli/links.rb'
40
-
41
- # Offense count: 1
42
- # This cop supports safe autocorrection (--autocorrect).
43
- # Configuration parameters: EnforcedStyleAlignWith, Severity.
44
- # SupportedStylesAlignWith: keyword, variable, start_of_line
45
- Layout/EndAlignment:
46
- Exclude:
47
- - 'lib/suma/cli/build.rb'
48
-
49
- # Offense count: 28
50
- # This cop supports safe autocorrection (--autocorrect).
51
- # Configuration parameters: Width, AllowedPatterns.
52
- Layout/IndentationWidth:
53
- Exclude:
54
- - 'lib/suma/cli/build.rb'
55
- - 'lib/suma/cli/links.rb'
56
-
57
16
  # Offense count: 43
58
17
  # This cop supports safe autocorrection (--autocorrect).
59
18
  # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
@@ -71,18 +30,19 @@ Layout/LineLength:
71
30
  - 'lib/suma/thor_ext.rb'
72
31
  - 'suma.gemspec'
73
32
 
74
- # Offense count: 1
75
- # This cop supports safe autocorrection (--autocorrect).
76
- # Configuration parameters: AllowInHeredoc.
77
- Layout/TrailingWhitespace:
78
- Exclude:
79
- - 'lib/suma/cli/links.rb'
80
-
81
33
  # Offense count: 1
82
34
  Lint/DuplicateMethods:
83
35
  Exclude:
84
36
  - 'lib/suma/express_schema.rb'
85
37
 
38
+ # Offense count: 2
39
+ # This cop supports safe autocorrection (--autocorrect).
40
+ # Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
41
+ # NotImplementedExceptions: NotImplementedError
42
+ Lint/UnusedMethodArgument:
43
+ Exclude:
44
+ - 'lib/suma/cli.rb'
45
+
86
46
  # Offense count: 11
87
47
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
88
48
  Metrics/AbcSize:
@@ -127,14 +87,6 @@ Performance/CollectionLiteralInLoop:
127
87
  Exclude:
128
88
  - 'spec/suma/cli_spec.rb'
129
89
 
130
- # Offense count: 1
131
- # This cop supports safe autocorrection (--autocorrect).
132
- # Configuration parameters: EnforcedStyle.
133
- # SupportedStyles: implicit, each, example
134
- RSpec/HookArgument:
135
- Exclude:
136
- - 'spec/suma/cli_spec.rb'
137
-
138
90
  # Offense count: 1
139
91
  RSpec/MultipleExpectations:
140
92
  Max: 2
@@ -7,21 +7,14 @@ module Suma
7
7
  module Cli
8
8
  # Build command for building collections
9
9
  class Build < Thor
10
- # Return true to exit with non-zero status on errors
11
- def self.exit_on_failure?
12
- true
13
- end
14
-
15
- default_command :default_build
16
-
17
- desc "default_build METANORMA_SITE_MANIFEST",
10
+ desc "build METANORMA_SITE_MANIFEST",
18
11
  "Build collection specified in site manifest (`metanorma*.yml`)"
19
12
  option :compile, type: :boolean, default: true,
20
13
  desc: "Compile or skip compile of collection"
21
14
  option :schemas_all_path, type: :string, aliases: "-s",
22
15
  desc: "Generate file that contains all schemas in the collection."
23
16
 
24
- def default_build(metanorma_site_manifest)
17
+ def build(metanorma_site_manifest)
25
18
  # Lazy-load dependencies only when this command is actually used
26
19
  require_relative "../processor"
27
20
  require_relative "../utils"
data/lib/suma/cli.rb CHANGED
@@ -11,17 +11,21 @@ module Suma
11
11
 
12
12
  desc "build METANORMA_SITE_MANIFEST",
13
13
  "Build collection specified in site manifest (`metanorma*.yml`)"
14
- def build(*args)
15
- # If no arguments, add an empty array to ensure the default command is triggered
16
- args = [] if args.empty?
14
+ option :compile, type: :boolean, default: true,
15
+ desc: "Compile or skip compile of collection"
16
+ option :schemas_all_path, type: :string, aliases: "-s",
17
+ desc: "Generate file that contains all schemas in the collection."
18
+ def build(_site_manifest)
19
+ # # If no arguments, add an empty array to ensure the default command is triggered
20
+ # args = [] if args.empty?
17
21
  require_relative "cli/build"
18
- Cli::Build.start(args)
22
+ Cli::Build.start
19
23
  end
20
24
 
21
25
  desc "links SUBCOMMAND ...ARGS", "Manage EXPRESS links"
22
- def links(*args)
26
+ def links(*_args)
23
27
  require_relative "cli/links"
24
- Cli::Links.start(args)
28
+ Cli::Links.start
25
29
  end
26
30
  end
27
31
  end
data/lib/suma/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Suma
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-21 00:00:00.000000000 Z
11
+ date: 2025-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: expressir