zuora_connect 0.0.9.3.3 → 0.0.9.3.4
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 +4 -4
- data/app/models/zuora_connect/app_instance.rb +10 -1
- data/db/migrate/20160718151733_create_connect_app_instances.rb +0 -3
- data/db/migrate/20161024162319_add_tokens_to_app_instance.rb +6 -0
- data/db/migrate/20161024220705_add_token_to_app_instance.rb +5 -0
- data/lib/zuora_connect/controllers/helpers.rb +2 -2
- data/lib/zuora_connect/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87b1366862b0a9cdeb1e9ac498bbc7c768799ead
|
4
|
+
data.tar.gz: e60795ed8bad5d7f79355942e36529eee2a5e774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd17ce708b1796cd36b42a41be760b626128657fb1f904bd2615711554cf85b802ae509f7c4eb439eda61ca5cb0cb6a90f17d9b90a1c662982e06eaf3a466dfb
|
7
|
+
data.tar.gz: 325ec4e2b04c0b654bbcf8ed990bf180815917755cea8a1ed752a6e66189c9c77838f8476c5a20bbb2e7156daf1d841fe86a8f5d14fc11854cdf406ecda09734
|
@@ -8,8 +8,12 @@ module ZuoraConnect
|
|
8
8
|
@options = Hash.new
|
9
9
|
@logins = Hash.new
|
10
10
|
@valid = false
|
11
|
-
|
11
|
+
self.attr_builder("timezone", ZuoraConnect.configuration.default_time_zone)
|
12
|
+
self.attr_builder("locale", ZuoraConnect.configuration.default_locale)
|
12
13
|
Apartment::Tenant.switch!(self.id)
|
14
|
+
if( ActiveRecord::Migration.check_pending! != nil)
|
15
|
+
Apartment::Migrator.migrate(self.id)
|
16
|
+
end
|
13
17
|
Thread.current[:appinstance] = self
|
14
18
|
end
|
15
19
|
|
@@ -40,6 +44,8 @@ module ZuoraConnect
|
|
40
44
|
build_task(session["#{self.id}::task_data"], session)
|
41
45
|
end
|
42
46
|
end
|
47
|
+
I18n.locale = self.locale
|
48
|
+
Time.zone = self.timezone
|
43
49
|
@valid = true
|
44
50
|
end
|
45
51
|
|
@@ -86,6 +92,9 @@ module ZuoraConnect
|
|
86
92
|
v.each do |opt|
|
87
93
|
@options[opt["config_name"]] = opt
|
88
94
|
end
|
95
|
+
elsif k == "user_settings"
|
96
|
+
self.timezone = v["timezone"]
|
97
|
+
self.locale = v["local"]
|
89
98
|
end
|
90
99
|
end
|
91
100
|
end
|
@@ -3,9 +3,6 @@ class CreateConnectAppInstances < ActiveRecord::Migration
|
|
3
3
|
if !ActiveRecord::Base.connection.table_exists?('zuora_connect_app_instances')
|
4
4
|
create_table :zuora_connect_app_instances do |t|
|
5
5
|
t.timestamps null: false
|
6
|
-
t.string "access_token"
|
7
|
-
t.string "token"
|
8
|
-
t.string "refresh_token"
|
9
6
|
end
|
10
7
|
end
|
11
8
|
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
class AddTokensToAppInstance < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :zuora_connect_app_instances, :access_token, :string unless column_exists? :zuora_connect_app_instances, :access_token
|
4
|
+
add_column :zuora_connect_app_instances, :refresh_token, :string unless column_exists? :zuora_connect_app_instances, :refresh_token
|
5
|
+
end
|
6
|
+
end
|
@@ -32,8 +32,8 @@ module ZuoraConnect
|
|
32
32
|
setup_instance_via_dev_mode
|
33
33
|
end
|
34
34
|
@appinstance.new_session(:session =>instance_data_lookup(@appinstance.id, @appinstance.access_token))
|
35
|
-
I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] :
|
36
|
-
Time.zone = session["#{@appinstance.id}::user::timezone"] ? session["#{@appinstance.id}::user::timezone"] :
|
35
|
+
I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] : @appinstance.locale
|
36
|
+
Time.zone = session["#{@appinstance.id}::user::timezone"] ? session["#{@appinstance.id}::user::timezone"] : @appinstance.timezone
|
37
37
|
end
|
38
38
|
|
39
39
|
def persist_connect_app_session
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.9.3.
|
4
|
+
version: 0.0.9.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apartment
|
@@ -127,6 +127,8 @@ files:
|
|
127
127
|
- config/initializers/apartment.rb
|
128
128
|
- config/routes.rb
|
129
129
|
- db/migrate/20160718151733_create_connect_app_instances.rb
|
130
|
+
- db/migrate/20161024162319_add_tokens_to_app_instance.rb
|
131
|
+
- db/migrate/20161024220705_add_token_to_app_instance.rb
|
130
132
|
- lib/tasks/zuora_connect_tasks.rake
|
131
133
|
- lib/zuora_connect.rb
|
132
134
|
- lib/zuora_connect/configuration.rb
|