kril 0.2.2 → 0.2.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -3
- data/bin/kril +3 -1
- data/lib/kril/schema_handler.rb +1 -0
- data/lib/kril/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78ad85e819260343f49eaf744a1a3adc57358286
|
|
4
|
+
data.tar.gz: 4dd49e901cd9769dff1e3a8829295f36fe7f2b5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eeda51547bb8cf4d2a5b21194f5988b551b87a3cdf9392737b95a5b5f1476542c89db11266f982413349a9ab39e217b1df12ed3d8adaba274ae2feb0aed9115b
|
|
7
|
+
data.tar.gz: 5be17cd3024a8eb353c7e63694bc4360568cc9d12a59940033b3fbca064c05eb6c26e59536db514395c754c5a5ceacc3b44f7e0ad74b9cb9b1fe4e66e58ed372
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Kril is an easy to use command line interface (CLI) for interacting with [Apache Kafka](https://kafka.apache.org/). It uses [Apache Avro](https://avro.apache.org/) for serialization/deserialization.
|
|
4
4
|
|
|
5
|
-
[](https://travis-ci.org/ChadBowman/kril)
|
|
6
|
+
[](https://rubygems.org/gems/kril)
|
|
6
7
|
|
|
7
8
|
## Installation
|
|
8
9
|
|
|
9
10
|
Add this line to your application's Gemspec:
|
|
10
11
|
|
|
11
12
|
```ruby
|
|
12
|
-
spec.
|
|
13
|
+
spec.add_dependency 'kril', '~> 0.1'
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
And then execute:
|
|
@@ -20,6 +21,7 @@ Or install it yourself as:
|
|
|
20
21
|
|
|
21
22
|
$ gem install kril
|
|
22
23
|
|
|
24
|
+
|
|
23
25
|
## Usage
|
|
24
26
|
|
|
25
27
|
Assuming your schema is not registered with the schema registry, and doesn't exist in the repository, you can define a schema and commit a record like so:
|
|
@@ -93,9 +95,10 @@ To see what schemas are saved in the repository:
|
|
|
93
95
|
$ kril --list-schemas
|
|
94
96
|
```
|
|
95
97
|
```bash
|
|
96
|
-
human
|
|
97
98
|
another_schema
|
|
99
|
+
human
|
|
98
100
|
```
|
|
101
|
+
|
|
99
102
|
## Contributing
|
|
100
103
|
|
|
101
104
|
1. Fork it ( https://github.com/ChadBowman/kril/fork )
|
|
@@ -109,3 +112,4 @@ Obey 👮[Rubocop](https://github.com/bbatsov/rubocop)! 🚨
|
|
|
109
112
|
## License
|
|
110
113
|
|
|
111
114
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
115
|
+
|
data/bin/kril
CHANGED
|
@@ -79,7 +79,9 @@ Clamp do
|
|
|
79
79
|
end
|
|
80
80
|
if list_schemas?
|
|
81
81
|
schemas = File.join(schemas_path, '**', '*.avsc')
|
|
82
|
-
Dir.glob(schemas).map { |file|
|
|
82
|
+
files = Dir.glob(schemas).map { |file| File.basename(file, '.avsc') }
|
|
83
|
+
files.sort.each { |name| puts name }
|
|
84
|
+
files
|
|
83
85
|
end
|
|
84
86
|
end
|
|
85
87
|
|
data/lib/kril/schema_handler.rb
CHANGED
|
@@ -17,6 +17,7 @@ module Kril
|
|
|
17
17
|
# input_string - schema name, schema file, or schema contents [String]
|
|
18
18
|
# returns - stored schema [Avro::Schema]
|
|
19
19
|
def process(input_string)
|
|
20
|
+
return nil unless input_string
|
|
20
21
|
name, namespace =
|
|
21
22
|
if File.exist?(input_string)
|
|
22
23
|
copy_schema_to_store(input_string)
|
data/lib/kril/version.rb
CHANGED