Sha256: edaed564e7d22abca0c9af328b649c81027b5142c796e57515a756d86bcc00f5

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

#!/usr/bin/env ruby

require "bundler/setup"
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]

Dir::chdir($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
	if !Apstrings::validate(file,files_to_validate["master"])
		success = false
	end
 }

if success && any_file
	Apstrings::log_info("Success, well done! 🍻 🍻")
	exit(0)
else if !any_file
	Apstrings::log_info("Nothing to validate.")
	exit(0)
else
	Apstrings::log_error("Failed: You'd better know what u r doing...")
	exit(1)
end
end
 

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
apstrings-0.3.1 bin/apstrings
apstrings-0.3.0 bin/apstrings