Project

device_map

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby implementation of client for Apache DeviceMap repository containing device information, images and other relevant information for all sorts of mobile devices.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.10
~> 10.0
~> 3.1
~> 0.28

Runtime

~> 1.6
 Project Readme

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

Build Status Code Climate

Installation

Add device_map to your Gemfile and execute bundle install.

Example

require 'device_map'

user_agent =
  'Mozilla/5.0 (Linux; U; Android 4.2.2; En-us; SM-T312 Build/JDQ39) ' \
  'AppleWebKit/534.30 (KHTML, Like Gecko) Version/4.0 Safari/534.30'

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:

$ bundle exec rake