Created
May 17, 2014 03:24
-
-
Save tonyarnold/bb87477beec5726e5681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = 'MagicalRecord' | |
s.version = '2.3.0.rc.1' | |
s.license = 'MIT' | |
s.summary = 'Super Awesome Easy Fetching for Core Data 1!!!11!!!!1!.' | |
s.homepage = 'http://github.com/magicalpanda/MagicalRecord' | |
s.author = { 'Saul Mora' => '[email protected]' } | |
s.source = { :git => 'https://github.com/magicalpanda/MagicalRecord.git', :tag => "#{s.version}" } | |
s.description = 'Handy fetching, threading and data import helpers to make Core Data a little easier to use.' | |
s.framework = 'CoreData' | |
s.requires_arc = true | |
s.default_subspec = 'Core' | |
s.subspec "Core" do |sp| | |
sp.source_files = 'MagicalRecord/**/*.{h,m}' | |
sp.prefix_header_contents = '#import <CoreData/CoreData.h>', '#import "CoreData+MagicalRecord.h"' | |
end | |
s.subspec "Shorthand" do |sp| | |
sp.source_files = 'MagicalRecord/**/*.{h,m}' | |
sp.prefix_header_contents = '#define MR_SHORTHAND 0', '#import <CoreData/CoreData.h>', '#import "CoreData+MagicalRecord.h"' | |
end | |
s.subspec "CoreWithCocoaLumberjack" do |sp| | |
sp.dependency 'CocoaLumberjack' | |
sp.source_files = 'MagicalRecord/**/*.{h,m}' | |
sp.prefix_header_contents = '#import <CoreData/CoreData.h>', '#import <CocoaLumberjack/DDLog.h>', '#import "CoreData+MagicalRecord.h"' | |
end | |
s.subspec "ShorthandWithCocoaLumberjack" do |sp| | |
sp.dependency 'CocoaLumberjack' | |
sp.source_files = 'MagicalRecord/**/*.{h,m}' | |
sp.prefix_header_contents = '#define MR_SHORTHAND 0', '#import <CoreData/CoreData.h>', '#import <CocoaLumberjack/DDLog.h>', '#import "CoreData+MagicalRecord.h"' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tip: if you want to simplify, don't forget that podspecs are also Ruby. So even if you have to specify
sp.source_files
for each subspec, you can at least writeall_files = 'MagicalRecord/**/*.{h,m}'
then usesp.source_files = all_files
in each subspec to avoid repetition and avoid having to change it everywhere in case you need to change the list of files everywhere one day.