slocks 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: e6bb3fbd433e82c7682b78d32b96ef31ef53e4ec41b351b58bf79bcdca99118f
4
- data.tar.gz: 56a285957d963f2407f979f037f421c8ce978907a589eb2b6464edbee94263a6
3
+ metadata.gz: aec70a18b669cfe2fc989a0e608b955e92bc14aedf73ecd2f904f0fb16030466
4
+ data.tar.gz: 13b8545cf3f91c8b9404a782f0b86f63ca4aedf7dcab6647faa7cfb4b8e60bfc
5
5
  SHA512:
6
- metadata.gz: 880cf788112c56c9f31dc0885d9d439606c41e02786d3bc72d0a094c15507a3a4f4695bebd571c7c975ee727a474c6a672115df71c864028d3938d1f911506f1
7
- data.tar.gz: 7a691e06510829f905f793353c143b40ee2a8e156571cccbbc83d313abec26a9f8e9ade81b338eb14854a8c1bca98f38bf5c012a37096745f3bccb485b250961
6
+ metadata.gz: d2d9c94877cce9328aa3d79f379d47e2ddb7dd07e0f01512efdaafecc5bdcad5bb078c2b8dabb05ccfff835213cfb159489afab8fca66364bf2d7312eadaf535
7
+ data.tar.gz: d08cedbca583e8a3050686642b5ff366ffdc2746d77090fdb7a3bbe73600ad3f1a057da7db72fb1f6092346157e4438cf21b337745cea87c518f22d4eac54345
data/README.md CHANGED
@@ -28,7 +28,7 @@ bundle install
28
28
  Create a template with the **.slack_blocks** extension.
29
29
 
30
30
  ```ruby
31
- # app/views/notifications/order_shipped.slack_blocks
31
+ # app/views/notifications/order_shipped.slack_message.slocks
32
32
 
33
33
  header "📦 Your order has shipped!"
34
34
 
@@ -282,6 +282,7 @@ title "Send Feedback"
282
282
  submit "Submit"
283
283
  close "Cancel"
284
284
  callback "feedback_modal"
285
+ private_metadata({ user_id: @user.id }.to_json)
285
286
 
286
287
  section "How was your experience?", markdown: true
287
288
 
@@ -381,6 +382,6 @@ The gem is available as open source under the terms of the [MIT License](https:/
381
382
 
382
383
  ## Credits
383
384
 
384
- built with <3 by nora and various LLM-slop providers.
385
+ built with <3 by nora and various LLM-slop providers.
385
386
 
386
387
  heavily inspired by Akira Matsuda's fantastic [JB](https://github.com/amatsuda/jb/) gem.
@@ -20,6 +20,10 @@ module Slocks
20
20
  @callback_id = id
21
21
  end
22
22
 
23
+ def private_metadata(value)
24
+ @private_metadata = value.to_s
25
+ end
26
+
23
27
  def to_h
24
28
  modal = {
25
29
  type: "modal",
@@ -29,6 +33,7 @@ module Slocks
29
33
  }.compact
30
34
  modal[:submit] = { type: "plain_text", text: @submit_text } if @submit_text
31
35
  modal[:close] = { type: "plain_text", text: @close_text } if @close_text
36
+ modal[:private_metadata] = @private_metadata if @private_metadata
32
37
  modal
33
38
  end
34
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Slocks
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 24c02