Skip to content

Commit

Permalink
v2.1.0 (#67)
Browse files Browse the repository at this point in the history
* [#63] Added support for installation via CocoaPods (#64)
* [#65] Removed redundant Linux test manifest (#66)
* Updated `import`s in tests
* Updated docs title in Jazzy configuration
  • Loading branch information
yakovmanshin authored May 17, 2021
2 parents 4484369 + ab188c0 commit cb10623
Show file tree
Hide file tree
Showing 18 changed files with 98 additions and 104 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/spm-ci.yml → .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
name: SPM CI
name: Run Tests

on: [pull_request, push]

jobs:
macos-test:

spm-macos-test:
runs-on: macos-11.0
steps:
- uses: actions/checkout@v2
- name: Select Xcode version
run: sudo xcode-select -switch /Applications/Xcode_12.5.app
- name: Run tests
run: swift test -v

linux-test:
spm-linux-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run tests
run: swift test -v

cocoapods-podspec-lint:
runs-on: macos-11.0
steps:
- uses: actions/checkout@v2
- name: Lint Podspec
run: pod lib lint --verbose
2 changes: 1 addition & 1 deletion .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ disable_search: true
github_file_prefix: https://github.com/yakovmanshin/YMFF/tree/main
github_url: https://github.com/yakovmanshin/YMFF
hide_documentation_coverage: true
title: YMFF Docs
title: YMFF v2 Docs
undocumented_text: Documentation Coming Soon…
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ YMFF is a nice little library that makes management of features with feature fla
YMFF ships completely ready for use, right out of the box: you get everything you need to start in just a few minutes. But you can also replace nearly any component of the system with your own, customized implementation. Since version 2.0, the implementation and the protocols are in two separate targets (YMFF and YMFFProtocols, respectively).

## Installation

### Swift Package Manager (SPM)
To add YMFF to your project, use Xcode’s built-in support for Swift packages. Click File → Swift Packages → Add Package Dependency, and paste the following URL into the search field:

```
Expand All @@ -23,6 +25,15 @@ If you need to use YMFF in another Swift package, add it as a dependency:
.package(url: "https://github.com/yakovmanshin/YMFF", .upToNextMajor(from: "2.0.0"))
```

### CocoaPods
YMFF now supports installation via [CocoaPods](https://youtu.be/iEAjvNRdZa0).

Add the following to your Podfile:

```ruby
pod 'YMFF', '~> 2.1'
```

## Setup
All you need to start managing features with YMFF is at least one feature flag *store*—an object which conforms to `FeatureFlagStoreProtocol` and provides values that correspond to feature flag keys.

Expand Down
2 changes: 2 additions & 0 deletions Sources/YMFF/FeatureFlag/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2020 Yakov Manshin. See the LICENSE file for license info.
//

#if !COCOAPODS
import YMFFProtocols
#endif

/// An object that facilitates access to feature flag values.
@propertyWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2020 Yakov Manshin. See the LICENSE file for license info.
//

#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - FeatureFlagResolverConfiguration

Expand Down
2 changes: 2 additions & 0 deletions Sources/YMFF/FeatureFlagResolver/FeatureFlagResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2020 Yakov Manshin. See the LICENSE file for license info.
//

#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - FeatureFlagResolver

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2020 Yakov Manshin. See the LICENSE file for license info.
//

#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - RuntimeOverridesStore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright © 2020 Yakov Manshin. See the LICENSE file for license info.
//

#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - TransparentFeatureFlagStore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#if canImport(Foundation)

import Foundation
#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - UserDefaultsStore

Expand Down
8 changes: 0 additions & 8 deletions Tests/LinuxMain.swift

This file was deleted.

3 changes: 3 additions & 0 deletions Tests/YMFFTests/FeatureFlagResolverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//

import XCTest
#if !COCOAPODS
import YMFFProtocols
#endif

@testable import YMFF

// MARK: - Configuration
Expand Down
3 changes: 3 additions & 0 deletions Tests/YMFFTests/FeatureFlagTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//

import XCTest
#if !COCOAPODS
import YMFFProtocols
#endif

@testable import YMFF

// MARK: - Configuration
Expand Down
2 changes: 2 additions & 0 deletions Tests/YMFFTests/MutableStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

import XCTest
#if !COCOAPODS
import YMFFProtocols
#endif

@testable import YMFF

Expand Down
3 changes: 3 additions & 0 deletions Tests/YMFFTests/RuntimeOverridesStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//

import XCTest
#if !COCOAPODS
import YMFFProtocols
#endif

@testable import YMFF

// MARK: - Configuration
Expand Down
2 changes: 2 additions & 0 deletions Tests/YMFFTests/SharedAssets/SharedAssets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

import YMFF
#if !COCOAPODS
import YMFFProtocols
#endif

// MARK: - Shared

Expand Down
1 change: 1 addition & 0 deletions Tests/YMFFTests/UserDefaultsStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#if canImport(Foundation)

import XCTest

@testable import YMFF

final class UserDefaultsStoreTests: XCTestCase {
Expand Down
91 changes: 0 additions & 91 deletions Tests/YMFFTests/XCTestManifests.swift

This file was deleted.

48 changes: 48 additions & 0 deletions YMFF.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Pod::Spec.new do |s|

# Basic Info

s.name = "YMFF"
s.version = "2.1.0"
s.summary = "Feature management made easy."

s.description = <<-DESC
YMFF is a nice little library that makes management of features
with feature flags—and management of the feature flags themselves—a bliss.
DESC

s.homepage = "https://github.com/yakovmanshin/YMFF"
s.documentation_url = "https://opensource.ym.dev/YMFF/"

s.license = { :type => "Apache License, version 2.0", :file => "LICENSE" }

s.author = { "Yakov Manshin" => "[email protected]" }
s.social_media_url = "https://github.com/yakovmanshin"

# Sources & Build Settings

s.source = { :git => "https://github.com/yakovmanshin/YMFF.git", :tag => "#{s.version}" }

s.swift_version = "5.3"
s.osx.deployment_target = "10.13"
s.ios.deployment_target = "11.0"

# Subspecs

s.default_subspec = "YMFF"

s.subspec "YMFF" do |is|
is.source_files = "Sources/YMFF/**/*.{swift}"
is.dependency "YMFF/YMFFProtocols"
end

s.subspec "YMFFProtocols" do |ps|
ps.source_files = "Sources/YMFFProtocols/**/*.{swift}"
end

s.test_spec "Tests" do |ts|
ts.source_files = "Tests/YMFFTests/**/*.{swift}"
ts.dependency "YMFF/YMFF"
end

end

0 comments on commit cb10623

Please sign in to comment.