rodauth-rails 0.4.1 → 0.4.2

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: c1e2e56e1f7312210e9f8fc587a783445f701a238aec21febf5f6ae0489e39c9
4
- data.tar.gz: d192cdbbc8aeebbb0a8318430cc5771bf26abd6e392644393c1755af28aeb9dd
3
+ metadata.gz: 230b201ad8b9f7c27a9ca00db1a27b4166b7ca0d202f32651fc15ff663bb860e
4
+ data.tar.gz: b6b7205916994f829f8eb74c76d8b6172c52339b157f464afd2cd9bfa96f3f25
5
5
  SHA512:
6
- metadata.gz: 145b25b7e6bdb4a6ad395ec5e717112c93624005480bda4d617c036d45766224ea9ebe7f389b14f6d3fb6a9036c9a9a08c7595cfae710b58ff3458f698e9ce70
7
- data.tar.gz: 51018b0878979bbc34c03f6dbd2a197c04854e3022561dd3db97ae2bb5d42f436d22c008d0ffd06ca8693435e5a69b5e938587f92baf5c39ad50bb247dfa2979
6
+ metadata.gz: fc5645e124796a66c59c51b3b1ab2f1a3b9d7168b53f0703543e42187bb29470d09d3b1103e543dad66ba9a7f940bd469383d767c7acf8fc1d1c8ac7675848e9
7
+ data.tar.gz: 89cfd6289466b276240ffbb1111fef0b4274ae2479f5a1dbdaaa193333093508ddc692f47e7a8d57ffeafe70a7d25039371a7ebd88646d962f63f577039afc9c
@@ -1,3 +1,13 @@
1
+ # 0.4.2 (2020-11-08)
2
+
3
+ * Drop support for Ruby 2.2 (@janko)
4
+
5
+ * Bump `sequel-activerecord_connection` dependency to 1.1+ (@janko)
6
+
7
+ * Set default bcrypt hash cost to `1` in tests (@janko)
8
+
9
+ * Call `AR::Base.connection_db_config` on Rails 6.1+ in `rodauth:install` generator (@janko)
10
+
1
11
  ## 0.4.1 (2020-11-02)
2
12
 
3
13
  * Don't generate `RodauthController` in API-only mode (@janko)
data/README.md CHANGED
@@ -88,7 +88,7 @@ ActiveRecord connection.
88
88
  require "sequel/core"
89
89
 
90
90
  # initialize Sequel and have it reuse Active Record's database connection
91
- DB = Sequel.postgres(extensions: :activerecord_connection, test: false)
91
+ DB = Sequel.postgres(extensions: :activerecord_connection)
92
92
  ```
93
93
 
94
94
  ### Rodauth app
@@ -69,7 +69,11 @@ module Rodauth
69
69
  end
70
70
 
71
71
  def activerecord_adapter
72
- ActiveRecord::Base.connection_config.fetch(:adapter)
72
+ if ActiveRecord::Base.respond_to?(:connection_db_config)
73
+ ActiveRecord::Base.connection_db_config.adapter
74
+ else
75
+ ActiveRecord::Base.connection_config.fetch(:adapter)
76
+ end
73
77
  end
74
78
 
75
79
  def api_only?
@@ -14,8 +14,8 @@ class RodauthApp < Rodauth::Rails::App
14
14
  <% unless api_only? -%>
15
15
  # Specify the controller used for view rendering and CSRF verification.
16
16
  rails_controller { RodauthController }
17
- <% end -%>
18
17
 
18
+ <% end -%>
19
19
  # Store account status in a text column.
20
20
  account_status_column :status
21
21
  account_unverified_status_value "unverified"
@@ -2,7 +2,7 @@ require "sequel/core"
2
2
 
3
3
  # initialize Sequel and have it reuse Active Record's database connection
4
4
  <% if RUBY_ENGINE == "jruby" -%>
5
- DB = Sequel.connect("jdbc:<%= sequel_adapter %>://", extensions: :activerecord_connection, test: false)
5
+ DB = Sequel.connect("jdbc:<%= sequel_adapter %>://", extensions: :activerecord_connection)
6
6
  <% else -%>
7
- DB = Sequel.<%= sequel_adapter %>(extensions: :activerecord_connection, test: false)
7
+ DB = Sequel.<%= sequel_adapter %>(extensions: :activerecord_connection)
8
8
  <% end -%>
@@ -13,6 +13,11 @@ module Rodauth
13
13
  include Rodauth::Rails::ControllerMethods
14
14
  end
15
15
  end
16
+
17
+ initializer "rodauth.test" do
18
+ # Rodauth uses RACK_ENV to set the default bcrypt hash cost
19
+ ENV["RACK_ENV"] = "test" if ::Rails.env.test?
20
+ end
16
21
  end
17
22
  end
18
23
  end
@@ -1,5 +1,5 @@
1
1
  module Rodauth
2
2
  module Rails
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
@@ -11,14 +11,14 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "https://github.com/janko/rodauth-rails"
12
12
  spec.license = "MIT"
13
13
 
14
- spec.required_ruby_version = ">= 2.2.0"
14
+ spec.required_ruby_version = ">= 2.3"
15
15
 
16
16
  spec.files = Dir["README.md", "LICENSE.txt", "CHANGELOG.md", "lib/**/*", "*.gemspec"]
17
17
  spec.require_paths = ["lib"]
18
18
 
19
19
  spec.add_dependency "railties", ">= 4.2", "< 7"
20
20
  spec.add_dependency "rodauth", "~> 2.1"
21
- spec.add_dependency "sequel-activerecord_connection", "~> 1.0"
21
+ spec.add_dependency "sequel-activerecord_connection", "~> 1.1"
22
22
  spec.add_dependency "tilt"
23
23
  spec.add_dependency "bcrypt"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-02 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.0'
53
+ version: '1.1'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.0'
60
+ version: '1.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: tilt
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
190
  - - ">="
191
191
  - !ruby/object:Gem::Version
192
- version: 2.2.0
192
+ version: '2.3'
193
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
195
  - - ">="