Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New project layout, Carthage, SPM [WIP] #187

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
fee6176
Use past participle “run” instead of past tense “ran”.
Nov 14, 2015
9e04ab7
Enable gathering coverage data on example project.
Nov 14, 2015
748bde4
Add post_install scripts to support gathering code coverage data.
Nov 22, 2015
f539662
Move the work for setting up the code coverage into a separate file
orta May 2, 2016
51a3558
Follow CocoaPods migration per http://blog.cocoapods.org/CocoaPods-1.0/
fulldecent May 1, 2016
b7519a0
import fdchessboardview
fulldecent May 6, 2016
08805be
work
fulldecent May 6, 2016
c204413
work
fulldecent May 6, 2016
1c1ba46
work
fulldecent May 6, 2016
d26b4d4
work
fulldecent May 6, 2016
0b500fb
work
fulldecent May 6, 2016
7ee6a7a
work
fulldecent May 6, 2016
8d415d0
add testing and travis ci
fulldecent May 7, 2016
5e2a105
clean project dir
fulldecent May 7, 2016
4fca88b
add travis status
fulldecent May 7, 2016
e2b028e
remove SPM
fulldecent May 7, 2016
65f5ebe
rebase
fulldecent May 10, 2016
bb8c7c0
add spec for basic configuration
fulldecent May 12, 2016
7bb316c
add default notes
fulldecent May 12, 2016
7b0e69d
travis ruby version
fulldecent May 13, 2016
ebb7b29
new versions
fulldecent May 13, 2016
3d55de1
this is a hunch
fulldecent May 13, 2016
d22f766
hunch, see https://travis-ci.org/CocoaPods/pod-template/jobs/129887616
fulldecent May 13, 2016
b017c8e
rake with bundle
fulldecent May 20, 2016
25ab393
latest cocoapods
fulldecent May 20, 2016
feca977
add verbose
fulldecent May 20, 2016
3c66328
close stdin
fulldecent May 20, 2016
91acd3a
popen2e
fulldecent May 20, 2016
21a9fe2
answer questions
fulldecent May 20, 2016
3d41a3b
Merge branch 'master' of https://github.com/CocoaPods/pod-template
orta Jun 25, 2016
a38d439
remove old, commented code
fulldecent Jun 26, 2016
ed0103e
remove unnecessary source
fulldecent Jun 26, 2016
1319e9f
use name templating
fulldecent Jun 26, 2016
cf7656f
genericize project and documentation
fulldecent Jun 26, 2016
56d07df
Add enable_code_coverage, credit to Orta and commit f539662be0d690f63…
fulldecent Jun 27, 2016
eb08289
Enable code coverage, fixes #135
fulldecent Jun 29, 2016
bacbd4b
Genericize test filename
fulldecent Jun 29, 2016
344f91b
Merge remote-tracking branch 'upstream/develop' OURS STRATEGY
fulldecent Jun 29, 2016
ad29704
Merge pull request #179 from fulldecent/master
orta Jun 29, 2016
45915fd
Remove code coverage post_install
fulldecent Jun 30, 2016
4464aa9
Init git repo last
fulldecent Jun 30, 2016
18a8a51
Fix date formatting
fulldecent Jun 30, 2016
40a2a51
Save test artifacts after RSpec
fulldecent Jun 30, 2016
e174efa
Merge branch 'develop' of https://github.com/CocoaPods/pod-template
fulldecent Jun 30, 2016
bbf3149
Refactor configurator to handle all xcodeproj
fulldecent Jun 30, 2016
fbbaba0
fix testing dir
fulldecent Jun 30, 2016
052ceeb
deploy staging directory
fulldecent Jun 30, 2016
e18e630
chdir properly
fulldecent Jun 30, 2016
a0b41b3
no recurse bomb
fulldecent Jun 30, 2016
a086c03
Add PROJECT.h file like AlamoFire
fulldecent Aug 2, 2016
b7400e4
Move all the Info.plist files into a Supporting Files Xcode group. It…
fulldecent Aug 2, 2016
0764862
Add a Supporting Files Xcode group to the iOS Example/Source group an…
fulldecent Aug 2, 2016
23c2dae
Add dev notes to README
fulldecent Aug 2, 2016
9e3ebf1
Add objective-c support
fulldecent Aug 2, 2016
ad39d36
Remove unnecessary lines from Obj-C pod
fulldecent Aug 7, 2016
68830d8
Update badge urls
fulldecent Aug 7, 2016
8657fe8
Fix vendoring for username
fulldecent Aug 7, 2016
22844a2
add quoting to replacable variables
fulldecent Aug 13, 2016
efb976a
add quoting to replacable variables
fulldecent Aug 13, 2016
487bd65
update travis ruby versions for activesupport
fulldecent Aug 13, 2016
dba31ad
update travis ruby versions for activesupport
fulldecent Aug 13, 2016
520c023
fix utf 8 issues
fulldecent Aug 14, 2016
8aff40c
handle some minor Rubocop complaints
orta Aug 14, 2016
6de1248
Add a check for spaces in the pod name
orta Aug 14, 2016
fe170a1
Swift 3.0 support as default, fixes project removal, handling adding …
orta Oct 30, 2016
76dc7e2
Update Quick/Nimble for Swift 3
orta Oct 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ Carthage
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
# Pods/

Gemfile.lock
play
spec/staging
25 changes: 13 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
language: ruby
sudo: false

cache: bundler
rvm:
- 2.2.5
- 2.2.2

# By default, this runs rake on the latest ruby and executes
# bundle install --jobs=3 --retry=3
# rake

osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/${POD_NAME}.xcworkspace -scheme ${POD_NAME}-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
- git fetch --unshallow
- bundle exec rake
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'rake'
gem 'rspec'
gem 'cocoapods'

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This project is licensed under the MIT license.

Copyright (c) 2013 - 2014 CocoaPods Dev Team
Copyright (c) 2013 - 2016 CocoaPods Dev Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Empty file removed Pod/Assets/.gitkeep
Empty file.
Empty file removed Pod/Classes/.gitkeep
Empty file.
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
pod-template
============

An opinionated template for creating a Pod with the following features:
[![Build Status](https://travis-ci.org/CocoaPods/pod-template.svg?branch=develop)](https://travis-ci.org/CocoaPods/pod-template)

- Git as the source control management system
An opinionated template for Swift and Objective-C frameworks with the following features:

- Prompt-based project generation
- Support for CocoaPods, Carthage and project layout compatible with Swift Package Manager
- Clean folder structure
- Project generation
- MIT license
- Testing as a standard
- Turnkey access to Travis CI
- Also supports Carthage


## Getting started

There are two reasons for wanting to work on this template, making your own or improving the one for everyone's. In both cases you will want to work with the ruby classes inside the `setup` folder, and the example base template that it works on from inside `template/ios/`.
Most CocoaPods framework developers will use `pod-template` by running `pod lib create POD_NAME`. You can also follow along with the guide at: https://guides.cocoapods.org/making/using-pod-lib-create.html

## Best practices
You must run **CocoaPods 1.0.0+** to use this template.

The command `pod lib create` aims to be ran along with this guide: http://guides.cocoapods.org/making/using-pod-lib-create.html so any changes of flow should be updated there also.

It is open to communal input, but adding new features, or new ideas are probably better off being discussed in an issue first. In general we try to think if an average Xcode user is going to use this feature or not, if it's unlikely is it a _very strongly_ encouraged best practice ( ala testing / CI. ) If it's something useful for saving a few minutes every deploy, or isn't easily documented in the guide it is likely to be denied in order to keep this project as simple as possible.
## Hacking

## Requirements:
- Clone and `cd` into the directory
- Run some stuff you need to run for any Ruby project:
- `gem install bundler`
- `bundle install`
- Run the included test suite:
- `rake`
- Note: this uses the latest released version of CocoaPods to run this template (retrieved with Bundler above)
- Try it for real:
- `cd ~/Desktop`
- `pod lib create --verbose --template-url='file:///PATH/TO/pod-template' NewPod`
- Note: this uses your INSTALLED VERSION of `pod` to run this template
- Hacking:
- **Note: you MUST commit to git BEFORE you do `rake` testing or `pod lib create` testing. Both of those tools pull from master in your local repository. Learn how to squash commits :-)**


## Best practices

- CocoaPods 1.0.0+
This project welcomes communal input, but please discuss new features and new ideas as an issue before sending a pull request. In general we try to think if an average Xcode user is going to use this feature or not, if it's unlikely is it a _very strongly_ encouraged best practice (à la testing / continuous integration). If it's something useful for saving a few minutes every deploy, or isn't easily documented in the guide it is likely to be denied in order to keep this project as simple as possible.
19 changes: 19 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'rake'
require 'rspec/core/rake_task'
require 'colored'

desc 'Run specs'
RSpec::Core::RakeTask.new do |t|
# Configure RSpec
t.pattern = './spec/**/*_spec.rb'
t.rspec_opts = '--format documentation'
# Prepare testing area
puts 'Wiping out staging area for testing'
FileUtils.rm_rf 'spec/staging'
FileUtils::mkdir_p 'spec/staging'
end

task :default => :spec do
puts "All RSpec testing is complete".blue
puts "You can manually inspect test artifacts in spec/staging/".blue
end
Loading