No commit activity in last 3 years
No release in over 3 years
namespace_editor replaces existing namespaces with a new namespace in each source file found at the given source path whose extension is one of those in the given list of extensions. Useful for Android white label apps
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.1.0
~> 4.0.1
~> 2.14.1
 Project Readme

NamespaceEditor

Command-line Ruby app to edit/replace namespaces. Useful for Android whitelabel apps.

##DESCRIPTION

namespace_editor is a command-line Ruby app to edit/replace namespaces found within src files, which may be necessary when creating Android whitelabel apps where an app is licenced to different organisations who wish to use their own namespaces. The new namespace replaces the existing namespace in each source file found in the given source path whose extension is one of those in the given list of extensions.

##OPTIONS

  • '-n', '--new_namespace': The new namespace
  • '-x', '--existing_namespace': The namespace to be replaced
  • '-s', '--src_path': The path to the directory containing the source files to be processed. Files in sub-folders will also be processed
  • '-e', '--extensions': The list of extensions the source files to be processed have. For multiple extensions this must be a comma separated list
  • '--list': Switches on list-style output
  • '--overwrite': Makes changes to the files - default is to only report the number of discovered src files
  • '-v', '--version': Prints the version number. All other options will be ignored

##EXAMPLES Replace the namespace com.example.something with the namespace com.example.anotherexample in java and cpp files located at C:\projects\my_project:

C:\>namespace_editor -n com.example.anotherexample -x com.example.something -s C:\projects\my_project -e java,cpp --overwrite

##INSTALLATION gem install namespace_editor

##LICENCE BSD 2-Clause

##AUTHOR Barry Drinkwater
email: barry.drinkwater@gmail.com

##SEE ALSO web: https://github.com/bellabling/NamespaceEditor