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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
filter: 'all', | |
init: function () { | |
this._super(); | |
Ember.run.schedule("afterRender",this,function() { | |
this.updateSortable(); |
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
<samlp:AuthnRequest AssertionConsumerServiceURL="http://ruby-saml-example.herokuapp.com/saml/consume" | |
Destination="https://ec2-54-235-224-165.compute-1.amazonaws.com:9443/samlsso" | |
ID="_2D729750-3EB6-43A4-8416-938C7114D8C6" | |
IssueInstant="2013-03-12T16:25:08" | |
Version="2.0" | |
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"> | |
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> | |
ruby-saml-example.herokuapp.com | |
</saml:Issuer> | |
</samlp:AuthnRequest> |
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 String | |
# This method will return an array of MatchData's rather than the | |
# array of strings returned by the vanilla `scan`. | |
def match_all(regex) | |
match_str = self | |
[].tap do |match_datas| | |
while md = match_str.match(regex) | |
match_datas << md | |
match_str = md.post_match |
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
window.app = format: {} | |
app.format.DollarizesCents = -> | |
dollarize: (pennies) -> | |
amount = (pennies / 100.0).toFixed(2) | |
[dollars, cents] = amount.toString().split(".") | |
"$#{@commasFor(dollars)}.#{cents}" | |
#private | |
commasFor: (dollars) -> |
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
describe MyCustomerAdapter do | |
should_support_adapter_interface :create | |
should_support_adapter_interface :delete | |
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
# When I run the specs above, the following error occurs: | |
$ script/spec -c spec/controllers/strange_name_error.rb | |
./spec/controllers/strange_name_error.rb:15: undefined local variable or method `properties_url' for #<Class:0x22b918c> (NameError) | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:68:in `module_eval' | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:68:in `create_nested_example_group' | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/extensions/class.rb:14:in `instance_eval' | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/extensions/class.rb:14:in `subclass' | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:66:in `create_nested_example_group' | |
from /Users/nick/src/housing-rentals/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:53:in `describe' |