ruby_native 0.17.2 → 0.18.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.
@@ -41,6 +41,45 @@ module RubyNative
41
41
  all.dig(name, "helper")
42
42
  end
43
43
 
44
+ # Signals a helper emits on every call, keyed by helper name. Only
45
+ # `always` signals are listed: native_fab_tag can emit data-native-color,
46
+ # but only when you pass `color:`, so counting it against a call would
47
+ # have `check` report markup the view never renders.
48
+ def helper_signals
49
+ @helper_signals ||= begin
50
+ map = {}
51
+ all.each do |name, meta|
52
+ helper = meta["helper"]
53
+ (map[helper] ||= []) << name if helper && meta["always"]
54
+ end
55
+ map.freeze
56
+ end
57
+ end
58
+
59
+ def signals_for_helper(helper)
60
+ helper_signals.fetch(helper, [])
61
+ end
62
+
63
+ # The keyword values a helper needs in order to render at all, keyed by
64
+ # helper name. native_tabs_tag(enabled: false) returns an empty string, so
65
+ # `always` alone would count a call that never reaches the page.
66
+ def render_conditions
67
+ @render_conditions ||= begin
68
+ map = {}
69
+ all.each do |_name, meta|
70
+ helper = meta["helper"]
71
+ next unless helper && meta["always"] && meta["renders_when"]
72
+
73
+ (map[helper] ||= {}).merge!(meta["renders_when"])
74
+ end
75
+ map.freeze
76
+ end
77
+ end
78
+
79
+ def render_condition(helper)
80
+ render_conditions[helper]
81
+ end
82
+
44
83
  # Closest known signal within one or two edits, for "did you mean". A
45
84
  # genuinely unrelated attribute gets no suggestion rather than a
46
85
  # confusing one.
@@ -1,3 +1,3 @@
1
1
  module RubyNative
2
- VERSION = "0.17.2"
2
+ VERSION = "0.18.0"
3
3
  end
data/lib/ruby_native.rb CHANGED
@@ -64,6 +64,7 @@ module RubyNative
64
64
  backfill_error_icons
65
65
  warn_on_duplicate_tab_keys
66
66
  normalize_analytics
67
+ normalize_firebase
67
68
  end
68
69
 
69
70
  # config/ruby_native.yml is rendered as ERB before it is parsed, so a
@@ -287,4 +288,12 @@ module RubyNative
287
288
  Rails.logger.warn("[RubyNative] analytics in config/ruby_native.yml must be true or false; ignoring it.")
288
289
  self.config.delete(:analytics)
289
290
  end
291
+
292
+ # An unquoted sender id parses as an Integer, and the Android app decodes these as strings only.
293
+ def self.normalize_firebase
294
+ firebase = self.config.dig(:android, :firebase)
295
+ return unless firebase.is_a?(Hash)
296
+
297
+ firebase.transform_values! { |value| value.nil? ? value : value.to_s }
298
+ end
290
299
  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.17.2
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Masilotti
@@ -94,12 +94,29 @@ files:
94
94
  - lib/ruby_native.rb
95
95
  - lib/ruby_native/certs/AppleRootCA-G3.cer
96
96
  - lib/ruby_native/cli.rb
97
+ - lib/ruby_native/cli/apple.rb
97
98
  - lib/ruby_native/cli/check.rb
98
99
  - lib/ruby_native/cli/check/signal_collector.rb
100
+ - lib/ruby_native/cli/command.rb
99
101
  - lib/ruby_native/cli/credentials.rb
102
+ - lib/ruby_native/cli/demo_account.rb
100
103
  - lib/ruby_native/cli/deploy.rb
104
+ - lib/ruby_native/cli/icon.rb
105
+ - lib/ruby_native/cli/link.rb
106
+ - lib/ruby_native/cli/listing.rb
101
107
  - lib/ruby_native/cli/login.rb
108
+ - lib/ruby_native/cli/mcp.rb
109
+ - lib/ruby_native/cli/mcp/config_validator.rb
110
+ - lib/ruby_native/cli/mcp/install.rb
111
+ - lib/ruby_native/cli/mcp/platform.rb
112
+ - lib/ruby_native/cli/mcp/prompts.rb
113
+ - lib/ruby_native/cli/permissions.rb
102
114
  - lib/ruby_native/cli/preview.rb
115
+ - lib/ruby_native/cli/screenshots.rb
116
+ - lib/ruby_native/cli/ship.rb
117
+ - lib/ruby_native/cli/status.rb
118
+ - lib/ruby_native/cli/submit.rb
119
+ - lib/ruby_native/cli/testers.rb
103
120
  - lib/ruby_native/engine.rb
104
121
  - lib/ruby_native/helper.rb
105
122
  - lib/ruby_native/iap/apple_webhook_processor.rb
@@ -107,6 +124,8 @@ files:
107
124
  - lib/ruby_native/iap/event.rb
108
125
  - lib/ruby_native/iap/normalizable.rb
109
126
  - lib/ruby_native/iap/verifiable.rb
127
+ - lib/ruby_native/icons/material_symbols.txt
128
+ - lib/ruby_native/icons/sf_symbols.tsv
110
129
  - lib/ruby_native/inertia_support.rb
111
130
  - lib/ruby_native/native_detection.rb
112
131
  - lib/ruby_native/native_version.rb