From 7de78da0f87f9a111a7fd5f1c894d5409879596c Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:39:38 +0200 Subject: [PATCH 1/5] Add a section about windows --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a2e74c9..0f752df 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,10 @@ $ echo 'CkEKCeOCj+OBn+OBlxDSCSIQWmQ730+N8z8tsp3vp8YJQCoSCAESBzA4MDAwMDAaBQ26sSZE } ``` +## Windows + +Windows users can run the binaries in a linux-on-windows tool (like Git bash or WSL) or use the official [protobuf binaries](https://github.com/protocolbuffers/protobuf/releases) to encode/decode protobuf data. + ## Contributing 1. Fork it () From 618a336060268a6cfeeba679cad52a394ede5a3f Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 29 Nov 2021 22:52:01 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f752df..8c55536 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,30 @@ Command-line tool to encode and decode arbitrary protobuf data. + +## Installation + +This pragram requires Crystal. See: https://crystal-lang.org/install/ + +### Standalone + +1. Clone: `git clone https://github.com/iv-org/protodec && cd protodec` +2. Build: `crystal build src/protodec.cr` +3. See [Usage](#Usage) below + + +### As a Crystal library + +Add this to your application's `shard.yml`: + +```yaml +dependencies: + protodec: + github: iv-org/protodec + version: ~> 0.1.4 +``` + + ## Usage ``` @@ -63,7 +87,7 @@ Windows users can run the binaries in a linux-on-windows tool (like Git bash or ## Contributing -1. Fork it () +1. Fork it () 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) From 11813ae3634fead724c7b484466ff350b770867a Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 29 Nov 2021 22:52:47 +0100 Subject: [PATCH 3/5] Fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c55536..87cbd58 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Command-line tool to encode and decode arbitrary protobuf data. ## Installation -This pragram requires Crystal. See: https://crystal-lang.org/install/ +This program requires Crystal. See: https://crystal-lang.org/install/ ### Standalone From c6cede69e680c83a405573c500142605c27d21b0 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 1 Dec 2022 00:07:22 +0100 Subject: [PATCH 4/5] cast_json: enforce param type at compile time --- src/protodec/utils.cr | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/protodec/utils.cr b/src/protodec/utils.cr index b65a43c..6c7c509 100644 --- a/src/protodec/utils.cr +++ b/src/protodec/utils.cr @@ -468,9 +468,7 @@ module Protodec Any.new(raw.clone) end - def self.cast_json(object) - raise "Invalid type" if !object.is_a?(Hash) - + def self.cast_json(object : Hash) JSON::Any.new(object.transform_values do |value| case value when .is_a?(Hash) From 9e02d88a19f7b948877f0650297dad4949188e52 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 1 Dec 2022 00:08:30 +0100 Subject: [PATCH 5/5] Release v0.1.5 --- README.md | 2 +- shard.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87cbd58..9f39ba7 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Add this to your application's `shard.yml`: dependencies: protodec: github: iv-org/protodec - version: ~> 0.1.4 + version: ~> 0.1.5 ``` diff --git a/shard.yml b/shard.yml index d881c30..33c49db 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: protodec -version: 0.1.4 +version: 0.1.5 authors: - Omar Roth