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 +4 -4
- data/README.md +3 -0
- data/lib/kaal/rails/version.rb +1 -1
- data/lib/kaal/rails.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6c3d26fefed62ee5114436e1a5695133e88770be0f64d0aff9cc3358e1367a8
|
|
4
|
+
data.tar.gz: 84f117442db3c9c21569d2a55460bf575167aeefb190cd4ae90dae443c425073
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/kaal/rails/version.rb
CHANGED
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
|
-
|
|
46
|
-
return nil unless
|
|
46
|
+
selected_backend = current_backend || backend
|
|
47
|
+
return nil unless selected_backend
|
|
47
48
|
|
|
48
|
-
configuration.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
|
+
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.
|
|
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.
|
|
26
|
+
version: 0.5.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rails
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|