Skip to content

Commit

Permalink
Add README, LICENSE and CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanlisovyi committed Nov 21, 2020
1 parent a98d7e9 commit 2f315b4
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 0.0.1
## Features
- Download Firebase Remote Config
- Transform Firebase Remote Config by flattening its structure
- Transform Firebase Remote Config by flattening its structure and transforming the output to `.plist` file.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Ivan Lisovyi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
# Blaze
![CI](https://github.com/ivanlisovyi/blaze/workflows/CI/badge.svg)

Blaze is a CLI tool that helps you to:
- Donwload Firebase Remote Config
- Optionally transform Firebase Remote Config with the help of built-in transforms

## Installation
### Swift Package Manager
Create `Package.swift` in the `BuildTools` folder with the following content
```swift
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "BuildTools",
platforms: [
.macOS(.v10_15)
] ,
dependencies: [
.package(
url: "https://github.com/ivanlisovyi/blaze",
from: "0.0.1"
),
],
targets: [
.target(name: "BuildTools")
]
)
```

In the `BuildTools` folder create a file called `Empty.swift` with nothing in it. This is to satisfy a change in Swift Package Manager.

## Usage
You can call `blaze` from the command line:
```sh
swift run -c release --package-path BuildTools blaze -c $PATH_TO_CONFIG -o $OUTPUT_PATH -t flattening
```

## Built-in Transforms
- Flattening - flattens the structure of the Remote Config file.
- FlatteningPlist - flattens the structure of Remote Config file and transforms the output to `.plist` file.

## License
MIT License

Copyright (c) 2020 Ivan Lisovyi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ final class FirebaseConfigOutputTransformerFactoryTests: XCTestCase {

// Then
XCTAssertNotNil(transformer)
XCTAssertTrue(transformer is FirebaseFlattenedJsonTransformer)
}

func testMakeTransformer_whenTransformIsNone_shallReturnNil() {
Expand All @@ -32,4 +33,16 @@ final class FirebaseConfigOutputTransformerFactoryTests: XCTestCase {
// Then
XCTAssertNil(transformer)
}

func testMakeTransformer_whenTransformIsPlist_shallReturnFlatteningPlistTransformer() {
// Given
let transform = Download.Transform.plist

// When
let transformer = FirebaseConfigOutputTransformerFactory.makeTransformer(for: transform)

// Then
XCTAssertNotNil(transformer)
XCTAssertTrue(transformer is FirebaseFlattenedPlistTransformer)
}
}

0 comments on commit 2f315b4

Please sign in to comment.