slack_widgets 0.2.0 → 0.2.1
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 +4 -4
- data/README.md +13 -11
- data/lib/slack_widgets/version.rb +1 -1
- data/slack_widgets.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26ea650f3c8cedc2e76c4c632b106cfc0a274fd8
|
|
4
|
+
data.tar.gz: 2d7aafd8442d274429c4f3650bd393338e815b0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4909813bcfa8fa36fa7284077996182ce606ed7130d66205c9828041b68d313371e7bf7301790d9f58d13b877e4d65ffd3b61ad25c19178e55eacf8ba4205f52
|
|
7
|
+
data.tar.gz: 410842c2fca591e16a3567538d36bbe0f95dab96feba3d9f2faa802f3b501a516da0d85eb9d49958745f96cd9326f4331771fbc5d61ef012dd2aaaad6188d25f
|
data/README.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# SlackWidgets
|
|
2
|
-
Developing a Slack app in Ruby? This gem will make your life a bit easier.
|
|
3
|
-
|
|
4
|
-
JSON button and pickers - lame :\
|
|
5
|
-
PORO button and pickers - Yeahy! :)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Developing a Slack app in Ruby? This gem will make your life a bit easier.
|
|
3
|
+
SlackWidgets will remove the need to write JSON to create Slack buttons and other widgets.
|
|
9
4
|
## Installation
|
|
10
5
|
|
|
11
6
|
Add this line to your application's Gemfile:
|
|
@@ -25,11 +20,18 @@ Or install it yourself as:
|
|
|
25
20
|
## Usage
|
|
26
21
|
|
|
27
22
|
```ruby
|
|
28
|
-
SlackWidgets::
|
|
29
|
-
|
|
30
|
-
# => {:name=>"
|
|
23
|
+
SlackWidgets::PrimaryButton.create(name: 'continue_button', text: 'Continue', value: 'continue')
|
|
24
|
+
|
|
25
|
+
# => {:name=>"continue_button",
|
|
26
|
+
# :text=>"Continue",
|
|
27
|
+
# :type=>"button",
|
|
28
|
+
# :style=>"primary",
|
|
29
|
+
# :value=>"continue"}
|
|
30
|
+
# This is exactly the format Slack expects in order to create
|
|
31
|
+
# a nice green (approval) button with the text "Continue" on it
|
|
31
32
|
```
|
|
32
|
-
|
|
33
|
+
Primary and Danger button examples:
|
|
34
|
+

|
|
33
35
|
## Development
|
|
34
36
|
|
|
35
37
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/slack_widgets.gemspec
CHANGED
|
@@ -33,5 +33,5 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.13"
|
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
36
|
-
spec.
|
|
36
|
+
spec.add_runtime_dependency "require_all", "~> 0"
|
|
37
37
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slack_widgets
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benny Sitbon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -56,14 +56,14 @@ dependencies:
|
|
|
56
56
|
name: require_all
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
|
-
type: :
|
|
62
|
+
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
description:
|