The problem at the moment stems from the fact that the frontend assets are developed in this style:
.foo {
background: url(../img/bar.png); /* Sometimes ../images/ */
}
require "faraday" | |
class Customer < ActiveRestClient::Base | |
base_url "http://requestb.in" | |
ActiveRestClient::Base.faraday_config do |faraday| | |
faraday.adapter(:net_http) | |
faraday.options.timeout = 20 | |
faraday.headers['User-Agent'] = "ActiveRestClient/#{ActiveRestClient::VERSION}" | |
end | |
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.1.1' | |
# Use sqlite3 as the database for Active Record | |
gem 'sqlite3' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.3' | |
# Use Uglifier as compressor for JavaScript assets |
class User < ActiveRestClient::Base | |
before_filter do |name, request| | |
request.headers["Authorization"] = request.get_params[:authorization] | |
end | |
get :find, "/users/:id" | |
end |
#!/usr/bin/env ruby | |
require 'tmpdir' | |
require 'digest/sha1' | |
hash = "" | |
Dir.mktmpdir do |dir| | |
`cd #{dir} && wget -E -H -k -K -q -p #{ARGV[0]}` | |
Dir["#{dir}/**/*"].each do |filename| | |
unless File.directory?(filename) | |
# puts filename |
{ | |
"name" : "John" | |
} |
[ | |
{"team": "Liverpool FC", "points": 88}, | |
{"team": "Manchester Utd", "points": 77} | |
] |
» CustomerManagementRenewal.find_simple_offer("413AIJ") | |
HTTPI GET request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP request: https://cmr-integration-lb.which.co.uk/marketing-services | |
SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 400 | |
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="which-cmr-1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:findSimpleOffer><simpleOfferQuery><advertCode>413AIJ</advertCode><channel>WEB</channel></simpleOfferQuery></tns:findSimpleOffer></env:Body></env:Envelope> | |
HTTPI POST request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP response (status 200) | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findSimpleOfferResponse xmlns:ns2="which-cmr-1.0"><campaignedOffers><campaignedOffer><campaignId>1110</campaignId><campaignName>5KY975</campaignName><offerId>1655</offerId><off |
11:34 ~ $ irb | |
1.9.2p290 :001 > require 'rubygems' | |
=> false | |
1.9.2p290 :002 > require 'json' | |
=> true | |
1.9.2p290 :003 > require 'msgpack' | |
=> true | |
1.9.2p290 :004 > f = File.read('test.json'); nil # f is our calendar data | |
=> nil | |
1.9.2p290 :005 > h = JSON.parse(f); nil |
#!/usr/bin/env ruby | |
kill = false | |
name = ARGV[0] | |
if (name == "-k") | |
kill = true | |
name = ARGV[1] | |
end | |
if name | |
ps = `ps axwu|grep -i [#{name[0..0]}]#{name[1..1000]}|grep -v " #{Process.pid}"` |