g_ruby 0.0.4 → 0.0.5

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/g_ruby/auth.rb +7 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53e3e76e11e3c4e052383526390eb5b62ee40ea9
4
- data.tar.gz: bcd26746404bfcea68009b701aa0463f951d4ec3
3
+ metadata.gz: 93390e5ec73db632c31f423ec3efc99bcbd64d09
4
+ data.tar.gz: 20da34e0fe5552b8c17bdf02541fad6623c24792
5
5
  SHA512:
6
- metadata.gz: 94b45960edb4bd905370de4717deb40e8e8e036715904aed2b29e73361c8a7521a10612892d283e0edc11db15953434b6fbd8eec405b70191ded14a5736f9d34
7
- data.tar.gz: 012cf4a4f9bac5626eff28097375de0b404c8fbea38eddfb399893c4884424e97022cff424cd09110337553bbccf77bdbd90ad60c2a8be80b9d85b031c5db4ad
6
+ metadata.gz: 215a95462860572f39d2499e2d907cb8b40c2e6d4508945583517489b4d8bda1613091cc4d69def63f99c2d18fac048e7fc243df123aa2ff17bb2832fd3330fc
7
+ data.tar.gz: be4e118be18f2d221cf285c0cc6cc044dabb59b518ba31cf23e331ce21d5aaf90ac73756ffbea2be0b42d9b38ceb353e0e15f33a3a45b5f9fe40b204d0f9cab3
data/lib/g_ruby/auth.rb CHANGED
@@ -8,6 +8,13 @@ class GRuby::Auth
8
8
  a = a + "&state=#{state}" if !state.blank?
9
9
  return a
10
10
  end
11
+
12
+ #GRuby::Auth.oauth2(state)
13
+ def self.oauth2(state, scope)
14
+ a = "https://accounts.google.com/o/oauth2/auth?response_type=code&access_type=offline&approval_prompt=auto&client_id=#{GOOGLE_CLIENTID}&redirect_uri=#{GOOGLE_CALLBACK}&scope=#{scope}"
15
+ a = a + "&state=#{state}" if !state.blank?
16
+ return a
17
+ end
11
18
 
12
19
  #GRuby::Auth.token(auth_code)
13
20
  def self.token(auth_code)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pykih Software