ltree_hierarchy 0.0.7 → 0.0.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: c0585962140ffc7543e0575b23b594e45a6fa3fe
4
- data.tar.gz: a56c281183b6e21796066fa59e391a4d95b4f874
3
+ metadata.gz: 946448c6b809825223af23ae122c5bb09804eee6
4
+ data.tar.gz: ced0477c73a25355c32d47cb39586fba159f7053
5
5
  SHA512:
6
- metadata.gz: 550602c092d26f7655ffaf3f657496c44f75d5684263b80729a39a9a9de5030687bcaeab097f0ba7d2db0707bf5c66107de987ac92d338d6e6e154b2c0424b8a
7
- data.tar.gz: d18adbfe3ef8cca05cda4a4a9138dcec0f40522faee33f805ed17e0234d1cd44af55aff7ef1996b0492e41dac49d9b1fb8f09db82f0df6b32d33bdff5ac188cf
6
+ metadata.gz: 13951ae121ca678cde04bc7c8aa7b7907acc3e500d42f95f596073375fedf705062629536d008b73c2824e167fd7960af0c353e4536a017a387663bd6c462382
7
+ data.tar.gz: 6a7aaf0aafbc5329db9f98aeccb98ec9894205abc62035cd2b6ea11b4c6363198ddf68301f0522c418528b35fa489e1ed3c28232c831ce41efb619308d34f14d
@@ -1,3 +1,7 @@
1
+ ## 0.0.8
2
+
3
+ * fix spelling of `descendant` (deprecate `descendents` and `self_and_descendents` methods)
4
+
1
5
  ## 0.0.7
2
6
 
3
7
  * fix `#leaves` method
@@ -1,52 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ltree_hierarchy (0.0.6)
5
- activerecord (>= 3.1.0)
6
- pg
4
+ ltree_hierarchy (0.0.7)
5
+ activerecord (>= 3.1)
6
+ pg (~> 0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (4.2.1)
12
- activesupport (= 4.2.1)
13
- builder (~> 3.1)
14
- activerecord (4.2.1)
15
- activemodel (= 4.2.1)
16
- activesupport (= 4.2.1)
17
- arel (~> 6.0)
18
- activesupport (4.2.1)
19
- i18n (~> 0.7)
20
- json (~> 1.7, >= 1.7.7)
21
- minitest (~> 5.1)
22
- thread_safe (~> 0.3, >= 0.3.4)
23
- tzinfo (~> 1.1)
24
- arel (6.0.0)
25
- builder (3.2.2)
26
- coderay (1.1.0)
11
+ activemodel (3.2.21)
12
+ activesupport (= 3.2.21)
13
+ builder (~> 3.0.0)
14
+ activerecord (3.2.21)
15
+ activemodel (= 3.2.21)
16
+ activesupport (= 3.2.21)
17
+ arel (~> 3.0.2)
18
+ tzinfo (~> 0.3.29)
19
+ activesupport (3.2.21)
20
+ i18n (~> 0.6, >= 0.6.4)
21
+ multi_json (~> 1.0)
22
+ arel (3.0.3)
23
+ builder (3.0.4)
27
24
  i18n (0.7.0)
28
- json (1.8.2)
29
- method_source (0.8.2)
30
- minitest (5.6.1)
25
+ minitest (5.7.0)
26
+ multi_json (1.11.0)
31
27
  pg (0.18.2)
32
- pry (0.10.1)
33
- coderay (~> 1.1.0)
34
- method_source (~> 0.8.1)
35
- slop (~> 3.4)
36
- pry-nav (0.2.4)
37
- pry (>= 0.9.10, < 0.11.0)
38
28
  rake (10.4.2)
39
- slop (3.6.0)
40
- thread_safe (0.3.5)
41
- tzinfo (1.2.2)
42
- thread_safe (~> 0.1)
29
+ tzinfo (0.3.44)
43
30
 
44
31
  PLATFORMS
45
32
  ruby
46
33
 
47
34
  DEPENDENCIES
35
+ activerecord (~> 3.2)
48
36
  ltree_hierarchy!
49
- minitest
50
- pry
51
- pry-nav
52
- rake
37
+ minitest (>= 4.2)
38
+ rake (~> 10.4)
data/README.md CHANGED
@@ -75,8 +75,8 @@ Run migrations:
75
75
  - `#self_and_siblings`
76
76
  - `#children`
77
77
  - `#self_and_children`
78
- - `#descendents`
79
- - `#self_and_descendents`
78
+ - `#descendants`
79
+ - `#self_and_descendants`
80
80
  - `#leaves`
81
81
 
82
82
  ## TODO
@@ -173,13 +173,24 @@ module Ltree
173
173
  end
174
174
  alias :and_siblings :self_and_siblings
175
175
 
176
- def descendents
176
+ def descendants
177
177
  ltree_scope.where("#{ltree_path_column} <@ ? AND #{ltree_fragment_column} != ?", ltree_path, ltree_fragment)
178
178
  end
179
179
 
180
- def self_and_descendents
180
+ def descendents
181
+ warn 'This method has been deprecated. Use #descendants instead'
182
+ descendants
183
+ end
184
+
185
+ def self_and_descendants
181
186
  ltree_scope.where("#{ltree_path_column} <@ ?", ltree_path)
182
187
  end
188
+ alias :and_descendants :self_and_descendants
189
+
190
+ def self_and_descendents
191
+ warn 'This method has been deprecated. Use #self_and_descendants instead'
192
+ self_and_descendants
193
+ end
183
194
  alias :and_descendents :self_and_descendents
184
195
 
185
196
  def children
@@ -192,7 +203,7 @@ module Ltree
192
203
  alias :and_children :self_and_children
193
204
 
194
205
  def leaves
195
- descendents.leaves
206
+ descendants.leaves
196
207
  end
197
208
  end
198
209
  end
@@ -1,5 +1,5 @@
1
1
  module Ltree
2
2
  module Hierarchy
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ltree_hierarchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Worley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-29 00:00:00.000000000 Z
12
+ date: 2015-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg
@@ -86,6 +86,7 @@ files:
86
86
  - lib/ltree_hierarchy.rb
87
87
  - lib/ltree_hierarchy/hierarchy.rb
88
88
  - lib/ltree_hierarchy/version.rb
89
+ - ltree_hierarchy-0.0.7.gem
89
90
  - ltree_hierarchy.gemspec
90
91
  homepage: https://github.com/Leadformance/ltree_hierarchy
91
92
  licenses:
@@ -112,3 +113,4 @@ signing_key:
112
113
  specification_version: 4
113
114
  summary: Organize ActiveRecord models into a tree using PostgreSQL's ltree datatype
114
115
  test_files: []
116
+ has_rdoc: