From 585b0a04cf243823fb56d143b2ddc894d1514d1b Mon Sep 17 00:00:00 2001 From: vidhvath28 Date: Mon, 2 Sep 2024 19:09:50 +0530 Subject: [PATCH] add --- README.md | 46 +++++++++++++++++++++++++++++---------------- spec/spec_helper.cr | 26 ------------------------- 2 files changed, 30 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index f6af6c9..37c5c51 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,29 @@ -# crystal2nix -crystal2nix is a streamlined tool designed to simplify the integration of Crystal projects with the Nix package manage, it supports seamless builds from both Git and Mercurial repositories. + [NixOS](https://nixos.org) -`crystal2nix` +# Crystal2Nix + +Crystal2Nix is a tool designed to generate Nix expressions for Crystal projects. It simplifies the process of managing dependencies and building Crystal applications within the Nix ecosystem. + +## Features + +- Automatically generates Nix expressions from `shard.yml` files. +- Supports Crystal projects with various dependencies. +- Building and managing Crystal applications. + +## Table of Contents + +- [Installation](#installation) +- [Usage](#usage) +- [Testing](#testing) +- [Contributing](#contributing) +- [License](#license) + +## Installation + +### Prerequisites + +- [Nix](https://nixos.org/download.html) installed on your system. +- [Crystal](https://crystal-lang.org/install/) programming language installed. ## Installation @@ -17,22 +39,15 @@ To generate a Nix expression for your Crystal project, simply run: ## Testing -crystal2nix includes various test cases to ensure the reliability and functionality of the tool. These are categorized into offline unit tests. - -Offline Unit Tests: These tests can be run within the Nix sandbox without requiring network connectivity. - -`make check` - -Helps you test offline test cases. +Unit Tests: These tests can be run within the Nix sandbox without requiring network connectivity. -## Development - -We welcome all contributions, whether it's bug fixes, new features, or documentation improvements. If you're interested in contributing to crystal2nix, here's how you can get started: +`make check ` # Runs unit tests ## Future plans Support for Fossil resources: Expanding source control compatibility. -Enhanced Test Suite: Adding more integration test cases to further solidify the reliability of crystal2nix. +Additional integration test cases: Enhancing the robustness of our test suite. + ## Contributing @@ -50,7 +65,6 @@ crystal2nix is licensed under the MIT License. You are free to use, modify, and ## Contributors - - [Michael Fellinger](https://github.com/manveru) - [Peter Hoeg](https://github.com/peterhoeg) -- [Vidhvath J](https://github.com/vidhvath28) +- [Vidhvath J](https://github.com/vidhvath28) \ No newline at end of file diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr index df6fdfe..67f3287 100644 --- a/spec/spec_helper.cr +++ b/spec/spec_helper.cr @@ -1,29 +1,3 @@ require "../src/crystal2nix" require "spectator" -module SpecHelper - def self.setup_temp_directory(dir) - Dir.mkdir(dir) unless Dir.exists?(dir) - end - - def self.cleanup_file(file_path) - File.delete(file_path) if File.exists?(file_path) - end - - def self.write_file(file_path, content) - File.write(file_path, content) - end - - def self.read_file(file_path) - File.read(file_path) - end - - def self.file_exists?(file_path) - File.exists?(file_path) - end - - def self.prepare_for_test(generated_shards_nix) - setup_temp_directory("spec/tmp") - cleanup_file(generated_shards_nix) - end -end