Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlyonsmith/code-tools
A set of tools for maintaining source code
https://github.com/jlyonsmith/code-tools
Last synced: 6 days ago
JSON representation
A set of tools for maintaining source code
- Host: GitHub
- URL: https://github.com/jlyonsmith/code-tools
- Owner: jlyonsmith
- License: mit
- Created: 2015-08-07T21:26:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-11T18:12:28.000Z (almost 8 years ago)
- Last Synced: 2023-03-17T16:35:26.786Z (over 1 year ago)
- Language: Ruby
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Source Code Tools
A collection of useful command line development tools for general source code maintenance. They are written in [Ruby](https://www.ruby-lang.org/en/) for maximum portability. I use [RubyMine](https://www.jetbrains.com/ruby/) for writing and debugging them, but it's not required.
- __vamper__ updates file and product version numbers across a variety of different file types
- __ender__ reports on and fixes line endings in text files
- __spacer__ reports on and fixes initial spaces and tabs in source code and other text filesTo install the latest version of [code_tools](https://rubygems.org/gems/code_tools) simply run:
```bash
gem install code_tools
```## Spacer
Spacer will report on and normalize spaces and tabs in source code and text files. Normalize the spaces of an entire directory of files _in-place_ with:
```bash
find *.cs -exec spacer -m spaces -t 4 -r {} \;
```## Debugging
Because of the directory layout, running the tools from the command line requires a little more effort:
```bash
ruby -e 'load($0=ARGV.shift);Vamper.new.execute' -- lib/vamper.rb --help
```## Publishing
Here's what you need to do to publish a Ruby gem. First time only:
```bash
curl -u https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
```Then:
```bash
gem build code_tools.gemspec
gem push code_tools-.gem
```