klenod 0.0.4 → 0.0.5

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: c180917d9633b6cab96e5ccd76a4150d91a1730b0105dacd8aab0d38ec24456e
4
- data.tar.gz: d66e174a4b360c225bcc94e3b1eee48dbcd5be966d3d316ce78480fcf4294ad3
3
+ metadata.gz: 5e3812472352e82fae1cab30961e220290391bcf4a400d684b229228ea81d3db
4
+ data.tar.gz: f79d3c9b90c97fec11a822aa621b0856bd816fbb84c605b8af65ecc1c85f1559
5
5
  SHA512:
6
- metadata.gz: 07c59d224c0594ad5bdc9c114534a19e2a2d7cb0f1520d5463bd11897d0caf7551207ad4ed58e7dcf51e680e2ba3dfa3e6059b979ee346c4223b6049b8c8cbfc
7
- data.tar.gz: 32dd45c6de1c31a1879806176f8da53f0ea4120e28fae882e8681b24fe6dc4eb0dc1ec74bcd030b9c11247a081ba4b2993d010b53e5a0a4b7eeb724e5dd6ffa3
6
+ metadata.gz: 2ec89df1d4fc20afd76164e5b353142caea11228c44eed5fc6cfc576d582e4fde26beba108fb119448ffd3192435ba1368f260a6b736d021131a3ab74c918477
7
+ data.tar.gz: 54b3960a6f4544874a8262865de69f7f16a56005963ff5ed1c896b5071450a6fdc2a24f169984f8856b9b50e4b1684de6383805418824631967319a0e6d6adfb
data/README.md CHANGED
@@ -4,7 +4,8 @@
4
4
  [Klenod](https://github.com/aalin/klenod).
5
5
 
6
6
  It depends on [klenod-build](https://github.com/aalin/klenod/tree/main/gems/klenod-build),
7
- and [klenod-runtime](https://github.com/aalin/klenod/tree/main/gems/klenod-runtime).
7
+ [klenod-runtime](https://github.com/aalin/klenod/tree/main/gems/klenod-runtime),
8
+ and [klenod-test](https://github.com/aalin/klenod/tree/main/gems/klenod-test).
8
9
 
9
10
  Use this gem when you want the complete Klenod API and development tooling:
10
11
 
@@ -18,4 +19,5 @@ on `klenod-runtime` instead.
18
19
  Web applications can add `klenod-rack` separately when they want Rack-compatible
19
20
  helpers for serving bundle assets.
20
21
 
21
- The `klenod` executable wrapper also lives here and delegates to the build CLI implementation.
22
+ The `klenod` executable also lives here. It provides the `build`, `graph`, and
23
+ `test` commands without making `klenod-build` depend on the test runner.
data/exe/klenod CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "klenod/build/cli"
3
+ require "klenod/cli"
4
4
 
5
- Klenod::Build::CLI::Application.call
5
+ result = Klenod::CLI::Application.call
6
+ exit result if result.is_a?(Integer)
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "klenod/build/cli"
4
+ require "klenod/test/cli"
5
+
6
+ module Klenod
7
+ module CLI
8
+ class Application < Samovar::Command
9
+ self.description = "Build, test, and develop Klenod applications."
10
+
11
+ options do
12
+ option "-h/--help", "Print this help."
13
+ option "-v/--version", "Print the Klenod version."
14
+ end
15
+
16
+ nested :command, {
17
+ "build" => Klenod::Build::CLI::Build,
18
+ "coverage" => Klenod::Test::CLI::CoverageCommand,
19
+ "graph" => Klenod::Build::CLI::Graph,
20
+ "test" => Klenod::Test::CLI::Command
21
+ }
22
+
23
+ def call
24
+ if @options[:version]
25
+ output.puts Klenod::Build::VERSION
26
+ elsif @options[:help] || !@command
27
+ print_usage
28
+ else
29
+ @command.call
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
data/lib/klenod/cli.rb ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "cli/application"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Klenod
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
data/lib/klenod.rb CHANGED
@@ -9,3 +9,4 @@ end
9
9
  require "klenod/runtime"
10
10
  require "klenod/build"
11
11
  require "klenod/build/watcher"
12
+ require "klenod/test"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klenod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrés Alin
@@ -15,28 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.0.4
18
+ version: 0.0.5
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.0.4
25
+ version: 0.0.5
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: klenod-runtime
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.0.4
32
+ version: 0.0.5
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 0.0.4
39
+ version: 0.0.5
40
+ - !ruby/object:Gem::Dependency
41
+ name: klenod-test
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '='
45
+ - !ruby/object:Gem::Version
46
+ version: 0.0.5
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.0.5
40
54
  description: Umbrella package for Klenod.
41
55
  email:
42
56
  - andreas.alin@gmail.com
@@ -48,6 +62,8 @@ files:
48
62
  - README.md
49
63
  - exe/klenod
50
64
  - lib/klenod.rb
65
+ - lib/klenod/cli.rb
66
+ - lib/klenod/cli/application.rb
51
67
  - lib/klenod/version.rb
52
68
  homepage: https://github.com/aalin/klenod
53
69
  licenses: