arcgis_vrps 0.0.3.1 → 0.0.3.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/arcgis_vrps/auth.rb +4 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6010a40ed0ec63c71ceb86e539d3e0f6aed0f5c2
4
- data.tar.gz: 79d0a25c178229964c740b77fd15c382a80c1452
3
+ metadata.gz: 70efb98c76757b8d4b76558606db71124568bf1d
4
+ data.tar.gz: cab7e5b2fae977d869bf2294eb5c6e2967bd808f
5
5
  SHA512:
6
- metadata.gz: a8e397baee81309043d500991c3304c285d672ecb7574b1bb5faff02621ad21c000d1434900bb56ec16144252ac760dc5262080cfc124b88c641959f24a46b37
7
- data.tar.gz: 562b1854a92c12890e0e18e2ba36bccaf2c52907a83374f3644ae6a72d1e5e167435ab7225ce41b819f3a2aa1394885067f30ca7eccf85c8ae47d9450ea6e77f
6
+ metadata.gz: 08e1a4b69a8cc91a96863e6e3e7bbc4732885b774b65e8eefd3ddfc02056765f819ac3bc952b67f9e9340cf544fbca796a592687214a3f63329ad82e0916ffb5
7
+ data.tar.gz: e176254a3cf5d3956f0cd37a2783e137b5dc6f672c8eb420b6e9b69405d3e0a11c7b037b474e61768f96f4b906f4a27ce18c09d511144c21c1b1270429a2b3ee
@@ -17,7 +17,7 @@ class Auth
17
17
  url = "https://www.arcgis.com/sharing/rest/oauth2/token"
18
18
  escaped_url = URI.encode(url)
19
19
  uri = URI.parse(escaped_url)
20
- req = Net::HTTP::Post.new(uri.to_s, nil)
20
+ req = Net::HTTP::Post.new(uri.to_s)
21
21
 
22
22
  # Expiration is set to 20160 minutes = 2 weeks
23
23
  req.set_form_data(
@@ -28,11 +28,10 @@ class Auth
28
28
  expiration: 20160
29
29
  )
30
30
 
31
- req.use_ssl = true
31
+ http = Net::HTTP.new(uri.hostname, uri.port)
32
+ http.use_ssl = true
32
33
 
33
- res = Net::HTTP.start(uri.hostname, uri.port) do |http|
34
- http.request(req)
35
- end
34
+ res = http.request(req)
36
35
 
37
36
  token = JSON.parse(res.body)['access_token']
38
37
  puts "\n"+res.body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcgis_vrps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.1
4
+ version: 0.0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiong