hangouts-chat 0.0.5 → 0.0.6

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: ba0a8479be8a197c5047423da9726c0a13adf72ac1182eb23168fbf42ccdfc93
4
- data.tar.gz: 512c4be373f898bf4f74909d6c05bb8184333615ccb43b2a993023da6e132f13
3
+ metadata.gz: beff61be4ee8a8cf2e9dfbc44da4356fb38a438607a98ed037e0aefbc36c4fb1
4
+ data.tar.gz: 3db614404c6eee2370b2cc9267b637053d5a752b15cefa0e5a1d1b4697e42b85
5
5
  SHA512:
6
- metadata.gz: c69a02455d2bc2d5d3d9931a921da1df3915846298692da03b2b88f5d695b10d581cb75d28e0cfb2bfc2814f3c9154240d8f78b65f12f5ae6e65a5a3cff76b77
7
- data.tar.gz: 2093224be9198bdc6be792de251c306823d6d5e884582259065c9874031052f6279c6c460ae9106b7394c3be66e4a66468fa95146afd59957a72e12613614b5e
6
+ metadata.gz: 2687dd752dd9f722dd6752ad16ed797873376ae94f1154d6c6947c0847fd6f4142f850c0a91609363d89a9d8ae7cb7f1601264733626ac605048212bb0924ae9
7
+ data.tar.gz: 76147f6d6fa2d58b410e8bea6bc8049fd49b6fe0729bb5aa4b7b5a84cd2b89f1a6202eb349e4356582b340d089cf55e01318e2552ba95bf0fc5691eef96fde33
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.6
4
+ * Fixed proxy ENV support for ruby versions < 2.5.0
5
+
3
6
  ## 0.0.5
4
7
  * Resolved missing dependencies for development and testing
5
8
 
data/README.md CHANGED
@@ -13,11 +13,14 @@ $ gem install hangouts-chat
13
13
 
14
14
  or add to your Gemfile
15
15
 
16
- ```ruby
17
- require 'hangouts-chat'
16
+ ```
17
+ gem 'hangouts-chat'
18
18
  ```
19
19
 
20
20
  ## Usage
21
+ ```ruby
22
+ require 'hangouts_chat'
23
+ ```
21
24
  ### Simple Text Message
22
25
  Simple messages that appear inline as if typed by a user. Details and format: [Simple Text Messages](https://developers.google.com/hangouts/chat/reference/message-formats/basic)
23
26
  ```ruby
@@ -32,8 +35,8 @@ sender = HangoutsChat::Sender.new 'webhook_URL'
32
35
  header = { title: 'Pizza Bot Customer Support',
33
36
  subtitle: 'pizzabot@example.com',
34
37
  imageUrl: 'https://goo.gl/aeDtrS' }
35
- sections = [{ keyValue: { topLabel: 'Order No.', content: '12345' } },
36
- { keyValue: { topLabel: 'Status', content: 'In Delivery' } }]
38
+ sections = [{ widgets: [{ keyValue: { topLabel: 'Order No.', content: '12345' } },
39
+ { keyValue: { topLabel: 'Status', content: 'In Delivery' } }] }]
37
40
 
38
41
  sender.card(header, sections)
39
42
  ```
@@ -22,10 +22,9 @@ module HangoutsChat
22
22
  def post(payload)
23
23
  @req.body = payload.to_json
24
24
 
25
- res = Net::HTTP.start(@uri.hostname, @uri.port, use_ssl: true) do |http|
25
+ Net::HTTP.start(@uri.hostname, @uri.port, :ENV, use_ssl: true) do |http|
26
26
  http.request(@req)
27
27
  end
28
- res
29
28
  end
30
29
  end
31
30
  end
@@ -1,4 +1,4 @@
1
1
  module HangoutsChat
2
2
  # Library version
3
- VERSION = '0.0.5'.freeze
3
+ VERSION = '0.0.6'.freeze
4
4
  end
@@ -29,8 +29,8 @@ class HangoutsChatTest < Minitest::Test
29
29
  header = { title: 'Pizza Bot Customer Support',
30
30
  subtitle: 'pizzabot@example.com',
31
31
  imageUrl: 'https://goo.gl/aeDtrS' }
32
- sections = [{ keyValue: { topLabel: 'Order No.', content: '12345' } },
33
- { keyValue: { topLabel: 'Status', content: 'In Delivery' } }]
32
+ sections = [{ widgets: [{ keyValue: { topLabel: 'Order No.', content: '12345' } },
33
+ { keyValue: { topLabel: 'Status', content: 'In Delivery' } }] }]
34
34
 
35
35
  @sender.card(header, sections)
36
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hangouts-chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - enzinia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-31 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler