Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google_mobile_friendly

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google_mobile_friendly

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

GoogleMobileFriendly

Build Status Code Climate

Ruby Wrapper for Mobile-Friendly Test from Google Search Console URL Testing Tools API

See Google documentation for more information - https://developers.google.com/webmaster-tools/search-console-api/reference/rest/

Requirements

  • Ruby >= 2.0.0

Installation

Add this line to your application's Gemfile:

gem 'google_mobile_friendly'

And then execute:

$ bundle

Or install it yourself as:

$ gem install google_mobile_friendly

Usage

page_one = GoogleMobileFriendly.run_test 'http://google.com', 'YOUR_API_KEY'
page_one.is_mobile_friendly?
# => true
page_one.list_of_mobile_issues
# => nil
page_one.list_of_blocked_resources
# => ["https://www.gstatic.com/og/_/ss/k=og.mob.o3hu3mtmammu.L.W.O/m=md/excm=mih,mab,meb/d=1/ed=1/rs=AA2YrTsgcHY9rgal7Q_4KtT2B4QI4nDAcA", "https://www.gstatic.com/og/_/js/k=og.mob.en_US.09TQbv5ZB3k.O/rt=j/m=md/exm=mih,mab,meb/d=1/ed=1/rs=AA2YrTtYyrscNOyD60o4h8_Tc0H3-gaXUQ", "https://www.google.com/xjs/_/js/k=xjs.qs.en_US.JLMJY8f85DU.O/m=sx,c,sb_mob,bct,cdos,elog,hsm,jsa,mbsf,qim,r,qsm,d,csi/am=gCNop3GCBgwAWHU0S-wLCAEoBA/rt=j/d=1/t=zcms/rs=ACT90oHfJ0gcIaPuA4F8guH-oefRznVKvw"]

page_two = GoogleMobileFriendly.run_test 'http://edition.cnn.com/EVENTS/1996/year.in.review/', 'YOUR_API_KEY'
page_two.is_mobile_friendly?
# => false
page_two.list_of_mobile_issues
# => ["Touch elements are too close to each other. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#touch_elements_too_close).", "Viewsport is not specified using the meta viewport tag. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#viewport_not_configured).", "Font size is too small for easy reading on a small screen. [Learn More]\n(https://support.google.com/webmasters/answer/6352293#small_font_size)."]

License

MIT

FAQs

Package last updated on 19 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc