sequel_pg_ltree 0.1.7 → 0.1.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
  SHA256:
3
- metadata.gz: 7ec4a0f98416a8125869c029d0161a5ae0479cf05a9dda405667e9806c5f0363
4
- data.tar.gz: a54a34f6ac63a1e1f1e8a209401582998bf2de296b175f46ff77e58cc7e501c7
3
+ metadata.gz: f36b537ec4b27058e26125def8bacc8692ef76707041ec8f27f87312bfd81208
4
+ data.tar.gz: c59b6efe87adcf4aefb92c80e9916c2bb80d98410bc1519ede0249c3e402767e
5
5
  SHA512:
6
- metadata.gz: 030d4041ffbb252dafc0decd672c23bc1dbc6046dd7f5557d3faf708c6f03d478e83783ca43414cdcaf5fb5641326d007a7f8c972aff6800d3ffebe53a4dc67a
7
- data.tar.gz: 61590a5c2b7491984b01384eb11e902d2ceea730c69d8d55a90b2b71b1e19222043a6baafce034beb8ab88f0f58bdd5a7dc0220c1665d8c5fbd092c9346e9719
6
+ metadata.gz: 35592042137f578b59d32f9117f18ed8821470b80c58be18d6dc4b4f41206c721a030efc0c111be17e820667d878f6a2ef661a2f22e36f8bd9629294fb411c42
7
+ data.tar.gz: 85f44df34d3bd42fdac97c10ffb93b28dbc18293682b83528466d737c560e92c1230ecd89c7b95a1de9be05ecf42579512c4ecb38860cfd00729b772b6037c12
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- #git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
3
  # Specify your gem's dependencies in sequel_pg_ltree.gemspec
6
4
  gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 TODO: Write your name
3
+ Copyright (c) 2019 b10wf15h
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # SequelPgLtree
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sequel_pg_ltree`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ ## notice
4
+ Sequel ORM postgresql ltree helper inspired by https://github.com/sjke/pg_ltree
6
5
 
7
6
  ## Installation
8
7
 
@@ -22,22 +21,30 @@ Or install it yourself as:
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sequel_pg_ltree. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
24
+ ```sql
25
+ id | path
26
+ ----+-------
27
+ 1 | A
28
+ 2 | A.B
29
+ 3 | A.C
30
+ 4 | A.C.D
31
+ 5 | A.C.E
32
+ 6 | A.C.F
33
+ 7 | A.B.G
34
+ ```
36
35
 
37
- ## License
36
+ ```ruby
37
+ class Tree < Sequel::Model(:tree)
38
+ plugin :pg_ltree, :column => :path
39
+ end
38
40
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+ Tree.find(id: 2).root.path # => A
42
+ Tree.find(id: 2).parent.path # => A
43
+ Tree.where(id: 1).first.children.each do |c|
44
+ c[:path]
45
+ end # => A.B A.C
40
46
 
41
- ## Code of Conduct
47
+ ```
42
48
 
43
- Everyone interacting in the SequelPgLtree project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sequel_pg_ltree/blob/master/CODE_OF_CONDUCT.md).
49
+ ## TODO
50
+ tests should be added
@@ -2,6 +2,6 @@ module Sequel
2
2
  # The Sequel::PgLtree model plugin
3
3
  module PgLtree
4
4
  # The Gem's version.
5
- VERSION = "0.1.7".freeze
5
+ VERSION = "0.1.8".freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg_ltree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Milisav
@@ -95,7 +95,6 @@ extra_rdoc_files: []
95
95
  files:
96
96
  - ".gitignore"
97
97
  - ".travis.yml"
98
- - CODE_OF_CONDUCT.md
99
98
  - Gemfile
100
99
  - LICENSE.txt
101
100
  - README.md
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at TODO: Write your email address. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/