Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
whitespace corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Ern-st committed Nov 27, 2017
1 parent 1cbde61 commit 6fdbfb3
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions _plugins/meetupFetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

module MeetupFetcher
class Generator < Jekyll::Generator
def convertDate(date, offset)
dateWithOffset = date + offset
convertedDate = "#{DateTime.strptime(dateWithOffset.to_s,'%Q').strftime('%Y-%m-%d %H:%M:%S')} #{@@timezone}"
return convertedDate
end
def convertDate(date, offset)
dateWithOffset = date + offset
convertedDate = "#{DateTime.strptime(dateWithOffset.to_s,'%Q').strftime('%Y-%m-%d %H:%M:%S')} #{@@timezone}"
return convertedDate
end

def getMeetUpGroupEvents(group)
maxRetryTimeout = 50
def getMeetUpGroupEvents(group)
maxRetryTimeout = 50
initialRetries = 5
begin
retries ||= initialRetries
Expand All @@ -26,10 +26,10 @@ def getMeetUpGroupEvents(group)
raise
end
end
end
end

def generateEventDocument(event)
doc = Jekyll::Document.new('', :site => @site, :collection => @collection)
def generateEventDocument(event)
doc = Jekyll::Document.new('', :site => @site, :collection => @collection)
doc.data['title'] = event['name']
doc.data['dateStart'] = convertDate(event['time'],event['utc_offset'])
if event['duration']
Expand All @@ -43,11 +43,11 @@ def generateEventDocument(event)
doc.data['category'] = event['group']['name'].downcase.gsub(/\s+|[():]/, "")
doc.data['excerpt'] = event['description']
return doc
end
end

def generate(site)
@site = site
@collection = @site.collections["events"]
def generate(site)
@site = site
@collection = @site.collections["events"]

MeetupClient.configure do |config|
keyPath = "#{@site.source}/meetup_api_key"
Expand All @@ -65,8 +65,8 @@ def generate(site)
@collection.docs << doc
end
end
end
@@timezone = Jekyll.configuration({})['timezone']
@@meetup_groups = Jekyll.configuration({})['meetup_groups']
end
@@timezone = Jekyll.configuration({})['timezone']
@@meetup_groups = Jekyll.configuration({})['meetup_groups']
end
end

0 comments on commit 6fdbfb3

Please sign in to comment.