ruby_native 0.10.0 → 0.10.2
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/lib/ruby_native/version.rb +1 -1
- data/lib/ruby_native.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eeb4ed38a0ee884b79aaeb774bec27382d5bf7e307662b4eceed42e2b1a3f777
|
|
4
|
+
data.tar.gz: b31cc3f05419442051575f57edf5455fcf85ccfabc88f8e157205527dd8a3543
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9757938c4a6cbec3f634efda968f66269e68d3af1a37b212c0d6ca7d89f528848df57bcb02e944b4b52618868a1d0f320d516c568d5da7d76f2137c6e08453eb
|
|
7
|
+
data.tar.gz: 53d8ce59aaa8bccd090e79dc2c346b627b25b5cfb7a30345d022eee6141c39797a1698f3a25eab88c6264ce419a2523dce8c61d020bfcb203c0356032a6841f5
|
data/lib/ruby_native/version.rb
CHANGED
data/lib/ruby_native.rb
CHANGED
|
@@ -41,5 +41,20 @@ module RubyNative
|
|
|
41
41
|
self.config[:app] ||= {}
|
|
42
42
|
self.config[:app][:entry_path] ||= self.config.dig(:tabs, 0, :path) || "/"
|
|
43
43
|
self.config[:auth] ||= {}
|
|
44
|
+
backfill_tab_icons
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Mirrors per-platform `icons:` into the legacy flat `icon:` field so native
|
|
48
|
+
# binaries that only read `tab.icon` keep rendering an icon. Explicit `icon:`
|
|
49
|
+
# wins; otherwise falls back to `icons.ios`, then `icons.android`.
|
|
50
|
+
def self.backfill_tab_icons
|
|
51
|
+
Array(self.config[:tabs]).each do |tab|
|
|
52
|
+
next unless tab.is_a?(Hash)
|
|
53
|
+
|
|
54
|
+
icons = tab[:icons]
|
|
55
|
+
next unless icons.is_a?(Hash)
|
|
56
|
+
|
|
57
|
+
tab[:icon] ||= icons[:ios] || icons[:android]
|
|
58
|
+
end
|
|
44
59
|
end
|
|
45
60
|
end
|