switch to bundler

This commit is contained in:
0x1eef 2022-07-17 16:58:34 -03:00
parent de5f05e1a4
commit 1f4e3e71e1
6 changed files with 16 additions and 11 deletions

View file

@ -3,3 +3,4 @@
gem "nokogiri", "~> 1.13" gem "nokogiri", "~> 1.13"
gem "paint", "~> 2.2" gem "paint", "~> 2.2"
gem "json", "~> 2.6" gem "json", "~> 2.6"
gem "standard", "~> 1.12"

View file

@ -296,17 +296,20 @@ contents of the [src/](src/) directory:
**Note #1** **Note #1**
By default it is not neccessary to run these scripts because the contents of `src/` is included in By default it is not neccessary to run the scripts mentioned above because the contents of
the repository already. `src/` is included in the repository already.
**Note #2** **Note #2**
The scripts are written in [Ruby v3.1.0+](https://www.ruby-lang.org). <br> The scripts are written in [Ruby v3.1.0+](https://www.ruby-lang.org). <br>
The ["pull-english"](bin/json/pull-english), ["pull-farsi"](bin/json/pull-farsi) and The script dependencies can be installed by running the following from
["pull-portuguese"](bin/json/pull-portuguese) scripts depend on the ["pull-arabic"](bin/json/pull-arabic) the root of the repository:
script being run first. The script dependencies can be installed by
running `gem install -g gem.deps.rb` from the root of the repository. ```
gem install bundler --no-rdoc --no-ri
bundle install
```
## Download ## Download
For those of you who don't have access to, or know how to use "git", For those of you who don't have access to, or know how to use "git",

View file

@ -12,10 +12,11 @@
## ##
# Set process title - primarily for the "ps" command # 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 # Dependencies
require "bundler/setup"
require "net/http" require "net/http"
require "nokogiri" require "nokogiri"
require "json" require "json"
@ -33,7 +34,7 @@ delay = 0.5
# Chapter names # Chapter names
names = JSON.parse( names = JSON.parse(
File.read( File.read(
File.join('bindata', 'al-quran.cc', 'chapter-names.json') File.join("bindata", "al-quran.cc", "chapter-names.json")
) )
) )

View file

@ -15,6 +15,7 @@ Process.setproctitle("quran-pull (pull-arabic)")
## ##
# Dependencies # Dependencies
require "bundler/setup"
require "net/http" require "net/http"
require "nokogiri" require "nokogiri"
require "json" require "json"

View file

@ -15,6 +15,7 @@ Process.setproctitle("quran-pull (pull-english)")
## ##
# Dependencies # Dependencies
require "bundler/setup"
require "net/http" require "net/http"
require "nokogiri" require "nokogiri"
require "json" require "json"

View file

@ -18,5 +18,3 @@ Process.setproctitle("quran-pull (pull-farsi)")
Process.wait Process.spawn( Process.wait Process.spawn(
"./bin/json/private/al-quran", "fa", "farsi" "./bin/json/private/al-quran", "fa", "farsi"
) )