uc3-dmp-rds 0.0.1 → 0.0.3

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: 8d491135d6067f7ef206b6674634897e80e305fbf8d886a3f4b1b3d32762813b
4
- data.tar.gz: 965e807f2ecabebbcaca3a5e251bf8844e17be5dad1731dc5c6d3d4d8cfc4bd2
3
+ metadata.gz: 9a8f900690c6b37e5498069aa39353c4f5a09eaa16f4aeafb73b941147fd6c53
4
+ data.tar.gz: 3a5b7e787b89237145c971c14edd89ffb327666ee65502adca6aaa8d70292a01
5
5
  SHA512:
6
- metadata.gz: 8bf401ad2b04e0865f304ee1bdc1d0a50bfc179dea37892bbc8207ce641e930d6e228dd38c5b472294cc31ab26f6b20a1c49735bed9611dcc76549f22ba1d712
7
- data.tar.gz: f2bc501cc49ad107c7b61ddfcd9564ca95cded57e2b578c79945026eb76a8975606c3cad77fa35fddb6f6a82e1a03f63edb51157eb4fe43d2e4f20dcafd1dcdf
6
+ metadata.gz: 79cebc62f90bcea1f4991b585bf80c285412e8c19dabffa19209589a12281692fbfb79c8d7b224e15f64d84644ed083db940602cebb9cf56d79055d9163640b2
7
+ data.tar.gz: eb618d5a27f22a1b21675b8502b39ae2cb49c565ead5864c9641c09ac706a129b1b266a08d22c52998d8331afe28a2f2cfa0ed0fe9b7e3a4bf3536da99a79370
@@ -24,8 +24,13 @@ module Uc3DmpRds
24
24
 
25
25
  class << self
26
26
  # Connect to the RDS instance
27
- def connect
27
+ def connect(debug: false)
28
28
  creds = _credentials
29
+
30
+ puts "DB stuff:"
31
+ puts "HOST: #{ENV['DATABASE_HOST']}, PORT: #{ENV['DATABASE_HOST']}, NAME: #{ENV['DATABASE_HOST']}"
32
+ pp creds
33
+
29
34
  ActiveRecord::Base.establish_connection(
30
35
  adapter: 'mysql2',
31
36
  host: ENV.fetch('DATABASE_HOST', nil),
@@ -35,12 +40,12 @@ module Uc3DmpRds
35
40
  password: creds[:password],
36
41
  encoding: 'utf8mb4'
37
42
  )
38
- ActiveRecord::Base.connected?
43
+ # ActiveRecord::Base.connected?
39
44
  end
40
45
 
41
46
  # Execute the specified query using ActiveRecord's helpers to sanitize the input
42
47
  def execute_query(sql:, **params)
43
- raise StandardError, MSG_NO_CONNECTION unless ActiveRecord::Base.connected?
48
+ # raise StandardError, MSG_NO_CONNECTION unless ActiveRecord::Base.connected?
44
49
  return [] unless sql.is_a?(String) && !sql.strip.empty? && (params.nil? || params.is_a?(Hash))
45
50
  # Verify that all of the kewords are accounted for and that values were supplied
46
51
  raise StandardError, MSG_KEYWORDS_INVALID unless _verify_params(sql: sql, params: params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpRds
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-rds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley