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
dovecot unix - n n - - pipe | |
flags=DRhu | |
user=vmail:vmail | |
argv=/usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -d $(recipient) |
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: User signs in successfully # features/users/sign_in.feature:22 | |
Given I am not logged in # features/step_definitions/user_steps.rb:32 | |
And I am a user with username "testuser", email "[email protected]" and password "password" # features/step_definitions/user_steps.rb:5 | |
When I go to the sign in page # features/step_definitions/web_steps.rb:48 | |
And I sign in as "testuser/password" # features/step_definitions/user_steps.rb:16 | |
Then I should see "Erfolgreich angemeldet." # features/step_definitions/web_steps.rb:105 | |
expected there to be content "Erfolgreich angemeldet." in "Falscher Benutzername oder falsches Passwort.\n\n\nAnmeldung\n\n\nBenutzername:\n\n\nPasswort:\n\n\nAngemeldet b |
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
Feature: User authentication | |
Szenario: Existing user logs in | |
Given the user is on the login page | |
When the user enters her credentials | |
And clicks on "Login" | |
Then the user is redirected to the "Activities" page |
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
# encoding: UTF-8 | |
Gegebensei /^ein bestehender Benutzer$/ do | |
@user = Factory(:user) | |
end | |
Wenn /^ich mich mit meinen Zugangsdaten anmelde$/ do | |
visit '/users/sign_in' | |
fill_in 'Benutzername', :with => @user.username | |
fill_in 'Passwort', :with => 'password' |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
class Datespan < ActiveRecord::Base | |
include Enumerable | |
attr_accessor :results | |
def initialize(start_date, end_date, user) | |
build_results(start_date, end_date, user) | |
end | |
def each(&block) |
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
funktion sollstunden { | |
mitarbeiter.sollstunden_pro_woche / 5 | |
} | |
funktion berechne_dauer(tätigkeit) { | |
if tätigkeit.dauer { | |
tätigkeit.dauer | |
} else { | |
tätigkeit.end_datum - tätigkeit.start_datum | |
} |
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
funktion sollstunden_pro_tag { | |
mitarbeiter.sollstunden_pro_woche / 5 | |
} | |
funktion berechne_dauer(tätigkeit, datum_oder_beginn = nüscht, ende = nüscht) { | |
if tätigkeit.dauer { | |
tätigkeit.dauer; | |
} else { | |
if ende { | |
tätigkeit.dauer_für_zeitraum(datum_oder_beginn, ende); |
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
class Activity < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :category, :foreign_key => :activity_type_id | |
SIMPLE_DURATION_CATEGORIES = %w{ | |
project_hour | |
nppitem_hour | |
nonclearable_hour | |
overtime_reduction | |
office_work |
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
# activity.rb | |
def full_duration | |
return (duration_in_minutes.to_f / 60).round(1) | |
end | |
# activity_spec.rb | |
describe "full_duration()" do | |
context "when duration_in_minutes is saved in the database" do |