This file contains hidden or 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
| # Scenario: Creating a product | |
| # Given I am logged in with role "admin" | |
| # When I follow "Admin-Panel" | |
| # And I follow "new product" | |
| # Then I should see "Please enter the new product data" | |
| Given /^I am logged in with role "([^"]*)"$/ do |role| | |
| Factory.create(:user, name: "root") | |
| log_in "root" | |
| end |
This file contains hidden or 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
| LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.14/ext/apache2/mod_passenger.so | |
| PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.14 | |
| PassengerRuby /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
| PassengerDefaultUser nobbz_de | |
| RailsEnv production |
This file contains hidden or 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
| get :index do | |
| @a = "ä" | |
| render "index" | |
| end | |
This file contains hidden or 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 "yaml" | |
| class DvFa < Padrino::Application | |
| register ScssInitializer | |
| use ActiveRecord::ConnectionAdapters::ConnectionManagement | |
| register Padrino::Rendering | |
| register Padrino::Mailer | |
| register Padrino::Helpers | |
| enable :sessions |
This file contains hidden or 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
| -cache "userbox_for_#{current_user.name}", :expires_in => 300 | |
| %img{:src => current_user.avatar, :class => "avatar"} | |
| =self.current_user.name |
This file contains hidden or 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 'nokogiri' | |
| require 'open-uri' | |
| def User < ActiveRecord::Base | |
| def update_user | |
| xml = Nokogiri::XML(open("http://example.com/api/#{pkey}/#{ukey}")) | |
| self.name = xml.xpath('hordes/headers/owner/citizen').first['name'] | |
| self.avatar = xml.xpath('hordes/headers/owner/citizen').first['avatar'] | |
| self.last_update = Time.now |
This file contains hidden or 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
| protected override void LoadContent () | |
| { | |
| spriteBatch = new SpriteBatch (GraphicsDevice); | |