kuzushi 0.0.32 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/kuzushi.rb +4 -9
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.32
1
+ 0.0.33
data/lib/kuzushi.rb CHANGED
@@ -300,18 +300,13 @@ class Kuzushi
300
300
  fetch("/files/#{f.source || File.basename(f.file)}", &blk) unless f.template
301
301
  end
302
302
 
303
+ ### this needs to be brought up to date - way last version - no need to read and filter...
303
304
  def fetch(file, filter = lambda { |d| d }, &block)
304
- names = config_names.clone
305
305
  begin
306
- ## its important that we try each name for the script - allows for polymorphic scripts
307
306
  block.call("/tmp/kuzushi/#{@name}/#{file}")
308
- # tmpfile(filter.call(http_get("#{@base_url}/#{names.first}#{file}")), file) do |tmp|
309
- # block.call(tmp)
310
- # end
311
- rescue RestClient::ResourceNotFound
312
- names.shift
313
- retry unless names.empty?
314
- error("file not found: #{file}")
307
+ tmpfile(filter.call(File.read("/tmp/kuzushi/#{name}/#{file}")), file) do |tmp|
308
+ block.call(tmp)
309
+ end
315
310
  rescue Object => e
316
311
  error("error fetching file: #{names.first}/#{file} : #{e.message}")
317
312
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 32
9
- version: 0.0.32
8
+ - 33
9
+ version: 0.0.33
10
10
  platform: ruby
11
11
  authors:
12
12
  - Orion Henry