-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add plugin for ruby * Increase python test coverage
- Loading branch information
Showing
4 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
inputs.nixpkgs-ruby.url = "github:bobvanderlinden/nixpkgs-ruby"; | ||
|
||
outputs = { self, nixpkgs-ruby }: { | ||
lib = { | ||
hasVersion = { version, system ? builtins.currentSystem }: | ||
builtins.hasAttr "ruby-${version}" nixpkgs-ruby.packages.${system}; | ||
packageFromVersion = { version, system ? builtins.currentSystem }: | ||
nixpkgs-ruby.packages.${system}."ruby-${version}"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
let | ||
lib = (builtins.getFlake (builtins.toString ./../../../plugins/ruby)).lib; | ||
in | ||
[ | ||
{ | ||
name = "When the version exists returns true"; | ||
actual = lib.hasVersion { version = "3.2.2"; }; | ||
expected = true; | ||
} | ||
{ | ||
name = "When the version does not exist returns false"; | ||
actual = lib.hasVersion { version = "0.0.0"; }; | ||
expected = false; | ||
} | ||
{ | ||
name = "When the version exists returns a package"; | ||
actual = (lib.packageFromVersion { version = "3.2.2"; }).name; | ||
expected = "ruby-3.2.2"; | ||
} | ||
] |