skap 1.0.0 → 1.0.1

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: b24eb7212466fb9d393d5d3847d279bf502c6ea798d5b6169443df4c704949e8
4
- data.tar.gz: 5c45d5fd262e0b9ef739f8d4145ca6aab80ada327e2c211b6d7aa0449a2d19c7
3
+ metadata.gz: 16e74f93e2cb2c5bfb6ec42565f0ee3a276f6d134a63418a98328a259141272e
4
+ data.tar.gz: a00a345fb79bd667ecde44d7b62fc8933f0f6e131185a740a6a6e30afd78e047
5
5
  SHA512:
6
- metadata.gz: cf53061aa0925dbc45a03068bf4565f7c6de5fa1033ea946a209667cec3194e16791bd0af89001f1bf66281b811eebe5515bf31eecd605f6071dea4ed05977f8
7
- data.tar.gz: 4dff3e1661ea6a77720be3c600add6a5af121c25490f579b1c66f34e7a129a627d4e44928b7ee75bd91da14459d43fb339afde31a7e16b1f0f035fbd0f612cc7
6
+ metadata.gz: '0908fffd649481ec79c9f772585beacf0b327ff6614dd2da60c9090c77876bb67cd0ec0d4f014b2b0eada4ddc1141c43c9f330c38e612fcfd03bcfa35f1d1459'
7
+ data.tar.gz: 27c06e31d15c05c3b311854f26f0f01eb8adb23487b79b9c8d8d426b09799d75720a5dd9c7bcaf9e11f33ae4f90c92f4b4e812c5c09529935cb2540fa0a7d248
data/lib/skap/cli.rb CHANGED
@@ -6,6 +6,7 @@ require "io/console"
6
6
  require "psych"
7
7
 
8
8
  require_relative "command"
9
+ require_relative "string_utils"
9
10
  require_relative "yaml_file"
10
11
 
11
12
  require_relative "files/menu"
data/lib/skap/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skap
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
data/menu.yaml CHANGED
@@ -31,8 +31,8 @@
31
31
  - cmd: ["publish DOCUMENT", "publish DOCUMENT FILE_PATH ..."]
32
32
  text:
33
33
  - >
34
- Save record about abstract (DOCUMENT) and pass list of file paths of sources
35
- (FILE_PATH ...) which relate to this abstract. You should prepend minus sign to file path
34
+ Save record about work (DOCUMENT) and pass list of file paths of sources
35
+ (FILE_PATH ...) which relate to this work. You should prepend minus sign to file path
36
36
  to exclude it from list of related sources. Examples:
37
37
  - >
38
38
  works publish _/docker/compose.md docs.docker.com/content/manuals/compose/**/*.md
data/skap.gemspec CHANGED
@@ -22,10 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.metadata["homepage_uri"] = spec.homepage
23
23
  spec.metadata["source_code_uri"] = spec.homepage
24
24
 
25
- spec.files =
26
- Dir.chdir(File.expand_path(__dir__)) do
27
- `git ls-files -z`.split("\x0").grep_v(%r{^spec/})
28
- end
25
+ spec.files = %w[Gemfile menu.yaml skap.gemspec] + Dir.glob("{exe,lib}/**/*", base: __dir__)
29
26
 
30
27
  spec.bindir = "exe"
31
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Nochevnov
@@ -87,14 +87,7 @@ executables:
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".bundle/config.template"
91
- - ".gitignore"
92
- - ".rubocop.yml"
93
90
  - Gemfile
94
- - Gemfile.lock
95
- - README.md
96
- - bin/rubocop
97
- - bin/yard
98
91
  - exe/skap
99
92
  - lib/skap.rb
100
93
  - lib/skap/cli.rb
@@ -1,7 +0,0 @@
1
- ---
2
- BUNDLE_GLOBAL_GEM_CACHE: true
3
- BUNDLE_IGNORE_FUNDING_REQUESTS: true
4
- BUNDLE_IGNORE_MESSAGES: true
5
- BUNDLE_SHEBANG: ruby
6
- BUNDLE_SILENCE_DEPRECATIONS: false
7
- BUNDLE_SILENCE_ROOT_WARNING: false
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- .bundle/config
2
- .yardoc
3
- *.gem
data/.rubocop.yml DELETED
@@ -1,20 +0,0 @@
1
- inherit_gem:
2
- rubocop-configs:
3
- - _all_cops.yml
4
- - _ruby.yml
5
- - gemspec.yml
6
- - performance.yml
7
-
8
- AllCops:
9
- TargetRubyVersion: 3.3
10
-
11
- Gemspec/DevelopmentDependencies:
12
- Enabled: false
13
-
14
- Lint/Debugger:
15
- DebuggerMethods:
16
- # Exclude "puts" from this list.
17
- Kernel: [warn, binding.irb, p, Kernel.binding.irb]
18
-
19
- Style/ClassAndModuleChildren:
20
- Enabled: false
data/Gemfile.lock DELETED
@@ -1,75 +0,0 @@
1
- GIT
2
- remote: https://github.com/crosspath/rubocop-configs.git
3
- revision: ef433c9f20720610194773a31ca1b89a7888e5e7
4
- specs:
5
- rubocop-configs (0.17.0)
6
- rake (>= 13.0)
7
-
8
- PATH
9
- remote: .
10
- specs:
11
- skap (1.0.0)
12
-
13
- GEM
14
- remote: https://rubygems.org/
15
- specs:
16
- ast (2.4.2)
17
- diff-lcs (1.5.1)
18
- json (2.7.2)
19
- language_server-protocol (3.17.0.3)
20
- parallel (1.26.3)
21
- parser (3.3.4.2)
22
- ast (~> 2.4.1)
23
- racc
24
- prism (1.0.0)
25
- psych (5.1.2)
26
- stringio
27
- racc (1.8.1)
28
- rainbow (3.1.1)
29
- rake (13.2.1)
30
- rdoc (6.7.0)
31
- psych (>= 4.0.0)
32
- regexp_parser (2.9.2)
33
- rspec-core (3.13.1)
34
- rspec-support (~> 3.13.0)
35
- rspec-expectations (3.13.2)
36
- diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.13.0)
38
- rspec-support (3.13.1)
39
- rubocop (1.66.1)
40
- json (~> 2.3)
41
- language_server-protocol (>= 3.17.0)
42
- parallel (~> 1.10)
43
- parser (>= 3.3.0.2)
44
- rainbow (>= 2.2.2, < 4.0)
45
- regexp_parser (>= 2.4, < 3.0)
46
- rubocop-ast (>= 1.32.2, < 2.0)
47
- ruby-progressbar (~> 1.7)
48
- unicode-display_width (>= 2.4.0, < 3.0)
49
- rubocop-ast (1.32.2)
50
- parser (>= 3.3.1.0)
51
- rubocop-performance (1.22.1)
52
- rubocop (>= 1.48.1, < 2.0)
53
- rubocop-ast (>= 1.31.1, < 2.0)
54
- ruby-progressbar (1.13.0)
55
- stringio (3.1.1)
56
- unicode-display_width (2.5.0)
57
- yard (0.9.37)
58
-
59
- PLATFORMS
60
- ruby
61
- x86_64-linux-gnu
62
-
63
- DEPENDENCIES
64
- prism
65
- rdoc
66
- rspec-core (~> 3.13)
67
- rspec-expectations (~> 3.13)
68
- rubocop (~> 1.66)
69
- rubocop-configs!
70
- rubocop-performance (~> 1.22)
71
- skap!
72
- yard (~> 0.9)
73
-
74
- BUNDLED WITH
75
- 2.5.19
data/README.md DELETED
@@ -1,119 +0,0 @@
1
- # Skap — document management system
2
-
3
- Word "skap" is a variation of Germanic words "skab"/"schap"/"schaf".
4
- Here it means storage closet with documents or books.
5
-
6
- Skap manages local copy of source documents published in git repositories.
7
- You may use Skap to track changes in source documents and to store revisions (versions)
8
- of your works based on these source documents, for example abstracts.
9
-
10
- ## Available commands
11
-
12
- ```plain
13
- help
14
- Show help message about supported commands.
15
- init
16
- init DIRECTORY_PATH
17
- Create configuration files in current directory or in DIRECTORY_PATH.
18
- sources
19
- add DIRECTORY REPO BRANCH
20
- Add git submodule into DIRECTORY from REPO and track BRANCH by default.
21
- delete DIRECTORY
22
- Delete git submodule from DIRECTORY.
23
- update
24
- update DIRECTORY ...
25
- Update git submodule from upstream in DIRECTORY or in all git submodules if DIRECTORY
26
- is not specified. You may pass one or more directory paths (DIRECTORY ...) to update their
27
- contents.
28
- works
29
- covered
30
- List files of sources which have been used for published works.
31
- ignored
32
- List ignored files.
33
- outdated
34
- List documents which may contain outdated information.
35
- publish DOCUMENT
36
- publish DOCUMENT FILE_PATH ...
37
- Save record about abstract (DOCUMENT) and pass list of file paths of sources (FILE_PATH ...)
38
- which relate to this abstract. You should prepend minus sign to file path to exclude it from
39
- list of related sources. Examples:
40
- works publish _/docker/compose.md docs.docker.com/content/manuals/compose/**/*.md
41
- works publish _/docker/compose.md -docs.docker.com/**/*.md
42
- uncovered
43
- List files of sources which have NOT been used for published works.
44
- unknown
45
- List files of sources which may be used for works or ignored.
46
- ```
47
-
48
- ## Suggested workflow
49
-
50
- 1. Install Skap: `gem install skap`
51
- 2. Initialize storage: `skap init ~/docs` (pass any path to storage)
52
- 3. Add sources: `skap sources add docker https://github.com/docker/docs.git main`
53
- (see command description in "Available commands")
54
- 4. Look into downloaded source files and fill entries in file "sources.yaml" in your storage.
55
- 5. Create file with your text (here it's known as "work") that relates somehow to source documents.
56
- 6. Save revision of source documents with current state of "work":
57
- `skap works publish _/docker/overview.md docker/content/get-started/docker-overview.md`
58
- (here "_/docker/overview.md" is path to your "work")
59
- 7. Commit changes into current git repository in your storage: `git commit ...` (see manual for git)
60
-
61
- Additionally you may push your changes into remote repository — see manual for git:
62
- git remote, git push.
63
-
64
- ## Additional files in storage
65
-
66
- You should store changes in these files with "git commit".
67
-
68
- Schema of file "sources.yaml":
69
-
70
- ```yaml
71
- %directory-name%:
72
- file-extensions: [%ext%, %ext%]
73
- ignored:
74
- - %file-path-pattern-in-this-directory%
75
- indexed:
76
- - %file-path-pattern-in-this-directory%
77
- ```
78
-
79
- Example of file "sources.yaml":
80
-
81
- ```yaml
82
- docker:
83
- file-extensions: [md, yaml]
84
- ignored:
85
- - "*.md"
86
- - compose.yaml
87
- indexed:
88
- - content/get-started/**/*.md
89
- ```
90
-
91
- Schema of file "versions.yaml":
92
-
93
- ```yaml
94
- %work-file-path%:
95
- date: %iso-date%
96
- sources:
97
- %source-file-path%:
98
- date: %iso-date%
99
- sha: %commit-sha%
100
- ```
101
-
102
- Example of file "versions.yaml":
103
-
104
- ```yaml
105
- _/docker/overview.md:
106
- date: 2024-12-31
107
- sources:
108
- docker/content/get-started/docker-overview.md:
109
- date: 2024-12-31
110
- sha: fc77b05ffe69070796a6a8630802e62b75304455
111
- ```
112
-
113
- ## Development
114
-
115
- ```shell
116
- bin/rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment
117
- bin/rubocop -a
118
- bin/build
119
- ```
data/bin/rubocop DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "rubygems"
5
- require "bundler/setup"
6
-
7
- load(Gem.bin_path("rubocop", "rubocop"))
data/bin/yard DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "rubygems"
5
- require "bundler/setup"
6
-
7
- load(Gem.bin_path("yard", "yard"))