klenod 0.0.3 → 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: 64c21ec08c2b6a08ee2ab475b49d61764756b05bbdf64af9754a165fc28ab0da
4
- data.tar.gz: 91f5c0d0b9561fd25a4da2ba85e528fda2161991ffb68d70a7348cf6d198fc1f
3
+ metadata.gz: 5e3812472352e82fae1cab30961e220290391bcf4a400d684b229228ea81d3db
4
+ data.tar.gz: f79d3c9b90c97fec11a822aa621b0856bd816fbb84c605b8af65ecc1c85f1559
5
5
  SHA512:
6
- metadata.gz: 0c6f5be645b4848845fc52e4522a9ce070c90f2fa9db97510edddf013dbc67760ba98026c61edcb20d08bdf27bd09e34f5a4a3d940aa624a41fbcc17460b264c
7
- data.tar.gz: 1fde7bb2f3b371a74349d4f0478444f5bf54305f48b01e149f824be8d4035a77e69e9ea1eaf76af01fdc1b444bf940d038eb5479fb69daa33913bd121a2809c4
6
+ metadata.gz: 2ec89df1d4fc20afd76164e5b353142caea11228c44eed5fc6cfc576d582e4fde26beba108fb119448ffd3192435ba1368f260a6b736d021131a3ab74c918477
7
+ data.tar.gz: 54b3960a6f4544874a8262865de69f7f16a56005963ff5ed1c896b5071450a6fdc2a24f169984f8856b9b50e4b1684de6383805418824631967319a0e6d6adfb
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  It depends on [klenod-build](https://github.com/aalin/klenod/tree/main/gems/klenod-build),
7
7
  [klenod-runtime](https://github.com/aalin/klenod/tree/main/gems/klenod-runtime),
8
- and [klenod-rack](https://github.com/aalin/klenod/tree/main/gems/klenod-rack).
8
+ and [klenod-test](https://github.com/aalin/klenod/tree/main/gems/klenod-test).
9
9
 
10
10
  Use this gem when you want the complete Klenod API and development tooling:
11
11
 
@@ -16,4 +16,8 @@ require "klenod"
16
16
  Production applications that only load generated bundles can depend directly
17
17
  on `klenod-runtime` instead.
18
18
 
19
- The `klenod` executable wrapper also lives here and delegates to the build CLI implementation.
19
+ Web applications can add `klenod-rack` separately when they want Rack-compatible
20
+ helpers for serving bundle assets.
21
+
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.3"
4
+ VERSION = "0.0.5"
5
5
  end
data/lib/klenod.rb CHANGED
@@ -8,5 +8,5 @@ end
8
8
 
9
9
  require "klenod/runtime"
10
10
  require "klenod/build"
11
- require "klenod/rack"
12
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.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrés Alin
@@ -15,42 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.0.3
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.3
25
+ version: 0.0.5
26
26
  - !ruby/object:Gem::Dependency
27
- name: klenod-rack
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.3
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.3
39
+ version: 0.0.5
40
40
  - !ruby/object:Gem::Dependency
41
- name: klenod-runtime
41
+ name: klenod-test
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
- version: 0.0.3
46
+ version: 0.0.5
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 0.0.3
53
+ version: 0.0.5
54
54
  description: Umbrella package for Klenod.
55
55
  email:
56
56
  - andreas.alin@gmail.com
@@ -62,6 +62,8 @@ files:
62
62
  - README.md
63
63
  - exe/klenod
64
64
  - lib/klenod.rb
65
+ - lib/klenod/cli.rb
66
+ - lib/klenod/cli/application.rb
65
67
  - lib/klenod/version.rb
66
68
  homepage: https://github.com/aalin/klenod
67
69
  licenses: