Skip to content

Commit

Permalink
Fixing the issue I created in awestruct#83
Browse files Browse the repository at this point in the history
Added the new parameter at the front instead of the end. Not sure what I
was thinking.
  • Loading branch information
LightGuard committed Nov 5, 2013
1 parent e3f694d commit 37c2f14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helpers/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def clone_repo
end
end

def all_files(dir = '', allows = [])
def all_files(allows = [], dir = '')
@logger.info "Finding all files, additional allows #{allows}"
default_allows = [%r!(.ad)|(.adoc)|(.adoc)|(.jpg)|(.jpeg)|(.png)|(.gif)!]
default_allows << allows.join unless allows.empty?
Expand Down
2 changes: 1 addition & 1 deletion public_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class PublicApp < Sinatra::Base

get '/repo/:repo_name/images' do |repo_name|
repo = create_repo(repo_name)
files = repo.all_files('images')
files = repo.all_files([], 'images')

json_return = {}
files.each do |f|
Expand Down

0 comments on commit 37c2f14

Please sign in to comment.