slack_resources 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ed9ee90cc5bdb9efba81b0c87a71a67822104921a56d50e6089e0305189a092
4
- data.tar.gz: ba0b87074c7d2afe8fd61d0236075efc8dda8f0bc9a0199a226d3decd652b6c7
3
+ metadata.gz: '06685bfac77c97878061fff4e2e377b9061c8bb2f05b52062a6684b16b83fb96'
4
+ data.tar.gz: b8aa38022dde2a89107fbac37c9929ebc45fcc9a789f87bee63e7d782d4ad278
5
5
  SHA512:
6
- metadata.gz: 81bcbd99723e0d181664421d4a81f5a162fe27b22fe0580c10f9cd0fd285d81e9fa22735ffb66782152dd49c8c1386d6045a9fe59d03cff05083be63d0b526be
7
- data.tar.gz: 14a28639e4d8f3c34d3589e89b75ef49053412750efbf8d51698dbf5784b0344444e53bbc6854645ceb3ad6f13b3f94695f75d7e8a257f2abca106dc18b98032
6
+ metadata.gz: bee917456f275fe630ed4b678f278a6a8801eba97b1a05c702bceb6d65402dcd09fd51c56d8d08e8b3b6a87aa07c35258811fcae8cacb43e41dd7118636cef85
7
+ data.tar.gz: 0e4ce0e4d533502370ea0339dd5418ad759fd9630f5e4405398d3967810f80a49ed488b8adb83858b7e438a3fa0c1af0a0ee26832175dc4b80c9f7423f591058
@@ -24,6 +24,8 @@ module SlackResources
24
24
  end
25
25
 
26
26
  def execute!
27
+ FileUtils.rm_r(@output_dir) rescue nil
28
+
27
29
  FileUtils.mkdir_p(@details_output_dir)
28
30
  FileUtils.mkdir_p(@schemas_output_dir)
29
31
  FileUtils.mkdir_p(@example_output_dir)
@@ -105,7 +107,7 @@ module SlackResources
105
107
 
106
108
  def write_all_schemas_json!(all_sub_schemas, main_schemas)
107
109
  File.write(
108
- @output_dir.join('schema.json').to_s,
110
+ @output_dir.join('schemas.json').to_s,
109
111
  JSON.pretty_generate(
110
112
  "$schema": 'http://json-schema.org/draft-07/schema',
111
113
  'definitions' => all_sub_schemas.protect_merge!(main_schemas).key_ordered
@@ -24,6 +24,10 @@ module SlackResources
24
24
  JSON.parse(File.read(SCHEMAS_PATH.join("#{name}.json")))
25
25
  end
26
26
 
27
+ def schemas
28
+ JSON.parse(File.read(BASE_PATH.join('schemas.json')))
29
+ end
30
+
27
31
  def event_types
28
32
  summary_file.map { |h| h['event'] }
29
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmmpa
@@ -367,7 +367,7 @@ files:
367
367
  - lib/slack_resources/resources/event_api/examples/user_resource_denied.json
368
368
  - lib/slack_resources/resources/event_api/examples/user_resource_granted.json
369
369
  - lib/slack_resources/resources/event_api/examples/user_resource_removed.json
370
- - lib/slack_resources/resources/event_api/schema.json
370
+ - lib/slack_resources/resources/event_api/schemas.json
371
371
  - lib/slack_resources/resources/event_api/schemas/app_mention.json
372
372
  - lib/slack_resources/resources/event_api/schemas/app_rate_limited.json
373
373
  - lib/slack_resources/resources/event_api/schemas/app_uninstalled.json