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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78d36e84e6d0ebfefb6461526fcf8cdfa8fd30952bb013b4a632f4f1ab91eb74
4
- data.tar.gz: a81d356f6aed9aeca458531d832e0a81813eeecde701328b727019661dc43f49
3
+ metadata.gz: eeb4ed38a0ee884b79aaeb774bec27382d5bf7e307662b4eceed42e2b1a3f777
4
+ data.tar.gz: b31cc3f05419442051575f57edf5455fcf85ccfabc88f8e157205527dd8a3543
5
5
  SHA512:
6
- metadata.gz: 5ed6f7fb6bf0847342695cf57e7037654de5bf4c461d6bea04a477904f8ecc6bc4d7c3b90f20cac6bf1718d0d2e3fcbf04623fe31b5c617afd22907c6bb620d1
7
- data.tar.gz: 770a073e3f8805ed04d4a0cf7e9e47d477dfcfb5da96be34a08eca14767c3c6fc1b4c7a1cb05715d9fb1c1145c92c3ab4303349d7e8765c6c0bb7db4157bc352
6
+ metadata.gz: 9757938c4a6cbec3f634efda968f66269e68d3af1a37b212c0d6ca7d89f528848df57bcb02e944b4b52618868a1d0f320d516c568d5da7d76f2137c6e08453eb
7
+ data.tar.gz: 53d8ce59aaa8bccd090e79dc2c346b627b25b5cfb7a30345d022eee6141c39797a1698f3a25eab88c6264ce419a2523dce8c61d020bfcb203c0356032a6841f5
@@ -1,3 +1,3 @@
1
1
  module RubyNative
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.2"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Masilotti