The document provides instructions for building an online business using Ruby on Rails. It recommends starting with conservative financial estimates, limiting initial features to 1-2 core functions, and using specific Ruby gems like Merb and DataMapper for rapid web development. It then outlines steps for bootstrapping a sample Rails application, writing model and request specs to test it, and implementing additional features like sorting pub data and using Haml templates.
There are a number of ways to add custom meta boxes to WordPress admin, from coding against core functions through code API frameworks to GUI interfaces. All of these have a place, but which is the right one for your project, code style and coding level? In this talk I will provide code examples and illustrations of the code techniques for each of the methods.
Time permitting, I will also show you how to extend the frameworks.
Aimed at all levels of developer because of the range of options covered.
An introduction to Rex - FLOSS UK DevOps York 2015Andy Beverley
An introduction to Rex automation and orchestration. Presentation given at FLOSS UK DevOps York 2015. Get a general overview of Rex and find out why I like to use it.
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013GetSource
Image Manipulation in WordPress 3.5 talk from WordCamp Phoenix 2013
Image manipulation in WordPress was an alchemy of mixing GD functions and WordPress functions together to (hopefully) turn out the desired result. Now, as of WordPress 3.5, GD is abstracted out, and a new class, WP_Image_Editor, allows easy manipulation of image files. This lets you perform simple resizing, crops, flips, rotates, and real-time streaming of those results using Imagick or GD. But, that’s not all! You can also easily extend WordPress’ classes to add your own functions, or replace the entire engine with your own.
This session will walk through what’s changed for image manipulation in WordPress 3.5, and explain ways you can take advantage of the new APIs, both through using them directly and extending them for plugins of your own.
Presented by Mike Schroder (@GetSource/DH-Shredder)
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
Like many others, WordPress has been my personal blogging tool for a long time. A powerful tool for easy publishing! That is what everyone wants.
Large sites like TechCrunch and TheNextWeb use it exactly for that reason. And more enterprises seem to discover it as good solution to their too-expensive publication tools. But keeping those WordPress instances running requires skills and knowledge.
Because of WordPress extendibility and its very active community, you can do this too. This tutorial will teach you how use Ansible, Composer, WP-CLI, WP REST API, and Elasticsearch can push WordPress from a personal blogging tool into an enterprise-worthy level application. Out with FTP based SCM ... in with automated deployment, dependency management, and utterly fast search.
Contributing to WordPress Core - Peter WilsonWordCamp Sydney
Almost everyone will have heard the phrase “don’t hack WordPress core” before, what’s less known is that it’s only the start of the saying. Don’t hack WordPress core, without contributing the hacks back.
Contributing to WordPress core is like riding a bike, it takes a little effort to get started but once you learn it’s a skill you’ll never forget.
You will be given a jump start on contributing, from how to use the bug tracker all the way to contributing a patch and getting your first props.
AA261: DevOps lessons in collaborative maintenanceLindsay Holmwood
On January 31, 2000, Alaska Airlines Flight 261 plunged into the Pacific ocean in an extreme "nose down" position, killing all 88 crew and passengers on board. The NTSB concluded AA261's horizontal stabiliser trim system's jackscrew was inadequately maintained, causing the pilots to lose all control of the plane.
There are striking parallels with the problems we face daily in IT operations & software development, and the 30 years of give and take between the aircraft manufacturer's engineers, airline maintenance staff, and federal regulators that preceded AA261's simple mechanical failure.
In this talk, Lindsay looks at the complex interplay between the parties in the AA261 crash through a DevOps lens, investigating the collaborative approach to maintenance and operation of the MD-83 aircraft, and relating the complexities back to the complex IT systems we build and maintain.
Bulletproof Networks provides managed hosting services to some of the largest companies in Australia. Bulletproof implements strong isolation of customer environments, and this can present unique challenges when re-using Puppet code across our customer base. Additionally, the environments range in size from small to very large, and our tools + processes need to be able to handle both uses cases equally well.
In this talk Lindsay + Mick will cover how Bulletproof's approach to these problems has evolved over the last 4 years, and some of the tools Bulletproof has developed and built upon to provide an awesome service to our customers.
There are a number of ways to add custom meta boxes to WordPress admin, from coding against core functions through code API frameworks to GUI interfaces. All of these have a place, but which is the right one for your project, code style and coding level? In this talk I will provide code examples and illustrations of the code techniques for each of the methods.
Time permitting, I will also show you how to extend the frameworks.
Aimed at all levels of developer because of the range of options covered.
An introduction to Rex - FLOSS UK DevOps York 2015Andy Beverley
An introduction to Rex automation and orchestration. Presentation given at FLOSS UK DevOps York 2015. Get a general overview of Rex and find out why I like to use it.
Image Manipulation in WordPress 3.5 - WordCamp Phoenix 2013GetSource
Image Manipulation in WordPress 3.5 talk from WordCamp Phoenix 2013
Image manipulation in WordPress was an alchemy of mixing GD functions and WordPress functions together to (hopefully) turn out the desired result. Now, as of WordPress 3.5, GD is abstracted out, and a new class, WP_Image_Editor, allows easy manipulation of image files. This lets you perform simple resizing, crops, flips, rotates, and real-time streaming of those results using Imagick or GD. But, that’s not all! You can also easily extend WordPress’ classes to add your own functions, or replace the entire engine with your own.
This session will walk through what’s changed for image manipulation in WordPress 3.5, and explain ways you can take advantage of the new APIs, both through using them directly and extending them for plugins of your own.
Presented by Mike Schroder (@GetSource/DH-Shredder)
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
Like many others, WordPress has been my personal blogging tool for a long time. A powerful tool for easy publishing! That is what everyone wants.
Large sites like TechCrunch and TheNextWeb use it exactly for that reason. And more enterprises seem to discover it as good solution to their too-expensive publication tools. But keeping those WordPress instances running requires skills and knowledge.
Because of WordPress extendibility and its very active community, you can do this too. This tutorial will teach you how use Ansible, Composer, WP-CLI, WP REST API, and Elasticsearch can push WordPress from a personal blogging tool into an enterprise-worthy level application. Out with FTP based SCM ... in with automated deployment, dependency management, and utterly fast search.
Contributing to WordPress Core - Peter WilsonWordCamp Sydney
Almost everyone will have heard the phrase “don’t hack WordPress core” before, what’s less known is that it’s only the start of the saying. Don’t hack WordPress core, without contributing the hacks back.
Contributing to WordPress core is like riding a bike, it takes a little effort to get started but once you learn it’s a skill you’ll never forget.
You will be given a jump start on contributing, from how to use the bug tracker all the way to contributing a patch and getting your first props.
AA261: DevOps lessons in collaborative maintenanceLindsay Holmwood
On January 31, 2000, Alaska Airlines Flight 261 plunged into the Pacific ocean in an extreme "nose down" position, killing all 88 crew and passengers on board. The NTSB concluded AA261's horizontal stabiliser trim system's jackscrew was inadequately maintained, causing the pilots to lose all control of the plane.
There are striking parallels with the problems we face daily in IT operations & software development, and the 30 years of give and take between the aircraft manufacturer's engineers, airline maintenance staff, and federal regulators that preceded AA261's simple mechanical failure.
In this talk, Lindsay looks at the complex interplay between the parties in the AA261 crash through a DevOps lens, investigating the collaborative approach to maintenance and operation of the MD-83 aircraft, and relating the complexities back to the complex IT systems we build and maintain.
Bulletproof Networks provides managed hosting services to some of the largest companies in Australia. Bulletproof implements strong isolation of customer environments, and this can present unique challenges when re-using Puppet code across our customer base. Additionally, the environments range in size from small to very large, and our tools + processes need to be able to handle both uses cases equally well.
In this talk Lindsay + Mick will cover how Bulletproof's approach to these problems has evolved over the last 4 years, and some of the tools Bulletproof has developed and built upon to provide an awesome service to our customers.
Escalating complexity: DevOps learnings from Air France 447Lindsay Holmwood
On June 1, 2009 Air France 447 crashed into the Atlantic ocean killing all 228 passengers and crew. The 15 minutes leading up to the impact were a terrifying demonstration of the how thick the fog of war is in complex systems.
Mainstream reports of the incident put the blame on the pilots - a common motif in incident reports that conveniently ignore a simple fact: people were just actors within a complex system, doing their best based on the information at hand.
While the systems you build and operate likely don't control the fate of people's lives, they share many of the same complexity characteristics. Dev and Ops can learn an abundance from how the feedback loops between these aviation systems are designed and how these systems are operated.
In this talk Lindsay will cover what happened on the flight, why the mainstream explanation doesn't add up, how design assumptions can impact people's ability to respond to rapidly developing situations, and how to improve your operational effectiveness when dealing with rapidly developing failure scenarios.
We all know that load testing is important, but it's all too common that it's left to the very end of a project and it's invariably the first thing that gets dropped when budgets and timeframes get cut. Furthermore, most of us don't know where or how to start implementing effective load tests, let alone how to analyse the results.
Lindsay Holmwood, Software Manager at Bulletproof Networks, will be talking about integrating performance testing into your application development + deploy cycle from the very beginning, using inexpensive and easy to use SaaS tools.
There will be a hands on demonstration of the Blitz load + performance testing tool, coupled with a brief dive into the Blitz API internals to retrieve and analyse advanced reporting information.
Behaviour Driven Monitoring with cucumber-nagiosLindsay Holmwood
Writing checks for your monitoring system is boring. You end up writing the same checks again and again, and it can be difficult to verify behavior instead of availability. Wouldn't it be useful to have a standard library of checks you could reuse across your infrastructure?
it lets you write reusable behavioral tests in human-readable language.Say hello to cucumber-nagios - it lets you write reusable behavioral tests in human-readable language. As cucumber-nagios output the test results in the Nagios plugin format you can run your checks from any monitoring system that understands the format.
Monitoring web application behaviour with cucumber-nagiosLindsay Holmwood
Setting up monitoring for web applications can be complicated - tests tend to lack expressiveness, or and quite often they don't even test the right problem in the first place.
cucumber-nagios lets a sysadmin write behavioural tests for their web apps in plain English, and outputs the test results in the Nagios plugin format, allowing a sysadmin to be notified by Nagios when their production apps aren't behaving.
Describes Outside-In development and Behvaiour Driven Development. Illustrates basic Cucumber usage within a Rails app and then goes over more advanced topics such as JS as web services.
Here's my 50-foot view of building a Facebook application on Rails. Rails itself is not part of the presentation - you can check out one of my available slides for that. Target: non-techies and people who just want to find out the Facebook API architecture. I wished I could've put more content, like y'know, ACTUAL CODE???
Using Geeklog as a Web Application FrameworkDirk Haun
Slides for the workshop "Using Geeklog as a Web Application Framework", as held at
- LinuxTag 2006, Wiesbaden, Germany, 2006-05-06
- PHP user group meeting, Stuttgart, Germany, 2006-05-10
- FrOSCon, Bonn, Germany, 2006-06-24
Hiveminder - Everything but the Secret SauceJesse Vincent
Ten tools and techniques to help you:
Find bugs faster バグの検出をもっと素早く
Build web apps ウェブアプリの構築
Ship software ソフトのリリース
Get input from users ユーザからの入力を受けつける
Own the Inbox 受信箱を用意する
今日の話
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
45. $ rake spec:request
.**......
Pending:
resource(:pubs) GET contains a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:21
resource(:pubs) GET has a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:33
Finished in 0.322787 seconds
9 examples, 0 failures, 2 pending
run specs
48. $ vim spec/requests/pubs_spec.rb
...
it quot;contains a sorted list of pubsquot; do
@response.should have_xpath(quot;//h3[contains(.,'Cheapest')]quot;)
@response.should have_xpath(quot;//h3[contains(.,'Nearest')]quot;)
end
request specs
51. $ rake spec:request
Pending:
resource(:pubs) GET has a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:33
1)
'resource(:pubs) GET contains a sorted list of pubs' FAILED
expected following text to match xpath //h3[contains(.,'Cheapest')]’
./spec/requests/pubs_spec.rb:21:
Finished in 0.411139 seconds
9 examples, 1 failure, 1 pending
run specs
61. $ bzr mv app/views/pubs/index.html.erb
app/views/pubs/index.html.haml
$ vim app/views/pubs/index.html.haml
%h3 Nearest
%h3 Cheapest
$ rake spec:request
Pending:
resource(:pubs) GET has a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:33
Finished in 0.389194 seconds
9 examples, 0 failures, 1 pending
hamlise view tests pass!
65. $ vim spec/models/pubs_spec.rb
1. it quot;should have name, address, pricequot; do
@pubs.each do |pub|
pub.name.should_not be_nil
pub.address.should_not be_nil
pub.price.should_not be_nil
end
end
model specs
66. $ vim spec/models/pubs_spec.rb
2. it quot;should handle different url formatsquot; do
@pubs.each do |pub|
pub.url = 'mygreatpub.com.au'
pub.save.should be_true
pub.url = 'http://mygreatpub.com.au/'
pub.save.should be_true
end
end
model specs
67. $ vim spec/models/pubs_spec.rb
3. it quot;should consistently format + store urlsquot; do
@pubs.each do |pub|
adjective = %w[great swanky awesome stylish][rand(4)]
pub.url = quot;#{adjective}pub.com.auquot;
pub.save.should be_true
pub.url.should =~ /^http://.+/$/
end
end
model specs
70. $ vim spec/models/pubs_spec.rb
before(:each) do
@pubs = 10.of { Pub.generate }
end
$ vim spec/spec_fixtures.rb
require 'dm-sweatshop'
Pub.fixture do
{
:name => ( name = %w[John Jane Jerry Justin][rand(4)] + quot;'s Pubquot;),
:price => (1..30).to_a[rand(30)],
:address => quot;#{(40..166).to_a[rand(126)]} Spring quot; + %w[Street Road Avenue][rand(3)],
:url => quot;http://#{name.gsub(/W/, '').downcase}.com/quot;
}
end
model specs
73. $ rake spec:models
1)
NameError in 'Pub should have name, address, price'
address= is not a public property
2)
NameError in 'Pub should handle different url formats'
address= is not a public property
3)
NameError in 'Pub should consistently format + store urls'
address= is not a public property
Finished in 0.252169 seconds
3 examples, 3 failures
run specs
83. $ vim spec/requests/pubs_spec.rb
...
it quot;contains a list of cheapest pubsquot; do
@response.should have_xpath(quot;//div[@id=’cheapest’]quot;)
@response.should have_xpath(quot;//div[@id=’cheapest’]//table//tr//td[@class='name']quot;)
@response.should have_xpath(quot;//div[@id=’cheapest’]//table//tr//td[@class='address']quot;)
@response.should have_xpath(quot;//div[@id=’cheapest’]//table//tr//td[contains(@class,'price')]quot;)
end
request specs
86. $ rake spec:request
Pending:
resource(:pubs) GET has a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:37
1)
'resource(:pubs) GET contains a list cheapest pubs' FAILED
expected following text to match xpath //div[@id='cheapest']
./spec/requests/pubs_spec.rb:26:
Finished in 0.411139 seconds
10 examples, 1 failure, 1 pending
run specs
94. $ rake spec:request
Pending:
resource(:pubs) GET has a list of pubs (TODO)
Called from ./spec/requests/pubs_spec.rb:37
Finished in 0.854704 seconds
10 examples, 0 failures, 1 pending
run specs
106. $ vim public/javascripts/application.js
window.addEvent('domready', function() {
if (GBrowserIsCompatible()) {
var map = new GMap2($(quot;mapquot;));
map.enableScrollWheelZoom();
map.setCenter(new GLatLng(-33.86336, 151.207151), 12);
var geocoder = new GClientGeocoder();
/* geocode top-ten addresses */
$$('div#cheapest tr').each( function(element) {
showAddress(map, geocoder, element);
});
}
});
dash o’ javascript
107. $ vim public/javascripts/application.js
function showAddress(map, geocoder, element) {
var name = element.getElements('td.name a').get('html');
var address = element.getChildren('td.address').get('html');
var price = element.getElements('td.price').get('html');
var link = element.getElements('td.name a').get('href');
geocoder.getLatLng(address, function(point) {
if (point) {
var marker = new GMarker(point);
marker.bindInfoWindowHtml(quot;<h4>quot; + name + quot;</h4>quot; + ... );
map.addOverlay(marker);
}
});
}
custom geocoder