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 DiscourseSsoController < ApplicationController | |
def login | |
sso = DiscourseUtils::SingleSignOn.parse( request.query_string ) | |
sso.external_id = current_user.id | |
sso.username = current_user.login | |
sso.name = current_user.display_name | |
sso.email = current_user.email | |
redirect_to( sso.to_url ) | |
end | |
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
class DiscourseSsoController < ApplicationController | |
def login | |
sso = DiscourseUtils::SingleSignOn.parse( request.query_string ) | |
sso.external_id = current_user.id | |
sso.username = current_user.login | |
sso.name = current_user.display_name | |
sso.email = current_user.email | |
# NEW CONTENT | |
sso.shop_name = current_user.get_shop_name | |
sso.shop_url = current_user.get_shop_url |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Todos</title> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
{{outlet}} |
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
Todos.TodoElementView = Ember.View.extend( { | |
templateView : 'todo-element', | |
tagName : 'li' | |
} ); | |
Ember.Handlebars.helper( 'todo-element', Todos.TodoElementView ); |
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
files: | |
"/tmp/00-elastic-beanstalk.conf": | |
mode: "000644", | |
owner: root, | |
group: root, | |
content: | | |
upstream my_app { | |
server unix:///var/run/puma/my_app.sock; | |
} | |
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 HaveXpathContaining < Struct.new( :xpath, :contents ) | |
def matches?( page ) | |
if self.contents.blank? | |
page.has_xpath?( self.xpath + "[not( text() )]" ) || page.has_xpath?( self.xpath + "[string-length( normalize-space( . ) ) = 0]" ) | |
else | |
page.has_xpath?( self.xpath + "[contains( ., '#{ self.contents }' )]" ) | |
end | |
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
describe 'application flow' | |
before_each | |
$page = $( fixture( "jqt.html" ) ) | |
end | |
it 'should start on the login page' | |
$page.find( "#login" ).should.have_class "current" | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Penny</title> | |
</head> | |
<body> | |
<form accept-charset='utf-8' action='/session.json' class='current' id='login' method='post'> | |
<div class='toolbar'> | |
<h1>Login</h1> |
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 'application flow' | |
before_each | |
$page = $( fixture( "jqt" ) ) | |
end | |
it 'should start on the login page' | |
$page.find( "#login" ).should.have_class( "current" ) | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8' /> | |
<title>Penny</title> | |
</head> | |
<body id="body"> | |
<form accept-charset='utf-8' action='/session.json' class='current' id='login' method='post'> | |
<div class='toolbar' id='login-c'> |
OlderNewer