activerecord-runivedo 0.4.0 → 0.5.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76c8d1e6bcfaacaf69adb4fb3f9d91f2344a26cd
|
4
|
+
data.tar.gz: e267f3b3f03cf19a449a901ae8bc878ab73cb7e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7368f4cb85245c1f1bc8a423ccebd173e263e46da0058a3c51b3310377ce2abd421f9477ab3a10bd49277915a7aee8a62e6654235e01b40a945ba7c3bbb98a98
|
7
|
+
data.tar.gz: 7fa4a0405e0ef432532653646c1e6a7969f1c8437de2ab7126d3959dad161ad9fe51ebffc7a153c6c6a129f5979c3ab333917c5c398ea1bc23756b16cee0c6d0
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "activerecord-runivedo"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.5.0"
|
8
8
|
spec.authors = ["Lucas Clemente"]
|
9
9
|
spec.email = ["lucas@univedo.com"]
|
10
10
|
spec.summary = "ActiveRecord adapter for Univedo"
|
@@ -13,8 +13,9 @@ module ActiveRecord
|
|
13
13
|
url = config[:server]
|
14
14
|
bucket = config[:bucket]
|
15
15
|
app = config[:app]
|
16
|
+
username = config[:username]
|
16
17
|
uts = config[:uts] ? IO.read(config[:uts]) : nil
|
17
|
-
ConnectionAdapters::RunivedoAdapter.new(url, bucket, app, uts, logger, config)
|
18
|
+
ConnectionAdapters::RunivedoAdapter.new(url, bucket, app, uts, username, logger, config)
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
@@ -38,13 +39,14 @@ module ActiveRecord
|
|
38
39
|
include Arel::Visitors::BindVisitor
|
39
40
|
end
|
40
41
|
|
41
|
-
def initialize(url, bucket, app, uts, logger, config)
|
42
|
+
def initialize(url, bucket, app, uts, username, logger, config)
|
42
43
|
super(nil, logger)
|
43
44
|
|
44
45
|
@url = url
|
45
46
|
@bucket = bucket
|
46
47
|
@app = app
|
47
48
|
@uts = uts
|
49
|
+
@username = username
|
48
50
|
@result = nil
|
49
51
|
|
50
52
|
if self.class.type_cast_config_to_boolean(config.fetch(:prepared_statements) { true })
|
@@ -66,7 +68,7 @@ module ActiveRecord
|
|
66
68
|
|
67
69
|
def connect
|
68
70
|
@connection = Runivedo::Connection.new(@url)
|
69
|
-
@session = @connection.get_session(@bucket, {})
|
71
|
+
@session = @connection.get_session(@bucket, {username: @username})
|
70
72
|
@session.apply_uts(@uts) if @uts
|
71
73
|
@perspective = session.get_perspective(@app)
|
72
74
|
@connection = @perspective.query
|
data/test/setup_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-runivedo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Clemente
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runivedo
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.4.
|
134
|
+
rubygems_version: 2.4.5
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: ActiveRecord adapter for Univedo
|