Sha256: ca3be3498b3a55569cd1b921695701825b0229e6a78aca41b08c0d6a2a302847
Contents?: true
Size: 1.22 KB
Versions: 5
Compression:
Stored size: 1.22 KB
Contents
#!/usr/bin/env ruby require "apstrings" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) # require "pry" # Pry.start $ROOT = ARGV[0] $VALID = true $SUMMARYS = [] Dir::chdir($ROOT) Apstrings::log_info("\n----------------\n Entering #{$ROOT}...") files_to_validate = {"master"=> nil,"files" => []} Dir.glob(File.join("**", "*.strings")) { |file| p File.basename(file) if File.basename(file) == "zh-Hans.strings" files_to_validate["master"] = File.expand_path(file) else files_to_validate["files"] << File.expand_path(file) end } success = true any_file = false files_to_validate["files"].each { |file| any_file = true $VALID,summary = Apstrings::validate(file,files_to_validate["master"]) $SUMMARYS << summary if !$VALID success = false end } if success && any_file Apstrings::log_info("Validate passed. Well done! 🍻 🍻 \n ----------------") exit(0) else if !any_file Apstrings::log_info("Nothing to validate. \n ----------------") exit(0) else Apstrings::log_error("Validate failed, See above for details.\n ----------------") exit(1) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
apstrings-0.4.1 | bin/apstrings |
apstrings-0.4.0 | bin/apstrings |
apstrings-0.3.9 | bin/apstrings |
apstrings-0.3.8 | bin/apstrings |
apstrings-0.3.7 | bin/apstrings |