Address rubocop errors
This commit is contained in:
parent
3d8deaecf3
commit
dd406b8a45
7 changed files with 18 additions and 6 deletions
|
@ -10,6 +10,10 @@ inherit_gem:
|
|||
|
||||
AllCops:
|
||||
TargetRubyVersion: 3.2
|
||||
Include:
|
||||
- libexec/quran-json/*
|
||||
- lib/quran-json/**/*.rb
|
||||
- bin/*
|
||||
|
||||
##
|
||||
# Enabled cops
|
||||
|
@ -24,5 +28,3 @@ Layout/ArgumentAlignment:
|
|||
Enabled: false
|
||||
Style/LambdaCall:
|
||||
Enabled: false
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "json"
|
||||
|
||||
##
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Quran
|
||||
module JSON
|
||||
require_relative "json/cmd"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Quran::JSON::Cmd
|
||||
require "ryo"
|
||||
require "json"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Quran::JSON::Pull
|
||||
require "ryo"
|
||||
require "json"
|
||||
|
@ -43,7 +45,7 @@ class Quran::JSON::Pull
|
|||
|
||||
def write(surah_no, rows)
|
||||
mkdir_p(locale_dir)
|
||||
rows[0] = Ryo.table_of(metadata[surah_no-1])
|
||||
rows[0] = Ryo.table_of(metadata[surah_no - 1])
|
||||
write_json File.join(locale_dir, "#{surah_no}.json"), rows
|
||||
end
|
||||
|
||||
|
@ -100,8 +102,6 @@ class Quran::JSON::Pull
|
|||
end
|
||||
|
||||
def sources
|
||||
@sources ||= Ryo.from(
|
||||
JSON.parse File.binread(File.join(data_dir, "sources.json"))
|
||||
)
|
||||
@sources ||= Ryo.from read_json(File.join(data_dir, "sources.json"))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
||||
require File.join(lib_dir, "quran", "json")
|
||||
require "optparse"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
||||
require File.join(lib_dir, "quran", "json")
|
||||
require "optparse"
|
||||
|
|
Loading…
Reference in a new issue