Skip to content

Commit

Permalink
fix broken assets_copy command
Browse files Browse the repository at this point in the history
  • Loading branch information
machu committed Jan 9, 2015
1 parent 152ce00 commit 751dd63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/tdiary/application/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module TDiary
class Application
class Configuration
attr_accessor :assets_paths, :assets_precompile, :plugin_paths, :path, :builder_procs, :authenticate_proc
attr_accessor :assets_precompile, :plugin_paths, :path, :builder_procs, :authenticate_proc

def initialize
# if you need to auto compilation for CoffeeScript
Expand All @@ -23,6 +23,12 @@ def builder(&block)
def authenticate(middleware, *params, &block)
@authenticate_proc = proc { use middleware, *params, &block }
end

def assets_paths
TDiary::Extensions::constants.map {|extension|
TDiary::Extensions::const_get( extension ).assets_path
}.flatten.uniq.each

This comment has been minimized.

Copy link
@kou

kou Jan 13, 2015

Contributor

eachが余計じゃないかなぁと思いました。

This comment has been minimized.

Copy link
@machu

machu Jan 13, 2015

Author Member

ありがとうございます。修正しました! 865ca93

end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tdiary/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def update

desc "assets_copy", "copy assets files"
def assets_copy
require 'tdiary/environment'
require 'tdiary'
assets_path = File.join(TDiary.server_root, 'public/assets')
TDiary::Application.config.assets_paths.each do |path|
Dir.glob(File.join(path, '*')).each do |entity|
Expand Down

0 comments on commit 751dd63

Please sign in to comment.