rodauth-rails 0.2.0 → 0.2.1

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: 43ab68591969400f7891b7451b3d3d19e6c0fedc93d58a6b2795a6df969fe6e3
4
- data.tar.gz: 19da59d6f9a9a041a7fde9135754d6b6173414383303e3bade6a7ed6a5116762
3
+ metadata.gz: 32eea791dff9c98b9e78d209ba375d08095f07ec1d0ba0e852e5af83602e2128
4
+ data.tar.gz: f12a2c57d4f3dee31efd10c6ba8fd211af62d8636cda5118fcc949642ded1e29
5
5
  SHA512:
6
- metadata.gz: 23f0093e1c3da9917b8080472b179e9926a565bf3b5cf01d32eb09cbbaf94787ef99564d704599f9be8396af3fb775bc056151c31b6a399fe5f2d7769c5f1893
7
- data.tar.gz: da88b97f2e2420ac8bd0f9397e69582ad6720d10a3bb04a695ad4b603b41ad276bd188ee5007a19642d682240944ca05402ccdd7996ecc0816c439f366d19739
6
+ metadata.gz: c722443088524cfedbffa17336de213dbcb004fe0866cb418f9bdc27a4a3a4b3af0ccd954a991bdc4d5e100278bd4738fc2a17b58a43555ddc725dcc49cca21b
7
+ data.tar.gz: a97951dd6653c70af6397633b6628450779497a80be7b7dd294fbd09c8f91b4d82fe722190911d7324af7a3ff2c4b9ff274dd55adde8c8983fbc513e5c81d12d
@@ -1,3 +1,7 @@
1
+ ## 0.2.1 (2020-07-26)
2
+
3
+ * Fix incorrect JDBC connect syntax in `sequel.rb` template on JRuby (@janko)
4
+
1
5
  ## 0.2.0 (2020-07-26)
2
6
 
3
7
  * Drop support for Rodauth 1.x (@janko)
@@ -56,13 +56,21 @@ module Rodauth
56
56
  end
57
57
  end
58
58
 
59
- def sequel_adapter
60
- return "jdbc" if RUBY_ENGINE == "jruby"
61
-
62
- case activerecord_adapter
63
- when "postgresql" then "postgres"
64
- when "mysql2" then "mysql2"
65
- when "sqlite3" then "sqlite"
59
+ if RUBY_ENGINE == "jruby"
60
+ def sequel_adapter
61
+ case activerecord_adapter
62
+ when "postgresql" then "postgresql"
63
+ when "mysql2" then "mysql"
64
+ when "sqlite3" then "sqlite"
65
+ end
66
+ end
67
+ else
68
+ def sequel_adapter
69
+ case activerecord_adapter
70
+ when "postgresql" then "postgres"
71
+ when "mysql2" then "mysql2"
72
+ when "sqlite3" then "sqlite"
73
+ end
66
74
  end
67
75
  end
68
76
 
@@ -1,6 +1,10 @@
1
1
  require "sequel/core"
2
2
 
3
3
  # initialize the appropriate Sequel adapter without creating a connection
4
+ <%- if RUBY_ENGINE == "jruby" -%>
5
+ DB = Sequel.connect("jdbc:<%= sequel_adapter %>://", test: false)
6
+ <% else -%>
4
7
  DB = Sequel.<%= sequel_adapter %>(test: false)
8
+ <% end -%>
5
9
  # have Sequel use ActiveRecord's connection for database interaction
6
10
  DB.extension :activerecord_connection
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "rodauth-rails"
3
- spec.version = "0.2.0"
3
+ spec.version = "0.2.1"
4
4
  spec.authors = ["Janko Marohnić"]
5
5
  spec.email = ["janko.marohnic@gmail.com"]
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić