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:
|
AllCops:
|
||||||
TargetRubyVersion: 3.2
|
TargetRubyVersion: 3.2
|
||||||
|
Include:
|
||||||
|
- libexec/quran-json/*
|
||||||
|
- lib/quran-json/**/*.rb
|
||||||
|
- bin/*
|
||||||
|
|
||||||
##
|
##
|
||||||
# Enabled cops
|
# Enabled cops
|
||||||
|
@ -24,5 +28,3 @@ Layout/ArgumentAlignment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/LambdaCall:
|
Style/LambdaCall:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/FrozenStringLiteralComment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "json"
|
require "json"
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Quran
|
module Quran
|
||||||
module JSON
|
module JSON
|
||||||
require_relative "json/cmd"
|
require_relative "json/cmd"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Quran::JSON::Cmd
|
module Quran::JSON::Cmd
|
||||||
require "ryo"
|
require "ryo"
|
||||||
require "json"
|
require "json"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Quran::JSON::Pull
|
class Quran::JSON::Pull
|
||||||
require "ryo"
|
require "ryo"
|
||||||
require "json"
|
require "json"
|
||||||
|
@ -100,8 +102,6 @@ class Quran::JSON::Pull
|
||||||
end
|
end
|
||||||
|
|
||||||
def sources
|
def sources
|
||||||
@sources ||= Ryo.from(
|
@sources ||= Ryo.from read_json(File.join(data_dir, "sources.json"))
|
||||||
JSON.parse File.binread(File.join(data_dir, "sources.json"))
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
||||||
require File.join(lib_dir, "quran", "json")
|
require File.join(lib_dir, "quran", "json")
|
||||||
require "optparse"
|
require "optparse"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-json")
|
||||||
require File.join(lib_dir, "quran", "json")
|
require File.join(lib_dir, "quran", "json")
|
||||||
require "optparse"
|
require "optparse"
|
||||||
|
|
Loading…
Reference in a new issue