outstand-sycamore 0.4.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.dockerignore +12 -0
- data/.editorconfig +24 -0
- data/.gitignore +12 -0
- data/.rspec +6 -0
- data/.travis.yml +16 -0
- data/.yardopts +13 -0
- data/AUTHORS +1 -0
- data/CHANGELOG.md +88 -0
- data/CONTRIBUTING.md +5 -0
- data/CREDITS +0 -0
- data/Deskfile +7 -0
- data/Dockerfile +78 -0
- data/Gemfile +12 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +22 -0
- data/README.md +571 -0
- data/Rakefile +36 -0
- data/VERSION +1 -0
- data/bin/console +7 -0
- data/bin/setup +8 -0
- data/brew-shim +10 -0
- data/compose.yml +35 -0
- data/docker-entrypoint.sh +39 -0
- data/lib/outstand_sycamore.rb +1 -0
- data/lib/sycamore/absence.rb +179 -0
- data/lib/sycamore/exceptions.rb +16 -0
- data/lib/sycamore/extension/nothing.rb +4 -0
- data/lib/sycamore/extension/path.rb +7 -0
- data/lib/sycamore/extension/tree.rb +4 -0
- data/lib/sycamore/extension.rb +2 -0
- data/lib/sycamore/nothing.rb +157 -0
- data/lib/sycamore/path.rb +266 -0
- data/lib/sycamore/path_root.rb +43 -0
- data/lib/sycamore/stree.rb +4 -0
- data/lib/sycamore/tree.rb +1470 -0
- data/lib/sycamore/version.rb +28 -0
- data/lib/sycamore.rb +13 -0
- data/support/doctest_helper.rb +2 -0
- data/support/travis.sh +6 -0
- data/sycamore.gemspec +29 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f240db3627214b816df038b5bb00458b174bdd3b7b7ca5a38d263939c3c13048
|
4
|
+
data.tar.gz: c39b143aadcd2a6618cbef207b664fb8972439d3a59499bd4fd7e48c3e936003
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 56f1839c00c2b00f099e63d67b085763f912b3b9ec36ee171368abab772ed37e3a6bfbdbc07dd09bb63df23b117e9bd5aa54960a96fe7d13a2697aa040c66fe2
|
7
|
+
data.tar.gz: bf0d1a037574159e53f322fce88d82e8a5910d81c90258b97f1ba0926c77b33eb580f2cda446a18d775d8fa60b7246dddd0c702c5be804a5e6252130a9a315bd
|
data/.dockerignore
ADDED
data/.editorconfig
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
root = true
|
2
|
+
|
3
|
+
[*]
|
4
|
+
charset = utf-8
|
5
|
+
end_of_line = lf
|
6
|
+
insert_final_newline = true
|
7
|
+
trim_trailing_whitespace = true
|
8
|
+
|
9
|
+
[*.rb]
|
10
|
+
indent_style = space
|
11
|
+
indent_size = 2
|
12
|
+
|
13
|
+
[*.gemspec]
|
14
|
+
indent_style = space
|
15
|
+
indent_size = 2
|
16
|
+
|
17
|
+
[*.yml]
|
18
|
+
indent_style = space
|
19
|
+
indent_size = 2
|
20
|
+
|
21
|
+
[*.md]
|
22
|
+
indent_style = space
|
23
|
+
indent_size = 2
|
24
|
+
trim_trailing_whitespace = false
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
language: ruby
|
2
|
+
bundler_args: --without debug
|
3
|
+
rvm:
|
4
|
+
- 2.2.4
|
5
|
+
- 2.3.1
|
6
|
+
- 2.4.1
|
7
|
+
- 2.5.1
|
8
|
+
- ruby-head
|
9
|
+
- jruby-head
|
10
|
+
- rbx-3
|
11
|
+
cache: bundler
|
12
|
+
before_install:
|
13
|
+
- gem update bundler
|
14
|
+
before_script:
|
15
|
+
- support/travis.sh
|
16
|
+
dist: trusty
|
data/.yardopts
ADDED
data/AUTHORS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- Marcel Otto <marcelotto.de@gmail.com>
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
This project adheres to [Semantic Versioning](http://semver.org/) and
|
5
|
+
[Keep a CHANGELOG](http://keepachangelog.com).
|
6
|
+
|
7
|
+
|
8
|
+
## 0.3.1 - 2016-05-07
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- array-access operator and `fetch` on `Path` for random access
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
|
16
|
+
- Lazy initialization of the internal hash. This improves extensibility, eg. by
|
17
|
+
not requiring a `super` call in the constructors of `Tree` subclasses.
|
18
|
+
|
19
|
+
|
20
|
+
[Compare v0.3.0...v0.3.1](https://github.com/marcelotto/sycamore/compare/v0.3.0...v0.3.1)
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
## 0.3.0 - 2016-04-23
|
25
|
+
|
26
|
+
### Added
|
27
|
+
|
28
|
+
- support `Path` objects as input on the following `Tree` methods:
|
29
|
+
- the `Tree.[]` population constructor
|
30
|
+
- `fetch`
|
31
|
+
- `add`
|
32
|
+
- `delete`
|
33
|
+
- `replace`
|
34
|
+
- `[]=`
|
35
|
+
- `include_node?`
|
36
|
+
- `leaf?`
|
37
|
+
- `strict_leaf?`
|
38
|
+
- `strict_leaves?`
|
39
|
+
- `internal?`
|
40
|
+
- `external?`
|
41
|
+
- `Tree#fetch_path` for fetching a child by path
|
42
|
+
|
43
|
+
### Fixed
|
44
|
+
|
45
|
+
- `Tree#add` or `Tree#delete` now fail without making any changes, when given
|
46
|
+
invalid input. Previously these command methods performed their operations
|
47
|
+
until the invalid input elements were encountered.
|
48
|
+
- `Tree#delete` deleted paths, when they matched a given input path partially,
|
49
|
+
e.g. `Tree[a: 1] >> a: {1 => 2}` deleted successfully.
|
50
|
+
|
51
|
+
|
52
|
+
[Compare v0.2.1...v0.3.0](https://github.com/marcelotto/sycamore/compare/v0.2.1...v0.3.0)
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
## 0.2.1 - 2016-04-07
|
57
|
+
|
58
|
+
### Added
|
59
|
+
|
60
|
+
- assigning `nil` via `Tree#[]=` removes a child tree, similar to the assignment
|
61
|
+
of `Sycamore::Nothing`
|
62
|
+
|
63
|
+
### Fixed
|
64
|
+
|
65
|
+
- [#2](https://github.com/marcelotto/sycamore/issues/2): Rubinius support
|
66
|
+
|
67
|
+
|
68
|
+
[Compare v0.2.0...v0.2.1](https://github.com/marcelotto/sycamore/compare/v0.2.0...v0.2.1)
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
## 0.2.0 - 2016-04-05
|
73
|
+
|
74
|
+
### Added
|
75
|
+
|
76
|
+
- assigning `Sycamore::Nothing` via `Tree#[]=` removes a child tree
|
77
|
+
- `Tree#search` for searching the tree for one or multiple nodes or a tree
|
78
|
+
- `Tree#node!` as a more strict variant of `Tree#node`, which raises an error
|
79
|
+
when no node present
|
80
|
+
|
81
|
+
|
82
|
+
[Compare v0.1.0...v0.2.0](https://github.com/marcelotto/sycamore/compare/v0.1.0...v0.2.0)
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
## 0.1.0 - 2016-03-28
|
87
|
+
|
88
|
+
Initial release
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
1. Fork it ( <https://github.com/marcelotto/sycamore/fork> )
|
2
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
3
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
4
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
5
|
+
5. Create a new Pull Request
|
data/CREDITS
ADDED
File without changes
|
data/Deskfile
ADDED
data/Dockerfile
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
FROM outstand/su-exec:latest as su-exec
|
2
|
+
FROM outstand/fixuid as fixuid
|
3
|
+
|
4
|
+
FROM ruby:3.1.2-bullseye
|
5
|
+
LABEL maintainer="Ryan Schlesinger <ryan@outstand.com>"
|
6
|
+
|
7
|
+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
8
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
9
|
+
|
10
|
+
RUN set -eux; \
|
11
|
+
\
|
12
|
+
groupadd -g 1000 sycamore && \
|
13
|
+
useradd -u 1000 -g sycamore -ms /bin/bash sycamore && \
|
14
|
+
\
|
15
|
+
apt-get update -y; \
|
16
|
+
apt-get install -y \
|
17
|
+
ca-certificates \
|
18
|
+
curl \
|
19
|
+
git \
|
20
|
+
build-essential \
|
21
|
+
tini \
|
22
|
+
; \
|
23
|
+
apt-get clean; \
|
24
|
+
rm -f /var/lib/apt/lists/*_*
|
25
|
+
|
26
|
+
# install su-exec
|
27
|
+
COPY --from=su-exec /sbin/su-exec /sbin/su-exec
|
28
|
+
|
29
|
+
# install fixuid
|
30
|
+
COPY --from=fixuid /usr/local/bin/fixuid /usr/local/bin/fixuid
|
31
|
+
RUN set -eux; \
|
32
|
+
\
|
33
|
+
chmod 4755 /usr/local/bin/fixuid; \
|
34
|
+
USER=sycamore; \
|
35
|
+
GROUP=sycamore; \
|
36
|
+
mkdir -p /etc/fixuid; \
|
37
|
+
printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml
|
38
|
+
|
39
|
+
ENV BUNDLER_VERSION 2.3.20
|
40
|
+
ENV GITHUB_CLI_VERSION 2.14.4
|
41
|
+
ENV GITHUB_CLI_CHECKSUM b0073fdcc07d1de5a19a1a782c7ad9f593f991da06a809ea39f0b6148869aa96
|
42
|
+
RUN set -eux; \
|
43
|
+
\
|
44
|
+
mkdir -p /tmp/build; \
|
45
|
+
cd /tmp/build; \
|
46
|
+
\
|
47
|
+
gem install bundler -v ${BUNDLER_VERSION} -i /usr/local/lib/ruby/gems/$(ls /usr/local/lib/ruby/gems) --force; \
|
48
|
+
curl -fsSL https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_linux_amd64.deb -o gh_${GITHUB_CLI_VERSION}_linux_amd64.deb; \
|
49
|
+
echo "${GITHUB_CLI_CHECKSUM} gh_${GITHUB_CLI_VERSION}_linux_amd64.deb" | sha256sum --check; \
|
50
|
+
apt-get update -y; \
|
51
|
+
apt-get install -y --no-install-recommends \
|
52
|
+
./gh_${GITHUB_CLI_VERSION}_linux_amd64.deb \
|
53
|
+
; \
|
54
|
+
apt-get clean; \
|
55
|
+
rm -f /var/lib/apt/lists/*_*; \
|
56
|
+
rm -rf /tmp/build
|
57
|
+
|
58
|
+
COPY brew-shim /usr/bin/brew
|
59
|
+
|
60
|
+
WORKDIR /sycamore
|
61
|
+
RUN set -eux; \
|
62
|
+
\
|
63
|
+
chown -R sycamore:sycamore /sycamore
|
64
|
+
|
65
|
+
USER sycamore
|
66
|
+
|
67
|
+
COPY --chown=sycamore:sycamore Gemfile sycamore.gemspec /sycamore/
|
68
|
+
COPY --chown=sycamore:sycamore lib/sycamore/version.rb /sycamore/lib/sycamore/
|
69
|
+
RUN set -eux; \
|
70
|
+
\
|
71
|
+
git config --global push.default simple
|
72
|
+
COPY --chown=sycamore:sycamore . /sycamore/
|
73
|
+
|
74
|
+
USER root
|
75
|
+
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
76
|
+
|
77
|
+
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/docker-entrypoint.sh"]
|
78
|
+
CMD ["rspec", "spec"]
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
guard 'rspec', cmd: 'bundle exec rspec', all_after_pass: false do
|
4
|
+
watch(%r{^spec/.+_spec\.rb$})
|
5
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
6
|
+
watch(/spec\/support\/(.+)\.rb/) { 'spec' }
|
7
|
+
|
8
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
9
|
+
watch(%r{^lib/sycamore/(.+)\.rb$}) { |m| "spec/unit/sycamore/#{m[1]}/" }
|
10
|
+
|
11
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015-2016 Marcel Otto
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|