webhook-cli 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 082357f21bf2101e8b2295f4fc5846df66997e99
4
- data.tar.gz: f19627c99d0e77fc53ab38b4f2d14a5f58a052e2
3
+ metadata.gz: d52d1862be1903effbcbb8883467907c8675235b
4
+ data.tar.gz: 4e60ece90e03eef8612e384af02caa738391d237
5
5
  SHA512:
6
- metadata.gz: 793fdf527b5788e97d0912bea6371acce86fd4d62e12ecb838b5558a99bf556dfb32c5015d905cdaad1bfdbe43f82f1b29ba4eb0e6d3effdff80c34ef2f35e17
7
- data.tar.gz: e647e9d3c60bb40572c3332261c4c978cea2a8e16e35a4db11184b88452246e5c782c9b3b8ff515a68fa331059e52584c97a9f60cf8f070cfbea629772209173
6
+ metadata.gz: f744730f984ffb3fe895ca6bf88a3730756ece3b10517035d00d7b326a24de23f4a640b2bcb792dc838f0da99649758fab320073dee594a2a07d7f103c17378c
7
+ data.tar.gz: 56bdacc0a75ccaabfcc370d84dfc0f1ada5c38c4e311da1bcd6c91f18c43e1ab79bf7e05619728032b78979ea45a6f93b705427d5892eed8e0ea9b3feb85f9b8
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # Webhook::Cli
1
+ # Webhook::CLI
2
2
 
3
- TODO: Write a gem description
3
+ Webhook::CLIは、コマンドラインからwebhookを実行できるツールです。
4
+ rubyコード中でも使えます。
4
5
 
5
6
  ## Installation
6
7
 
@@ -18,7 +19,11 @@ Or install it yourself as:
18
19
 
19
20
  ## Usage
20
21
 
21
- TODO: Write usage instructions here
22
+ ~~~
23
+ $ webhook url json-file
24
+ ~~~
25
+
26
+ This command posts payload=json-file-content to specified url.
22
27
 
23
28
  ## Contributing
24
29
 
@@ -40,6 +40,14 @@ module Webhook
40
40
  def verify_json_content(json)
41
41
  JSON.parse(json)
42
42
  end
43
+ def json_content?(json)
44
+ begin
45
+ JSON.parse(json)
46
+ rescue
47
+ false
48
+ end
49
+ true
50
+ end
43
51
  end
44
52
  end
45
53
  end
@@ -1,5 +1,5 @@
1
1
  module Webhook
2
2
  module CLI
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webhook-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - CHIKURA Shinsaku