Do not raise NotImplementedError if changed file is not in local_assets_...

If there are changed files excluded via the ignore_files setting the watch method is raising a NotImplementedError. In my opinion this is a bug so i changed the if clause to better behave in such cases. If you confirm this as a bug and not a feature i would be happy if you will merge this.
Yes it was a quick hack to understand and debug. I totally prefer to fail
early.

On 26.06.2014, at 21:42, Christopher Saunders <notifications@github.com>
wrote:

In lib/shopify_theme/cli.rb:

> @@ -126,14 +126,18 @@ def watch
>        puts "Watching current folder: #{Dir.pwd}"
>        watcher do |filename, event|
>          filename = filename.gsub("#{Dir.pwd}/", '')
> -        action = if local_assets_list.include?(filename) && [:changed, :new].include?(event)
> -                   :send_asset
> -                 elsif event == :delete
> -                   :delete_asset
> -                 else
> -                   raise NotImplementedError, "Unknown event -- #{event}"
> -                 end
> -        send(action, filename, options['quiet'])
> +
> +        if local_assets_list.include?(filename)

what if we were to simply next unless local_assets_list.include?(filename)

That way we can reduce the amount of indentation that's kinda noisy. I
*think* that should keep the functionality we want, right?

—
Reply to this email directly or view it on GitHub
<https://github.com/Shopify/shopify_theme/pull/107/files#r14262044>.