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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a210e9e2dd1ddc77df25699aba3bf4a17a9bd4d8
4
- data.tar.gz: b4e30434dc666b5d2720beb51270bf3b4c6974c5
3
+ metadata.gz: 26ea650f3c8cedc2e76c4c632b106cfc0a274fd8
4
+ data.tar.gz: 2d7aafd8442d274429c4f3650bd393338e815b0c
5
5
  SHA512:
6
- metadata.gz: bdab9d4c906cfb9c52b0911bbba5ccaf18850dd770cd25ff285b7173e3d39332360a553be8821e6baeda7178cee9d00d74f21341683cb7979f24fd0cb3f5115f
7
- data.tar.gz: b244072fe1037656ebc1dab663841e3a753797b017ff51154b83d753c921c60f035ae07fdf21a7bde80de302e84e33e657b7a4525937f0198f0608d1e114af27
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
- For Slack message attachments:
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::DangerButton.create(name: 'test', text: 'text', value: 1, confirm_hash: 'POSITIVE??')
29
-
30
- # => {:name=>"test", :text=>"text", :type=>"button", :value=>1, :style=>"danger", :confirm=>"POSITIVE??"}
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
+ ![Primary button example](https://user-images.githubusercontent.com/2252680/29849715-015b42e2-8d6c-11e7-93a9-fa71e83a6345.png)
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.
@@ -1,3 +1,3 @@
1
1
  module SlackWidgets
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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.add_development_dependency "require_all"
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.0
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-01 00:00:00.000000000 Z
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: :development
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: