ruby_native 0.14.0 → 0.14.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20484032681be68def5c45552a5ac02502f3f3eaf63e69b7cc5fffbd785177cc
|
|
4
|
+
data.tar.gz: d6e34e9592f9ec3f4a14ad739c1f468c5f81d75784411742e2cd317a3c57a093
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e34b666cebd831fc7ed1946090dc68562807a1bbc524f86781af3b56f46f318394104e745270ab7914778ccf471caeb495b92912fa62152760b7bcf1d1d0e912
|
|
7
|
+
data.tar.gz: 5de7b5d12c50b1bb6c48bbdf333847da2b4ae0b20730beb4c3f3bd7059b1dc3d1225ec1e34f9afe0dbf167b3f76aa04d46aed1e9395f6985e16ddcf4e8a0cbcb
|
|
@@ -69,6 +69,9 @@ appearance:
|
|
|
69
69
|
# foreground_color: "#FFFFFF"
|
|
70
70
|
# tab_bar:
|
|
71
71
|
# background_color: "#1E293B"
|
|
72
|
+
# # Icon and label color. Defaults to the theme's, with tint_color on the
|
|
73
|
+
# # selected tab. Set this and unselected tabs dim to 60% of it.
|
|
74
|
+
# foreground_color: "#FFFFFF"
|
|
72
75
|
|
|
73
76
|
# Show a launch splash while the first screen loads. It holds your launch icon
|
|
74
77
|
# and background_color in frame, with a spinner, until the web content paints.
|
|
@@ -2,16 +2,17 @@ module RubyNative
|
|
|
2
2
|
module NativeDetection
|
|
3
3
|
extend ActiveSupport::Concern
|
|
4
4
|
|
|
5
|
-
# Matches "Ruby Native iOS/5.2/35 iOS/26.5.2 RubyNative/0.12.5". The
|
|
6
|
-
# OS groups are optional: apps built before the UA
|
|
7
|
-
# "Ruby Native iOS/5.2"
|
|
8
|
-
#
|
|
9
|
-
|
|
5
|
+
# Matches "Ruby Native iOS/5.2/35 iOS/26.5.2/23F79 RubyNative/0.12.5". The
|
|
6
|
+
# build, OS, and OS build groups are optional: apps built before the UA
|
|
7
|
+
# carried them send only "Ruby Native iOS/5.2" (or later "... iOS/26.5.2"
|
|
8
|
+
# without the OS build), and the optional groups keep the OS capture from
|
|
9
|
+
# swallowing the app version.
|
|
10
|
+
SIGNATURE = %r{Ruby Native (?:iOS|Android)/([\d.]+)(?:/([\d.]+) (?:iOS|Android)/([\d.]+)(?:/([\w.]+))?)?}
|
|
10
11
|
|
|
11
12
|
included do
|
|
12
13
|
if respond_to?(:helper_method)
|
|
13
14
|
helper_method :native_app?, :native_version, :native_platform,
|
|
14
|
-
:native_app_version, :native_app_build, :native_os_version
|
|
15
|
+
:native_app_version, :native_app_build, :native_os_version, :native_os_build
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
|
|
@@ -49,5 +50,11 @@ module RubyNative
|
|
|
49
50
|
def native_os_version
|
|
50
51
|
request.user_agent.to_s[SIGNATURE, 3]
|
|
51
52
|
end
|
|
53
|
+
|
|
54
|
+
# The device's OS build, like "23F79" (iOS) or "UQ1A.240205.004" (Android).
|
|
55
|
+
# Nil for web browsers and apps built before the User-Agent carried it.
|
|
56
|
+
def native_os_build
|
|
57
|
+
request.user_agent.to_s[SIGNATURE, 4]
|
|
58
|
+
end
|
|
52
59
|
end
|
|
53
60
|
end
|
data/lib/ruby_native/version.rb
CHANGED