Sha256: 21b0b6abc14a36664cd171e564ff9460375b4a988da1886e969f6e05ee1cff83
Contents?: true
Size: 1.93 KB
Versions: 3
Compression:
Stored size: 1.93 KB
Contents
# DeviceMap Apache DeviceMap is a project to create a data repository containing device information, images and other relevant information for all sorts of mobile devices, e.g. smartphones and tablets. [Apache DeviceMap](http://devicemap.apache.org/) [![Build Status](https://travis-ci.org/soylent/device_map.svg?branch=master)](https://travis-ci.org/soylent/device_map) [![Code Climate](https://codeclimate.com/github/soylent/device_map/badges/gpa.svg)](https://codeclimate.com/github/soylent/device_map) ## Installation Add `device_map` to your `Gemfile` and execute `bundle install`. ## Basic example ```ruby require 'device_map' user_agent = <<USERAGENT Mozilla/5.0 (Linux; U; Android 2.3.4; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 USERAGENT device = DeviceMap.classify(user_agent) device.ajax_manipulate_css # => true device.ajax_manipulate_dom # => true device.ajax_support_event_listener # => true device.ajax_support_events # => true device.ajax_support_getelementbyid # => true device.ajax_support_inner_html # => true device.ajax_support_javascript # => true device.device_os # => "Android" device.device_os_version # => "2.3" device.display_height # => 800 device.display_width # => 480 device.dual_orientation # => true device.from # => "open_db_modified" device.id # => "GT-I9100" device.image_inlining # => true device.input_devices # => "touchscreen" device.marketing_name # => "Galaxy S II" device.mobile_browser # => "Android Webkit" device.mobile_browser_version # => "4.0" device.model # => "GT-I9100" ``` ## Contributing Pull requests are very welcome. Please make sure that your changes don't break the tests by running: ```sh $ bundle exec rake ```
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
device_map-0.1.2 | README.md |
device_map-0.1.1 | README.md |
device_map-0.1.0 | README.md |