miasma-local 0.1.6 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e28c940ec6f1ad866a968999e8e9742e65f11308
4
- data.tar.gz: 4aec1e385ed0b4f67a2d8ff132e87a103bc2b71f
3
+ metadata.gz: b939851dd9045658e4abeaa8356056042a22cb2d
4
+ data.tar.gz: d045f895e629fff44ad6aaba980e30d86dc9a82d
5
5
  SHA512:
6
- metadata.gz: acc147426ac14e17dda5327265ca994d869c794cbc8457c3d827c0de2a960ff2d9a72a6da9f6af6c1c98c8009cb8e8fde5db734d845234bd82a780646159e7b1
7
- data.tar.gz: 7180c2ab0f29e2455b2a448ed9d0cdc530115606e4f8ee1c1eb12f630989cd25c5f18a56dc6da7232e3bced6b708963bcb8068d2efb4e694de2cf7b7993a5a98
6
+ metadata.gz: 9658f4f3ff2b34e5a697ca606d7db25e51b61b5b812be431c9f7c4f32e616b12015dd6d72c7b03c39e06621a3d5c99f9c88372e3f493ba1a9d1336ee34633fd3
7
+ data.tar.gz: be2950b549e5ab0061e9fdc3e27d686c07bc8ff28fa69e36926fc2bee7a1be772b48c386b7435cfc1b95e971518bfdeaed07e384c3e8988799c158f9276c0322
@@ -1,3 +1,6 @@
1
+ ## v0.1.8
2
+ * Fix prefix filtering on bucket files
3
+
1
4
  ## v0.1.6
2
5
  * Always escape paths when dealing with local system
3
6
 
@@ -1,4 +1,4 @@
1
1
  module MiasmaLocal
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.6')
3
+ VERSION = Gem::Version.new('0.1.8')
4
4
  end
@@ -1,4 +1,5 @@
1
1
  require 'miasma'
2
+ require 'miasma/contrib/local'
2
3
  require 'fileutils'
3
4
  require 'tempfile'
4
5
  require 'mime-types'
@@ -83,7 +84,7 @@ module Miasma
83
84
  # @param args [Hash] filter options
84
85
  # @return [Array<Models::Storage::File>]
85
86
  def file_filter(bucket, args)
86
- Dir.glob(::File.join(full_path(bucket), uri_escape(args[:prefix]), '*')).map do |item|
87
+ Dir.glob(::File.join(full_path(bucket), "#{uri_escape(args[:prefix])}*")).map do |item|
87
88
  if(::File.file?(item) && !item.start_with?('.'))
88
89
  item_name = item.sub("#{full_path(bucket)}/", '')
89
90
  item_name = uri_unescape(item_name)
@@ -91,8 +92,8 @@ module Miasma
91
92
  bucket,
92
93
  :id => ::File.join(bucket.name, item_name),
93
94
  :name => item_name,
94
- :updated => File.mtime(item),
95
- :size => File.size(item)
95
+ :updated => ::File.mtime(item),
96
+ :size => ::File.size(item)
96
97
  ).valid_state
97
98
  end
98
99
  end.compact
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miasma-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-21 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: miasma
@@ -147,4 +147,3 @@ signing_key:
147
147
  specification_version: 4
148
148
  summary: Smoggy local API
149
149
  test_files: []
150
- has_rdoc: