An open API service indexing awesome lists of open source software.

https://github.com/igor-makarov/censorius


https://github.com/igor-makarov/censorius

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Censorius
[![Gem](https://img.shields.io/gem/v/censorius.svg)](https://rubygems.org/gems/censorius)
[![Twitter: @igormaka](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/igormaka)
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](./LICENSE.txt)
[![Build Status](https://github.com/igor-makarov/censorius/workflows/Specs/badge.svg)](https://github.com/igor-makarov/censorius/actions)

Censorius is a small gem that generates deterministic and stable UUID paths for [Xcodeproj](https://github.com/CocoaPods/Xcodeproj). It's meant to be used either with [CocoaPods](https://github.com/CocoaPods/CocoaPods) or [Xcake](https://github.com/igor-makarov/xcake) to reduce meaningless Xcode project file differences, and therefore make Xcode incremental builds after project generation shorter.

It is meant as a replacement for the `Xcodeproj::Project#predictabilize_uuids` method, which generates deterministic UUIDs in a way that is very unstable on even the smallest changes.

Censorius covers all meaningful PBX file format elements.

## Why the name "Censorius"?

In ancient Rome, a [censor](https://en.wikipedia.org/wiki/Roman_censor) was an official appointed to conduct the census, a process by which all of Rome's subjects were enumerated, and all their property was noted for the purpose of taxation.

[Cato the Censor](https://en.wikipedia.org/wiki/Cato_the_Elder) was a Roman censor, who was mostly known for his catchphrase "Carthago delenda est" ("Carthage must be destroyed"), referring to the Carthaginian Empire that kept threatening and attacking Rome.

The gem is named "Censorius" because it is my hope that with this final effort of conducting an object census of the Xcode project file, all the problems of the PBX file format will finally go away. _PBX delenda est._

## Installation

Add this line to your Gemfile:

```ruby
gem 'censorius'
```

## Usage

### With CocoaPods

In your `Podfile`:
```ruby
require 'censorius'
#
# Define your dependencies...
#
# Remove the `deterministic_uuids` option if you're using it.
#
post_install do |installer|
installer.generated_projects.each do |project|
Censorius::UUIDGenerator.new([project]).generate!
end
end
```

### With Xcake
In your `Cakefile`:
```ruby
require 'censorius'
#
# Define your targets...
#
project.before_save do |main_project|
Censorius::UUIDGenerator.new([main_project]).generate!
end

```
## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/igor-makarov/censorius. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/igor-makarov/censorius/blob/master/CODE_OF_CONDUCT.md).

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Censorius project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/igor-makarov/censorius/blob/master/CODE_OF_CONDUCT.md).