api_sabeq_ps_v1 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: c7191f152ec344c33f442a89fc983153421c00b18612e9419db467e9bf63f6d6
4
- data.tar.gz: 2bdd22fc843e4c188741ac59cbc6ac93e200462c4d73f02d86cbee4811c70301
3
+ metadata.gz: 0a6a440f7e8db92a7361e1eea6b52773608e286243ef3eb57662ee8eacfa936c
4
+ data.tar.gz: 251bdc290a918c11f08e0e1c7fa26257e6b3e7379d31892f784369978603aef9
5
5
  SHA512:
6
- metadata.gz: 3644688a82814c90f678de2e3e99bdbff697b7e358fd54d7cc406a207f04293e569a0bd611a3d946386eff6d661477f0ef1dcd10d7a1f90a6d48c75f5d4c028d
7
- data.tar.gz: 7b2a41e48a29583f4c1f28912a2c07ca55a8a5eb08b06d74e2788cb4301d5b6657ee40ed17847373316bb88bfb0d38a3736151e67fe9ef05c0516e1fe6cd7f48
6
+ metadata.gz: 726dec151f9a79496e540ecb2a95903cf8cf03aebed56cf1a43a5c0af59b9dbf154a44bf373131a863cdff5af34cbb1ce818c1b09d2a0d158442bf3c28e6cb66
7
+ data.tar.gz: ca0808f59b919cb7b8c2ac28ab85ffebee39c0fbd8ef2a11f98ef151b91e4b2b4e7c4d19a0b393df937b2ef65131169c6d5608cfdbc9817f3ba3441c34988622
@@ -4,8 +4,7 @@ require "net/https"
4
4
  module ApiSabeqPsV1
5
5
  module SabeqHelpers
6
6
  REQUEST_HEADER = {'Content-Type' => 'application/json'}
7
- #SABEQ_URL = "https://sabeq.ps"
8
- SABEQ_URL = "https://localhost:3001/"
7
+ SABEQ_URL = "https://sabeq.ps"
9
8
 
10
9
  # Authorize the request
11
10
  # parameters: login_token
@@ -69,8 +68,7 @@ module ApiSabeqPsV1
69
68
  def make_post_request(url_link, json_content)
70
69
  uri = URI.parse(url_link)
71
70
  http = Net::HTTP.new(uri.host, uri.port)
72
- #http.use_ssl = true
73
- http.use_ssl = false
71
+ http.use_ssl = true
74
72
  a_request = Net::HTTP::Post.new(uri.request_uri, REQUEST_HEADER)
75
73
  a_request.body = json_content.to_json
76
74
  a_response = http.request(a_request)
@@ -80,8 +78,7 @@ module ApiSabeqPsV1
80
78
  def make_get_request(url_link, json_content)
81
79
  uri = URI.parse(url_link)
82
80
  http = Net::HTTP.new(uri.host, uri.port)
83
- #http.use_ssl = true
84
- http.use_ssl = false
81
+ http.use_ssl = true
85
82
  the_params = json_content
86
83
  uri.query = URI.encode_www_form(the_params)
87
84
  a_request = Net::HTTP::Get.new(uri.request_uri)
@@ -1,3 +1,3 @@
1
1
  module ApiSabeqPsV1
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_sabeq_ps_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShaimaKaraki