csp-resolver 0.0.1 → 0.1.0
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 +4 -4
- data/.rubocop.yml +3 -1
- data/CODE_OF_CONDUCT.md +133 -0
- data/CONTRIBUTING.md +72 -0
- data/README.md +6 -0
- data/Rakefile +13 -1
- data/csp-resolver.gemspec +3 -0
- data/lib/csp/problem.rb +3 -0
- data/lib/csp/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2132843b5897c1dc72b0fd25d79d7a397c12346cb43aa8a7207eb2d3811dbba
|
4
|
+
data.tar.gz: b09b982f678d54011f2a32c6418a169391378f5e86bdd739f6a566f2fc8c0156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4c576c37e8ac70a1b21ca373bb2a5a3ac501703a4832638c90ed6ba62aa8af80c8016fe80d1db204fe68379adb762bff51be223def53d5fce11169c32079aae
|
7
|
+
data.tar.gz: 79992f4d8021a57b6cf2390a1c998d53f6b8478468799a16d3f1c7b921db3a3190cecd09a18d4fb33e0a8f599bd8ecffab2db4e814df7f9d1bcc95bea01625f7
|
data/.rubocop.yml
CHANGED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
31
|
+
any kind
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
* Public or private harassment
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
devs@rebase.com.br.
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
## Enforcement Guidelines
|
70
|
+
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73
|
+
|
74
|
+
### 1. Correction
|
75
|
+
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
78
|
+
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
82
|
+
|
83
|
+
### 2. Warning
|
84
|
+
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
86
|
+
actions.
|
87
|
+
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
93
|
+
ban.
|
94
|
+
|
95
|
+
### 3. Temporary Ban
|
96
|
+
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
99
|
+
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
105
|
+
|
106
|
+
### 4. Permanent Ban
|
107
|
+
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
111
|
+
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
113
|
+
community.
|
114
|
+
|
115
|
+
## Attribution
|
116
|
+
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.1, available at
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
120
|
+
|
121
|
+
Community Impact Guidelines were inspired by
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
123
|
+
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
127
|
+
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
133
|
+
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Thank you for your interest in contributing! We welcome contributions of all kinds, including new features, bug fixes, and documentation improvements.
|
4
|
+
|
5
|
+
Please take a moment to review this document to make the contribution process easy and effective for everyone involved.
|
6
|
+
|
7
|
+
If you have any questions, feel free to reach out by opening an issue or contacting the maintainers directly.
|
8
|
+
|
9
|
+
## Table of Contents
|
10
|
+
1. [How to Report an Issue](#how-to-report-an-issue)
|
11
|
+
2. [Submitting a Pull Request](#submitting-a-pull-request)
|
12
|
+
3. [Coding Guidelines](#coding-guidelines)
|
13
|
+
4. [Code of Conduct](#code-of-conduct)
|
14
|
+
|
15
|
+
## How to Report an Issue
|
16
|
+
|
17
|
+
If you encounter any bugs or have feature requests, please create an issue on our GitHub repository.
|
18
|
+
|
19
|
+
1. Go to the [Issues](https://github.com/Rebase-BR/csp-resolver/issues) page.
|
20
|
+
2. Click on "New Issue".
|
21
|
+
3. Select the "Bug report" or "Feature request".
|
22
|
+
4. Fill in the details as prompted by the template.
|
23
|
+
|
24
|
+
If your issue does not fit the provided templates, feel free to create an issue without following them. Provide as much detail as possible to help us understand and address your concern.
|
25
|
+
|
26
|
+
## Submitting a Pull Request
|
27
|
+
To submit a pull request, please follow these steps:
|
28
|
+
|
29
|
+
1. **Fork the Repository**:
|
30
|
+
- Navigate to the [repository](https://github.com/Rebase-BR/csp-resolver).
|
31
|
+
- Click the "Fork" button in the top-right corner.
|
32
|
+
2. **Clone the Forked Repository**:
|
33
|
+
```sh
|
34
|
+
git clone https://github.com/Rebase-BR/csp-resolver.git
|
35
|
+
cd csp-resolver
|
36
|
+
```
|
37
|
+
3. **Create a Branch**:
|
38
|
+
```sh
|
39
|
+
git checkout -b <your-branch-name>
|
40
|
+
```
|
41
|
+
4. **Make Your Changes**:
|
42
|
+
- Implement your feature, bug fix, or documentation improvement.
|
43
|
+
- If you're making changes to the code, write some tests.
|
44
|
+
- Ensure your code follows our [Coding Guidelines](#coding-guidelines).
|
45
|
+
5. **Commit Your Changes**:
|
46
|
+
```sh
|
47
|
+
git add .
|
48
|
+
git commit -m "Description of your changes"
|
49
|
+
```
|
50
|
+
6. **Push to Your Fork**:
|
51
|
+
```sh
|
52
|
+
git push origin your-branch-name
|
53
|
+
```
|
54
|
+
7. **Create a Pull Request**:
|
55
|
+
- Go to your fork on GitHub.
|
56
|
+
- Click on the "Compare & pull request" button.
|
57
|
+
- Fill in the details of your pull request and submit.
|
58
|
+
|
59
|
+
We will review your pull request and provide feedback. Please be responsive to our comments and make the necessary adjustments.
|
60
|
+
|
61
|
+
## Coding Guidelines
|
62
|
+
|
63
|
+
To ensure consistency and maintainability of the codebase, please adhere to the following guidelines:
|
64
|
+
|
65
|
+
- Follow the Ruby community's [style guide](https://rubystyle.guide/).
|
66
|
+
- Write tests for your changes.
|
67
|
+
- Ensure all tests pass before submitting a pull request.
|
68
|
+
- Document public methods and classes.
|
69
|
+
|
70
|
+
## Code of Conduct
|
71
|
+
|
72
|
+
By participating in this project, you agree to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md). Please be respectful and considerate in all interactions.
|
data/README.md
CHANGED
@@ -256,5 +256,11 @@ problem.solve
|
|
256
256
|
# => { 'A' => 'green', 'B' => 'red', 'C' => 'purple' }
|
257
257
|
```
|
258
258
|
|
259
|
+
## Contributing
|
260
|
+
See our [CONTRIBUTING](./CONTRIBUTING.md) guidelines.
|
261
|
+
|
262
|
+
## Code of Conduct
|
263
|
+
We expect that everyone participating in any way with this project follows our [Code of Conduct](./CODE_OF_CONDUCT.md).
|
264
|
+
|
259
265
|
## License
|
260
266
|
This project is licensed under the [MIT License](MIT-LICENSE).
|
data/Rakefile
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
|
-
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
8
|
+
t.pattern = 'spec/**/*_spec.rb'
|
9
|
+
t.verbose = false
|
10
|
+
end
|
11
|
+
|
12
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
13
|
+
t.options = ['--format', 'simple']
|
14
|
+
end
|
15
|
+
|
16
|
+
task default: :spec
|
data/csp-resolver.gemspec
CHANGED
@@ -28,4 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.bindir = 'exe'
|
29
29
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ['lib']
|
31
|
+
|
32
|
+
# For more information and examples about making a new gem, check out our
|
33
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
31
34
|
end
|
data/lib/csp/problem.rb
CHANGED
@@ -64,14 +64,17 @@ module CSP
|
|
64
64
|
|
65
65
|
def add_ordering(ordering_algorithm)
|
66
66
|
@ordering_algorithm = ordering_algorithm
|
67
|
+
self
|
67
68
|
end
|
68
69
|
|
69
70
|
def add_filtering(filtering_algorithm)
|
70
71
|
@filtering_algorithm = filtering_algorithm
|
72
|
+
self
|
71
73
|
end
|
72
74
|
|
73
75
|
def add_lookahead(lookahead_algorithm)
|
74
76
|
@lookahead_algorithm = lookahead_algorithm
|
77
|
+
self
|
75
78
|
end
|
76
79
|
|
77
80
|
private
|
data/lib/csp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csp-resolver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Benjamim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This Ruby gem solves CSPs using custom constraints
|
15
15
|
email:
|
@@ -20,6 +20,8 @@ extensions: []
|
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
22
|
- ".rubocop.yml"
|
23
|
+
- CODE_OF_CONDUCT.md
|
24
|
+
- CONTRIBUTING.md
|
23
25
|
- MIT-LICENSE
|
24
26
|
- README.md
|
25
27
|
- Rakefile
|
@@ -60,7 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
62
|
- !ruby/object:Gem::Version
|
61
63
|
version: '0'
|
62
64
|
requirements: []
|
63
|
-
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 2.7.6.2
|
64
67
|
signing_key:
|
65
68
|
specification_version: 4
|
66
69
|
summary: A Ruby CSP Solver
|