microsoft_teams_incoming_webhook_ruby 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +3 -0
- data/LICENSE.txt +1 -1
- data/README.md +107 -0
- data/lib/microsoft_teams_incoming_webhook_ruby/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d6a6f3195a55056f01df70e9d34e8e5eb8295362ed9ec16f34a96b26491cbf1
|
4
|
+
data.tar.gz: 409e243fd39a19b1312892492885554da8a30762f31735f1162e0c48fe55f732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f3223dc3cd9a7a459bd534fa609b63d3d9657da71fa8e6f4e114133977eea92618a24e885d234f57eec308b19ccfb90dfb74d420a118c0b93d105a773acca29
|
7
|
+
data.tar.gz: ff7ab10962d645c9d223934b3f1529600ebf75bb72510b260be8698dce3cdff0f858c2cdeb2e7217da3cd3f732019cc79aabacb897aafb06251008699f54726f
|
data/.github/workflows/ci.yml
CHANGED
data/.rubocop.yml
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -379,6 +379,113 @@ end
|
|
379
379
|
message.send
|
380
380
|
```
|
381
381
|
|
382
|
+
### Advanced
|
383
|
+
|
384
|
+
```ruby
|
385
|
+
require 'microsoft_teams_incoming_webhook_ruby'
|
386
|
+
|
387
|
+
webhook_url = 'YOUR INCOMING WEBHOOK URL HERE'
|
388
|
+
|
389
|
+
message = MicrosoftTeamsIncomingWebhookRuby::Message.new do |m|
|
390
|
+
m.url = webhook_url
|
391
|
+
m.text = 'Advanced message'
|
392
|
+
m['@type'] = 'MessageCard'
|
393
|
+
m['@context'] = 'http://schema.org/extensions'
|
394
|
+
m.themeColor = '0076D7'
|
395
|
+
m.summary = 'Larry Bryant created a new task'
|
396
|
+
|
397
|
+
m.sections = [
|
398
|
+
{
|
399
|
+
'activityTitle': 'Larry Bryant created a new task',
|
400
|
+
'activitySubtitle': 'On Project Tango',
|
401
|
+
'activityImage': 'https://teamsnodesample.azurewebsites.net/static/img/image5.png',
|
402
|
+
'markdown': true,
|
403
|
+
'facts': [
|
404
|
+
{ 'name': 'Assigned to', 'value': 'Unassigned' },
|
405
|
+
{ 'name': 'Due date', 'value': 'Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)' },
|
406
|
+
{ 'name': 'Status', 'value': 'Not started' }
|
407
|
+
]
|
408
|
+
}
|
409
|
+
]
|
410
|
+
|
411
|
+
m.potentialAction = [
|
412
|
+
{
|
413
|
+
'@type': 'ActionCard',
|
414
|
+
'name': 'Add a comment',
|
415
|
+
'inputs': [
|
416
|
+
{
|
417
|
+
'@type': 'TextInput',
|
418
|
+
'id': 'comment',
|
419
|
+
'isMultiline': false,
|
420
|
+
'title': 'Add a comment here for this task'
|
421
|
+
}
|
422
|
+
],
|
423
|
+
'actions': [
|
424
|
+
{
|
425
|
+
'@type': 'HttpPOST',
|
426
|
+
'name': 'Add comment',
|
427
|
+
'target': 'https://docs.microsoft.com/outlook/actionable-messages'
|
428
|
+
}
|
429
|
+
]
|
430
|
+
},
|
431
|
+
{
|
432
|
+
'@type': 'ActionCard',
|
433
|
+
'name': 'Set due date',
|
434
|
+
'inputs': [
|
435
|
+
{
|
436
|
+
'@type': 'DateInput',
|
437
|
+
'id': 'dueDate',
|
438
|
+
'title': 'Enter a due date for this task'
|
439
|
+
}
|
440
|
+
],
|
441
|
+
'actions': [
|
442
|
+
{
|
443
|
+
'@type': 'HttpPOST',
|
444
|
+
'name': 'Save',
|
445
|
+
'target': 'https://docs.microsoft.com/outlook/actionable-messages'
|
446
|
+
}
|
447
|
+
]
|
448
|
+
},
|
449
|
+
{
|
450
|
+
'@type': 'OpenUri',
|
451
|
+
'name': 'Learn More',
|
452
|
+
'targets': [
|
453
|
+
{
|
454
|
+
'os': 'default',
|
455
|
+
'uri': 'https://docs.microsoft.com/outlook/actionable-messages'
|
456
|
+
}
|
457
|
+
]
|
458
|
+
},
|
459
|
+
{
|
460
|
+
'@type': 'ActionCard',
|
461
|
+
'name': 'Change status',
|
462
|
+
'inputs': [
|
463
|
+
{
|
464
|
+
'@type': 'MultichoiceInput',
|
465
|
+
'id': 'list',
|
466
|
+
'title': 'Select a status',
|
467
|
+
'isMultiSelect': 'false',
|
468
|
+
'choices': [
|
469
|
+
{ 'display': 'In Progress', 'value': '1' },
|
470
|
+
{ 'display': 'Active', 'value': '2' },
|
471
|
+
{ 'display': 'Closed', 'value': '3' }
|
472
|
+
]
|
473
|
+
}
|
474
|
+
],
|
475
|
+
'actions': [
|
476
|
+
{
|
477
|
+
'@type': 'HttpPOST',
|
478
|
+
'name': 'Save',
|
479
|
+
'target': 'https://docs.microsoft.com/outlook/actionable-messages'
|
480
|
+
}
|
481
|
+
]
|
482
|
+
}
|
483
|
+
]
|
484
|
+
end
|
485
|
+
|
486
|
+
message.send
|
487
|
+
```
|
488
|
+
|
382
489
|
## Execute tests/specs
|
383
490
|
|
384
491
|
To execute gem tests locally, use Docker with the commands below:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microsoft_teams_incoming_webhook_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Furtado
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.3.7
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Ruby gem for integration with Microsoft Teams Incoming Webhook
|