19 April 2014

The Ruby Reflector

Topic

JSON

  Source Favicon
By David of Signal vs. Noise 5 days ago.
Email

…people following the "just do a server-side API ", since the json may well generate in 50ms, but then the client-side computation takes a full second on the below-average device — doh!).

Level two, once reasonable efforts have been made to trim the fat around the X-Runtime itself, is getting some big numbers up on the board: Mean and the 90th percentile. Those really are great places to start. If your mean is an embarrassing 500ms+, well, then you have some serious, fundamental …

37signals.com Read
  Source Favicon
By Joshua Timberman of Chef Blog 9 days ago.
Email

…Chef Server API, the reference implementation uses Apache Solr for indexing the JSON data, such as information about nodes that are managed. In our Hosted Enterprise Chef environment, we run Solr 1.4, and it is made highly available for redundancy . Due to the age of Solr in our environment, we are currently working to update Solr to version 4 to take advantage of various new features and bug fixes. The Erchef API sends all search queries to Solr 4 and Solr 1 simultaneously so …

opscode.com Read
  Source Favicon
By Serdar Sutay of Chef Blog 10 days ago.
Email

jaymzh : bump up upper limit on json gem to 1.8.1 ( CHEF-4632)

Ohai 7.0.0

jaymzh : Work around libc bug in hostname --fqdn

mvidner : (Long time ago) Added differentiation for suse & opensuse in the :platform attribute.

tas50 : Added additional cpu information to darwin platform.

mpasternacki : Removed fe80:: link-local address from reported ip6addresses.

paulczar : Added private network information for Rackspace nodes.

ctennis : Added init_package plugin which reports …

opscode.com Read
  Source Favicon
By Lucas Mazza of Plataformatec Blog 11 days ago.
Email

…config.action_dispatch.cookies_serializer configuration option, and new apps will ship with a smarter default: a JSON serializer that won't recreate complex objects besides Strings, Integers and other JSON data types. And for a smooth upgrade, you can use the :hybrid serializer that will convert your existing marshalled cookies into JSON cookies, so this upgrade can be transparent for your application users.

This upgrade highlights a possible bad practice in our applications where …

blog.plataformatec.com.br Read
  Source Favicon
By Jessie Young of Giant Robots Smashing Into Other Giant Robots 23 days ago.
Email

After reading iOS on Rails , you will be able to create a JSON API with Rails and an iOS app that interacts with that API.

The book covers:

Which tools we chose for rendering JSON endpoints and why

How to test-drive development of your Rails JSON API

How to create JSON endpoints for GET, POST, and PATCH requests

How to create geocoded API endpoints

How to set up your first iOS app in Xcode

How to consume and use API endpoints in an iOS app

As with all our …

robots.thoughtbot.com Read
  Source Favicon
By Guest Post of New Relic 24 days ago.
Email

…and makes it easy to define what a correct response looks like (e.g. the status code was 200 and the JSON response body contained the expected data). Radar also understands that APIs aren't static, so you can dynamically extract and pass data between requests to test entire workflows. You can learn more about testing our APIs with Radar in our docs .

New Relic Insights is a perfect complement to Runscope Radar. With a few simple queries, you can create dashboards …

newrelic.com Read
  Source Favicon
Email

"Shape" is the point (in spatial format) and other_tags will contain some additional format (in JSON format), this is how ogr2ogr converts it by default. See the GDAL documentation on the OSM driver for more information.

OSM data may contain the zip code, but this is not guaranteed. Here is the example how we can find all coffee shops in ZIP code 27701: mysql> select shape into @ shape from zcta.tl_2013_us_zcta510 where zcta5ce10='27701'; Query OK, …

mysqlperformanceblog.com Read
  Source Favicon
Email

…let's say Cocoapods switches from Ruby based spec files to another format ( JSON?). Now I've got to spend client time just fixing my build system, which isn't adding much value to their product.

Are these scenarios this likely to happen? I hover somewhere between ‘maybe' and ‘probably not'.

Contracting vs Personal Projects

Having described how I analyze third-party dependencies and my thoughts on Cocoapods in general, I will say that I am now using it …

carpeaqua.com Read
  Source Favicon
By Guest Post of New Relic 1 month ago.
Email

…Microsoft.net, we chose to use the Json.Newtonsoft libraries for parsing the Json results. using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization;

// Helper method to retrieve list of alerts from New Relic API. public JObject GetAlerts() { var client = new RestClient("https://api.newrelic.com/v2/alert_policies.json"); var request = new RestRequest(Method.GET); request.AddHeader("X-Api-Key", …

newrelic.com Read
  Source Favicon
Email

…differently depending on which child class receives the parse method. Both the XML and JSON parsers modify GenericParser 's behavior, which raises an exception.

Duck Typing

In statically typed languages, runtime polymorphism is more difficult to achieve. Fortunately, with Ruby we can use duck typing .

We'll use our XML and JSON parsers again for this example, minus the inheritance: class XmlParser def parse puts 'An instance of the XmlParser class …

robots.thoughtbot.com Read