kaal-rails 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
  SHA256:
3
- metadata.gz: eb9975de587d0049dc6d0c600a8d1ae9b475d10ada23dcca56250008f4662915
4
- data.tar.gz: 72cb9b8d049685add808d81a11a7bf5682580857e8973cd5f46b351d67d4c4af
3
+ metadata.gz: f6c3d26fefed62ee5114436e1a5695133e88770be0f64d0aff9cc3358e1367a8
4
+ data.tar.gz: 84f117442db3c9c21569d2a55460bf575167aeefb190cd4ae90dae443c425073
5
5
  SHA512:
6
- metadata.gz: 6b4d4ac608ba05a69c26ab53cb062026166fd98dbf2c10a35fed393e2e78f56e24018b834fe4c13ecc59e1f0576d03beefc1056cff6010713c6f4e75ee224014
7
- data.tar.gz: a3ef5c9890a13dac180b51a74d11f8e4c35d53a436085fba627677649e3ad541dc2c9a882cd9375baf2d4dd80a40d686a6e1b41a7cdb94bc564eee0b52d2c64d
6
+ metadata.gz: 45c1e82dafa72cb398fcc4a58ecd5616dabe69c89e9cd2501a645e6a097f5665571c1849178ac230278c438d539efa7b6a622e65537d2fbdc001f333fcd1de11
7
+ data.tar.gz: 527d9da69cc8cc495a9c2bb8a139188dfbcc895362aab1a307e46e3f3699a8f837d59a54481825b1fd0f69bc3fc20356aa422ec27a62830dd3e0579da52f2b69
data/README.md CHANGED
@@ -41,12 +41,15 @@ bundle exec rails generate kaal:install --backend=mysql
41
41
  bundle exec rails db:migrate
42
42
  ```
43
43
 
44
+ These migrations install the Kaal persistence tables required by the selected backend.
45
+
44
46
  ## What It Provides
45
47
 
46
48
  - Rails-native setup on top of the Kaal engine
47
49
  - Active Record-backed persistence through the core `kaal` gem
48
50
  - migration templates for the Kaal tables required by the selected backend
49
51
  - automatic backend selection from the Rails database adapter unless the app sets `Kaal.configuration.backend` itself
52
+ - the normal Kaal runtime API in a Rails install surface
50
53
 
51
54
  ## Usage
52
55
 
@@ -6,6 +6,6 @@
6
6
  # LICENSE file in the root directory of this source tree.
7
7
  module Kaal
8
8
  module Rails
9
- VERSION = '0.4.0'
9
+ VERSION = '0.5.0'
10
10
  end
11
11
  end
data/lib/kaal/rails.rb CHANGED
@@ -41,11 +41,14 @@ module Kaal
41
41
  end
42
42
 
43
43
  def configure_backend!(configuration: Kaal.configuration, backend: build_backend)
44
+ logger = configuration.logger
44
45
  current_backend = configuration.backend
45
- return current_backend if current_backend
46
- return nil unless backend
46
+ selected_backend = current_backend || backend
47
+ return nil unless selected_backend
47
48
 
48
- configuration.backend = backend
49
+ configuration.backend = selected_backend unless current_backend
50
+ Kaal.warn_on_risky_configuration!(configuration:, logger:)
51
+ selected_backend
49
52
  end
50
53
 
51
54
  def install!(root: ::Rails.root, backend: detect_backend_name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaal-rails
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
  - Nitesh Purohit
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0
19
+ version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0
26
+ version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement