From 1f4e3e71e117056896c9fa2d8bf673404677a72a Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 17 Jul 2022 16:58:34 -0300 Subject: [PATCH] switch to bundler --- gem.deps.rb => Gemfile | 1 + README.md | 17 ++++++++++------- bin/json/private/al-quran | 5 +++-- bin/json/pull-arabic | 1 + bin/json/pull-english | 1 + bin/json/pull-farsi | 2 -- 6 files changed, 16 insertions(+), 11 deletions(-) rename gem.deps.rb => Gemfile (79%) diff --git a/gem.deps.rb b/Gemfile similarity index 79% rename from gem.deps.rb rename to Gemfile index 1a1040b..6fc115d 100644 --- a/gem.deps.rb +++ b/Gemfile @@ -3,3 +3,4 @@ gem "nokogiri", "~> 1.13" gem "paint", "~> 2.2" gem "json", "~> 2.6" +gem "standard", "~> 1.12" diff --git a/README.md b/README.md index 93c89d9..b9d0a2b 100644 --- a/README.md +++ b/README.md @@ -296,17 +296,20 @@ contents of the [src/](src/) directory: **Note #1** -By default it is not neccessary to run these scripts because the contents of `src/` is included in -the repository already. - +By default it is not neccessary to run the scripts mentioned above because the contents of +`src/` is included in the repository already. **Note #2** The scripts are written in [Ruby v3.1.0+](https://www.ruby-lang.org).
-The ["pull-english"](bin/json/pull-english), ["pull-farsi"](bin/json/pull-farsi) and -["pull-portuguese"](bin/json/pull-portuguese) scripts depend on the ["pull-arabic"](bin/json/pull-arabic) -script being run first. The script dependencies can be installed by -running `gem install -g gem.deps.rb` from the root of the repository. +The script dependencies can be installed by running the following from +the root of the repository: + +``` +gem install bundler --no-rdoc --no-ri +bundle install +``` + ## Download For those of you who don't have access to, or know how to use "git", diff --git a/bin/json/private/al-quran b/bin/json/private/al-quran index 618c889..168147f 100755 --- a/bin/json/private/al-quran +++ b/bin/json/private/al-quran @@ -12,10 +12,11 @@ ## # Set process title - primarily for the "ps" command -Process.setproctitle("quran-pull (al-quran) (#{ARGV[1])") +Process.setproctitle("quran-pull (al-quran) (#{ARGV[1]})") ## # Dependencies +require "bundler/setup" require "net/http" require "nokogiri" require "json" @@ -33,7 +34,7 @@ delay = 0.5 # Chapter names names = JSON.parse( File.read( - File.join('bindata', 'al-quran.cc', 'chapter-names.json') + File.join("bindata", "al-quran.cc", "chapter-names.json") ) ) diff --git a/bin/json/pull-arabic b/bin/json/pull-arabic index 58c4507..8ff8b1f 100755 --- a/bin/json/pull-arabic +++ b/bin/json/pull-arabic @@ -15,6 +15,7 @@ Process.setproctitle("quran-pull (pull-arabic)") ## # Dependencies +require "bundler/setup" require "net/http" require "nokogiri" require "json" diff --git a/bin/json/pull-english b/bin/json/pull-english index 2f7abbc..541848e 100755 --- a/bin/json/pull-english +++ b/bin/json/pull-english @@ -15,6 +15,7 @@ Process.setproctitle("quran-pull (pull-english)") ## # Dependencies +require "bundler/setup" require "net/http" require "nokogiri" require "json" diff --git a/bin/json/pull-farsi b/bin/json/pull-farsi index fd49f72..1a4d520 100755 --- a/bin/json/pull-farsi +++ b/bin/json/pull-farsi @@ -18,5 +18,3 @@ Process.setproctitle("quran-pull (pull-farsi)") Process.wait Process.spawn( "./bin/json/private/al-quran", "fa", "farsi" ) - -