activerecord-runivedo 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b4b0e410dfa7f2388446731df58fc0b8278b92c
4
- data.tar.gz: dce3b3fd9e42953194f5e0a70076d5168509ea20
3
+ metadata.gz: 76c8d1e6bcfaacaf69adb4fb3f9d91f2344a26cd
4
+ data.tar.gz: e267f3b3f03cf19a449a901ae8bc878ab73cb7e6
5
5
  SHA512:
6
- metadata.gz: 7ed11231a6043d11af9586a9fb468cd8a324ee2d38d72d3f5b4beff3e1624f13a07a90e8e8b930a469d9d02a02386061255869cccf9ab0616f136e219c4b9486
7
- data.tar.gz: 0ee62af7fd4d57077f14c0185eca2873a9d5e967a61bb667da17e6af12e2fc08326ad3649557e93e586b44d2304882ab14be124981d2972651ab5cffe7e4798a
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.4.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
@@ -5,6 +5,7 @@ ActiveRecord::Base.establish_connection(
5
5
  server: TEST_URL,
6
6
  bucket: "01a9e003-0783-475a-b698-485a5450a9d4",
7
7
  app: "6e5a3a08-9bb0-4d92-ad04-7c6fed3874fa",
8
+ username: "marvin",
8
9
  )
9
10
 
10
11
  class Table < ActiveRecord::Base; end
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.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: 2014-12-09 00:00:00.000000000 Z
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.2
134
+ rubygems_version: 2.4.5
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: ActiveRecord adapter for Univedo