omniauth-visma 0.0.4 → 0.0.5

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
2
  SHA256:
3
- metadata.gz: ad14691ae656580b454323786b143049a4bcabc5aa7a5712e191e63f8e54d05d
4
- data.tar.gz: cd1e500ae5c9cffdee787310b91951943989908d42a86df64a7966c28ab32651
3
+ metadata.gz: d6275d75a6bc6192d047c6cdaf044b49734faf2e4545acc23025c995d720dc9b
4
+ data.tar.gz: a400dafc034f3330993549f13e9510bcac57737c9468bb5396834616d2b848b5
5
5
  SHA512:
6
- metadata.gz: 2705bcdde3b8902f02541b626a4c64793c5820ad95383a309ee77daaec3df5c0f3fcdac05ccb33b14b27fb4dd48d071a69221161cf39d3d4a25d3d3a368f5ff7
7
- data.tar.gz: e90621cbcf3ec84dbd6e480f77aec72d19c490d5d221ae7a484b20106896ee649c88de5c25df588e12a3175484c643cb45889db49724241bb93d681eec79aea8
6
+ metadata.gz: ca93ecab3eeee34515c6153c962492e802c0ec507573943b3c711f09d9f1fc5af3f3aa9cfd9741298a5ec8cda679b0cf9eabacff1bc816895ebc5981893b3a9f
7
+ data.tar.gz: d64a2f218a7384e30e603d52b2a2e2e65068019c2164220d19d22eab1baef05715b125e865ba0825984eae856a2627378f228250fcf885b918f033a5cb8b378d
data/README.md CHANGED
@@ -12,7 +12,7 @@ For more information about the API see https://developer.vismaonline.com/.
12
12
  provider "visma", ENV['VISMA_CLIENT_ID'], ENV['VISMA_CLIENT_SECRET'], scope: 'offline_access ea:api'
13
13
  end
14
14
 
15
- The default environment is ```:production```. For testing you can use the sandbox environment by specifying ```:sandbox``` as ```environment``` in the provider setup.
15
+ The default environment is ```:production```. For testing you can use the sandbox environment by specifying ```:sandbox``` as ```environment``` in the provider setup. If changing environment after initalizing then call ```change_environment```.
16
16
 
17
17
  ## Credits
18
18
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Visma
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -50,6 +50,10 @@ module OmniAuth
50
50
  @raw_info ||= access_token.get('/v2/companysettings').parsed
51
51
  end
52
52
 
53
+ def change_environment
54
+ update_default_environment_urls
55
+ end
56
+
53
57
  private
54
58
 
55
59
  def update_default_environment_urls
@@ -49,6 +49,12 @@ describe OmniAuth::Strategies::Visma do
49
49
  subject.client.authorize_url.should eq("https://identity-sandbox.test.vismaonline.com/connect/authorize")
50
50
  end
51
51
 
52
+ it 'should set environment after init' do
53
+ subject.options.environment = :sandbox
54
+ subject.change_environment
55
+ subject.client.authorize_url.should eq("https://identity-sandbox.test.vismaonline.com/connect/authorize")
56
+ end
57
+
52
58
  end
53
59
 
54
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-visma
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
  - Espen Antonsen