Rails 4 with Rspec 3
Configure your Gemfile
# Gemfile group :development, :test do gem 'rspec-rails', '~> 3.0.0' gem 'factory_girl_rails' gem 'capybara'
|_ = require 'underscore'|
|# Given an array of elements ELEM and a matching KEY value,|
|# will build the apprpriate projection to generate sortable|
|# weights for a mongo aggregator.|
|# ELEM: An array of values upon which to match against KEY|
|# KEY: The document field key to match against|
|# I: Default 0, index into array at which to begin|
|expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username|
|expect(@user.errors[:username]).to include("can't be blank") # check for the error message|
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
On a mac you can use homebrew by running the command
brew install pandoc.
Include Weather Icons in your app: https://github.com/erikflowers/weather-icons
Include the below JSON in your application, for example purposes, lets assume it's a global named
Make a request to OpenWeatherMap:
req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');