judges 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3d395cb5c5d1116843533c8a8d8576e346c8426ef1da8524d11c2fb00a65430
4
- data.tar.gz: 648cb80dae16df946aec75075d3458b4fafaf04531e2cf2fe8bfa225353b4e3f
3
+ metadata.gz: e4506ff0fe002c7bd8077f203ba8a0af5b9d5b9b788e1d42370c6f990d4b9479
4
+ data.tar.gz: 8cf313cdaa8a859ffe1c286107c767aac93a0196420152c57337dd05d0ed4881
5
5
  SHA512:
6
- metadata.gz: 99f24ae2112c3e60ac802a82f7ba0f5b8c2f582fcbdf9fc8d92d89c2c8f52476c4566b67bd4996b06c0c3aa550573fc79ecfec534493a0a7f3c71fe9c247cc4d
7
- data.tar.gz: 53d1db75b34ae7d2536bd9ef5787d5fa52d5cd16debb199702c15381a8d20de0a8a06359b3482b2ba9d48990cc4ceba4d73d93f8a9b6969b22dc7122b0c18ef3
6
+ metadata.gz: f19785b0268c7dce59b6d9478137e2e2e1172ebc03fd803b576d0c1d155eecadea11d38ecaa258f8ecefef031e183807660dee7b0f7aede0c875a42f101ae62d
7
+ data.tar.gz: 433e49e718acd4b17ba9efdbce605181ca2b6cd88a7a36601bf71dc926f07185f652d57e1005750b28fe2c98467f05c1b93ddd93dee4461dd40f28a58a209097
data/bin/judges CHANGED
@@ -32,7 +32,7 @@ Encoding.default_internal = Encoding::UTF_8
32
32
  class App
33
33
  extend GLI::App
34
34
 
35
- ver = '0.0.28'
35
+ ver = '0.0.29'
36
36
 
37
37
  loog = Loog::REGULAR
38
38
 
@@ -87,6 +87,14 @@ class App
87
87
  end
88
88
  end
89
89
 
90
+ desc 'Import YAML into a factbase'
91
+ command :import do |c|
92
+ c.action do |global, options, args|
93
+ require_relative '../lib/judges/commands/import'
94
+ Judges::Import.new(loog).run(options, args)
95
+ end
96
+ end
97
+
90
98
  desc 'Remove the facts that are too old'
91
99
  command :trim do |c|
92
100
  c.desc 'Only the facts that match the expression are deleted'
@@ -0,0 +1,17 @@
1
+ Feature: Import
2
+ I want to import YAML into a factbase
3
+
4
+ Scenario: Simple import of a small YAML
5
+ Given I make a temp directory
6
+ Then I have a "simple.yaml" file with content:
7
+ """
8
+ -
9
+ foo: 42
10
+ bar: 2024-03-04T22:22:22Z
11
+ t: Hello, world!
12
+ -
13
+ z: 3.14
14
+ """
15
+ Then I run bin/judges with "--verbose import simple.yaml simple.fb"
16
+ Then Stdout contains "Import finished"
17
+ And Exit code is zero
data/judges.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
27
27
  s.required_ruby_version = '>=3.2'
28
28
  s.name = 'judges'
29
- s.version = '0.0.28'
29
+ s.version = '0.0.29'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description = '
@@ -21,6 +21,7 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  require 'time'
24
+ require 'factbase/looged'
24
25
  require_relative '../../judges'
25
26
  require_relative '../../judges/impex'
26
27
  require_relative '../../judges/to_rel'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -113,6 +113,7 @@ files:
113
113
  - Rakefile
114
114
  - bin/judges
115
115
  - features/gem_package.feature
116
+ - features/import.feature
116
117
  - features/inspect.feature
117
118
  - features/join.feature
118
119
  - features/misc.feature