Latest 0.0.3
Homepage https://github.com/kaygro/Rapier
License MIT
Platforms ios 9.0
Dependencies Swinject
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Rapier is available through CocoaPods. To install
it, simply add the following line to your Podfile:
(not fully automatic yet)

pod 'Rapier/AutoIntegrate'

This will also pull in sourcery, which is used for code generation.
Then use the follwing script in a pre compile build phse:

sourcerycmd="$PODS_ROOT/Sourcery/bin/sourcery"
normal_template_location="$PODS_ROOT/Rapier/Templates"
example_template_location="$PODS_ROOT/../../Rapier/Templates"
if [ -d "$normal_template_location" ]; then
  template_location="$normal_template_location"
else
  template_location="$example_template_location"
fi

$sourcerycmd --templates "$template_location" --sources "$SRCROOT" --exclude-sources "$PODS_ROOT" --exclude-sources "$SRCROOT/PODS"  --output "$SRCROOT/Generated" --verbose

Your projects Sourceroot should contain a folder ‘Generated’. Add it to your xcode project, done.

If you don’t like the default integration, just add

pod 'Rapier'

to your project, but you need to setup your sourcery integration manually.
Note: This pods uses swifttemplates, which aren’t supported by the hoenrew release of sourcery.
(Use the sourcery release tap instead, or include sourcery via cocoapods.)

Author

kaygro, [email protected]

License

Rapier is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Rapier",
    "version": "0.0.3",
    "summary": "A dependency injection framework for swift.",
    "description": "This pods purpose is to reduce the boilerplate that comes with using dependencyninjection. It generates an initializer for constructor/initializer injectionnand class members from a dependencies annotation in addition to a handy factory class.nIt uses sourcery for code generation and swinject to help build the object graph.",
    "homepage": "https://github.com/kaygro/Rapier",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "kaygro": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kaygro/Rapier.git",
        "tag": "0.0.3"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.1",
    "source_files": "Rapier/Templates/*.swifttemplate",
    "dependencies": {
        "Swinject": []
    },
    "default_subspecs": "Manual",
    "subspecs": [
        {
            "name": "AutoIntegrate",
            "source_files": "Rapier/Templates/*.swifttemplate",
            "dependencies": {
                "Sourcery": []
            }
        },
        {
            "name": "Manual",
            "source_files": "Rapier/Templates/*.swifttemplate"
        }
    ]
}

Pin It on Pinterest

Share This