dir_model 0.6.0 → 0.6.1

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: 4bd12bf7d01c2bad2a2523951ab4ab1c568e0e02
4
- data.tar.gz: fc427c58ec981822cb6cbb2094133d565ca11d89
3
+ metadata.gz: 8b3a8d350b4d8004603f0dc60aafcea63d16d093
4
+ data.tar.gz: 829174e25f6ca9217891cb4e50316f7aaf95ba40
5
5
  SHA512:
6
- metadata.gz: 16742b98db89c722a6781663280852b7c37a5fb957c9d8ce586b88b0ee910463919c6c487ce3fa32fd2a8913b248b3fb57487df2696352a6edc8781b840b2894
7
- data.tar.gz: 4404f164ed161c2629abc6ebf18e51ca3790c02f85732a379161bb23b09ec0e7e211935a4a0364f6131a6d723f3282b3736a38e281600aab5cb977bb017c42cd
6
+ metadata.gz: 44cef5e36645bf8a328e24cff4bb64e89fe99150f998264d34b877b8e7bfa7706c66fec48d820bf2eaa7f2194561c0e9eb21c5a0ffd11ead8d66821ca94c3528
7
+ data.tar.gz: 32dfd96f5ea816d1f3eea320e74fa9903383bd580db28b6a55c85a099a525cbad5743d5c4a228ded24a518c093dffd88534c8355cc9c428ae38ad0bf2b185389
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### VERSION 0.6.1
2
+
3
+ * escape special characters on foreign key values. Due of this relations weren't be found.
4
+
1
5
  ### VERSION 0.6.0
2
6
 
3
7
  * Fix relations
@@ -44,11 +44,11 @@ module DirModel
44
44
  set_end unless current_path
45
45
  current_path
46
46
  end
47
-
47
+
48
48
  def set_position(index)
49
49
  @index = index
50
50
  end
51
-
51
+
52
52
  def rewind
53
53
  set_position(-1)
54
54
  end
@@ -56,7 +56,7 @@ module DirModel
56
56
  protected
57
57
 
58
58
  def ruby_path
59
- @ruby_path ||= ::Dir.glob("#{path}/**/*")
59
+ @ruby_path ||= ::Dir.glob("#{path}/**/*").sort
60
60
  end
61
61
 
62
62
  def set_end
@@ -85,7 +85,7 @@ module DirModel
85
85
 
86
86
  def get_regexp
87
87
  if foreign_value
88
- Regexp.new(self.class.options[:regex].call(foreign_value), Regexp::IGNORECASE)
88
+ Regexp.new(self.class.options[:regex].call(Regexp.quote(foreign_value)), Regexp::IGNORECASE)
89
89
  else
90
90
  self.class.options[:regex].call
91
91
  end
@@ -1,3 +1,3 @@
1
1
  module DirModel
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dir_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Chung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-10 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport