Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
c81a7b27
Commit
c81a7b27
authored
Nov 11, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec][Fixtures] Add a Swift podspec fixture
Never compare that to banana-lib!
parent
fbadc7d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
291 additions
and
0 deletions
+291
-0
.gitignore
spec/fixtures/orange-framework/.gitignore
+32
-0
LICENSE
spec/fixtures/orange-framework/LICENSE
+19
-0
OrangeFramework.podspec
spec/fixtures/orange-framework/OrangeFramework.podspec
+16
-0
Info.plist
spec/fixtures/orange-framework/Source/Info.plist
+26
-0
Juicer.swift
spec/fixtures/orange-framework/Source/Juicer.swift
+44
-0
orange.h
spec/fixtures/orange-framework/Source/orange.h
+7
-0
Info.plist
spec/fixtures/orange-framework/Test/Info.plist
+24
-0
orange_frameworkTests.swift
...ixtures/orange-framework/Test/orange_frameworkTests.swift
+12
-0
project.pbxproj
...ange-framework/orange-framework.xcodeproj/project.pbxproj
+0
-0
oranage-framework.xcscheme
...odeproj/xcshareddata/xcschemes/oranage-framework.xcscheme
+110
-0
spec_helper.rb
spec/spec_helper.rb
+1
-0
No files found.
spec/fixtures/orange-framework/.gitignore
0 → 100644
View file @
c81a7b27
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
# Bundler
.bundle
# 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/
spec/fixtures/orange-framework/LICENSE
0 → 100644
View file @
c81a7b27
Copyright (c) 2014 Marius Rackwitz <git@mariusrackwitz.de>
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.
spec/fixtures/orange-framework/OrangeFramework.podspec
0 → 100644
View file @
c81a7b27
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
"OrangeFramework"
s
.
version
=
"0.1.0"
s
.
author
=
{
"Swiftest Orang-Utan"
=>
"swiftest@orang.utan.local"
}
s
.
summary
=
"Fresh juice!"
s
.
description
=
"Blends fresh orange juice."
s
.
homepage
=
"http://httpbin.org/html"
s
.
source
=
{
:git
=>
"http://utan.local/orange-framework.git"
,
:tag
=>
s
.
version
.
to_s
}
s
.
license
=
'MIT'
s
.
platform
=
:ios
,
'8.0'
s
.
source_files
=
'Source/Juicer.swift'
s
.
frameworks
=
'UIKit'
end
spec/fixtures/orange-framework/Source/Info.plist
0 → 100644
View file @
c81a7b27
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.cocoapods.$
(
PRODUCT_NAME:rfc1034identifier
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
$
(
CURRENT_PROJECT_VERSION
)<
/string
>
<
k
e
y
>
NSPrincipalClass
<
/k
e
y
>
<
string
><
/string
>
<
/
d
i
c
t
>
<
/plist
>
spec/fixtures/orange-framework/Source/Juicer.swift
0 → 100644
View file @
c81a7b27
import
Foundation
public
struct
Orange
{
public
var
weight
:
Float
public
init
(
weight
:
Float
)
{
self
.
weight
=
weight
}
}
public
struct
Glass
:
Equatable
{
public
var
volume
:
Float
public
init
(
volume
:
Float
)
{
self
.
volume
=
volume
}
public
static
func
empty
()
->
Glass
{
return
Glass
(
volume
:
0
)
}
public
func
pour
(
additionalVolume
:
Float
)
->
Glass
{
return
Glass
(
volume
:
self
.
volume
+
additionalVolume
)
}
}
public
class
Juicer
{
public
required
init
()
{}
public
func
pressOut
(
fruits
:
[
Orange
])
->
Glass
{
return
reduce
(
fruits
,
Glass
.
empty
())
{
(
glass
,
fruit
)
in
glass
.
pour
(
self
.
juiceOf
(
fruit
))
}
}
public
func
juiceOf
(
fruit
:
Orange
)
->
Float
{
return
fruit
.
weight
*
0.5
;
}
}
public
func
==
(
lhs
:
Glass
,
rhs
:
Glass
)
->
Bool
{
return
lhs
.
volume
==
rhs
.
volume
}
spec/fixtures/orange-framework/Source/orange.h
0 → 100644
View file @
c81a7b27
#import <UIKit/UIKit.h>
//! Project version number for orange-framework.
FOUNDATION_EXPORT
double
orangeVersionNumber
;
//! Project version string for orange-framework.
FOUNDATION_EXPORT
const
unsigned
char
orangeVersionString
[];
spec/fixtures/orange-framework/Test/Info.plist
0 → 100644
View file @
c81a7b27
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
org.cocoapods.$
(
PRODUCT_NAME:rfc1034identifier
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
BNDL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
spec/fixtures/orange-framework/Test/orange_frameworkTests.swift
0 → 100644
View file @
c81a7b27
import
UIKit
import
XCTest
import
orange
class
orange_frameworkTests
:
XCTestCase
{
func
testExample
()
{
let
juicer
=
Juicer
()
XCTAssertEqual
(
juicer
.
pressOut
([
Orange
(
weight
:
1.5
),
Orange
(
weight
:
0.5
)]),
Glass
(
volume
:
1.0
))
}
}
spec/fixtures/orange-framework/orange-framework.xcodeproj/project.pbxproj
0 → 100644
View file @
c81a7b27
This diff is collapsed.
Click to expand it.
spec/fixtures/orange-framework/orange-framework.xcodeproj/xcshareddata/xcschemes/oranage-framework.xcscheme
0 → 100644
View file @
c81a7b27
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"0610"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB951A11885100535476"
BuildableName =
"orange.framework"
BlueprintName =
"oranage-framework"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"NO"
buildForArchiving =
"NO"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB9F1A11885200535476"
BuildableName =
"oranage-frameworkTests.xctest"
BlueprintName =
"oranage-frameworkTests"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
buildConfiguration =
"Debug"
>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB9F1A11885200535476"
BuildableName =
"oranage-frameworkTests.xctest"
BlueprintName =
"oranage-frameworkTests"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB951A11885100535476"
BuildableName =
"orange.framework"
BlueprintName =
"oranage-framework"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
buildConfiguration =
"Debug"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
allowLocationSimulation =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB951A11885100535476"
BuildableName =
"orange.framework"
BlueprintName =
"oranage-framework"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
buildConfiguration =
"Release"
debugDocumentVersioning =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"71D6BB951A11885100535476"
BuildableName =
"orange.framework"
BlueprintName =
"oranage-framework"
ReferencedContainer =
"container:orange-framework.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
spec/spec_helper.rb
View file @
c81a7b27
...
@@ -121,3 +121,4 @@ end
...
@@ -121,3 +121,4 @@ end
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
SpecHelper
::
Fixture
.
fixture
(
'orange-framework'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment