This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://ew2d.t.proxylocal.com/orderings/third_parties/dnb?web_order[id]=6401012&web_order[broker][id]=mabj&web_order[broker][email]=magnus.bjork%40DNBeiendom.no&web_order[broker][name]=Magnus%20Bj%C3%B6rk&web_order[broker][mobile]=&web_order[broker][telephone]=&web_order[office][id]=103&web_order[type]=residential&web_order[estate_address][street]=Djupedalsfaret+56+B&web_order[estate_address][zip_code]=3280&web_order[estate_address][postal_area]=TJODALYNG&web_order[estate_seller][name]=Marit%20Schulstok&web_order[estate_seller][telephone]=99%2001%2062%2092&web_order[estate_seller][mobile]=99%2001%2062%2092&web_order[estate_seller][email]=&api_key=3e86fde49f703c658dc4bcccc9627e85&signature=ced0e1b974e9b69ff8ab53d477b5daaeeca0cfb8e7dd606f9229d7e136218541&ts=1336734870&third_party_application_name=DNB%22%20for%20153.110.137.24%20at%202012-05-11%2010:14:32%20+0000[28967]:%20Started%20GET%20%22/orderings/third_parties/dnb?web_order[id]=6401012&web_order[broker][id]=mabj&web_order[broker][email]=magnus.bjork%40DNBei |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-order> | |
<id>1</id> | |
<customer-ref>customer_ref_1</customer-ref> | |
<web-order-type>residential</web-order-type> | |
<office> | |
<id>99</id> | |
<name>Asker eiendomsmegling</name> | |
</office> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://users.example.com"> | |
<env:Body> | |
<order> | |
<!-- | |
The total amount can be used to verify that | |
sums calculated by Thalamus and NAV are in sync | |
--> | |
<totalAmount>21.0</totalAmount> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Put this in spec/support/ | |
# Will use a sunspot stub session as default in all tests. | |
# | |
# To actually test the search you'll need something like: | |
# describe "something", sunspot: true do | |
# ...some tests... | |
# end | |
# | |
# If you do this in your spec helper: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car < MassiveRecord::ORM::Table | |
# Defines a column family "info" where two fields are stored. | |
# By default fields will be strings, but you can send in a type | |
# As a second option, for instance :integer, :boolean and so on. | |
# You can also set a default value, and say that a field can't be nil or not. | |
# For more information, see MassiveRecord's github page. | |
column_family :info do | |
field :brand | |
field :color | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# lib/devise/orm/massive_record.rb | |
# | |
# This adds support for Devise so Devise can define | |
# attributes in a MassiveRecord class. By default | |
# attributes will be persisted in column family | |
# "devise", but you can change by setting | |
# column_family_name_for_devise to something else. | |
# | |
module Devise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "digest/sha1" | |
module Devise | |
module Encryptors | |
# = Sha1 | |
# Uses the Sha1 hash algorithm to encrypt passwords. | |
class Sha1 < Base | |
# Gererates a default password digest based on stretches, salt, pepper and the | |
# incoming password. | |
def self.digest(password, stretches, salt, pepper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# CarrierWave Amazon S3 File Reprocessor Rake Task | |
# | |
# Written (specifically) for: | |
# - CarrierWave | |
# - Ruby on Rails 3 | |
# - Amazon S3 | |
# | |
# Works with: | |
# - Any server of which you have write-permissions in the Rails.root/tmp directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With Rspec 1.3.0: | |
it "should pass.. ;-)" do | |
mock_model(Object, :valid? => true).valid?.should == true | |
end | |
--> Passes | |
it "should pass.. ;-)" do | |
mock_model(Object, :valid? => true).should be_valid | |
end | |
--> Fails, with msg: undefined method `handling_predicate!' for #<Spec::Matchers::Be:0x7f2760f154f8 @args=[:be_valid]> |