roda-kabk 1.0.0 → 1.0.1

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: f5508b1dac33bf7629b9c147a7f1798a67e78280862aaacc77fa6114944df277
4
- data.tar.gz: 459908e88eb476e96592aa97f8832c53c5bbcd01b446ace3e977b6aca14c1bea
3
+ metadata.gz: d27536425bdf1e8615cec4da82ca3db024d3af288abf56fd52b58046539d2fa9
4
+ data.tar.gz: eba3784e32fb18d50d4b28fdd71c5e1a41787192aca260d4e5b4a09d6f8e1290
5
5
  SHA512:
6
- metadata.gz: e3be59177e76c02daad67d4d00c1c6b6c6effd42ad0acee508e1b75b85516760552f0e1839c47e9d9eccc4bec16c6f2f171619f14c533b5dfc4afa001f1302dc
7
- data.tar.gz: 1f322e901a43c63bb5ceaec3ebb6314bed76c3384a951e144b79ddf68c7b6b13c189768f03f57d516da856d3bc9680f7a56923dc9e62b248264b6bc617d7d587
6
+ metadata.gz: 875da794e05174b27fc5445c8866ccd2e64ed1df8c849a85924eb8b832513dbd484d47e3b093ef6fd6eb6656d63876717cb4588a211e5fce86d1694af838a056
7
+ data.tar.gz: d1ea468f5e982c41227df72dad4d29d34dc35bc3c36eecee0db9345c57d1966f59992ae9ae97b716aa57414be9f721fb7ea30388d103b258c665a800f13286c7
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roda-kabk (0.2.0)
5
- kabk (~> 0.2.0)
4
+ roda-kabk (1.0.1)
5
+ kabk (~> 1.0)
6
6
  roda (~> 3.0)
7
7
 
8
8
  GEM
@@ -11,7 +11,7 @@ GEM
11
11
  bigdecimal (4.1.2)
12
12
  concurrent-ruby (1.3.8)
13
13
  diff-lcs (1.6.2)
14
- kabk (0.2.0)
14
+ kabk (1.0.0)
15
15
  concurrent-ruby (~> 1.1)
16
16
  sequel (~> 5.0)
17
17
  logger (1.7.0)
@@ -58,7 +58,7 @@ CHECKSUMS
58
58
  bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
59
59
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
60
60
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
61
- kabk (0.2.0) sha256=96b8cbea6b28d8ef0e5b9b4d935851833a617d87f14c7b0c39bc50142bf78118
61
+ kabk (1.0.0)
62
62
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
63
63
  nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
64
64
  puma (8.0.2) sha256=c8ed871dfbbe66448ea9ffd46692342d9804d4071522b52b5331b7b6e7b686fb
@@ -66,7 +66,7 @@ CHECKSUMS
66
66
  rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
67
67
  rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
68
68
  roda (3.106.0) sha256=1a1cfb13c6690db158a3929e9c9ece88e697fb23b05baae63f07b0773e3bbade
69
- roda-kabk (0.2.0)
69
+ roda-kabk (1.0.1)
70
70
  rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
71
71
  rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
72
72
  rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
data/README.md CHANGED
@@ -112,7 +112,6 @@ class App < Roda
112
112
  default_locale: "en",
113
113
  supported_locales: ["en", "fa"],
114
114
  direction: "ltr",
115
- show_demo_credentials: false,
116
115
  endpoints: {
117
116
  upload: "/admin/api/uploads"
118
117
  },
data/TUTORIAL.md CHANGED
@@ -26,7 +26,9 @@ class AdminApp < Roda
26
26
  default_locale: "en",
27
27
  supported_locales: ["en", "fa"],
28
28
  direction: "ltr",
29
- show_demo_credentials: false,
29
+ auth: {
30
+ show_demo_credentials: false
31
+ },
30
32
  custom_fonts: [
31
33
  {
32
34
  name: "Inter",
data/examples/app.rb CHANGED
@@ -133,7 +133,6 @@ class App < Roda
133
133
  default_locale: "en",
134
134
  supported_locales: ["en", "fa"],
135
135
  direction: "ltr",
136
- show_demo_credentials: false,
137
136
  logo_url: "/simurgh-logo.svg",
138
137
  endpoints: {
139
138
  upload: "/api/admin/uploads"
@@ -73,12 +73,14 @@ module RodaPlugins
73
73
  ]
74
74
  }
75
75
  auth = auth_defaults.merge(raw_config[:auth] || {})
76
+ if raw_config.key?(:show_demo_credentials) && (raw_config[:auth].nil? || !raw_config[:auth].key?(:show_demo_credentials))
77
+ auth[:show_demo_credentials] = raw_config[:show_demo_credentials]
78
+ end
76
79
 
77
80
  base_defaults = {
78
81
  direction: "ltr",
79
82
  default_locale: "en",
80
- supported_locales: ["en", "fa"],
81
- show_demo_credentials: false
83
+ supported_locales: ["en", "fa"]
82
84
  }
83
85
 
84
86
  base_defaults.merge(raw_config).merge(endpoints: endpoints, auth: auth)
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Roda
4
+ module RodaPlugins
5
+ module Kabk
6
+ # Current version of the roda-kabk gem
7
+ VERSION = "1.0.1"
8
+ end
9
+ end
10
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "kabk"
4
+ require_relative "kabk/version"
4
5
  require_relative "kabk/helpers"
5
6
 
6
7
  class Roda