rho-tau-extensions 6.0.0 → 7.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/libs/android_net_native_prebuilt/ext/build +22 -0
- data/libs/android_net_native_prebuilt/ext/build.bat +44 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/android_net_native.jar +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/aarch64/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/armeabi/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/x86/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext.yml +8 -0
- data/libs/crosswalk/ext/platform/android/Rakefile +19 -1
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/native_lib_placeholder.stamp +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/native_lib_placeholder.stamp +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +1 -1
- data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +2 -2
- data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +8 -8
- data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk_100_percent.pak +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_attrs.xml → attrs.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/attrs_03.xml +18 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_colors.xml → colors_xwalk.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_dimens.xml → dimens_03.xml} +1 -3
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_dimens.xml → dimens_xwalk.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/ids_xwalk.xml +12 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/strings_00.xml +16 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_internal_java_strings.xml → strings_01.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_java_strings.xml → strings_02.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_strings.xml → strings_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_styles.xml → styles_00.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_values.xml → values_00.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +7 -10
- data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +4 -3
- data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-v17/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-v21/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +18 -1
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/aarch64/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
- data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -4
- data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +9 -58
- data/libs/fcm-push-18/ext/android/AndroidManifest.rb +10 -0
- data/libs/fcm-push-18/ext/android/ApplicationManifestAdds.erb +39 -0
- data/libs/fcm-push-18/ext/android/Rakefile +187 -0
- data/libs/fcm-push-18/ext/android/ext_java.files +3 -0
- data/libs/fcm-push-18/ext/android/ext_native.files +1 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.cpp +215 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.h +74 -0
- data/libs/fcm-push-18/ext/android/res/res/values/fireBaseValues.xml +5 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +164 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +219 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +88 -0
- data/libs/fcm-push-18/ext/build +16 -0
- data/libs/fcm-push-18/ext/build.bat +8 -0
- data/libs/fcm-push-18/ext/fcm.xml +9 -0
- data/libs/fcm-push-18/ext/iphone/ApplePush_Prefix.pch +7 -0
- data/libs/fcm-push-18/ext/iphone/Firebase.h +68 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +62 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +115 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h +13 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +389 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +485 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +15 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/FirebaseCore +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +52 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRApp.h +130 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h +78 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h +35 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIROptions.h +133 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +6 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +276 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/FirebaseMessaging +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h +508 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap +8 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseNanoPB.framework/FirebaseNanoPB +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Protobuf +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/nanopb +0 -0
- data/libs/fcm-push-18/ext/iphone/Rakefile +30 -0
- data/libs/fcm-push-18/ext/iphone/fcm-push.xcodeproj/project.pbxproj +370 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.h +28 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.m +27 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.mm +234 -0
- data/libs/fcm-push-18/ext/iphone/impl/applePushSetup.c +10 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.h +69 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.mm +164 -0
- data/libs/fcm-push-18/ext/iphone/impl/readme.txt +7 -0
- data/libs/fcm-push-18/ext/platform/iphone/impl/readme.txt +7 -0
- data/libs/fcm-push-18/ext.yml +20 -0
- data/libs/nodejs/ext/platform/android/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
- data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +8 -4
- data/libs/nodejs/ext/platform/iphone/Rakefile +9 -62
- data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
- data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
- data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
- data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
- data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/asn1t.h +19 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +23 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +5 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +5 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +5 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +9 -12
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +1 -4
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +1 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +5 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +17 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +24 -6
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +1 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +3 -16
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +7 -12
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +0 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +3 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +11 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +13 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +2 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +3 -16
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +20 -8
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +3 -3
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +2 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +1 -3
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +85 -52
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +4 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +6 -6
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +10 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +5 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1 -0
- data/libs/rexml-edge/rexml/attlistdecl.rb +63 -0
- data/libs/rexml-edge/rexml/attribute.rb +192 -0
- data/libs/rexml-edge/rexml/cdata.rb +68 -0
- data/libs/rexml-edge/rexml/child.rb +97 -0
- data/libs/rexml-edge/rexml/comment.rb +80 -0
- data/libs/rexml-edge/rexml/doctype.rb +270 -0
- data/libs/rexml-edge/rexml/document.rb +291 -0
- data/libs/rexml-edge/rexml/dtd/attlistdecl.rb +11 -0
- data/libs/rexml-edge/rexml/dtd/dtd.rb +47 -0
- data/libs/rexml-edge/rexml/dtd/elementdecl.rb +18 -0
- data/libs/rexml-edge/rexml/dtd/entitydecl.rb +57 -0
- data/libs/rexml-edge/rexml/dtd/notationdecl.rb +40 -0
- data/libs/rexml-edge/rexml/element.rb +1241 -0
- data/libs/rexml-edge/rexml/encoding.rb +51 -0
- data/libs/rexml-edge/rexml/entity.rb +174 -0
- data/libs/rexml-edge/rexml/formatters/default.rb +112 -0
- data/libs/rexml-edge/rexml/formatters/pretty.rb +142 -0
- data/libs/rexml-edge/rexml/formatters/transitive.rb +58 -0
- data/libs/rexml-edge/rexml/functions.rb +418 -0
- data/libs/rexml-edge/rexml/instruction.rb +71 -0
- data/libs/rexml-edge/rexml/light/node.rb +196 -0
- data/libs/rexml-edge/rexml/namespace.rb +48 -0
- data/libs/rexml-edge/rexml/node.rb +76 -0
- data/libs/rexml-edge/rexml/output.rb +30 -0
- data/libs/rexml-edge/rexml/parent.rb +166 -0
- data/libs/rexml-edge/rexml/parseexception.rb +52 -0
- data/libs/rexml-edge/rexml/parsers/baseparser.rb +533 -0
- data/libs/rexml-edge/rexml/parsers/lightparser.rb +59 -0
- data/libs/rexml-edge/rexml/parsers/pullparser.rb +197 -0
- data/libs/rexml-edge/rexml/parsers/sax2parser.rb +273 -0
- data/libs/rexml-edge/rexml/parsers/streamparser.rb +61 -0
- data/libs/rexml-edge/rexml/parsers/treeparser.rb +101 -0
- data/libs/rexml-edge/rexml/parsers/ultralightparser.rb +57 -0
- data/libs/rexml-edge/rexml/parsers/xpathparser.rb +657 -0
- data/libs/rexml-edge/rexml/quickpath.rb +266 -0
- data/libs/rexml-edge/rexml/rexml.rb +32 -0
- data/libs/rexml-edge/rexml/sax2listener.rb +98 -0
- data/libs/rexml-edge/rexml/security.rb +28 -0
- data/libs/rexml-edge/rexml/source.rb +297 -0
- data/libs/rexml-edge/rexml/streamlistener.rb +93 -0
- data/libs/rexml-edge/rexml/syncenumerator.rb +33 -0
- data/libs/rexml-edge/rexml/text.rb +426 -0
- data/libs/rexml-edge/rexml/undefinednamespaceexception.rb +9 -0
- data/libs/rexml-edge/rexml/validation/relaxng.rb +539 -0
- data/libs/rexml-edge/rexml/validation/validation.rb +144 -0
- data/libs/rexml-edge/rexml/validation/validationexception.rb +10 -0
- data/libs/rexml-edge/rexml/xmldecl.rb +116 -0
- data/libs/rexml-edge/rexml/xmltokens.rb +85 -0
- data/libs/rexml-edge/rexml/xpath.rb +81 -0
- data/libs/rexml-edge/rexml/xpath_parser.rb +704 -0
- data/version +1 -1
- metadata +144 -27
- data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +0 -19
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +0 -7
- data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +0 -18
- data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +0 -206
- data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +0 -231
- data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +0 -359
- data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +0 -144
- data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +0 -9
- data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +0 -16
@@ -0,0 +1,704 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require 'rexml/namespace'
|
3
|
+
require 'rexml/xmltokens'
|
4
|
+
require 'rexml/attribute'
|
5
|
+
require 'rexml/syncenumerator'
|
6
|
+
require 'rexml/parsers/xpathparser'
|
7
|
+
|
8
|
+
class Object
|
9
|
+
# provides a unified +clone+ operation, for REXML::XPathParser
|
10
|
+
# to use across multiple Object types
|
11
|
+
def dclone
|
12
|
+
clone
|
13
|
+
end
|
14
|
+
end
|
15
|
+
class Symbol
|
16
|
+
# provides a unified +clone+ operation, for REXML::XPathParser
|
17
|
+
# to use across multiple Object types
|
18
|
+
def dclone ; self ; end
|
19
|
+
end
|
20
|
+
class Fixnum
|
21
|
+
# provides a unified +clone+ operation, for REXML::XPathParser
|
22
|
+
# to use across multiple Object types
|
23
|
+
def dclone ; self ; end
|
24
|
+
end
|
25
|
+
class Float
|
26
|
+
# provides a unified +clone+ operation, for REXML::XPathParser
|
27
|
+
# to use across multiple Object types
|
28
|
+
def dclone ; self ; end
|
29
|
+
end
|
30
|
+
class Array
|
31
|
+
# provides a unified +clone+ operation, for REXML::XPathParser
|
32
|
+
# to use across multiple Object+ types
|
33
|
+
def dclone
|
34
|
+
klone = self.clone
|
35
|
+
klone.clear
|
36
|
+
self.each{|v| klone << v.dclone}
|
37
|
+
klone
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module REXML
|
42
|
+
# You don't want to use this class. Really. Use XPath, which is a wrapper
|
43
|
+
# for this class. Believe me. You don't want to poke around in here.
|
44
|
+
# There is strange, dark magic at work in this code. Beware. Go back! Go
|
45
|
+
# back while you still can!
|
46
|
+
class XPathParser
|
47
|
+
include XMLTokens
|
48
|
+
LITERAL = /^'([^']*)'|^"([^"]*)"/u
|
49
|
+
|
50
|
+
def initialize( )
|
51
|
+
@parser = REXML::Parsers::XPathParser.new
|
52
|
+
@namespaces = nil
|
53
|
+
@variables = {}
|
54
|
+
end
|
55
|
+
|
56
|
+
def namespaces=( namespaces={} )
|
57
|
+
Functions::namespace_context = namespaces
|
58
|
+
@namespaces = namespaces
|
59
|
+
end
|
60
|
+
|
61
|
+
def variables=( vars={} )
|
62
|
+
Functions::variables = vars
|
63
|
+
@variables = vars
|
64
|
+
end
|
65
|
+
|
66
|
+
def parse path, nodeset
|
67
|
+
path_stack = @parser.parse( path )
|
68
|
+
match( path_stack, nodeset )
|
69
|
+
end
|
70
|
+
|
71
|
+
def get_first path, nodeset
|
72
|
+
path_stack = @parser.parse( path )
|
73
|
+
first( path_stack, nodeset )
|
74
|
+
end
|
75
|
+
|
76
|
+
def predicate path, nodeset
|
77
|
+
path_stack = @parser.parse( path )
|
78
|
+
expr( path_stack, nodeset )
|
79
|
+
end
|
80
|
+
|
81
|
+
def []=( variable_name, value )
|
82
|
+
@variables[ variable_name ] = value
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
# Performs a depth-first (document order) XPath search, and returns the
|
87
|
+
# first match. This is the fastest, lightest way to return a single result.
|
88
|
+
#
|
89
|
+
# FIXME: This method is incomplete!
|
90
|
+
def first( path_stack, node )
|
91
|
+
return nil if path.size == 0
|
92
|
+
|
93
|
+
case path[0]
|
94
|
+
when :document
|
95
|
+
# do nothing
|
96
|
+
return first( path[1..-1], node )
|
97
|
+
when :child
|
98
|
+
for c in node.children
|
99
|
+
r = first( path[1..-1], c )
|
100
|
+
return r if r
|
101
|
+
end
|
102
|
+
when :qname
|
103
|
+
name = path[2]
|
104
|
+
if node.name == name
|
105
|
+
return node if path.size == 3
|
106
|
+
return first( path[3..-1], node )
|
107
|
+
else
|
108
|
+
return nil
|
109
|
+
end
|
110
|
+
when :descendant_or_self
|
111
|
+
r = first( path[1..-1], node )
|
112
|
+
return r if r
|
113
|
+
for c in node.children
|
114
|
+
r = first( path, c )
|
115
|
+
return r if r
|
116
|
+
end
|
117
|
+
when :node
|
118
|
+
return first( path[1..-1], node )
|
119
|
+
when :any
|
120
|
+
return first( path[1..-1], node )
|
121
|
+
end
|
122
|
+
return nil
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
def match( path_stack, nodeset )
|
127
|
+
r = expr( path_stack, nodeset )
|
128
|
+
r
|
129
|
+
end
|
130
|
+
|
131
|
+
private
|
132
|
+
|
133
|
+
|
134
|
+
# Returns a String namespace for a node, given a prefix
|
135
|
+
# The rules are:
|
136
|
+
#
|
137
|
+
# 1. Use the supplied namespace mapping first.
|
138
|
+
# 2. If no mapping was supplied, use the context node to look up the namespace
|
139
|
+
def get_namespace( node, prefix )
|
140
|
+
if @namespaces
|
141
|
+
return @namespaces[prefix] || ''
|
142
|
+
else
|
143
|
+
return node.namespace( prefix ) if node.node_type == :element
|
144
|
+
return ''
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
# Expr takes a stack of path elements and a set of nodes (either a Parent
|
150
|
+
# or an Array and returns an Array of matching nodes
|
151
|
+
ALL = [ :attribute, :element, :text, :processing_instruction, :comment ]
|
152
|
+
ELEMENTS = [ :element ]
|
153
|
+
def expr( path_stack, nodeset, context=nil )
|
154
|
+
node_types = ELEMENTS
|
155
|
+
return nodeset if path_stack.length == 0 || nodeset.length == 0
|
156
|
+
while path_stack.length > 0
|
157
|
+
if nodeset.length == 0
|
158
|
+
path_stack.clear
|
159
|
+
return []
|
160
|
+
end
|
161
|
+
case (op = path_stack.shift)
|
162
|
+
when :document
|
163
|
+
nodeset = [ nodeset[0].root_node ]
|
164
|
+
|
165
|
+
when :qname
|
166
|
+
prefix = path_stack.shift
|
167
|
+
name = path_stack.shift
|
168
|
+
nodeset.delete_if do |node|
|
169
|
+
# FIXME: This DOUBLES the time XPath searches take
|
170
|
+
ns = get_namespace( node, prefix )
|
171
|
+
if node.node_type == :element
|
172
|
+
if node.name == name
|
173
|
+
end
|
174
|
+
end
|
175
|
+
!(node.node_type == :element and
|
176
|
+
node.name == name and
|
177
|
+
node.namespace == ns )
|
178
|
+
end
|
179
|
+
node_types = ELEMENTS
|
180
|
+
|
181
|
+
when :any
|
182
|
+
nodeset.delete_if { |node| !node_types.include?(node.node_type) }
|
183
|
+
|
184
|
+
when :self
|
185
|
+
# This space left intentionally blank
|
186
|
+
|
187
|
+
when :processing_instruction
|
188
|
+
target = path_stack.shift
|
189
|
+
nodeset.delete_if do |node|
|
190
|
+
(node.node_type != :processing_instruction) or
|
191
|
+
( target!='' and ( node.target != target ) )
|
192
|
+
end
|
193
|
+
|
194
|
+
when :text
|
195
|
+
nodeset.delete_if { |node| node.node_type != :text }
|
196
|
+
|
197
|
+
when :comment
|
198
|
+
nodeset.delete_if { |node| node.node_type != :comment }
|
199
|
+
|
200
|
+
when :node
|
201
|
+
# This space left intentionally blank
|
202
|
+
node_types = ALL
|
203
|
+
|
204
|
+
when :child
|
205
|
+
new_nodeset = []
|
206
|
+
nt = nil
|
207
|
+
nodeset.each do |node|
|
208
|
+
nt = node.node_type
|
209
|
+
new_nodeset += node.children if nt == :element or nt == :document
|
210
|
+
end
|
211
|
+
nodeset = new_nodeset
|
212
|
+
node_types = ELEMENTS
|
213
|
+
|
214
|
+
when :literal
|
215
|
+
return path_stack.shift
|
216
|
+
|
217
|
+
when :attribute
|
218
|
+
new_nodeset = []
|
219
|
+
case path_stack.shift
|
220
|
+
when :qname
|
221
|
+
prefix = path_stack.shift
|
222
|
+
name = path_stack.shift
|
223
|
+
for element in nodeset
|
224
|
+
if element.node_type == :element
|
225
|
+
attrib = element.attribute( name, get_namespace(element, prefix) )
|
226
|
+
new_nodeset << attrib if attrib
|
227
|
+
end
|
228
|
+
end
|
229
|
+
when :any
|
230
|
+
for element in nodeset
|
231
|
+
if element.node_type == :element
|
232
|
+
new_nodeset += element.attributes.to_a
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
nodeset = new_nodeset
|
237
|
+
|
238
|
+
when :parent
|
239
|
+
nodeset = nodeset.collect{|n| n.parent}.compact
|
240
|
+
#nodeset = expr(path_stack.dclone, nodeset.collect{|n| n.parent}.compact)
|
241
|
+
node_types = ELEMENTS
|
242
|
+
|
243
|
+
when :ancestor
|
244
|
+
new_nodeset = []
|
245
|
+
nodeset.each do |node|
|
246
|
+
while node.parent
|
247
|
+
node = node.parent
|
248
|
+
new_nodeset << node unless new_nodeset.include? node
|
249
|
+
end
|
250
|
+
end
|
251
|
+
nodeset = new_nodeset
|
252
|
+
node_types = ELEMENTS
|
253
|
+
|
254
|
+
when :ancestor_or_self
|
255
|
+
new_nodeset = []
|
256
|
+
nodeset.each do |node|
|
257
|
+
if node.node_type == :element
|
258
|
+
new_nodeset << node
|
259
|
+
while ( node.parent )
|
260
|
+
node = node.parent
|
261
|
+
new_nodeset << node unless new_nodeset.include? node
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
nodeset = new_nodeset
|
266
|
+
node_types = ELEMENTS
|
267
|
+
|
268
|
+
when :predicate
|
269
|
+
new_nodeset = []
|
270
|
+
subcontext = { :size => nodeset.size }
|
271
|
+
pred = path_stack.shift
|
272
|
+
nodeset.each_with_index { |node, index|
|
273
|
+
subcontext[ :node ] = node
|
274
|
+
subcontext[ :index ] = index+1
|
275
|
+
pc = pred.dclone
|
276
|
+
result = expr( pc, [node], subcontext )
|
277
|
+
result = result[0] if result.kind_of? Array and result.length == 1
|
278
|
+
if result.kind_of? Numeric
|
279
|
+
new_nodeset << node if result == (index+1)
|
280
|
+
elsif result.instance_of? Array
|
281
|
+
if result.size > 0 and result.inject(false) {|k,s| s or k}
|
282
|
+
new_nodeset << node if result.size > 0
|
283
|
+
end
|
284
|
+
else
|
285
|
+
new_nodeset << node if result
|
286
|
+
end
|
287
|
+
}
|
288
|
+
nodeset = new_nodeset
|
289
|
+
=begin
|
290
|
+
predicate = path_stack.shift
|
291
|
+
ns = nodeset.clone
|
292
|
+
result = expr( predicate, ns )
|
293
|
+
if result.kind_of? Array
|
294
|
+
nodeset = result.zip(ns).collect{|m,n| n if m}.compact
|
295
|
+
else
|
296
|
+
nodeset = result ? nodeset : []
|
297
|
+
end
|
298
|
+
=end
|
299
|
+
|
300
|
+
when :descendant_or_self
|
301
|
+
rv = descendant_or_self( path_stack, nodeset )
|
302
|
+
path_stack.clear
|
303
|
+
nodeset = rv
|
304
|
+
node_types = ELEMENTS
|
305
|
+
|
306
|
+
when :descendant
|
307
|
+
results = []
|
308
|
+
nt = nil
|
309
|
+
nodeset.each do |node|
|
310
|
+
nt = node.node_type
|
311
|
+
results += expr( path_stack.dclone.unshift( :descendant_or_self ),
|
312
|
+
node.children ) if nt == :element or nt == :document
|
313
|
+
end
|
314
|
+
nodeset = results
|
315
|
+
node_types = ELEMENTS
|
316
|
+
|
317
|
+
when :following_sibling
|
318
|
+
results = []
|
319
|
+
nodeset.each do |node|
|
320
|
+
next if node.parent.nil?
|
321
|
+
all_siblings = node.parent.children
|
322
|
+
current_index = all_siblings.index( node )
|
323
|
+
following_siblings = all_siblings[ current_index+1 .. -1 ]
|
324
|
+
results += expr( path_stack.dclone, following_siblings )
|
325
|
+
end
|
326
|
+
nodeset = results
|
327
|
+
|
328
|
+
when :preceding_sibling
|
329
|
+
results = []
|
330
|
+
nodeset.each do |node|
|
331
|
+
next if node.parent.nil?
|
332
|
+
all_siblings = node.parent.children
|
333
|
+
current_index = all_siblings.index( node )
|
334
|
+
preceding_siblings = all_siblings[ 0, current_index ].reverse
|
335
|
+
results += preceding_siblings
|
336
|
+
end
|
337
|
+
nodeset = results
|
338
|
+
node_types = ELEMENTS
|
339
|
+
|
340
|
+
when :preceding
|
341
|
+
new_nodeset = []
|
342
|
+
nodeset.each do |node|
|
343
|
+
new_nodeset += preceding( node )
|
344
|
+
end
|
345
|
+
nodeset = new_nodeset
|
346
|
+
node_types = ELEMENTS
|
347
|
+
|
348
|
+
when :following
|
349
|
+
new_nodeset = []
|
350
|
+
nodeset.each do |node|
|
351
|
+
new_nodeset += following( node )
|
352
|
+
end
|
353
|
+
nodeset = new_nodeset
|
354
|
+
node_types = ELEMENTS
|
355
|
+
|
356
|
+
when :namespace
|
357
|
+
new_nodeset = []
|
358
|
+
prefix = path_stack.shift
|
359
|
+
nodeset.each do |node|
|
360
|
+
if (node.node_type == :element or node.node_type == :attribute)
|
361
|
+
if @namespaces
|
362
|
+
namespaces = @namespaces
|
363
|
+
elsif (node.node_type == :element)
|
364
|
+
namespaces = node.namespaces
|
365
|
+
else
|
366
|
+
namespaces = node.element.namesapces
|
367
|
+
end
|
368
|
+
if (node.namespace == namespaces[prefix])
|
369
|
+
new_nodeset << node
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
373
|
+
nodeset = new_nodeset
|
374
|
+
|
375
|
+
when :variable
|
376
|
+
var_name = path_stack.shift
|
377
|
+
return @variables[ var_name ]
|
378
|
+
|
379
|
+
# :and, :or, :eq, :neq, :lt, :lteq, :gt, :gteq
|
380
|
+
# TODO: Special case for :or and :and -- not evaluate the right
|
381
|
+
# operand if the left alone determines result (i.e. is true for
|
382
|
+
# :or and false for :and).
|
383
|
+
when :eq, :neq, :lt, :lteq, :gt, :gteq, :or
|
384
|
+
left = expr( path_stack.shift, nodeset.dup, context )
|
385
|
+
right = expr( path_stack.shift, nodeset.dup, context )
|
386
|
+
res = equality_relational_compare( left, op, right )
|
387
|
+
return res
|
388
|
+
|
389
|
+
when :and
|
390
|
+
left = expr( path_stack.shift, nodeset.dup, context )
|
391
|
+
return [] unless left
|
392
|
+
if left.respond_to?(:inject) and !left.inject(false) {|a,b| a | b}
|
393
|
+
return []
|
394
|
+
end
|
395
|
+
right = expr( path_stack.shift, nodeset.dup, context )
|
396
|
+
res = equality_relational_compare( left, op, right )
|
397
|
+
return res
|
398
|
+
|
399
|
+
when :div
|
400
|
+
left = Functions::number(expr(path_stack.shift, nodeset, context)).to_f
|
401
|
+
right = Functions::number(expr(path_stack.shift, nodeset, context)).to_f
|
402
|
+
return (left / right)
|
403
|
+
|
404
|
+
when :mod
|
405
|
+
left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
406
|
+
right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
407
|
+
return (left % right)
|
408
|
+
|
409
|
+
when :mult
|
410
|
+
left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
411
|
+
right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
412
|
+
return (left * right)
|
413
|
+
|
414
|
+
when :plus
|
415
|
+
left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
416
|
+
right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
417
|
+
return (left + right)
|
418
|
+
|
419
|
+
when :minus
|
420
|
+
left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
421
|
+
right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
|
422
|
+
return (left - right)
|
423
|
+
|
424
|
+
when :union
|
425
|
+
left = expr( path_stack.shift, nodeset, context )
|
426
|
+
right = expr( path_stack.shift, nodeset, context )
|
427
|
+
return (left | right)
|
428
|
+
|
429
|
+
when :neg
|
430
|
+
res = expr( path_stack, nodeset, context )
|
431
|
+
return -(res.to_f)
|
432
|
+
|
433
|
+
when :not
|
434
|
+
when :function
|
435
|
+
func_name = path_stack.shift.tr('-','_')
|
436
|
+
arguments = path_stack.shift
|
437
|
+
subcontext = context ? nil : { :size => nodeset.size }
|
438
|
+
|
439
|
+
res = []
|
440
|
+
cont = context
|
441
|
+
nodeset.each_with_index { |n, i|
|
442
|
+
if subcontext
|
443
|
+
subcontext[:node] = n
|
444
|
+
subcontext[:index] = i
|
445
|
+
cont = subcontext
|
446
|
+
end
|
447
|
+
arg_clone = arguments.dclone
|
448
|
+
args = arg_clone.collect { |arg|
|
449
|
+
expr( arg, [n], cont )
|
450
|
+
}
|
451
|
+
Functions.context = cont
|
452
|
+
res << Functions.send( func_name, *args )
|
453
|
+
}
|
454
|
+
return res
|
455
|
+
|
456
|
+
end
|
457
|
+
end # while
|
458
|
+
return nodeset
|
459
|
+
end
|
460
|
+
|
461
|
+
|
462
|
+
##########################################################
|
463
|
+
# FIXME
|
464
|
+
# The next two methods are BAD MOJO!
|
465
|
+
# This is my achilles heel. If anybody thinks of a better
|
466
|
+
# way of doing this, be my guest. This really sucks, but
|
467
|
+
# it is a wonder it works at all.
|
468
|
+
# ########################################################
|
469
|
+
|
470
|
+
def descendant_or_self( path_stack, nodeset )
|
471
|
+
rs = []
|
472
|
+
d_o_s( path_stack, nodeset, rs )
|
473
|
+
document_order(rs.flatten.compact)
|
474
|
+
#rs.flatten.compact
|
475
|
+
end
|
476
|
+
|
477
|
+
def d_o_s( p, ns, r )
|
478
|
+
nt = nil
|
479
|
+
ns.each_index do |i|
|
480
|
+
n = ns[i]
|
481
|
+
x = expr( p.dclone, [ n ] )
|
482
|
+
nt = n.node_type
|
483
|
+
d_o_s( p, n.children, x ) if nt == :element or nt == :document and n.children.size > 0
|
484
|
+
r.concat(x) if x.size > 0
|
485
|
+
end
|
486
|
+
end
|
487
|
+
|
488
|
+
|
489
|
+
# Reorders an array of nodes so that they are in document order
|
490
|
+
# It tries to do this efficiently.
|
491
|
+
#
|
492
|
+
# FIXME: I need to get rid of this, but the issue is that most of the XPath
|
493
|
+
# interpreter functions as a filter, which means that we lose context going
|
494
|
+
# in and out of function calls. If I knew what the index of the nodes was,
|
495
|
+
# I wouldn't have to do this. Maybe add a document IDX for each node?
|
496
|
+
# Problems with mutable documents. Or, rewrite everything.
|
497
|
+
def document_order( array_of_nodes )
|
498
|
+
new_arry = []
|
499
|
+
array_of_nodes.each { |node|
|
500
|
+
node_idx = []
|
501
|
+
np = node.node_type == :attribute ? node.element : node
|
502
|
+
while np.parent and np.parent.node_type == :element
|
503
|
+
node_idx << np.parent.index( np )
|
504
|
+
np = np.parent
|
505
|
+
end
|
506
|
+
new_arry << [ node_idx.reverse, node ]
|
507
|
+
}
|
508
|
+
new_arry.sort{ |s1, s2| s1[0] <=> s2[0] }.collect{ |s| s[1] }
|
509
|
+
end
|
510
|
+
|
511
|
+
|
512
|
+
def recurse( nodeset, &block )
|
513
|
+
for node in nodeset
|
514
|
+
yield node
|
515
|
+
recurse( node, &block ) if node.node_type == :element
|
516
|
+
end
|
517
|
+
end
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
# Builds a nodeset of all of the preceding nodes of the supplied node,
|
522
|
+
# in reverse document order
|
523
|
+
# preceding:: includes every element in the document that precedes this node,
|
524
|
+
# except for ancestors
|
525
|
+
def preceding( node )
|
526
|
+
ancestors = []
|
527
|
+
p = node.parent
|
528
|
+
while p
|
529
|
+
ancestors << p
|
530
|
+
p = p.parent
|
531
|
+
end
|
532
|
+
|
533
|
+
acc = []
|
534
|
+
p = preceding_node_of( node )
|
535
|
+
while p
|
536
|
+
if ancestors.include? p
|
537
|
+
ancestors.delete(p)
|
538
|
+
else
|
539
|
+
acc << p
|
540
|
+
end
|
541
|
+
p = preceding_node_of( p )
|
542
|
+
end
|
543
|
+
acc
|
544
|
+
end
|
545
|
+
|
546
|
+
def preceding_node_of( node )
|
547
|
+
psn = node.previous_sibling_node
|
548
|
+
if psn.nil?
|
549
|
+
if node.parent.nil? or node.parent.class == Document
|
550
|
+
return nil
|
551
|
+
end
|
552
|
+
return node.parent
|
553
|
+
#psn = preceding_node_of( node.parent )
|
554
|
+
end
|
555
|
+
while psn and psn.kind_of? Element and psn.children.size > 0
|
556
|
+
psn = psn.children[-1]
|
557
|
+
end
|
558
|
+
psn
|
559
|
+
end
|
560
|
+
|
561
|
+
def following( node )
|
562
|
+
acc = []
|
563
|
+
p = next_sibling_node( node )
|
564
|
+
while p
|
565
|
+
acc << p
|
566
|
+
p = following_node_of( p )
|
567
|
+
end
|
568
|
+
acc
|
569
|
+
end
|
570
|
+
|
571
|
+
def following_node_of( node )
|
572
|
+
if node.kind_of? Element and node.children.size > 0
|
573
|
+
return node.children[0]
|
574
|
+
end
|
575
|
+
return next_sibling_node(node)
|
576
|
+
end
|
577
|
+
|
578
|
+
def next_sibling_node(node)
|
579
|
+
psn = node.next_sibling_node
|
580
|
+
while psn.nil?
|
581
|
+
if node.parent.nil? or node.parent.class == Document
|
582
|
+
return nil
|
583
|
+
end
|
584
|
+
node = node.parent
|
585
|
+
psn = node.next_sibling_node
|
586
|
+
end
|
587
|
+
return psn
|
588
|
+
end
|
589
|
+
|
590
|
+
def norm b
|
591
|
+
case b
|
592
|
+
when true, false
|
593
|
+
return b
|
594
|
+
when 'true', 'false'
|
595
|
+
return Functions::boolean( b )
|
596
|
+
when /^\d+(\.\d+)?$/
|
597
|
+
return Functions::number( b )
|
598
|
+
else
|
599
|
+
return Functions::string( b )
|
600
|
+
end
|
601
|
+
end
|
602
|
+
|
603
|
+
def equality_relational_compare( set1, op, set2 )
|
604
|
+
if set1.kind_of? Array and set2.kind_of? Array
|
605
|
+
if set1.size == 1 and set2.size == 1
|
606
|
+
set1 = set1[0]
|
607
|
+
set2 = set2[0]
|
608
|
+
elsif set1.size == 0 or set2.size == 0
|
609
|
+
nd = set1.size==0 ? set2 : set1
|
610
|
+
rv = nd.collect { |il| compare( il, op, nil ) }
|
611
|
+
return rv
|
612
|
+
else
|
613
|
+
res = []
|
614
|
+
SyncEnumerator.new( set1, set2 ).each { |i1, i2|
|
615
|
+
i1 = norm( i1 )
|
616
|
+
i2 = norm( i2 )
|
617
|
+
res << compare( i1, op, i2 )
|
618
|
+
}
|
619
|
+
return res
|
620
|
+
end
|
621
|
+
end
|
622
|
+
# If one is nodeset and other is number, compare number to each item
|
623
|
+
# in nodeset s.t. number op number(string(item))
|
624
|
+
# If one is nodeset and other is string, compare string to each item
|
625
|
+
# in nodeset s.t. string op string(item)
|
626
|
+
# If one is nodeset and other is boolean, compare boolean to each item
|
627
|
+
# in nodeset s.t. boolean op boolean(item)
|
628
|
+
if set1.kind_of? Array or set2.kind_of? Array
|
629
|
+
if set1.kind_of? Array
|
630
|
+
a = set1
|
631
|
+
b = set2
|
632
|
+
else
|
633
|
+
a = set2
|
634
|
+
b = set1
|
635
|
+
end
|
636
|
+
|
637
|
+
case b
|
638
|
+
when true, false
|
639
|
+
return a.collect {|v| compare( Functions::boolean(v), op, b ) }
|
640
|
+
when Numeric
|
641
|
+
return a.collect {|v| compare( Functions::number(v), op, b )}
|
642
|
+
when /^\d+(\.\d+)?$/
|
643
|
+
b = Functions::number( b )
|
644
|
+
return a.collect {|v| compare( Functions::number(v), op, b )}
|
645
|
+
else
|
646
|
+
b = Functions::string( b )
|
647
|
+
return a.collect { |v| compare( Functions::string(v), op, b ) }
|
648
|
+
end
|
649
|
+
else
|
650
|
+
# If neither is nodeset,
|
651
|
+
# If op is = or !=
|
652
|
+
# If either boolean, convert to boolean
|
653
|
+
# If either number, convert to number
|
654
|
+
# Else, convert to string
|
655
|
+
# Else
|
656
|
+
# Convert both to numbers and compare
|
657
|
+
s1 = set1.to_s
|
658
|
+
s2 = set2.to_s
|
659
|
+
if s1 == 'true' or s1 == 'false' or s2 == 'true' or s2 == 'false'
|
660
|
+
set1 = Functions::boolean( set1 )
|
661
|
+
set2 = Functions::boolean( set2 )
|
662
|
+
else
|
663
|
+
if op == :eq or op == :neq
|
664
|
+
if s1 =~ /^\d+(\.\d+)?$/ or s2 =~ /^\d+(\.\d+)?$/
|
665
|
+
set1 = Functions::number( s1 )
|
666
|
+
set2 = Functions::number( s2 )
|
667
|
+
else
|
668
|
+
set1 = Functions::string( set1 )
|
669
|
+
set2 = Functions::string( set2 )
|
670
|
+
end
|
671
|
+
else
|
672
|
+
set1 = Functions::number( set1 )
|
673
|
+
set2 = Functions::number( set2 )
|
674
|
+
end
|
675
|
+
end
|
676
|
+
return compare( set1, op, set2 )
|
677
|
+
end
|
678
|
+
return false
|
679
|
+
end
|
680
|
+
|
681
|
+
def compare a, op, b
|
682
|
+
case op
|
683
|
+
when :eq
|
684
|
+
a == b
|
685
|
+
when :neq
|
686
|
+
a != b
|
687
|
+
when :lt
|
688
|
+
a < b
|
689
|
+
when :lteq
|
690
|
+
a <= b
|
691
|
+
when :gt
|
692
|
+
a > b
|
693
|
+
when :gteq
|
694
|
+
a >= b
|
695
|
+
when :and
|
696
|
+
a and b
|
697
|
+
when :or
|
698
|
+
a or b
|
699
|
+
else
|
700
|
+
false
|
701
|
+
end
|
702
|
+
end
|
703
|
+
end
|
704
|
+
end
|
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
7.4.1
|