mensa 0.2.0 → 0.2.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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/tables/mensa/base.rb +1 -1
- data/app/tables/mensa/config/table_dsl.rb +1 -1
- data/app/tables/mensa/config_readers.rb +5 -3
- data/lib/mensa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7393ecb783abf8a65f707744bc94c3dda05fc62b3c607eba3c3700b1ce93fa28
|
|
4
|
+
data.tar.gz: ad6f2d96a68cac83adb19d9e9cb62f9dd0de72d830306a1420b6fbc14e2f71d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4935b9ade5b6a239f40bf81a051c772e469f6abf5ee3d619949940bee52e9ccd54d5c1ab6cb9113dc837e6a196977a6c8cb7bdad72438f5519a9eb5d66a9c1a5
|
|
7
|
+
data.tar.gz: 5a2edf045417c7a48b1fb1ee07291221221b89857f6c94592f9dc8297d40db1fdbe39829f4d7b86cfc8b980d36d5df236cd402bf9c4cb0e18cc7c597bd108a21
|
data/Gemfile.lock
CHANGED
data/app/tables/mensa/base.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Mensa::Config
|
|
|
48
48
|
class TableDsl
|
|
49
49
|
include DslLogic
|
|
50
50
|
|
|
51
|
-
option :model, default: -> { self.class.name.demodulize.to_s.classify.constantize rescue raise "No model found for #{self.class.name}" }
|
|
51
|
+
option :model, default: -> { self.class.name.demodulize.to_s.classify.gsub("Table","").singularize.constantize rescue raise "No model found for #{self.class.name}" }
|
|
52
52
|
option :column, dsl_hash: Mensa::Config::ColumnDsl
|
|
53
53
|
option :internal, dsl_hash: Mensa::Config::ColumnDsl, default: {internal: true}
|
|
54
54
|
option :link
|
|
@@ -3,11 +3,13 @@ module Mensa
|
|
|
3
3
|
extend ActiveSupport::Concern
|
|
4
4
|
|
|
5
5
|
class_methods do
|
|
6
|
-
|
|
6
|
+
# Having proc here should not necessary, but not having it gave me issues with row links
|
|
7
|
+
def config_reader(name, proc: false)
|
|
7
8
|
define_method name do
|
|
8
|
-
config[name.to_s.gsub("?", "").to_sym]
|
|
9
|
+
value = config[name.to_s.gsub("?", "").to_sym]
|
|
10
|
+
proc == true && value.is_a?(Proc) ? instance_exec(&value) : value
|
|
9
11
|
end
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
|
-
end
|
|
15
|
+
end
|
data/lib/mensa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mensa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: caxlsx_rails
|