From f287c2c8c95579688fa5620df954d8cc1272cbbf Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Mon, 2 Apr 2018 21:42:09 -0600 Subject: [PATCH 01/15] Bumped version number to v0.1.3. --- shard.yml | 6 +----- src/compiled_license/version.cr | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/shard.yml b/shard.yml index 1d9e463..e26efbc 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: compiled_license -version: 0.1.2 +version: 0.1.3 authors: - Isaac Sloan @@ -7,7 +7,3 @@ authors: crystal: 0.24.1 license: MIT - -dependencies: - cry: - github: elorest/cry diff --git a/src/compiled_license/version.cr b/src/compiled_license/version.cr index f067864..5ee35f3 100644 --- a/src/compiled_license/version.cr +++ b/src/compiled_license/version.cr @@ -1,3 +1,3 @@ module CompiledLicense - VERSION = "0.1.2" + VERSION = "0.1.3" end From 759e503f0882fc9ec30d950b503f75da4bd44609 Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Mon, 2 Apr 2018 21:58:44 -0600 Subject: [PATCH 02/15] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2093558..e9b93ed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # compiled_license - -TODO: Write a description here +Compiles the licences of all shards used in project into binary. ## Installation @@ -18,7 +17,10 @@ dependencies: require "compiled_license" ``` -TODO: Write usage instructions here +``` +$ testapp --licenses +# Returns all licenses to stdout +``` ## Development From 65207213dbbe85051209c286c6886f631f0258a0 Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Mon, 2 Apr 2018 21:59:00 -0600 Subject: [PATCH 03/15] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index e9b93ed..5e8bcd9 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,6 @@ $ testapp --licenses # Returns all licenses to stdout ``` -## Development - -TODO: Write development instructions here - ## Contributing 1. Fork it ( https://github.com/elorest/compiled_license/fork ) From cdca2f5832be48a710f8cbdc6988c1361ea435d8 Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Mon, 2 Apr 2018 21:59:18 -0600 Subject: [PATCH 04/15] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e8bcd9..849c1e6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# compiled_license +# Compiled License + Compiles the licences of all shards used in project into binary. ## Installation From 307ab40b4431f454facb832b4cec7986241c264d Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Mon, 2 Apr 2018 22:03:14 -0600 Subject: [PATCH 05/15] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 849c1e6..12867f1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Compiled License Compiles the licences of all shards used in project into binary. +This allows you to legally distribute binaries without having to package the licenses files from the shards. ## Installation @@ -18,7 +19,10 @@ dependencies: require "compiled_license" ``` +Compile and run + ``` +$ crystal build src/testapp.cr $ testapp --licenses # Returns all licenses to stdout ``` From ba052e31f8203c1db9997be3aba9dae62dc5f832 Mon Sep 17 00:00:00 2001 From: Isaac Sloan Date: Wed, 12 May 2021 14:35:57 -0700 Subject: [PATCH 06/15] Bumped version number to v1.0.0. --- shard.yml | 4 ++-- src/compiled_license/version.cr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shard.yml b/shard.yml index e26efbc..9208c08 100644 --- a/shard.yml +++ b/shard.yml @@ -1,9 +1,9 @@ name: compiled_license -version: 0.1.3 +version: 1.0.0 authors: - Isaac Sloan -crystal: 0.24.1 +crystal: "> 0.24.1, < 1.1.0" license: MIT diff --git a/src/compiled_license/version.cr b/src/compiled_license/version.cr index 5ee35f3..2c264a8 100644 --- a/src/compiled_license/version.cr +++ b/src/compiled_license/version.cr @@ -1,3 +1,3 @@ module CompiledLicense - VERSION = "0.1.3" + VERSION = "1.0.0" end From 22ab96d7d08fe4fbe76e4d3df4c7c9e95b2a67e5 Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:17:50 +0200 Subject: [PATCH 07/15] rewrite --- .travis.yml | 1 - shard.yml | 3 ++- spec/compiled_license_spec.cr | 9 +++++---- spec/spec_helper.cr | 2 -- src/compiled_license.cr | 15 +++------------ src/compiled_license/licenses.cr | 18 ++++++++++-------- src/compiled_license/version.cr | 3 --- 7 files changed, 20 insertions(+), 31 deletions(-) delete mode 100644 .travis.yml delete mode 100644 spec/spec_helper.cr delete mode 100644 src/compiled_license/version.cr diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ffc7b6a..0000000 --- a/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: crystal diff --git a/shard.yml b/shard.yml index 9208c08..58a9060 100644 --- a/shard.yml +++ b/shard.yml @@ -3,7 +3,8 @@ version: 1.0.0 authors: - Isaac Sloan + - grimmigerFuchs -crystal: "> 0.24.1, < 1.1.0" +crystal: 1.20.1 license: MIT diff --git a/spec/compiled_license_spec.cr b/spec/compiled_license_spec.cr index cb3364c..0d7e535 100644 --- a/spec/compiled_license_spec.cr +++ b/spec/compiled_license_spec.cr @@ -1,14 +1,15 @@ -require "./spec_helper" +require "spec" +require "../src/compiled_license" describe CompiledLicense do - licenses = {{ run("../src/compiled_license/licenses.cr").stringify }} + licenses = CompiledLicense::LICENSES it "should return string" do (licenses.size > 20).should be_true end it "should include license of current file" do - licenses.should contain("Compiled_license") + licenses.should contain("compiled_license") end it "should contain name of author from license file" do @@ -17,6 +18,6 @@ describe CompiledLicense do it "should contain more than one license" do delimiter = "\n\n" - (licenses.split(delimiter).size > 1).should be_true + (licenses.split(delimiter).size > 1).should be_true end end diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr deleted file mode 100644 index 999c873..0000000 --- a/spec/spec_helper.cr +++ /dev/null @@ -1,2 +0,0 @@ -require "spec" -require "../src/compiled_license" diff --git a/src/compiled_license.cr b/src/compiled_license.cr index bd3852a..bc26aea 100644 --- a/src/compiled_license.cr +++ b/src/compiled_license.cr @@ -1,14 +1,5 @@ -require "./compiled_license/version" +module CompiledLicense + VERSION = {{ `shards version`.stringify.chomp }} -module Compiled - module License - def self.display - {{ run("./compiled_license/licenses.cr").stringify }} - end - end -end - -if ARGV[0]? && ARGV[0]? == "--licenses" - puts Compiled::License.display - exit 0 + LICENSES = {{ run("./compiled_license/licenses.cr").stringify }} end diff --git a/src/compiled_license/licenses.cr b/src/compiled_license/licenses.cr index d72e2ad..4f5765e 100644 --- a/src/compiled_license/licenses.cr +++ b/src/compiled_license/licenses.cr @@ -1,19 +1,21 @@ -licenses = String.build do |s| +DELIMITER = "================================================================================" + +LICENSES = String.build do |s| if File.exists?("./LICENSE") - s.puts Dir.current.split("/").last.capitalize - s.puts "================================================================================" + s.puts Dir.current.split("/").last + s.puts DELIMITER s.puts File.read("./LICENSE") - s.puts "================================================================================" + s.puts DELIMITER s.puts "\n\n" end Dir.glob("./lib/*/LICENSE", "./lib/*/license").each do |path| - s.puts path.match(/^\.\/lib\/([^\/]+)\//).try(&.[1]).to_s.capitalize - s.puts "================================================================================" + s.puts path.match(/^\.\/lib\/([^\/]+)\//).try(&.[1]).to_s + s.puts DELIMITER s.puts File.read(path) - s.puts "================================================================================" + s.puts DELIMITER s.puts "\n\n" end end -puts licenses +puts LICENSES diff --git a/src/compiled_license/version.cr b/src/compiled_license/version.cr deleted file mode 100644 index 2c264a8..0000000 --- a/src/compiled_license/version.cr +++ /dev/null @@ -1,3 +0,0 @@ -module CompiledLicense - VERSION = "1.0.0" -end From 2bd7f722d0d213a6063e8edbc9bd6643934a166d Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:20:18 +0200 Subject: [PATCH 08/15] updated usage --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 12867f1..f5dc738 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ dependencies: ```crystal require "compiled_license" + +puts CompiledLicense::LICENSES ``` Compile and run From 88e6e0de7ae3dad559978a6b6a88c14e9cd3ce9a Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:23:24 +0200 Subject: [PATCH 09/15] updated readme --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f5dc738..a394c66 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Compiled License +A fork of [elorest](https://github.com/elorest)'s library. + Compiles the licences of all shards used in project into binary. This allows you to legally distribute binaries without having to package the licenses files from the shards. @@ -10,7 +12,7 @@ Add this to your application's `shard.yml`: ```yaml dependencies: compiled_license: - github: elorest/compiled_license + github: grimmigerFuchs/compiled_license ``` ## Usage @@ -25,13 +27,13 @@ Compile and run ``` $ crystal build src/testapp.cr -$ testapp --licenses +$ testapp # Returns all licenses to stdout ``` ## Contributing -1. Fork it ( https://github.com/elorest/compiled_license/fork ) +1. Fork it ( https://github.com/grimmigerFuchs/compiled_license/fork ) 2. Create your feature branch (git checkout -b my-new-feature) 3. Commit your changes (git commit -am 'Add some feature') 4. Push to the branch (git push origin my-new-feature) @@ -40,3 +42,4 @@ $ testapp --licenses ## Contributors - [elorest](https://github.com/elorest) Isaac Sloan - creator, maintainer +- [grimmigerFuchs](https://github.com/grimmigerFuchs) - contributor From e3bd2f268c470b22e5fb3403559d2cd207293c3d Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:23:54 +0200 Subject: [PATCH 10/15] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a394c66..5042793 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Compiled License -A fork of [elorest](https://github.com/elorest)'s library. +*A fork of [elorest](https://github.com/elorest)'s library.* Compiles the licences of all shards used in project into binary. This allows you to legally distribute binaries without having to package the licenses files from the shards. From d02b58c655b943d69633df7e5da8043b19e2aedf Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:55:14 +0200 Subject: [PATCH 11/15] fixed typo --- shard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shard.yml b/shard.yml index 58a9060..76729b6 100644 --- a/shard.yml +++ b/shard.yml @@ -5,6 +5,6 @@ authors: - Isaac Sloan - grimmigerFuchs -crystal: 1.20.1 +crystal: 1.2.1 license: MIT From 59f49d2f921ddf67b32fda3cf1ecbf0c195e34c2 Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 12:56:54 +0200 Subject: [PATCH 12/15] updated version --- shard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shard.yml b/shard.yml index 76729b6..4d64fd4 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: compiled_license -version: 1.0.0 +version: 2.0.0 authors: - Isaac Sloan From d1d8104ab4117148e4eb5d201611f808b1c39df3 Mon Sep 17 00:00:00 2001 From: grimmigerFuchs Date: Sat, 23 Oct 2021 13:42:39 +0200 Subject: [PATCH 13/15] added automatic version fetching --- shard.yml | 5 +++++ src/compiled_license.cr | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/shard.yml b/shard.yml index 4d64fd4..73e048c 100644 --- a/shard.yml +++ b/shard.yml @@ -8,3 +8,8 @@ authors: crystal: 1.2.1 license: MIT + +dependencies: + version: + github: unn4m3d/version + version: 0.1.1 diff --git a/src/compiled_license.cr b/src/compiled_license.cr index bc26aea..10e8103 100644 --- a/src/compiled_license.cr +++ b/src/compiled_license.cr @@ -1,5 +1,7 @@ +require "version" + module CompiledLicense - VERSION = {{ `shards version`.stringify.chomp }} + VERSION = Version.fetch LICENSES = {{ run("./compiled_license/licenses.cr").stringify }} end From 993eae03d5d115573079968b31d40bb58fb4a49d Mon Sep 17 00:00:00 2001 From: Dominic Grimm Date: Sun, 6 Feb 2022 19:52:37 +0000 Subject: [PATCH 14/15] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5042793..e9930ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Compiled License -*A fork of [elorest](https://github.com/elorest)'s library.* +*A fork of [elorest's library](https://github.com/elorest/compiled_license).* Compiles the licences of all shards used in project into binary. This allows you to legally distribute binaries without having to package the licenses files from the shards. From 00fc5c46bbc65003ed40ba813c5fc20f976de734 Mon Sep 17 00:00:00 2001 From: Dominic Grimm Date: Sun, 6 Feb 2022 19:53:31 +0000 Subject: [PATCH 15/15] Update 'README.md' --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9930ac..5c32935 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Add this to your application's `shard.yml`: ```yaml dependencies: compiled_license: - github: grimmigerFuchs/compiled_license + git: https://git.dergrimm.net/dergrimm/compiled_license.git ``` ## Usage @@ -42,4 +42,4 @@ $ testapp ## Contributors - [elorest](https://github.com/elorest) Isaac Sloan - creator, maintainer -- [grimmigerFuchs](https://github.com/grimmigerFuchs) - contributor +- [grimmigerFuchs](https://git.dergrimm.net/dergrimm) - contributor