pax_global_header 0000666 0000000 0000000 00000000064 13700074614 0014514 g ustar 00root root 0000000 0000000 52 comment=afd82952076e605402a54dd0a142cdcebe34edc7 pastel-0.8.0/ 0000775 0000000 0000000 00000000000 13700074614 0013011 5 ustar 00root root 0000000 0000000 pastel-0.8.0/.editorconfig 0000664 0000000 0000000 00000000226 13700074614 0015466 0 ustar 00root root 0000000 0000000 root = true [*.rb] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 trim_trailing_whitespace = true pastel-0.8.0/.github/ 0000775 0000000 0000000 00000000000 13700074614 0014351 5 ustar 00root root 0000000 0000000 pastel-0.8.0/.github/FUNDING.yml 0000664 0000000 0000000 00000000024 13700074614 0016162 0 ustar 00root root 0000000 0000000 github: piotrmurach pastel-0.8.0/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000001043 13700074614 0017054 0 ustar 00root root 0000000 0000000 ### Are you in the right place? * For issues or feature requests file a GitHub issue in this repository * For general questions or discussion post on StackOverflow ### Describe the problem A brief description of the issue/feature. ### Steps to reproduce the problem ``` Your code here to reproduce the issue ``` ### Actual behaviour What happened? This could be a description, log output, error raised etc... ### Expected behaviour What did you expect to happen? ### Describe your environment * OS version: * Ruby version: * Pastel version: pastel-0.8.0/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000000677 13700074614 0020164 0 ustar 00root root 0000000 0000000 ### Describe the change What does this Pull Request do? ### Why are we doing this? Any related context as to why is this is a desirable change. ### Benefits How will the library improve? ### Drawbacks Possible drawbacks applying this change. ### Requirements Put an X between brackets on each line if you have done the item: [] Tests written & passing locally? [] Code style checked? [] Rebased with `master` branch? [] Documentation updated? pastel-0.8.0/.gitignore 0000664 0000000 0000000 00000000271 13700074614 0015001 0 ustar 00root root 0000000 0000000 *.gem *.rbc .bundle .config .yardoc Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports test/tmp test/version_tmp tmp *.bundle *.so *.o *.a mkmf.log pastel-0.8.0/.rspec 0000664 0000000 0000000 00000000051 13700074614 0014122 0 ustar 00root root 0000000 0000000 --color --require spec_helper --warnings pastel-0.8.0/.rubocop.yml 0000664 0000000 0000000 00000001247 13700074614 0015267 0 ustar 00root root 0000000 0000000 Lint/AssignmentInCondition: Enabled: false Metrics/AbcSize: Max: 30 Metrics/BlockLength: CountComments: true Max: 25 ExcludedMethods: [] Exclude: - "spec/**/*" Metrics/ClassLength: Max: 1500 Metrics/CyclomaticComplexity: Enabled: false Metrics/LineLength: Max: 80 Metrics/MethodLength: Max: 20 Naming/BinaryOperatorParameterName: Enabled: false Style/AsciiComments: Enabled: false Style/LambdaCall: EnforcedStyle: braces Style/StringLiterals: EnforcedStyle: double_quotes Style/TrivialAccessors: Enabled: false # { ... } for multi-line blocks is okay Style/BlockDelimiters: Enabled: false Style/CommentedKeyword: Enabled: false pastel-0.8.0/.travis.yml 0000664 0000000 0000000 00000000666 13700074614 0015132 0 ustar 00root root 0000000 0000000 --- language: ruby before_install: "gem install bundler -v '< 2.0'" bundler_args: --without yard benchmarks script: "bundle exec rake ci" rvm: - 2.0 - 2.1 - 2.2 - 2.3 - 2.4 - 2.5 - 2.6 - 2.7 - ruby-head - jruby-9.2.11.0 - jruby-head - truffleruby matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head - rvm: truffleruby fast_finish: true branches: only: master notifications: email: false pastel-0.8.0/CHANGELOG.md 0000664 0000000 0000000 00000011223 13700074614 0014621 0 ustar 00root root 0000000 0000000 # Change log ## [v0.8.0] - 2020-07-04 ### Changed * Change gemspec to require Ruby 2.0 or higher * Change Pastel#new to use keyword arguments in place of hash options * Change to freeze all strings * Remove equatable dependency ### Fixed * Fix Pastel#strip to recognise no-number reset by DanielVartanov(@DanielVartanov) * Fix Pastel#undecorate to correctly assign styles for nested colors ## [v0.7.4] - 2020-05-08 ### Fixed * Fix ColorParser#undecorate to require direct dependency by Nick Pezza(@npezza93) ## [v0.7.3] - 2019-06-16 ### Changed * Change gemspec to load required files directly without git * Change to update tty-color & equatable dependency versions ### Fixed * Fix Delegator warning ## [v0.7.2] - 2017-11-09 ### Changed * Change to load relative file paths * Change to allow `#alias_color` to accept multiple colors by Jared Ning (@ordinaryzelig) ## [v0.7.1] - 2017-01-09 ### Changed * Change to load specific files when needed * Change to freeze ANSI attributes * Change to directly assign enabled attribute ## [v0.7.0] - 2016-12-27 ### Changed * Enabled colors on Windows by default * Update tty-color dependency ### Fixed * Fix Color#decorate to prevent redecoration with the same color ## [v0.6.1] - 2016-04-09 ### Fixed * Fix #decorate to apply color to non zero length strings ## [v0.6.0] - 2016-01-15 ### Added * Add helper functions #foreground?, #background?, #style to ANSI module * Add ColorParser for parsing color symbols out of text * Add Pastel#undecorate for parsing color names out of strings ### Changed * Change to use tty-color for color capabilities detection * Change to move enabled option to Pastel#new * Improve performance of Color#lookup * Change Color#decorate performance to be 6x faster! * Change Color DSL styling to be 3x faster! ### Fixed * Fix #strip to only remove color sequences * Fix #decorate to pass through original text when decorating without colors * Fix #decorate to work correctly with nested background colors ## [v0.5.3] - 2015-01-05 ### Fixed * Change gemspec to fix dependencies requirement ## [v0.5.2] - 2015-11-27 (Nov 27, 2015) * Change Color#decorate to accept non-string values and immediately return ## [v0.5.1] - 2015-09-18 ### Added * Add ability to call detached instance with array access ## [v0.5.0] - 2015-09-13 ### Added * Add external dependency to check for color support * Add #colored? to check if string has color escape codes * Add #eachline option to allow coloring of multiline strings ### Changed * Further refine #strip method accuracy ### Fixed * Fix redefining inspect method * Fix string representation for pastel instance ## [v0.4.0] - 2014-11-22 ### Added * Add ability to #detach color combination for later reuse * Add ability to nest styles with blocks ### Fixed * Fix Delegator#respond_to method to correctly report existence of methods ## [v0.3.0] - 2014-11-08 ### Added * Add ability to alias colors through #alias_color method * Add ability to alias colors through the environment variable * Improve performance of Pastel::Color styles and lookup methods ### Fixed * Fix bug concerned with lack of escaping for nested styles ## [v0.2.1] - 2014-10-13 ### Fixed * Fix issue #1 with unitialize dependency ## [v0.2.0] - 2014-10-12 ### Added * Add #supports? to Color to check for terminal color support * Add ability to force color support through :enabled option ### Changed * Change gemspec to include equatable as dependency * Change Delegator to stop creating instances and improve performance [v0.8.0]: https://github.com/piotrmurach/pastel/compare/v0.7.4...v0.8.0 [v0.7.4]: https://github.com/piotrmurach/pastel/compare/v0.7.3...v0.7.4 [v0.7.3]: https://github.com/piotrmurach/pastel/compare/v0.7.2...v0.7.3 [v0.7.2]: https://github.com/piotrmurach/pastel/compare/v0.7.1...v0.7.2 [v0.7.1]: https://github.com/piotrmurach/pastel/compare/v0.7.0...v0.7.1 [v0.7.0]: https://github.com/piotrmurach/pastel/compare/v0.6.1...v0.7.0 [v0.6.1]: https://github.com/piotrmurach/pastel/compare/v0.6.0...v0.6.1 [v0.6.0]: https://github.com/piotrmurach/pastel/compare/v0.5.3...v0.6.0 [v0.5.3]: https://github.com/piotrmurach/pastel/compare/v0.5.2...v0.5.3 [v0.5.2]: https://github.com/piotrmurach/pastel/compare/v0.5.1...v0.5.2 [v0.5.1]: https://github.com/piotrmurach/pastel/compare/v0.5.0...v0.5.1 [v0.5.0]: https://github.com/piotrmurach/pastel/compare/v0.4.0...v0.5.0 [v0.4.0]: https://github.com/piotrmurach/pastel/compare/v0.3.0...v0.4.0 [v0.3.0]: https://github.com/piotrmurach/pastel/compare/v0.2.1...v0.3.0 [v0.2.1]: https://github.com/piotrmurach/pastel/compare/v0.2.0...v0.2.1 [v0.2.0]: https://github.com/piotrmurach/pastel/compare/v0.1.0...v0.2.0 [v0.1.0]: https://github.com/piotrmurach/pastel/compare/v0.1.0 pastel-0.8.0/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000006235 13700074614 0015616 0 ustar 00root root 0000000 0000000 # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at piotr@piotrmurach.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ pastel-0.8.0/Gemfile 0000664 0000000 0000000 00000000271 13700074614 0014304 0 ustar 00root root 0000000 0000000 source "https://rubygems.org" gemspec group :test do gem "coveralls", "~> 0.8.22" gem "simplecov", "~> 0.16.1" gem "yardstick", "~> 0.9.9" gem "benchmark-ips", "~> 2.7.2" end pastel-0.8.0/LICENSE.txt 0000664 0000000 0000000 00000002055 13700074614 0014636 0 ustar 00root root 0000000 0000000 Copyright (c) 2014 Piotr Murach MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pastel-0.8.0/README.md 0000664 0000000 0000000 00000026656 13700074614 0014307 0 ustar 00root root 0000000 0000000