Permalink
Browse files

DELETE EVERYTHING

  • Loading branch information...
1 parent 0df6d22 commit e44174659ed5c0f74dded0f2ac1ec96a285dab71 @moonglum moonglum committed Oct 28, 2012
View
@@ -108,17 +108,11 @@ group :development do
# gem 'terminal-notifier'
end
- # YARD:
- gem 'yard', '~> 0.8.2.1'
- gem 'rdiscount', '~> 1.6.8'
-
# guard
gem 'guard', '~> 1.3.0'
gem 'guard-test', '~> 0.5.0'
- gem 'guard-livereload', '~> 1.0.0'
gem 'guard-pow', '~> 1.0.0'
gem 'guard-bundler', '~> 1.0.0'
- gem 'guard-yard', '~> 2.0.0'
end
group :test do
View
@@ -53,7 +53,6 @@ GEM
multi_json (~> 1.0)
acts-as-taggable-on (2.3.3)
rails (~> 3.0)
- addressable (2.3.2)
arbre (1.0.1)
activesupport (>= 3.0.0)
arel (3.0.2)
@@ -85,11 +84,7 @@ GEM
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
- em-websocket (0.3.8)
- addressable (>= 2.1.1)
- eventmachine (>= 0.12.9)
erubis (2.7.0)
- eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.6.1)
@@ -114,18 +109,11 @@ GEM
guard-bundler (1.0.0)
bundler (~> 1.0)
guard (~> 1.1)
- guard-livereload (1.0.0)
- em-websocket (>= 0.2.0)
- guard (>= 1.1.0)
- multi_json (~> 1.0)
guard-pow (1.0.0)
guard (>= 1.1)
guard-test (0.5.0)
guard (>= 1.1.0)
test-unit (~> 2.2)
- guard-yard (2.0.0)
- guard (>= 1.1.0)
- yard (>= 0.7.0)
haml (3.1.7)
has_scope (0.5.1)
hashie (1.2.0)
@@ -239,7 +227,6 @@ GEM
open4 (~> 1.0)
rake (~> 0.8)
rb-fsevent (0.9.1)
- rdiscount (1.6.8)
rdoc (3.12)
json (~> 1.4)
redcarpet (2.1.1)
@@ -289,7 +276,6 @@ GEM
vlad (>= 2.1.0)
warden (1.2.1)
rack (>= 1.0)
- yard (0.8.2.1)
zero-clipboard-rails (1.0.1)
railties (~> 3.0)
thor (~> 0.14)
@@ -318,10 +304,8 @@ DEPENDENCIES
growl (~> 1.0.3)
guard (~> 1.3.0)
guard-bundler (~> 1.0.0)
- guard-livereload (~> 1.0.0)
guard-pow (~> 1.0.0)
guard-test (~> 0.5.0)
- guard-yard (~> 2.0.0)
haml (~> 3.1.4)
html_truncator (~> 0.3.0)
ice_cube (~> 0.8.0)
@@ -343,7 +327,6 @@ DEPENDENCIES
rails (~> 3.2.8)
rake (~> 0.9)
rb-fsevent (~> 0.9.0pre4)
- rdiscount (~> 1.6.8)
redcarpet (~> 2.1.0)
ri_cal (~> 0.8.8)
sass-rails (~> 3.2.3)
@@ -356,5 +339,4 @@ DEPENDENCIES
uglifier (~> 1.2.0)
vlad (~> 2.2.3)
vlad-git (~> 2.2.0)
- yard (~> 0.8.2.1)
zero-clipboard-rails (~> 1.0.1)
View
@@ -1,11 +1,3 @@
-guard 'livereload' do
- watch(%r{app/assets/.+\.(scss|css|js)})
- watch(%r{app/.+\.(erb|haml)})
- watch(%r{app/helpers/.+\.rb})
- watch(%r{public/.+\.(css|js|html)})
- watch(%r{config/locales/.+\.yml})
-end
-
guard 'pow' do
watch('.powrc')
watch('.powenv')
@@ -22,12 +14,6 @@ guard 'bundler' do
watch('Gemfile')
end
-guard 'yard' do
- watch(%r{app/.+\.rb})
- watch(%r{lib/.+\.rb})
- watch(%r{ext/.+\.c})
-end
-
guard 'test', drb: false do
watch(%r{lib/(.*)\.rb}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{test/.*_test\.rb})
@@ -14,80 +14,9 @@ def show
respond_with @event
end
- def new
- @event = Event.new
- authorize! :new, @event
- respond_with @event
- end
-
- def edit
- @event = Event.find params[:id]
- authorize! :edit, @event
- respond_with @event
- end
-
- def create
- @event = Event.new filtered_params(params[:event])
- @event.start_time = determine_start_time_for_event params[:event]
- authorize! :create, @event
-
- if @event.save
- flash[:notice] = t "events.create.confirmation"
- end
-
- respond_with @event
- end
-
- def update
- @event = Event.find params[:id]
- @event.start_time = determine_start_time_for_event params[:event]
- authorize! :update, @event
-
- if @event.update_attributes filtered_params(params[:event])
- expire_fragment "event_occurences_#{@event.id}"
- flash[:notice] = t "events.update.confirmation"
- end
-
- respond_with @event
- end
-
- def destroy
- @event = Event.find params[:id]
- authorize! :destroy, @event
-
- if @event.destroy
- flash[:notice] = t "events.destroy.confirmation"
- end
-
- respond_with @product, location: root_path
- end
-
def history
authorize! :history, SingleEvent
@events = SingleEvent.where("occurrence < ?", Time.now.at_beginning_of_day)
respond_with @events
end
-
-
- private
-
- def determine_start_time_for_event(event)
- if event["start_time(1i)"]
- start_time = Time.new event["start_time(1i)"].to_i,
- event["start_time(2i)"].to_i,
- event["start_time(3i)"].to_i,
- event["start_time(4i)"].to_i,
- event["start_time(5i)"].to_i
- end
-
- start_time || Time.now
- end
-
- def filtered_params(params)
- params.except "start_time(1i)",
- "start_time(2i)",
- "start_time(3i)",
- "start_time(4i)",
- "start_time(5i)"
- end
end
@@ -1,24 +0,0 @@
-# encoding: utf-8
-
-require 'datetime_parser'
-
-class Schedule::ExdatesController < ApplicationController
- include ::DatetimeParser
-
- def destroy
- @event = Event.find(params[:event_id])
- authorize! :destroy, @event
-
- exdate = @event.schedule.extimes[params[:id].to_i]
- @event.schedule.remove_exception_time(exdate)
-
- if !@event.save
- redirect_to event_path(@event),
- alert: 'Datum konnte nicht entfernt werden.'
- else
- redirect_to event_path(@event),
- notice: 'Datum entfernt.'
- end
- end
-
-end
@@ -1,37 +0,0 @@
-# encoding: utf-8
-
-class Schedule::RulesController < ApplicationController
-
- def create
- @event = Event.find(params[:event_id])
- authorize! :update, @event
-
- day_of_week = params[:day_of_week].to_i
- week_number = params[:week_number].to_i
- rule = IceCube::Rule.monthly.day_of_week({
- Date::DAYNAMES[day_of_week].downcase.to_sym => [week_number]
- })
- @event.schedule.add_recurrence_rule rule
-
- if !@event.save
- redirect_to(@event, alert: 'Datum konnte nicht hinzugefügt werden.')
- else
- redirect_to(@event, notice: 'Datum hinzugefügt.')
- end
- end
-
- def destroy
- @event = Event.find(params[:event_id])
- authorize! :destroy, @event
-
- rule = @event.schedule.rrules[params[:id].to_i]
- @event.schedule.remove_recurrence_rule(rule)
-
- if !@event.save
- redirect_to(@event, alert: 'Datum konnte nicht entfernt werden.')
- else
- redirect_to(@event, notice: 'Datum entfernt.')
- end
- end
-
-end
@@ -3,62 +3,11 @@
class SingleEventsController < ApplicationController
respond_to :html, :xml
- def new
- @event = Event.find params[:event_id]
- @single_event = @event.single_events.new based_on_rule: false
- @single_event.occurrence = 2.days.from_now.beginning_of_day + 20.hours
- authorize! :new, @single_event
- respond_with @single_event
- end
-
- def create
- @event = Event.find params[:event_id]
- @single_event = @event.single_events.create params[:single_event]
- authorize! :create, @single_event
-
- if @event.save
- flash[:notice] = t "single_events.create.confirmation"
- end
-
- respond_with @single_event, location: @event
- end
-
def show
@advertisement = Advertisement.first
@single_event = SingleEvent.find params[:id]
opengraph_data @single_event.to_opengraph
@event = @single_event.event
respond_with @single_event
end
-
- def edit
- @event = Event.find params[:event_id]
- @single_event = SingleEvent.find params[:id]
- authorize! :edit, @single_event
- respond_with @single_event
- end
-
- def update
- @single_event = SingleEvent.find params[:id]
- authorize! :update, @single_event
- @single_event.update_attributes params[:single_event]
-
- if @single_event.save
- flash[:notice] = t "single_events.update.confirmation"
- end
-
- respond_with @single_event,
- location: event_single_event_path(@single_event.event, @single_event)
- end
-
- def destroy
- @single_event = SingleEvent.find params[:id]
- authorize! :destroy, @single_event
-
- if @single_event.destroy
- flash[:notice] = t "single_events.destroy.confirmation"
- end
-
- respond_with @single_event, location: @single_event.event
- end
end
View
@@ -7,8 +7,6 @@ def initialize(user)
end
if user.present?
- can [:create, :update], Event
- can [:create, :update], SingleEvent
can [:create, :update, :destroy], Comment, user_id: user.id
end
@@ -1,7 +0,0 @@
-%h1 Event bearbeiten
-
-= render 'form', event: @event
-
-= link_to 'Anzeigen', @event
-|
-= link_to 'Zurück', root_path
@@ -1,17 +0,0 @@
-%h1 Neuer Event
-
-.event_hinweis
- :markdown
- Damit hcking.de den Focus auf Nerd-Events nicht verliert, müssen die Events in eine
- der folgenden Kategorieen fallen:
-
- * Programmieren (in jedweder Sprache)
- * Nerd-Kultur (z.B. Star Wars, Ponies, Gaming, Comics, ...)
- * Software Development Methoden und Software Engineering
- * Elektronik und Robotik
- * Networking
-
-= render 'form', event: @event
-
-= link_to 'Zurück', root_path
-
@@ -1,4 +0,0 @@
-%h1 Diesen Termin bearbeiten
-
-= render 'form', event: @event, single_event: @single_event
-
@@ -1,3 +0,0 @@
-%h1 Neuen Termin anlegen
-
-= render 'form', event: @event, single_event: @single_event
Oops, something went wrong.

0 comments on commit e441746

Please sign in to comment.