ultrahook 0.1.5 → 1.0.0

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
- SHA1:
3
- metadata.gz: eca7ea24fa46f90513699730b1dd6f2c25a2d06a
4
- data.tar.gz: e77fb90563e7af9b70282b4a49d08ac23e927cb8
2
+ SHA256:
3
+ metadata.gz: f121751871d589fe219517b892a2a68259f72f2d6290ea180fc803ca8d13809b
4
+ data.tar.gz: 40d1424d65a17167fbdd2c687b53f830a0ce0228e014935baccc6c51a82bbc45
5
5
  SHA512:
6
- metadata.gz: cf3283536e621e7887f5fa35defe0eee4da30cf7e1507bad863eeb47704bb5aafbd112345529e98cfca1d311344346f937c146a839f4c81ed8946e68c3cb16d7
7
- data.tar.gz: 70549b14bcb5c36db536a704d5a9459288cb621ff0daa991ddb07e4429f970a17ba93bce4b7436239281bcc6518e615f74657553609023b7b1f29d697acf2546
6
+ metadata.gz: c14c4260e09e8d70f3ee75836584004cb82c1172b9aaf9a556e85a056db173cd774bc4da284b8f005ae2463c66c6bdb829f48d63a4e9ccdccba27e22b38f5cc4
7
+ data.tar.gz: 58595e2dde96869f35cf76be69716150a8d2050af60b953d7c362107e4d6cf404ff785e83d25368914cd7c4e473e1008f0a838b83a94db6c4cfb65246cb78047
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Senvee Inc.
1
+ Copyright (c) 2013 - 2020 Senvee Inc.
2
2
 
3
3
  Senvee Inc hereby grants you a non-exclusive commercial license to use and distribute the provided software. You may not create derivative works of the provided software.
4
4
 
File without changes
@@ -92,7 +92,7 @@ module UltraHook
92
92
 
93
93
  def process_init(payload)
94
94
  puts "Forwarding activated..."
95
- puts "http://#{@options["host"]}.#{@namespace}.ultrahook.com -> #{@options["destination"]}"
95
+ puts "https://#{@ultrahook_host} -> #{@options["destination"]}"
96
96
  end
97
97
 
98
98
  def process_error(payload)
@@ -103,6 +103,14 @@ module UltraHook
103
103
  puts "Warning: "+payload["message"]
104
104
  end
105
105
 
106
+ def process_message(payload)
107
+ puts payload["message"]
108
+ end
109
+
110
+ def process_ping(payload)
111
+ # silent ack!
112
+ end
113
+
106
114
  def full_path(uri)
107
115
  return "/" if uri.path == "" && uri.query == ""
108
116
  return "/?#{uri.query}" if uri.path == "" && uri.query != ""
@@ -128,7 +136,7 @@ module UltraHook
128
136
  end
129
137
 
130
138
  def retrieve_config
131
- response = http_post(URI("http://www.ultrahook.com/init"), "key=#{@options["key"]}&host=#{@options["host"]}&version=#{UltraHook::VERSION}")
139
+ response = http_post(URI("https://www.ultrahook.com/init"), "key=#{@options["key"]}&host=#{@options["host"]}&version=#{UltraHook::VERSION}")
132
140
 
133
141
  error "Could not retrieve config from server: #{response.code}" if response.code.to_i != 200
134
142
 
@@ -136,6 +144,7 @@ module UltraHook
136
144
  if payload["success"] == true
137
145
  @stream_url = payload["url"]
138
146
  @namespace = payload["namespace"]
147
+ @ultrahook_host = payload["host"]
139
148
 
140
149
  puts "Authenticated as #{@namespace}"
141
150
  else
@@ -145,7 +154,7 @@ module UltraHook
145
154
 
146
155
  def init_stream
147
156
  uri = URI(@stream_url)
148
- Net::HTTP.start(uri.host, uri.port) do |http|
157
+ Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
149
158
  begin
150
159
  request = Net::HTTP::Get.new "#{uri.path}?#{uri.query}"
151
160
 
@@ -1,3 +1,3 @@
1
1
  module UltraHook
2
- VERSION = "0.1.5"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultrahook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinay Sahni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -57,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 2.4.8
60
+ rubygems_version: 3.0.6
62
61
  signing_key:
63
62
  specification_version: 4
64
63
  summary: Receive webhooks on localhost