Skip to content

Commit

Permalink
Merge branch 'main' into main01
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhvath28 authored Jun 15, 2024
2 parents d18a71c + 785776f commit 69948aa
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 76 deletions.
46 changes: 46 additions & 0 deletions shard.lock.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2.0
shards:
carbon:
git: https://github.com/luckyframework/carbon.git
version: 0.2.1

carbon_smtp_adapter:
hg: https://hg.sr.ht/~peterhoeg/dummy
version: 0.1.1+hg.commit.4048cd7e156f3d4317e10ebd4e742020c8049310

email:
git: https://github.com/arcage/crystal-email.git
version: 0.6.4

habitat:
git: https://github.com/luckyframework/habitat.git
version: 0.4.8

libremiliacr:
fossil: https://chiselapp.com/user/MistressRemilia/repository/libremiliacr
version: 0.90.6

lucky_task:
git: https://github.com/luckyframework/lucky_task.git
version: 0.1.1

teeplate:
git: https://github.com/luckyframework/teeplate.git
version: 0.8.5

version_from_shard:
git: https://github.com/hugopl/version_from_shard.git
version: 1.2.5

wordsmith:
git: https://github.com/luckyframework/wordsmith.git
version: 0.3.0

yunosynth:
fossil: https://chiselapp.com/user/MistressRemilia/repository/yunosynth
version: 0.4.2+fossil.commit.e820a8489011d22d43383526726b40695238c79d8e8b335fbf60a42dd0215544

zstd:
git: https://github.com/didactic-drunk/zstd.cr.git
version: 1.2.0

3 changes: 0 additions & 3 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: crystal2nix
version: 0.3.0
license: MIT
Expand All @@ -18,7 +17,6 @@ dependencies:
github: hugopl/version_from_shard
version: ~> 1.2.4


carbon_smtp_adapter:
hg: https://hg.sr.ht/~peterhoeg/dummy
version: ~> 0.1.1
Expand All @@ -27,4 +25,3 @@ development_dependencies:
spectator:
gitlab: arctic-fox/spectator
version: ~> 0.10.5

21 changes: 0 additions & 21 deletions shards.nix
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
{
spectator = {
url = "https://gitlab.com/arctic-fox/spectator.git";
rev = "v0.10.5";
sha256 = "1fgjz5vg59h4m25v4fjklimcdn62ngqbchm00kw1160ggjpgpzw2";
};
version_from_shard = {
url = "https://github.com/hugopl/version_from_shard.git";
rev = "v1.2.5";
sha256 = "0xizj0q4rd541rwjbx04cjifc2gfx4l5v6q2y7gmd0ndjmkgb8ik";
};
carbon_smtp_adapter = {
hg = "https://hg.sr.ht/~peterhoeg/dummy";
rev = "v0.1.1";
sha256 = "0kdb0k1xzl4yysfmlif7xmr2mnb3y5f3knqr8dy08f3sq9n31x4z";

}
}



56 changes: 4 additions & 52 deletions spec/repo_spec.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "./spec_helper"

Spectator.describe Crystal2Nix::Repo do
Spectator.describe Repo do
context "commit" do
let(:with_commit) {
<<-EOF
Expand All @@ -9,12 +9,8 @@ Spectator.describe Crystal2Nix::Repo do
EOF
}

let(:shard) {
Crystal2Nix::Shard.from_yaml(with_commit)
}

let(:repo) {
Crystal2Nix::Repo.new(shard.url, shard.rev, shard.type)
Crystal2Nix::Repo.new(Crystal2Nix::Shard.from_yaml(with_commit))
}

it "should have the commit as revision" do
Expand All @@ -30,56 +26,12 @@ Spectator.describe Crystal2Nix::Repo do
EOF
}

let(:shard) {
Crystal2Nix::Shard.from_yaml(with_version)
}

let(:repo) {
Crystal2Nix::Repo.new(shard.url, shard.rev, shard.type)
Crystal2Nix::Repo.new(Crystal2Nix::Shard.from_yaml(with_version))
}

it "should prefix version references with a v" do
expect(repo.rev).to eq("v0.1.1")
end
end

context "http url" do
let(:with_http_url) {
<<-EOF
http: https://example.com/archive.tar.gz
EOF
}

let(:shard) {
Crystal2Nix::Shard.from_yaml(with_http_url)
}

let(:repo) {
Crystal2Nix::Repo.new(shard.url, shard.rev, shard.type)
}

it "should have the correct url" do
expect(repo.url).to eq("https://example.com/archive.tar.gz")
end
end

context "git without revision" do
let(:without_revision) {
<<-EOF
git: https://github.com/example/repo.git
EOF
}

let(:shard) {
Crystal2Nix::Shard.from_yaml(without_revision)
}

let(:repo) {
Crystal2Nix::Repo.new(shard.url, shard.rev, shard.type)
}

it "should have the correct url" do
expect(repo.url).to eq("https://github.com/example/repo.git")
end
end
end
end

0 comments on commit 69948aa

Please sign in to comment.