inventarium 0.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 +7 -0
- data/.gitignore +1 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +66 -0
- data/LICENSE.txt +22 -0
- data/README.md +8 -0
- data/Rakefile +12 -0
- data/bin/inventarium +6 -0
- data/inventarium.gemspec +38 -0
- data/lib/inventarium.rb +5 -0
- data/lib/inventarium/cli.rb +16 -0
- data/lib/inventarium/cli/init.rb +26 -0
- data/lib/inventarium/cli/push.rb +28 -0
- data/lib/inventarium/cli/version.rb +11 -0
- data/lib/inventarium/version.rb +3 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6a365d48edd4ef2847ee4f185ca259dc1e5efe99a89157291433ea2a82a1da41
|
4
|
+
data.tar.gz: a55f8658692f431cebec5f78cf952a327f42a4387c9ed2384018646838b14a2d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ac93407137adf6877d2bff661177f5489da1190ef60b118f55f386fccd2eefbbc64418f47843cd4b9817d3ed49cc48751399e4fe70298d3b3ef3b0c606fff8bf
|
7
|
+
data.tar.gz: 1b7258347f5c6dd81e660e10ee65f0bf849fd8224b1d630b564c65a9a33e2adb6affe3ca04058afc016a2352af2af8c623d154f92e3292798c187009156b858a
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
inventarium (0.0.1)
|
5
|
+
dry-cli (~> 0.4)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
concurrent-ruby (1.1.6)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
docile (1.3.2)
|
13
|
+
dry-cli (0.6.0)
|
14
|
+
concurrent-ruby (~> 1.0)
|
15
|
+
equatable (0.6.1)
|
16
|
+
json (2.3.0)
|
17
|
+
pastel (0.7.3)
|
18
|
+
equatable (~> 0.6)
|
19
|
+
tty-color (~> 0.5)
|
20
|
+
rake (13.0.1)
|
21
|
+
rspec (3.9.0)
|
22
|
+
rspec-core (~> 3.9.0)
|
23
|
+
rspec-expectations (~> 3.9.0)
|
24
|
+
rspec-mocks (~> 3.9.0)
|
25
|
+
rspec-core (3.9.1)
|
26
|
+
rspec-support (~> 3.9.1)
|
27
|
+
rspec-expectations (3.9.1)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.9.0)
|
30
|
+
rspec-mocks (3.9.1)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-support (3.9.2)
|
34
|
+
simplecov (0.18.5)
|
35
|
+
docile (~> 1.1)
|
36
|
+
simplecov-html (~> 0.11)
|
37
|
+
simplecov-html (0.12.2)
|
38
|
+
simplecov-json (0.2.1)
|
39
|
+
json
|
40
|
+
simplecov
|
41
|
+
strings-ansi (0.1.0)
|
42
|
+
tty-color (0.5.1)
|
43
|
+
tty-cursor (0.7.1)
|
44
|
+
tty-progressbar (0.17.0)
|
45
|
+
strings-ansi (~> 0.1.0)
|
46
|
+
tty-cursor (~> 0.7)
|
47
|
+
tty-screen (~> 0.7)
|
48
|
+
unicode-display_width (~> 1.6)
|
49
|
+
tty-screen (0.7.1)
|
50
|
+
unicode-display_width (1.7.0)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
bundler
|
57
|
+
inventarium!
|
58
|
+
pastel
|
59
|
+
rake
|
60
|
+
rspec
|
61
|
+
simplecov
|
62
|
+
simplecov-json
|
63
|
+
tty-progressbar
|
64
|
+
|
65
|
+
BUNDLED WITH
|
66
|
+
2.1.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright © 2020 Anton Davydov
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/inventarium
ADDED
data/inventarium.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# this file is managed by dry-rb/devtools project
|
3
|
+
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
5
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
+
require 'inventarium/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'inventarium'
|
10
|
+
spec.authors = ["Anton Davydov"]
|
11
|
+
spec.email = ["antondavydov.o+oss@gmail.com"]
|
12
|
+
spec.license = 'MIT'
|
13
|
+
spec.version = Inventarium::VERSION.dup
|
14
|
+
|
15
|
+
spec.summary = "CLI interface for inventarium.io"
|
16
|
+
spec.description = spec.summary
|
17
|
+
spec.homepage = 'https://inventarium.io'
|
18
|
+
|
19
|
+
spec.bindir = 'bin'
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
f.match(%r{^(test|spec|features)/})
|
22
|
+
end
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
27
|
+
# spec.metadata['changelog_uri'] = ''
|
28
|
+
spec.metadata['source_code_uri'] = 'https://github.com/inventarium-org/cli'
|
29
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/inventarium-org/cli/issues'
|
30
|
+
|
31
|
+
spec.required_ruby_version = ">= 2.4.0"
|
32
|
+
|
33
|
+
spec.add_runtime_dependency "dry-cli", "~> 0.4"
|
34
|
+
|
35
|
+
spec.add_development_dependency "bundler"
|
36
|
+
spec.add_development_dependency "rake"
|
37
|
+
spec.add_development_dependency "rspec"
|
38
|
+
end
|
data/lib/inventarium.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "dry/cli"
|
2
|
+
require_relative "./cli/version"
|
3
|
+
require_relative "./cli/init"
|
4
|
+
require_relative "./cli/push"
|
5
|
+
|
6
|
+
module Inventarium
|
7
|
+
module CLI
|
8
|
+
extend Dry::CLI::Registry
|
9
|
+
|
10
|
+
register "version", Version, aliases: ["v", "-v", "--version"]
|
11
|
+
|
12
|
+
register "init", Init
|
13
|
+
register "push", Push
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "pastel"
|
2
|
+
|
3
|
+
module Inventarium
|
4
|
+
module CLI
|
5
|
+
class Init < Dry::CLI::Command
|
6
|
+
desc "Create an empty service.yml file for the service"
|
7
|
+
|
8
|
+
example [
|
9
|
+
" # Generate service.yml in root folder",
|
10
|
+
"./.service_meta # Generate service.yml in '.service_meta' folder"
|
11
|
+
]
|
12
|
+
|
13
|
+
def call(args: [], **)
|
14
|
+
dir = args.first || '.'
|
15
|
+
|
16
|
+
pastel = Pastel.new
|
17
|
+
|
18
|
+
printf "Generating a new service.yaml\t\t"
|
19
|
+
sleep(0.3)
|
20
|
+
puts "[#{pastel.green('DONE')}]"
|
21
|
+
|
22
|
+
# puts "Created a new service.yml file in '#{dir}' directory"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'tty-progressbar'
|
2
|
+
require "pastel"
|
3
|
+
|
4
|
+
module Inventarium
|
5
|
+
module CLI
|
6
|
+
class Push < Dry::CLI::Command
|
7
|
+
desc "Push metainformation to inventarium service"
|
8
|
+
|
9
|
+
example [
|
10
|
+
" # Push service.yml from root folder",
|
11
|
+
"./meta/specific_service.yml # Push specific_service.yml from './meta' folder"
|
12
|
+
]
|
13
|
+
|
14
|
+
def call(args: [], **)
|
15
|
+
# dir = args.first || './service.yml'
|
16
|
+
bar = TTY::ProgressBar.new("Puishing service.yaml to inventarium.io [:bar]", total: 30)
|
17
|
+
10.times do
|
18
|
+
sleep(0.1)
|
19
|
+
bar.advance(3)
|
20
|
+
end
|
21
|
+
|
22
|
+
pastel = Pastel.new
|
23
|
+
puts "[#{pastel.green('DONE')}]"
|
24
|
+
# puts "Push a new service.yml file from '#{dir}' directory"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inventarium
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anton Davydov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dry-cli
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.4'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: CLI interface for inventarium.io
|
70
|
+
email:
|
71
|
+
- antondavydov.o+oss@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/inventarium
|
83
|
+
- inventarium.gemspec
|
84
|
+
- lib/inventarium.rb
|
85
|
+
- lib/inventarium/cli.rb
|
86
|
+
- lib/inventarium/cli/init.rb
|
87
|
+
- lib/inventarium/cli/push.rb
|
88
|
+
- lib/inventarium/cli/version.rb
|
89
|
+
- lib/inventarium/version.rb
|
90
|
+
homepage: https://inventarium.io
|
91
|
+
licenses:
|
92
|
+
- MIT
|
93
|
+
metadata:
|
94
|
+
allowed_push_host: https://rubygems.org
|
95
|
+
source_code_uri: https://github.com/inventarium-org/cli
|
96
|
+
bug_tracker_uri: https://github.com/inventarium-org/cli/issues
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 2.4.0
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubygems_version: 3.1.2
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: CLI interface for inventarium.io
|
116
|
+
test_files: []
|