formie 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/formie/version.rb +1 -1
  3. data/lib/formie.rb +11 -12
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19f0dec9cee5de2b1c0654913d3da82378c588a5
4
- data.tar.gz: 96de732431ce49bf61e387c86ad9608406ade802
3
+ metadata.gz: 0f2bbada69ef9d3396fcabe50441944dc42deb84
4
+ data.tar.gz: bd1d7e8eebdb2a648ba5b5fc8c42892cd98f2bd1
5
5
  SHA512:
6
- metadata.gz: df6998aaf416df4f4956bb3097868f7eb684ad236a554d1d1cf96d89a724f9722a88df09b1ef36a7728a61703342bde2d311dad070890b4ae19a0170408d5cea
7
- data.tar.gz: 16e860161a51802f6b44a58cf0ccf47713992dd2ef9de2461f2b5830ce48ced73607c28b56481d7c485a38242e61397977e2abc443516816c1c075888b7c3dcb
6
+ metadata.gz: a05e70983381fa0ef92c43d1241f7c2881f4c67bdd580d1a754a91be35cfe6deb857062d69f2b5e1b381931453c8ceb89fa17c7a94c3c47c1d3db2f4a096b150
7
+ data.tar.gz: 779eb7a8968e79f4da48577576c65357540f5b895913c5d7550d198edbdc3f827a13c035229eba44c670776db2d4c415b444404bf82cef7fe6d452a2efaaf6e9
@@ -1,3 +1,3 @@
1
1
  module Formie
2
- VERSION = '0.9.3'
2
+ VERSION = '0.9.4'
3
3
  end
data/lib/formie.rb CHANGED
@@ -33,20 +33,19 @@ module Formie
33
33
 
34
34
  private
35
35
  def self.load_formies(where, dir)
36
- dir = "#{::Rails.root.to_s}/#{dir}"
36
+ # avoid Dir.chdir (not thread safe)
37
+ dir = File.join Rails.root, dir
37
38
  return unless File.exist?(dir)
38
- Dir.chdir(dir) {|current_dir|
39
- hsh = {}
40
- Dir.glob('**/**').sort.each { |path|
41
- base = File.basename(path).split('.').first
42
- hsh[base] = path unless hsh[base]
43
- }
44
- hsh.each { |name, path|
45
- next if File.new(path).mtime < @last_update
39
+ hsh = {}
40
+ Dir.glob(File.join(dir,'**','**')).sort.each { |path|
41
+ base = File.basename(path).split('.').first
42
+ hsh[base] = path unless hsh[base]
43
+ }
44
+ hsh.each { |name, path|
45
+ next if File.new(path).mtime < @last_update
46
46
 
47
- x = File.expand_path(File.dirname(path))
48
- where.define_formie name, File.join(x, name)
49
- }
47
+ x = File.expand_path(File.dirname(path))
48
+ where.define_formie name, File.join(x, name)
50
49
  }
51
50
  end
52
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails