2
1
mirror of https://github.com/kdabir/has.git synced 2024-09-18 17:01:29 +02:00
Commit Graph

100 Commits

Author SHA1 Message Date
Virgil
0e92f29a24 🎨 follow Bats coding style for tests
- [x] renamed working directory variable to `HAS_TMPDIR`
- [x] explicitly calling has binary
- [x] Only using `[[ ]]` for regex matches
2019-05-21 07:00:23 +10:00
Virgil
1f7dd61324 use apt addon in CI config (#33) 2019-05-20 23:18:08 +05:30
Virgil
f5981b9145 Linting with shellcheck (#32)
* [SC2196] Use grep -Eegrep is non-standard and deprecated.

* [SC2086] Double quoting

Double quote to prevent globbing and word splitting.

* [SC2059] printf syntax

Don't use variables in the printf format string.
Use printf "..%s.." "$foo".

Update matching test to not assume whitespace is <space>

* [SC2002] Useless cat.

Consider 'cmd < file | ..' or 'cmd file | ..' instead.

* Update Unicode PASS/FAIL output

- [x] NEW variables for 'checkmark' and 'fancy x' and tput colours
  - [x] eg: `checkmark` = `\342\234\223`
  - [x] eg: `PASS=${txtbold}${txtgreen}${checkmark}${txtreset}`
  - [x] update `printf` statements to use `%b` for unicode variables.
- [x] Using readonly variables for
  - [x] $BINARY_NAME and $VERSION
  - [x] $PASS and $FAIL
- [x] refactor `.hasrc` file reading
  - [x] [SC2002] Useless cat
- [x] Add new BATS tests for Unicode output

* Repo scaffolding - shellscript filetype

- [x] Add shellscripts to `.editorconfig`
- [x] Add shellscripts to `.gitattributes`

* Refactored tests to use consistent unicode glyphs.
2019-04-23 12:08:38 +05:30
Kunal Dabir
53ab06dd03 Sadly, longopts like --verbose are not working on MacOS for cp, mkdir and rm. also -u was not supported for cp. alternative is rsync
https://superuser.com/questions/515373/cp-u-is-illegal-on-mac-what-are-the-alternatives
2019-04-04 16:14:00 +05:30
Virgil
36e11e238f Freshen Makefile and update README.md (#31)
Details:

* Freshen Makefile and update README.md

- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output

- [x] Use `install` with permission mode

The permissions on `has` were 777 from `git clone`.

- [x] Add option to use $PREFIX

What if I don't want to install to /usr/local/bin?

`make PREFIX=$HOME/.local install` now works.

- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets

* Freshen Makefile and update README.md

- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output

- [x] Use `install` with permissions set

The permissions on `has` were 777 from `git clone`.

- [x] Add option to use $PREFIX

What if I don't want to install to /usr/local/bin?

`make PREFIX=$HOME/.local install` now works.

- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets

- [x] Add tests for Makefile changes
- [x] Uses `bats` variables for directories

- ✓ make install creates a valid installation
- ✓ ..even if has is missing from directory
- ✓ make update runs git pull

* Update .hastest.bats

temp remove "git pull" check.

* Update travis to use bats-core 1.10

Do not be concerned about dirty working tree when running make update.

* Change version output to non-blinking.

* Update travis to use bats-core 1.10

Do not be concerned about dirty working tree when running make update.

* Working makefile

* Use `[[` and `@` for the $lines match.

* `make install` MacOS friendly again
2019-04-04 16:09:17 +05:30
Kunal Dabir
3b26771c8a
Update README.md 2018-12-03 09:17:49 +05:30
Kunal Dabir
33b0623497
Update README.md 2018-11-27 08:30:33 +05:30
Kunal Dabir
29e5c412d2 release v1.4.0 2018-11-18 17:37:01 +05:30
Kunal Dabir
10c906e7f8 fix regression created with #15. self verion had stopped working. now added a test for it 2018-11-17 11:05:14 +05:30
Kunal Dabir
ef55e62fd0
detailed installation instructions 2018-11-17 10:51:49 +05:30
Kunal Dabir
b1f41e786c
cleanup 2018-11-16 18:43:35 +05:30
Kunal Dabir
7dc6946d36
link this repo's .hasrc 2018-11-16 18:41:00 +05:30
Kunal Dabir
d07a65596d #15 docs on project specific .hasrc 2018-11-16 17:19:46 +05:30
Kunal Dabir
33cbc13738 #15 update documentation for .hasrc file 2018-11-16 16:50:36 +05:30
Kunal Dabir
44a71cf023 #15 test for excluding comments (lines starting with a #) 2018-11-16 16:23:34 +05:30
Kunal Dabir
1702c991ce implements #15
support for .hasrc file in current working directory, from where
has command is fired. these commands are merged with cli args.
2018-11-16 16:01:11 +05:30
Kunal Dabir
b60c239bc4 extract magic number into a variable 2018-11-16 12:12:37 +05:30
Kunal Dabir
79f3eb8bba fixes #27 return status code only upto 126 2018-11-16 07:58:05 +05:30
Kunal Dabir
27a6b24b1c update demo 2018-11-15 13:24:22 +05:30
Kunal Dabir
722a5495d6 bump to v1.3.0 2018-11-15 11:57:30 +05:30
Kunal Dabir
4e91758c00 colorize the version as well 2018-11-15 11:53:28 +05:30
Kunal Dabir
1ad2f05548 its possible because of many more 2018-11-15 10:44:33 +05:30
Jason Phan
4d1035e241 added: colors (#26)
Support Colors #12 

* added: colors

No more echo with variables in them. Think of it like the Holocaust... Never. Again.

* update: removed color codes from tests
2018-11-15 10:39:17 +05:30
Kunal Dabir
8674525059
Update LICENSE 2018-11-14 21:51:07 +05:30
Kunal Dabir
87959c9b70
Merge pull request #25 from danstewart/master
Add perl6 and kotlin
2018-10-26 18:37:35 +05:30
Dan Stewart
86e7a8c4d6 Add perl6 and kotlin 2018-10-26 13:25:51 +01:00
Kunal Dabir
75ccc96171
Merge pull request #24 from layik/patch-1
tiny: add R
2018-09-12 18:31:32 +05:30
Layik Hama
621616fe56
tiny: add R 2018-09-12 13:17:28 +01:00
Kunal Dabir
0f23f2606d
add project location in script 2018-09-11 20:18:32 +05:30
Kunal Dabir
d18ace12fd add some cloud tools 2018-09-11 12:46:16 +05:30
Kunal Dabir
5443d4cb9e
link svg
in future, serve svg via rawgit
2018-04-08 22:33:10 +05:30
Kunal Dabir
c85422d5d4 add demo svg 2018-04-08 22:29:36 +05:30
Kunal Dabir
a3223b2a8e
Merge pull request #23 from codetriage-readme-bot/codetriage-badge
Add CodeTriage badge to kdabir/has
2018-03-01 09:44:49 +05:30
codetriage-readme-bot
90e3dfdd68 Add CodeTriage badge to kdabir/has
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/kdabir/has/badges/users.svg)](https://www.codetriage.com/kdabir/has)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly 4 months ago, [@kdabir](https://github.com/kdabir) added this project to CodeTriage in order to start contributing.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-03 15:52:36 -06:00
Kunal Dabir
4de4abba1e
add build status 2018-01-31 09:30:14 +05:30
Kunal Dabir
3136085c75 Fix for #22 - let has eat it's own dogfood 2017-12-27 17:47:19 +05:30
Kunal Dabir
f6fe16c659 Merge pull request #20 from vimist/More_tools
More tools
2017-10-14 16:18:02 +05:30
Kunal Dabir
f5101803f4 Merge pull request #19 from vimist/Treat_SIGPIPE_as_success
Treat SIGPIPE (exit code 141) as a success
2017-10-14 16:16:08 +05:30
vimist
dfe466c7bf Added sbt support 2017-10-14 11:12:54 +01:00
vimist
d61a4bb457 Added lein support 2017-10-14 11:12:43 +01:00
vimist
cf9ea4ce23 Added scala support 2017-10-14 11:12:16 +01:00
vimist
f3b243a531 Added php5 support 2017-10-14 11:11:55 +01:00
vimist
1382244c94 Treat SIGPIPE (exit code 141) as a success
If SIGPIPE is received, it doesn't mean that we didn't manage to extract
the version; this change should fix this issue.

This should resolve #18.
2017-10-14 08:53:50 +01:00
Kunal Dabir
0816c04c67 add grunt gulp brunch 2017-10-14 12:56:16 +05:30
Kunal Dabir
8f0ffe8698 add alias for brew 2017-10-14 12:39:14 +05:30
Kunal Dabir
dc072fd7d6 add yarn 2017-10-14 12:35:23 +05:30
Kunal Dabir
9b6b4d303c add ways to contribute 2017-10-14 12:29:07 +05:30
Kunal Dabir
b1fb012bd7 support httpie 2017-10-14 12:29:07 +05:30
Kunal Dabir
2a75f7e763 Add more comments for anyone to follow along what the script does
Also extracted function for commands what expect version as arg
2017-10-14 12:29:07 +05:30
Kunal Dabir
a6381b6093 update readme for non-whitelisted commands 2017-09-12 09:44:51 +05:30