xylem 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a66a285e5aacfa913b065f184b825218e6cfa07d
4
- data.tar.gz: 7edc791c60d6c1638c460c2975a125ac746af45a
3
+ metadata.gz: 839e6abfb93c9430c6fc0a977b55bd48d5e70ad6
4
+ data.tar.gz: 1c1f61879fa556be5a6ad0a2685d213b23d8975a
5
5
  SHA512:
6
- metadata.gz: cddec6fbfc58582508343ba1b1fd5b32ff22ca67468df10a4491e9a1eb78b9f527b80429777f0144a452305b43e86bb417b4a381cb80f17c50c3ef98fd487d77
7
- data.tar.gz: dd325095109b73ec7e9ae6a0db5abd5ecf6d5344483a6703c363bc1286ce350ea62de865e94d6040020eaab6e424ba444c5946ff0db4f53b0ba7c6faac4ef4b5
6
+ metadata.gz: 99632d4282ef205f475f16f3c99b64a157b8d740f94538c66493084aff93e6497117f77b347482dba464ebe2491c6438c76549be18fe52a4de334d8d46bf62d7
7
+ data.tar.gz: b3e439c08250890543f1a1f8487e7b023089548bfbf82d875f541bd472ee6479e72cdce438ed45402abbb6d878c287b9dd819647385e3ec44966efd01db9f3d8
@@ -1,16 +1,15 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
- - 2.3.0
5
- - 2.2.4
6
- - 2.1.8
4
+ - 2.3.1
5
+ - 2.2.5
6
+ - 2.1.10
7
7
  - 2.0.0
8
- - 1.9.3
9
8
  gemfile:
10
9
  - gemfiles/ar_4.0.gemfile
11
10
  - gemfiles/ar_4.1.gemfile
12
11
  - gemfiles/ar_4.2.gemfile
13
- - gemfiles/ar_5beta.gemfile
12
+ - gemfiles/ar_5.0.gemfile
14
13
  before_script:
15
14
  - psql -c 'create database xylem_test;' -U postgres
16
15
  addons:
@@ -27,9 +26,7 @@ env:
27
26
  secure: "PSK+NqEOpz6P3lDxQ/dIYg6F2FQrdtrkiE72hbL2S0uJ+BJMGp/Uw3h23ihUmlJAPqjNjtxyoslKYLiCiUje/6ID7DhxL8q2Yerqtf0mnMnHrX2mmSkrXrLva9RkMEbpXlHUVT7eZyEZKaw/3ZL917XPo2/M/dX8e0zwtUjhfOEejzXvWuW53A+B155ghpKnB9krbI71CXzK9fsPGR9fi4Mb7+eyZ24Qi3snrRADz9gQbpCG6rLs1j0E052NnLCttkMYU0d5+K9VI+eyDnWboiPThDY/iCw7arTkE6HPjnPbtZp2/GyiOQMpGxV8pzBrtAiy167wUzzhdhtKhLUvl0RUKyRY811N9EJAXEoXydf+r/SHCYNNrTaKKf/dMuTJT1YKFiqthlFS3lFT4f3JduRoPT0YsvPliAWDSdIG1XOINg5DnrNtVgKdwfLjb4klUK4MAw2cwF2M0iKbaNaj9AAduMctRxJyfY91+uCMOnnj4KXNXDzcUjLqXyZPd2qPBWf9wU1lL7mll/B2UDHuAaKqVDe18yut4LeszN0JFClZdGNlSdYXfj/1+C5b80hd5f8ckzlZ5ZYkksOTPDcByev1uvkDThSixru+LI8kYyTENgRAptMSHrUFmGn4XINELOvJi9dsjq9nhSC3DP30dCcddQalcxcSZQI8EeWOVb4="
28
27
  matrix:
29
28
  exclude:
30
- - rvm: 1.9.3
31
- gemfile: gemfiles/ar_5beta.gemfile
32
29
  - rvm: 2.0.0
33
- gemfile: gemfiles/ar_5beta.gemfile
34
- - rvm: 2.1.8
35
- gemfile: gemfiles/ar_5beta.gemfile
30
+ gemfile: gemfiles/ar_5.0.gemfile
31
+ - rvm: 2.1.10
32
+ gemfile: gemfiles/ar_5.0.gemfile
data/Appraisals CHANGED
@@ -10,6 +10,6 @@ appraise 'ar-4.2' do
10
10
  gem 'activerecord', '~> 4.2'
11
11
  end
12
12
 
13
- appraise 'ar-5beta' do
14
- gem 'activerecord', '5.0.0.beta1'
13
+ appraise 'ar-5.0' do
14
+ gem 'activerecord', '~> 5.0'
15
15
  end
data/README.md CHANGED
@@ -19,7 +19,7 @@ Also queries that traverse the tree (such as get ancestors or descendants of a n
19
19
  Add this line to your application's Gemfile:
20
20
 
21
21
  ```ruby
22
- gem 'xylem', '~> 0.0.1'
22
+ gem 'xylem', '~> 0.1.1'
23
23
  ```
24
24
 
25
25
  And then execute:
@@ -156,6 +156,20 @@ Here are some other gems you could use to achieve the same objective:
156
156
  4. Push to the branch (`git push origin my-new-feature`)
157
157
  5. Create a new Pull Request
158
158
 
159
+ ## Changelog
160
+
161
+ ### 0.1.1 - 2016-08-12
162
+
163
+ * Fixed leaves query to respect the AR's default_scope
164
+
165
+ ### 0.1.0 - 2016-06-20
166
+
167
+ * Added the #leaves instance method
168
+
169
+ ### 0.0.1 - 2016-01-18
170
+
171
+ * Initial version
172
+
159
173
  ## License
160
174
 
161
175
  Copyright (c) 2015-2016 Oscar Esgalha
@@ -4,6 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "codeclimate-test-reporter", :group => :test, :require => nil
6
6
  gem "appraisal"
7
- gem "activerecord", "5.0.0.rc1"
7
+ gem "activerecord", "~> 5.0"
8
8
 
9
9
  gemspec :path => "../"
@@ -68,8 +68,7 @@ module Xylem
68
68
  end
69
69
 
70
70
  def leaves
71
- t = arel_table
72
- where(t[:id].not_in(t.project([t[:parent_id]]).where(t[:parent_id].not_eq(nil)).distinct))
71
+ where.not(id: select(:parent_id).where.not(parent_id: nil))
73
72
  end
74
73
  end
75
74
  end
@@ -1,3 +1,3 @@
1
1
  module Xylem
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -57,6 +57,7 @@ class XylemTestCase < MiniTest::Test
57
57
  @suboption11 = Menu.create!(parent: @option1)
58
58
  @suboption12 = Menu.create!(parent: @option1)
59
59
  @suboption21 = Menu.create!(parent: @option2, draft: true)
60
+ @suboption31 = Menu.create!(parent: @option3, draft: true )
60
61
  end
61
62
 
62
63
  def teardown
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xylem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Esgalha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-20 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -118,7 +118,7 @@ files:
118
118
  - gemfiles/ar_4.0.gemfile
119
119
  - gemfiles/ar_4.1.gemfile
120
120
  - gemfiles/ar_4.2.gemfile
121
- - gemfiles/ar_5beta.gemfile
121
+ - gemfiles/ar_5.0.gemfile
122
122
  - lib/xylem.rb
123
123
  - lib/xylem/version.rb
124
124
  - test/xylem_tests.rb