mirror of https://github.com/mjohanning99/RubyTLDR
Fix UPCASE bug
parent
acf14c084c
commit
6ec6b5014f
|
@ -20,10 +20,10 @@ along with RubyTldr. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#Checks where the page exists in the page folders (and returns the operating system of the corresponding page)
|
||||
def operating_system()
|
||||
return "linux" if Dir.entries(@linux).include?("#{ARGV[0]}.md")
|
||||
return "common" if Dir.entries(@common).include?("#{ARGV[0]}.md")
|
||||
return "windows" if Dir.entries(@windows).include?("#{ARGV[0]}.md")
|
||||
return "osx" if Dir.entries(@osx).include?("#{ARGV[0]}.md")
|
||||
return "sunos" if Dir.entries(@sunos).include?("#{ARGV[0]}.md")
|
||||
return "linux" if Dir.entries(@linux).include?("#{ARGV[0].downcase}.md")
|
||||
return "common" if Dir.entries(@common).include?("#{ARGV[0].downcase}.md")
|
||||
return "windows" if Dir.entries(@windows).include?("#{ARGV[0].downcase}.md")
|
||||
return "osx" if Dir.entries(@osx).include?("#{ARGV[0].downcase}.md")
|
||||
return "sunos" if Dir.entries(@sunos).include?("#{ARGV[0].downcase}.md")
|
||||
return "nil" if ARGV[0].class == NilClass
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ along with RubyTldr. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#Checking if the page exists, parsing it using parse_md and downloading it if necessary
|
||||
def run()
|
||||
page = "#{ARGV[0]}.md"
|
||||
page = "#{ARGV[0].downcase}.md"
|
||||
case operating_system()
|
||||
when "linux"
|
||||
parse_md(@linux, page)
|
||||
|
|
Loading…
Reference in New Issue