pg_ltree 1.1.3 → 1.1.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +31 -10
  3. data/lib/pg_ltree/ltree.rb +9 -1
  4. data/lib/pg_ltree/version.rb +2 -2
  5. data/test/database.yml.sample +5 -0
  6. data/test/pg_ltree/ltree_test.rb +14 -10
  7. data/test/pg_ltree/scoped_for_test.rb +4 -8
  8. data/test/pg_ltree_test.rb +1 -1
  9. data/test/test_helper.rb +66 -14
  10. metadata +88 -83
  11. data/test/dummy/README.rdoc +0 -28
  12. data/test/dummy/Rakefile +0 -6
  13. data/test/dummy/app/assets/javascripts/application.js +0 -13
  14. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  15. data/test/dummy/app/controllers/application_controller.rb +0 -5
  16. data/test/dummy/app/helpers/application_helper.rb +0 -2
  17. data/test/dummy/app/models/not_uniq_tree_node.rb +0 -6
  18. data/test/dummy/app/models/tree_node.rb +0 -3
  19. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  20. data/test/dummy/bin/bundle +0 -3
  21. data/test/dummy/bin/rails +0 -4
  22. data/test/dummy/bin/rake +0 -4
  23. data/test/dummy/bin/setup +0 -29
  24. data/test/dummy/config/application.rb +0 -26
  25. data/test/dummy/config/boot.rb +0 -5
  26. data/test/dummy/config/database.yml.example +0 -14
  27. data/test/dummy/config/environment.rb +0 -5
  28. data/test/dummy/config/environments/development.rb +0 -41
  29. data/test/dummy/config/environments/production.rb +0 -79
  30. data/test/dummy/config/environments/test.rb +0 -42
  31. data/test/dummy/config/initializers/assets.rb +0 -11
  32. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  33. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  34. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  35. data/test/dummy/config/initializers/inflections.rb +0 -16
  36. data/test/dummy/config/initializers/mime_types.rb +0 -4
  37. data/test/dummy/config/initializers/session_store.rb +0 -3
  38. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  39. data/test/dummy/config/locales/en.yml +0 -23
  40. data/test/dummy/config/routes.rb +0 -56
  41. data/test/dummy/config/secrets.yml +0 -22
  42. data/test/dummy/config.ru +0 -4
  43. data/test/dummy/db/migrate/20150809114511_enable_postgres_ltree.rb +0 -13
  44. data/test/dummy/db/migrate/20150809114528_create_tree_node.rb +0 -7
  45. data/test/dummy/db/migrate/20150809114547_create_not_uniq_tree_node.rb +0 -8
  46. data/test/dummy/db/schema.rb +0 -29
  47. data/test/dummy/public/404.html +0 -67
  48. data/test/dummy/public/422.html +0 -67
  49. data/test/dummy/public/500.html +0 -66
  50. data/test/dummy/public/favicon.ico +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e203fa640f7e8c7f0bcacd2f8b37fe7be5b48a78
4
- data.tar.gz: cf431e9086557ab80ddb9bc4aa5bc37ebe8ff42a
3
+ metadata.gz: e6ebb7f510340a66069f3b5adc839f817d7a89be
4
+ data.tar.gz: 44c43b19e281f1eed03243c35e3f41bdbce11b9e
5
5
  SHA512:
6
- metadata.gz: 4f034ae0258542eb7c281b162f51cdc5d47a4e738be3fef8a9d4d1328039a6d95bfe90102fae29d356ff3ce5ab2ba676bc2560dc39dfb2abb16bf51101d61fbf
7
- data.tar.gz: 6fb91eb800f10edf5021993f8c411659d7f2c7c3123a2dcaf65bb0117bb6f0b531cdf80bb33e26544e106dd7c2247b823d309f0ef55d42a7d69fa5d32d1497a1
6
+ metadata.gz: b073089f1f9232bbc55032bb50f8c4c2ccad63530237660d5f255a72b3ac8020a9fd69897c28134118b34f92ac84b53440df7391ffe0801d806ffdae85d11f7f
7
+ data.tar.gz: 7d0cf44472a6916c49554f7d524db7ec98ba834a73c8b191307637ab12292aae8b29e116f88033b278d84271923c04442c9eee1ee356775c511f3ffe162bb107
data/Rakefile CHANGED
@@ -1,11 +1,10 @@
1
- begin
2
- require 'bundler/setup'
3
- rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
- end
1
+ require 'bundler/gem_tasks'
6
2
 
3
+ require 'rake/testtask'
7
4
  require 'rdoc/task'
8
5
 
6
+ gemspec = eval(File.read(Dir['*.gemspec'].first))
7
+
9
8
  RDoc::Task.new(:rdoc) do |rdoc|
10
9
  rdoc.rdoc_dir = 'rdoc'
11
10
  rdoc.title = 'PgLtree'
@@ -14,10 +13,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
13
  rdoc.rdoc_files.include('lib/**/*.rb')
15
14
  end
16
15
 
17
- Bundler::GemHelper.install_tasks
18
-
19
- require 'rake/testtask'
20
-
21
16
  Rake::TestTask.new(:test) do |t|
22
17
  t.libs << 'lib'
23
18
  t.libs << 'test'
@@ -25,4 +20,30 @@ Rake::TestTask.new(:test) do |t|
25
20
  t.verbose = false
26
21
  end
27
22
 
28
- task default: :test
23
+ desc 'Default: run unit tests.'
24
+ task default: 'test:all'
25
+
26
+ namespace :test do
27
+ AVAILABLE_CASES = %w(
28
+ activerecord_40_pg_017 activerecord_40_pg_018
29
+ activerecord_41_pg_017 activerecord_41_pg_018
30
+ activerecord_42_pg_017 activerecord_42_pg_018
31
+ activerecord_50_pg_018 activerecord_51_pg_020
32
+ ).freeze
33
+
34
+ AVAILABLE_CASES.each do |version|
35
+ desc "Test pg_ltree against #{version}"
36
+ task version do
37
+ sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle install --quiet"
38
+ sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle exec rake -t test"
39
+ end
40
+ end
41
+
42
+ desc 'Run all tests for pg_ltree'
43
+ task :all do
44
+ AVAILABLE_CASES.each do |version|
45
+ sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle install --quiet"
46
+ sh "BUNDLE_GEMFILE='gemfiles/#{version}.gemfile' bundle exec rake -t test"
47
+ end
48
+ end
49
+ end
@@ -59,6 +59,14 @@ module PgLtree
59
59
  def where_path_liked(lquery)
60
60
  where "#{ltree_path_column} ~ ?", lquery
61
61
  end
62
+
63
+ # Get all nodes with path matching full-text-search-like pattern
64
+ #
65
+ # @param ltxtquery [String] ltree search query
66
+ # @return [ActiveRecord::Relation] of matching nodes
67
+ def where_path_matches_ltxtquery(ltxtquery)
68
+ where "#{ltree_path_column} @ ?", ltxtquery
69
+ end
62
70
  end
63
71
 
64
72
  # Define instance methods
@@ -114,7 +122,7 @@ module PgLtree
114
122
  #
115
123
  # @return [Integer] node depth
116
124
  def depth
117
- ActiveRecord::Base.connection.select_all("SELECT NLEVEL('#{ltree_path}')").cast_values.first
125
+ ActiveRecord::Base.connection.select_all("SELECT NLEVEL('#{ltree_path}')").rows.flatten.first.to_i
118
126
  end
119
127
 
120
128
  # Get root of the node
@@ -1,7 +1,7 @@
1
- # Organise ActiveRecord model into a tree structure with PostgreSQL LTree
1
+ # Organize ActiveRecord model into a tree structure with PostgreSQL LTree
2
2
  #
3
3
  # @author a.ponomarenko
4
4
  module PgLtree
5
5
  # Gem Version
6
- VERSION = '1.1.3'.freeze
6
+ VERSION = '1.1.4'.freeze
7
7
  end
@@ -0,0 +1,5 @@
1
+ adapter: postgresql
2
+ host: localhost
3
+ username: postgres
4
+ password:
5
+ database: pg_ltree_test
@@ -1,8 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
- class PgLtree::LtreeTest < ActiveSupport::TestCase
4
-
3
+ class PgLtree::LtreeTest < BaseTest
5
4
  def setup
5
+ super
6
6
  %w(
7
7
  Top
8
8
  Top.Science
@@ -22,15 +22,11 @@ class PgLtree::LtreeTest < ActiveSupport::TestCase
22
22
  end
23
23
  end
24
24
 
25
- def teardown
26
- TreeNode.delete_all
27
- end
28
-
29
- test "Default configuration" do
25
+ test 'Default configuration' do
30
26
  assert_equal TreeNode.ltree_path_column, :path
31
27
  end
32
28
 
33
- test "Custom configuration" do
29
+ test 'Custom configuration' do
34
30
  assert_equal NotUniqTreeNode.ltree_path_column, :new_path
35
31
  end
36
32
 
@@ -64,6 +60,15 @@ class PgLtree::LtreeTest < ActiveSupport::TestCase
64
60
  )
65
61
  end
66
62
 
63
+ test '#where_path_matches_ltxtquery' do
64
+ assert_equal TreeNode.where_path_matches_ltxtquery('Astro*% & !pictures@').pluck(:path), %w(
65
+ Top.Science.Astronomy
66
+ Top.Science.Astronomy.Astrophysics
67
+ Top.Science.Astronomy.Cosmology
68
+ Top.Hobbies.Amateurs_Astronomy
69
+ )
70
+ end
71
+
67
72
  test '.root?' do
68
73
  assert TreeNode.find_by(path: 'Top').root?
69
74
  assert_not TreeNode.find_by(path: 'Top.Science').root?
@@ -93,7 +98,7 @@ class PgLtree::LtreeTest < ActiveSupport::TestCase
93
98
 
94
99
  test '.parent' do
95
100
  assert_equal TreeNode.find_by(path: 'Top.Collections.Pictures.Astronomy.Astronauts').parent.path,
96
- 'Top.Collections.Pictures.Astronomy'
101
+ 'Top.Collections.Pictures.Astronomy'
97
102
  end
98
103
 
99
104
  test '.leaves' do
@@ -152,7 +157,6 @@ class PgLtree::LtreeTest < ActiveSupport::TestCase
152
157
  )
153
158
  end
154
159
 
155
-
156
160
  test '.siblings' do
157
161
  assert_equal TreeNode.find_by(path: 'Top.Collections.Pictures.Astronomy.Stars').siblings.pluck(:path), %w(
158
162
  Top.Collections.Pictures.Astronomy.Galaxies
@@ -1,7 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
- class PgLtree::ScopedForTest < ActiveSupport::TestCase
3
+ class PgLtree::ScopedForTest < BaseTest
4
4
  def setup
5
+ super
5
6
  %w(
6
7
  Top
7
8
  Top.Science
@@ -23,12 +24,8 @@ class PgLtree::ScopedForTest < ActiveSupport::TestCase
23
24
  end
24
25
  end
25
26
 
26
- def teardown
27
- NotUniqTreeNode.delete_all
28
- end
29
-
30
27
  test '#roots' do
31
- assert_equal NotUniqTreeNode.roots.pluck(:new_path), ['Top', 'Top']
28
+ assert_equal NotUniqTreeNode.roots.pluck(:new_path), %w(Top Top)
32
29
  end
33
30
 
34
31
  test '#at_depth' do
@@ -81,7 +78,7 @@ class PgLtree::ScopedForTest < ActiveSupport::TestCase
81
78
 
82
79
  test '.parent' do
83
80
  assert_equal not_uniq_tree_node_find_by_path('Top.Collections.Pictures.Astronomy.Astronauts').parent.new_path,
84
- 'Top.Collections.Pictures.Astronomy'
81
+ 'Top.Collections.Pictures.Astronomy'
85
82
  end
86
83
 
87
84
  test '.leaves' do
@@ -140,7 +137,6 @@ class PgLtree::ScopedForTest < ActiveSupport::TestCase
140
137
  )
141
138
  end
142
139
 
143
-
144
140
  test '.siblings' do
145
141
  assert_equal not_uniq_tree_node_find_by_path('Top.Collections.Pictures.Astronomy.Stars').siblings.pluck(:new_path), %w(
146
142
  Top.Collections.Pictures.Astronomy.Galaxies
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class PgLtreeTest < ActiveSupport::TestCase
4
- test "truth" do
4
+ test 'truth' do
5
5
  assert_kind_of Module, PgLtree
6
6
  end
7
7
  end
data/test/test_helper.rb CHANGED
@@ -1,19 +1,71 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
1
+ require 'bundler'
2
+ begin
3
+ Bundler.require(:default, :development)
4
+ rescue Bundler::BundlerError => e
5
+ $stderr.puts e.message
6
+ $stderr.puts 'Run `bundle install` to install missing gems'
7
+ exit e.status_code
8
+ end
9
+
10
+ require 'pg'
11
+ require 'pg_ltree'
12
+ require 'minitest/autorun'
13
+
14
+ class BaseTest < ActiveSupport::TestCase
15
+ def setup
16
+ prepare_db
17
+ end
18
+
19
+ def teardown
20
+ drop_db
21
+ end
22
+
23
+ private
24
+
25
+ def prepare_db
26
+ begin
27
+ db_connection = YAML.load_file(File.expand_path('../database.yml', __FILE__))
28
+ rescue => e
29
+ $stderr.puts e.message
30
+ $stderr.puts 'Copy `test/database.yml.sample` to `test/database.yml` and configure connection to DB'
31
+ exit 0
32
+ end
3
33
 
4
- require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
- ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
- require "rails/test_help"
34
+ ActiveRecord::Base.establish_connection db_connection
35
+ ActiveRecord::Schema.verbose = false
7
36
 
8
- # Filter out Minitest backtrace while allowing backtrace from other libraries
9
- # to be shown.
10
- Minitest.backtrace_filter = Minitest::BacktraceFilter.new
37
+ ActiveRecord::Schema.define(version: 1) do
38
+ enable_extension 'plpgsql'
39
+ enable_extension 'ltree'
11
40
 
12
- # Load support files
13
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
41
+ create_table 'not_uniq_tree_nodes', force: :cascade do |t|
42
+ t.string 'status'
43
+ t.ltree 'new_path'
44
+ end
45
+
46
+ create_table 'tree_nodes', force: :cascade do |t|
47
+ t.ltree 'path'
48
+ end
49
+ end
50
+ end
51
+
52
+ def drop_db
53
+ tables = if ActiveRecord::VERSION::MAJOR < 5
54
+ ActiveRecord::Base.connection.tables
55
+ else
56
+ ActiveRecord::Base.connection.data_sources
57
+ end
58
+ tables.each { |table| ActiveRecord::Base.connection.drop_table(table) }
59
+ end
60
+ end
61
+
62
+ class NotUniqTreeNode < ActiveRecord::Base
63
+ extend PgLtree::ScopedFor
64
+
65
+ ltree :new_path
66
+ ltree_scoped_for :status
67
+ end
14
68
 
15
- # Load fixtures from the engine
16
- if ActiveSupport::TestCase.respond_to?(:fixture_path=)
17
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
18
- ActiveSupport::TestCase.fixtures :all
69
+ class TreeNode < ActiveRecord::Base
70
+ ltree
19
71
  end
metadata CHANGED
@@ -1,22 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_ltree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Panamarenka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.2'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 4.0.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.2'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: pg
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +37,9 @@ dependencies:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: 0.17.0
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.21'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +47,79 @@ dependencies:
38
47
  - - ">="
39
48
  - !ruby/object:Gem::Version
40
49
  version: 0.17.0
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.21'
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: pry
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: yard
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ - !ruby/object:Gem::Dependency
110
+ name: minitest
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
41
123
  description: Organise ActiveRecord model into a tree structure with PostgreSQL LTree
42
124
  email:
43
125
  - andrei.panamarenka@gmail.com
@@ -51,46 +133,7 @@ files:
51
133
  - lib/pg_ltree/ltree.rb
52
134
  - lib/pg_ltree/scoped_for.rb
53
135
  - lib/pg_ltree/version.rb
54
- - test/dummy/README.rdoc
55
- - test/dummy/Rakefile
56
- - test/dummy/app/assets/javascripts/application.js
57
- - test/dummy/app/assets/stylesheets/application.css
58
- - test/dummy/app/controllers/application_controller.rb
59
- - test/dummy/app/helpers/application_helper.rb
60
- - test/dummy/app/models/not_uniq_tree_node.rb
61
- - test/dummy/app/models/tree_node.rb
62
- - test/dummy/app/views/layouts/application.html.erb
63
- - test/dummy/bin/bundle
64
- - test/dummy/bin/rails
65
- - test/dummy/bin/rake
66
- - test/dummy/bin/setup
67
- - test/dummy/config.ru
68
- - test/dummy/config/application.rb
69
- - test/dummy/config/boot.rb
70
- - test/dummy/config/database.yml.example
71
- - test/dummy/config/environment.rb
72
- - test/dummy/config/environments/development.rb
73
- - test/dummy/config/environments/production.rb
74
- - test/dummy/config/environments/test.rb
75
- - test/dummy/config/initializers/assets.rb
76
- - test/dummy/config/initializers/backtrace_silencers.rb
77
- - test/dummy/config/initializers/cookies_serializer.rb
78
- - test/dummy/config/initializers/filter_parameter_logging.rb
79
- - test/dummy/config/initializers/inflections.rb
80
- - test/dummy/config/initializers/mime_types.rb
81
- - test/dummy/config/initializers/session_store.rb
82
- - test/dummy/config/initializers/wrap_parameters.rb
83
- - test/dummy/config/locales/en.yml
84
- - test/dummy/config/routes.rb
85
- - test/dummy/config/secrets.yml
86
- - test/dummy/db/migrate/20150809114511_enable_postgres_ltree.rb
87
- - test/dummy/db/migrate/20150809114528_create_tree_node.rb
88
- - test/dummy/db/migrate/20150809114547_create_not_uniq_tree_node.rb
89
- - test/dummy/db/schema.rb
90
- - test/dummy/public/404.html
91
- - test/dummy/public/422.html
92
- - test/dummy/public/500.html
93
- - test/dummy/public/favicon.ico
136
+ - test/database.yml.sample
94
137
  - test/pg_ltree/ltree_test.rb
95
138
  - test/pg_ltree/scoped_for_test.rb
96
139
  - test/pg_ltree_test.rb
@@ -120,47 +163,9 @@ signing_key:
120
163
  specification_version: 4
121
164
  summary: Organise ActiveRecord model into a tree structure with PostgreSQL LTree
122
165
  test_files:
123
- - test/dummy/app/assets/javascripts/application.js
124
- - test/dummy/app/assets/stylesheets/application.css
125
- - test/dummy/app/controllers/application_controller.rb
126
- - test/dummy/app/helpers/application_helper.rb
127
- - test/dummy/app/models/not_uniq_tree_node.rb
128
- - test/dummy/app/models/tree_node.rb
129
- - test/dummy/app/views/layouts/application.html.erb
130
- - test/dummy/bin/bundle
131
- - test/dummy/bin/rails
132
- - test/dummy/bin/rake
133
- - test/dummy/bin/setup
134
- - test/dummy/config/application.rb
135
- - test/dummy/config/boot.rb
136
- - test/dummy/config/database.yml.example
137
- - test/dummy/config/environment.rb
138
- - test/dummy/config/environments/development.rb
139
- - test/dummy/config/environments/production.rb
140
- - test/dummy/config/environments/test.rb
141
- - test/dummy/config/initializers/assets.rb
142
- - test/dummy/config/initializers/backtrace_silencers.rb
143
- - test/dummy/config/initializers/cookies_serializer.rb
144
- - test/dummy/config/initializers/filter_parameter_logging.rb
145
- - test/dummy/config/initializers/inflections.rb
146
- - test/dummy/config/initializers/mime_types.rb
147
- - test/dummy/config/initializers/session_store.rb
148
- - test/dummy/config/initializers/wrap_parameters.rb
149
- - test/dummy/config/locales/en.yml
150
- - test/dummy/config/routes.rb
151
- - test/dummy/config/secrets.yml
152
- - test/dummy/config.ru
153
- - test/dummy/db/migrate/20150809114511_enable_postgres_ltree.rb
154
- - test/dummy/db/migrate/20150809114528_create_tree_node.rb
155
- - test/dummy/db/migrate/20150809114547_create_not_uniq_tree_node.rb
156
- - test/dummy/db/schema.rb
157
- - test/dummy/public/404.html
158
- - test/dummy/public/422.html
159
- - test/dummy/public/500.html
160
- - test/dummy/public/favicon.ico
161
- - test/dummy/Rakefile
162
- - test/dummy/README.rdoc
166
+ - test/database.yml.sample
163
167
  - test/pg_ltree/ltree_test.rb
164
168
  - test/pg_ltree/scoped_for_test.rb
165
169
  - test/pg_ltree_test.rb
166
170
  - test/test_helper.rb
171
+ has_rdoc:
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,6 +0,0 @@
1
- class NotUniqTreeNode < ActiveRecord::Base
2
- extend PgLtree::ScopedFor
3
-
4
- ltree :new_path
5
- ltree_scoped_for :status
6
- end
@@ -1,3 +0,0 @@
1
- class TreeNode < ActiveRecord::Base
2
- ltree
3
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run