ruby_everywhere 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +255 -0
- data/bridge/everywhere/bridge.js +60 -3
- data/lib/everywhere/android_resources.rb +217 -0
- data/lib/everywhere/android_sdk.rb +330 -0
- data/lib/everywhere/asset_catalog.rb +185 -0
- data/lib/everywhere/auth_handoff.rb +398 -0
- data/lib/everywhere/auth_token.rb +118 -0
- data/lib/everywhere/builders/android.rb +844 -0
- data/lib/everywhere/builders/ios.rb +40 -3
- data/lib/everywhere/commands/build.rb +51 -9
- data/lib/everywhere/commands/clean.rb +10 -5
- data/lib/everywhere/commands/dev.rb +46 -8
- data/lib/everywhere/commands/doctor.rb +89 -3
- data/lib/everywhere/commands/install.rb +1 -1
- data/lib/everywhere/commands/logs.rb +117 -8
- data/lib/everywhere/config.rb +409 -13
- data/lib/everywhere/emulator.rb +405 -0
- data/lib/everywhere/engine.rb +12 -0
- data/lib/everywhere/icon.rb +196 -0
- data/lib/everywhere/log_filter.rb +74 -0
- data/lib/everywhere/native_helper.rb +2 -5
- data/lib/everywhere/omniauth.rb +88 -0
- data/lib/everywhere/paths.rb +47 -0
- data/lib/everywhere/version.rb +1 -1
- data/support/mobile/android/README.md +217 -0
- data/support/mobile/android/app/build.gradle.kts +156 -0
- data/support/mobile/android/app/everywhere.properties +8 -0
- data/support/mobile/android/app/native-packages.gradle.kts +16 -0
- data/support/mobile/android/app/proguard-rules.pro +21 -0
- data/support/mobile/android/app/src/debug/res/xml/network_security_config.xml +30 -0
- data/support/mobile/android/app/src/main/AndroidManifest.xml +42 -0
- data/support/mobile/android/app/src/main/assets/everywhere.json +9 -0
- data/support/mobile/android/app/src/main/assets/fonts/MaterialIcons-Regular.codepoints +2235 -0
- data/support/mobile/android/app/src/main/assets/fonts/MaterialIcons-Regular.ttf +0 -0
- data/support/mobile/android/app/src/main/assets/json/path-configuration.json +19 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/AuthFlow.kt +268 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/EverywhereApplication.kt +178 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/EverywhereConfig.kt +409 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/EverywhereEvents.kt +68 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/EverywhereHost.kt +101 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/IconFont.kt +211 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/MainActivity.kt +975 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/MainTabs.kt +201 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/WebBottomSheetFragment.kt +13 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/WebFragment.kt +36 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/BiometricsComponent.kt +535 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/HapticsComponent.kt +141 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/MenuComponent.kt +361 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/NotificationComponent.kt +151 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/PermissionsComponent.kt +271 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/StorageComponent.kt +101 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/bridge/WebControlChannel.kt +204 -0
- data/support/mobile/android/app/src/main/java/com/rubyeverywhere/shell/extensions/EverywhereExtensions.kt +51 -0
- data/support/mobile/android/app/src/main/res/color/bottom_navigation_active_indicator.xml +4 -0
- data/support/mobile/android/app/src/main/res/color/bottom_navigation_item.xml +11 -0
- data/support/mobile/android/app/src/main/res/drawable/ic_launcher_foreground.xml +26 -0
- data/support/mobile/android/app/src/main/res/drawable/ic_tab_placeholder.xml +28 -0
- data/support/mobile/android/app/src/main/res/layout/activity_main.xml +116 -0
- data/support/mobile/android/app/src/main/res/layout/bridge_menu_sheet.xml +83 -0
- data/support/mobile/android/app/src/main/res/layout/bridge_menu_sheet_item.xml +35 -0
- data/support/mobile/android/app/src/main/res/layout/tab_more_sheet.xml +48 -0
- data/support/mobile/android/app/src/main/res/layout/tab_more_sheet_item.xml +35 -0
- data/support/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +12 -0
- data/support/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
- data/support/mobile/android/app/src/main/res/values/colors.xml +21 -0
- data/support/mobile/android/app/src/main/res/values/ic_launcher_background.xml +5 -0
- data/support/mobile/android/app/src/main/res/values/strings.xml +18 -0
- data/support/mobile/android/app/src/main/res/values/styles.xml +32 -0
- data/support/mobile/android/app/src/main/res/values/themes.xml +53 -0
- data/support/mobile/android/app/src/main/res/values-night/colors.xml +11 -0
- data/support/mobile/android/app/src/main/res/values-night/themes.xml +33 -0
- data/support/mobile/android/app/src/main/res/xml/network_security_config.xml +12 -0
- data/support/mobile/android/app/src/stamped/AndroidManifest.xml +34 -0
- data/support/mobile/android/build.gradle.kts +8 -0
- data/support/mobile/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/support/mobile/android/gradle/wrapper/gradle-wrapper.properties +10 -0
- data/support/mobile/android/gradle.properties +14 -0
- data/support/mobile/android/gradlew +251 -0
- data/support/mobile/android/gradlew.bat +94 -0
- data/support/mobile/android/settings.gradle.kts +28 -0
- data/support/mobile/ios/App/AppDelegate.swift +5 -0
- data/support/mobile/ios/App/AuthFlow.swift +101 -0
- data/support/mobile/ios/App/EverywhereConfig.swift +84 -0
- data/support/mobile/ios/App/SceneDelegate.swift +103 -0
- data/support/mobile/ios/App.xcodeproj/project.pbxproj +4 -0
- data/support/mobile/ios/README.md +4 -1
- metadata +67 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Bridge components are instantiated reflectively through
|
|
2
|
+
# BridgeComponentFactory and named by string from the page, so R8 has no call
|
|
3
|
+
# graph reaching them. Without this the release build strips every component
|
|
4
|
+
# and the page's `everywhere--*` messages silently go nowhere.
|
|
5
|
+
-keep class com.rubyeverywhere.shell.bridge.** { *; }
|
|
6
|
+
|
|
7
|
+
# App-provided native code (native/android/*.kt), same reasoning: it is
|
|
8
|
+
# referenced by identifier from the path configuration, not from Kotlin.
|
|
9
|
+
-keep class com.rubyeverywhere.shell.extensions.** { *; }
|
|
10
|
+
|
|
11
|
+
# Fragment destinations are resolved from the navigation graph by class name.
|
|
12
|
+
-keep class * extends androidx.fragment.app.Fragment { *; }
|
|
13
|
+
|
|
14
|
+
# kotlinx.serialization generates a companion `serializer()` per @Serializable
|
|
15
|
+
# class; the plugin's own rules cover its runtime, these cover our models.
|
|
16
|
+
-keepclassmembers class com.rubyeverywhere.shell.** {
|
|
17
|
+
*** Companion;
|
|
18
|
+
}
|
|
19
|
+
-keepclasseswithmembers class com.rubyeverywhere.shell.** {
|
|
20
|
+
kotlinx.serialization.KSerializer serializer(...);
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
Debug only. The analogue of iOS's NSAllowsLocalNetworking: enough cleartext
|
|
4
|
+
to reach a Rails server on the developer's machine, and not one host more.
|
|
5
|
+
Never `cleartextTrafficPermitted="true"` on the base config — that would
|
|
6
|
+
quietly downgrade every request the app makes while debugging, including the
|
|
7
|
+
ones going to the real, deployed app.
|
|
8
|
+
|
|
9
|
+
* 127.0.0.1 / localhost — correct on emulators AND physical devices once
|
|
10
|
+
`adb reverse tcp:<port> tcp:<port>` is set up. The preferred rung.
|
|
11
|
+
* 10.0.2.2 — the Android emulator's alias for the host's loopback, used when
|
|
12
|
+
`adb reverse` is unavailable.
|
|
13
|
+
* .local — a Bonjour hostname, which is how most LAN setups are reachable.
|
|
14
|
+
|
|
15
|
+
network-security-config takes hostnames and IP literals only; there is no
|
|
16
|
+
CIDR syntax, so the private ranges cannot be expressed here. An explicit
|
|
17
|
+
`dev_url` of http://192.168.1.20:3000 therefore needs its host added, and
|
|
18
|
+
appending a domain entry to this file for that case is the one edit the
|
|
19
|
+
builder is allowed to make here.
|
|
20
|
+
-->
|
|
21
|
+
<network-security-config>
|
|
22
|
+
<base-config cleartextTrafficPermitted="false" />
|
|
23
|
+
|
|
24
|
+
<domain-config cleartextTrafficPermitted="true">
|
|
25
|
+
<domain includeSubdomains="false">127.0.0.1</domain>
|
|
26
|
+
<domain includeSubdomains="false">localhost</domain>
|
|
27
|
+
<domain includeSubdomains="false">10.0.2.2</domain>
|
|
28
|
+
<domain includeSubdomains="true">local</domain>
|
|
29
|
+
</domain-config>
|
|
30
|
+
</network-security-config>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
FROZEN. Nothing per-app belongs in this file. The app label arrives as a
|
|
4
|
+
manifest placeholder from everywhere.properties; deep-link intent filters,
|
|
5
|
+
the auth callback scheme and runtime permissions are merged in from
|
|
6
|
+
src/stamped/AndroidManifest.xml.
|
|
7
|
+
-->
|
|
8
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
9
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
10
|
+
|
|
11
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
12
|
+
|
|
13
|
+
<application
|
|
14
|
+
android:name=".EverywhereApplication"
|
|
15
|
+
android:allowBackup="false"
|
|
16
|
+
android:enableOnBackInvokedCallback="true"
|
|
17
|
+
android:icon="@mipmap/ic_launcher"
|
|
18
|
+
android:label="${everywhereLabel}"
|
|
19
|
+
android:roundIcon="@mipmap/ic_launcher_round"
|
|
20
|
+
android:supportsRtl="true"
|
|
21
|
+
android:theme="@style/Theme.Everywhere"
|
|
22
|
+
android:networkSecurityConfig="@xml/network_security_config"
|
|
23
|
+
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute">
|
|
24
|
+
|
|
25
|
+
<activity
|
|
26
|
+
android:name=".MainActivity"
|
|
27
|
+
android:exported="true"
|
|
28
|
+
android:configChanges="orientation|screenSize"
|
|
29
|
+
android:theme="@style/Theme.Everywhere.Splash"
|
|
30
|
+
android:windowSoftInputMode="adjustResize"
|
|
31
|
+
android:launchMode="singleTask">
|
|
32
|
+
|
|
33
|
+
<intent-filter>
|
|
34
|
+
<action android:name="android.intent.action.MAIN" />
|
|
35
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
36
|
+
</intent-filter>
|
|
37
|
+
|
|
38
|
+
</activity>
|
|
39
|
+
|
|
40
|
+
</application>
|
|
41
|
+
|
|
42
|
+
</manifest>
|