browser 1.1.0 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.hound.yml +26 -6
- data/.rubocop.yml +26 -6
- data/CHANGELOG.md +10 -0
- data/README.md +177 -41
- data/Rakefile +1 -1
- data/bin/rake +16 -0
- data/bot_exceptions.yml +1 -0
- data/bots.yml +188 -192
- data/browser.gemspec +14 -28
- data/languages.yml +54 -54
- data/lib/browser.rb +82 -202
- data/lib/browser/accept_language.rb +47 -0
- data/lib/browser/action_controller.rb +1 -1
- data/lib/browser/base.rb +159 -0
- data/lib/browser/blackberry.rb +21 -0
- data/lib/browser/bot.rb +63 -0
- data/lib/browser/chrome.rb +23 -0
- data/lib/browser/detect_version.rb +19 -0
- data/lib/browser/device.rb +175 -0
- data/lib/browser/device/base.rb +11 -0
- data/lib/browser/device/blackberry_playbook.rb +17 -0
- data/lib/browser/device/ipad.rb +17 -0
- data/lib/browser/device/iphone.rb +17 -0
- data/lib/browser/device/ipod_touch.rb +17 -0
- data/lib/browser/device/kindle.rb +17 -0
- data/lib/browser/device/kindle_fire.rb +17 -0
- data/lib/browser/device/playstation3.rb +17 -0
- data/lib/browser/device/playstation4.rb +17 -0
- data/lib/browser/device/psp.rb +17 -0
- data/lib/browser/device/psvita.rb +17 -0
- data/lib/browser/device/surface.rb +23 -0
- data/lib/browser/device/tv.rb +17 -0
- data/lib/browser/device/unknown.rb +17 -0
- data/lib/browser/device/wii.rb +17 -0
- data/lib/browser/device/wiiu.rb +17 -0
- data/lib/browser/device/xbox_360.rb +17 -0
- data/lib/browser/device/xbox_one.rb +17 -0
- data/lib/browser/edge.rb +19 -0
- data/lib/browser/firefox.rb +19 -0
- data/lib/browser/generic.rb +32 -0
- data/lib/browser/internet_explorer.rb +61 -0
- data/lib/browser/meta/base.rb +1 -1
- data/lib/browser/meta/device.rb +9 -0
- data/lib/browser/meta/generic_browser.rb +1 -1
- data/lib/browser/meta/id.rb +1 -1
- data/lib/browser/meta/ie.rb +1 -1
- data/lib/browser/meta/ios.rb +2 -2
- data/lib/browser/meta/mobile.rb +2 -2
- data/lib/browser/meta/modern.rb +1 -1
- data/lib/browser/meta/platform.rb +2 -2
- data/lib/browser/meta/proxy.rb +1 -1
- data/lib/browser/meta/safari.rb +1 -1
- data/lib/browser/meta/tablet.rb +9 -0
- data/lib/browser/meta/webkit.rb +1 -1
- data/lib/browser/middleware.rb +1 -1
- data/lib/browser/middleware/context.rb +2 -2
- data/lib/browser/middleware/context/additions.rb +1 -1
- data/lib/browser/middleware/context/url_methods.rb +3 -3
- data/lib/browser/nokia.rb +19 -0
- data/lib/browser/opera.rb +19 -0
- data/lib/browser/phantom_js.rb +19 -0
- data/lib/browser/platform.rb +152 -0
- data/lib/browser/platform/adobe_air.rb +21 -0
- data/lib/browser/platform/android.rb +21 -0
- data/lib/browser/platform/base.rb +15 -0
- data/lib/browser/platform/blackberry.rb +21 -0
- data/lib/browser/platform/chrome_os.rb +21 -0
- data/lib/browser/platform/firefox_os.rb +21 -0
- data/lib/browser/platform/ios.rb +28 -0
- data/lib/browser/platform/linux.rb +21 -0
- data/lib/browser/platform/mac.rb +21 -0
- data/lib/browser/platform/other.rb +21 -0
- data/lib/browser/platform/windows.rb +21 -0
- data/lib/browser/platform/windows_mobile.rb +21 -0
- data/lib/browser/platform/windows_phone.rb +21 -0
- data/lib/browser/rails.rb +3 -2
- data/lib/browser/safari.rb +22 -0
- data/lib/browser/testing.rb +23 -0
- data/lib/browser/uc_browser.rb +19 -0
- data/lib/browser/version.rb +2 -7
- data/search_engines.yml +5 -5
- data/test/browser_test.rb +71 -172
- data/test/middleware_test.rb +7 -7
- data/test/sample_app.rb +3 -3
- data/test/test_helper.rb +11 -10
- data/test/ua.yml +15 -26
- data/test/ua_bots.yml +27 -0
- data/test/ua_search_engines.yml +6 -0
- data/test/unit/accept_language_test.rb +92 -0
- data/test/unit/adobe_air_test.rb +5 -10
- data/test/unit/android_test.rb +44 -49
- data/test/unit/blackberry_test.rb +55 -77
- data/test/unit/bots_test.rb +52 -84
- data/test/unit/chrome_test.rb +48 -42
- data/test/unit/console_test.rb +4 -62
- data/test/unit/device_test.rb +193 -0
- data/test/unit/firefox_test.rb +32 -27
- data/test/unit/ie_test.rb +223 -238
- data/test/unit/ios_app_test.rb +3 -3
- data/test/unit/ios_test.rb +87 -94
- data/test/unit/kindle_test.rb +10 -24
- data/test/unit/nokia_test.rb +3 -7
- data/test/unit/opera_test.rb +20 -30
- data/test/unit/platform_test.rb +161 -0
- data/test/unit/proxy_test.rb +3 -3
- data/test/unit/safari_test.rb +66 -0
- data/test/unit/uc_browser_test.rb +3 -7
- data/test/unit/windows_phone_test.rb +19 -40
- data/test/unit/windows_test.rb +32 -34
- metadata +73 -28
- data/lib/browser/methods/blackberry.rb +0 -51
- data/lib/browser/methods/bots.rb +0 -35
- data/lib/browser/methods/consoles.rb +0 -43
- data/lib/browser/methods/devices.rb +0 -41
- data/lib/browser/methods/ie.rb +0 -99
- data/lib/browser/methods/language.rb +0 -16
- data/lib/browser/methods/mobile.rb +0 -35
- data/lib/browser/methods/platform.rb +0 -152
- data/lib/browser/methods/proxy.rb +0 -8
- data/lib/browser/methods/tv.rb +0 -8