17 April 2014

The Ruby Reflector

Topic

Hypertext Transfer Protocol

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

…organizations rely more and more on SaaS providers to manage their DevOps and customer communication, it's imperative that these systems learn to work together. Facilitating these integrations are open protocols and data sharing standards like HTTP and Json. New Relic and Uptime.ly customers are enjoying the benefit of the integrations these standards make possible - get started here !

newrelic.com Read
  Source Favicon
By Matt Soldo of Heroku 1 month ago.
Email

…X-Request-ID convention, you can easily correlate multiple log entries to individual HTTP(s) requests.

HTTP Request IDs are now enabled on all Heroku apps.

Understanding X-Request-ID on Heroku

Each HTTP request that reaches your dyno will now contain an X-Request-ID header. Heroku will pass through existing X-Request-ID headers if they are set by the HTTP client. For requests that lack the header, Heroku generates an ID. Your application code can …

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

Reduce the number of HTTP requests

Where possible, images should be combined into CSS sprites and CSS and Javascript files combined into single files to reduce the number of requests to the web server.

It will be interesting to see the reports in New Relic as we're implementing our strategy and the resulting changes in our bounce rate, time on site and conversion rate in our analytics package.

To hear more from Yusuf, can follow him on Twitter or connect with him …

newrelic.com Read
  Source Favicon
By Joseph Smith of Chef Blog 1 month ago.
Email

Enterprise Chef 11.1.1 defaults to the Host header set by the incoming HTTP request, ensuring that bookshelf URLs generated from requests to the API front-end will be directed back to that front-end and be correctly proxied to the back-end service. This also ensures that all external bookshelf traffic travels over HTTPS.

Updated documentation on these changes, including the new configuration settings, is available at: http://docs.opscode.com/release/oec_11-1/config_rb_chef_server_enterprise.html …

opscode.com Read
  Source Favicon
By Joseph Smith of Chef Blog 1 month ago.
Email

This security release includes fixes for the following:

libyaml 0.1.5

[ CVE-2013-6393 ] - ml_parser_scan_tag_uri function in scanner.c performs incorrect cast

OpenSSL 1.0.1f

[ CVE-2013-4353 ] - allows remote TLS servers to cause a denial of service

Nginx 1.4.4

[ CVE-2013-2070 ] - when proxy_pass is used with untrusted HTTP servers, allows remote attackers to cause a denial of service

[ CVE-2013-4547] - allows remote attackers to bypass intended …

opscode.com Read
  Source Favicon
Email

Typing a URL into the address bar of a web browser sends a GET request to the URL specified. Sending a GET request in this fashion looks identical to sending a GET request through the terminal with cURL.

If we set the root path of our demo app to the index action of our dummy controller and navigate to localhost:3000 the browser will send the GET request. If we take a look at the Rails console we'll notice the output is almost identical to what we saw with cURL. Started GET "/" …

robots.thoughtbot.com Read
  Source Favicon
On igvita.com 3 months ago.
Email

Web font adoption continues to accelerate across the web: according to HTTP Archive, ~ 37% of top 300K sites are using web fonts as of early 2014, which translates to a 2x+ increase over the past twelve months. Of course, this should not be all that surprising to most of us. Typography has always been an important part of good design, branding, and readability and web fonts offer many additional benefits: the text is selectable, searchable, zoomable, and high-DPI friendly. What's not to like?

igvita.com Read
  Source Favicon
By Miles Matthias of RubyLearning Blog 3 months ago.
Email

Here's the list of what HTTP Verbs and URL combinations match to what methods inside a controller:

(Credit: http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions )

Notice in the controller that we didn't call render at all. That's because Rails automatically attempts to render a view that has a filename of the same name of the method called in the controller. If it can't find one, it will default to the index.html view for the controller, or the …

rubylearning.com Read
  Source Favicon
By James Schorr of RubyLearning Blog 3 months ago.
Email

…actual API call. Notice how we can accomplish this by using ‘send'. Thus the various HTTP verbs can all be used as desired while keeping the code pretty DRY.

Attempt 4 - Sustainability module StatsApi require 'json' require 'httparty' require 'active_support/core_ext/string' require 'jsonpath'

## Reader: note that @ error is raised so that we can easily handle that in our parent methods...

def find_users_stats(users_handle) …

rubylearning.com Read
  Source Favicon
Email

…concept of microservices. His goal is to split the app into multiple services talking to each other via HTTP/ JSON.

Where you see contexts, he sees services.

This represents an architectural difference between both of you.

To be honest, this is a nice problem to have. It means, that people in your team are passionate. They put time into learning new concepts and they are constantly trying to image the app in a different way.

How to deal with it?

I've chosen DCI and microservices …

andrzejonsoftware.blogspot.com Read