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
ccc848ba
Commit
ccc848ba
authored
Nov 20, 2015
by
Ashton Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test that `pod lib create` correctly reuses version variable in source
parent
9c014bbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
spec_spec.rb
spec/functional/command/spec_spec.rb
+38
-0
No files found.
spec/functional/command/spec_spec.rb
View file @
ccc848ba
...
@@ -116,6 +116,44 @@ module Pod
...
@@ -116,6 +116,44 @@ module Pod
spec
.
source
.
should
==
{
:git
=>
'https://github.com/lukeredpath/libPusher.git'
,
:commit
=>
'5f482b0693ac2ac1ad85d1aabc27ec7547cc0bc7'
}
spec
.
source
.
should
==
{
:git
=>
'https://github.com/lukeredpath/libPusher.git'
,
:commit
=>
'5f482b0693ac2ac1ad85d1aabc27ec7547cc0bc7'
}
end
end
it
'correctly reuses version variable in source if matching tag is found on github'
do
repo
=
{
'name'
=>
'libPusher'
,
'owner'
=>
{
'login'
=>
'lukeredpath'
},
'html_url'
=>
'https://github.com/lukeredpath/libPusher'
,
'description'
=>
'An Objective-C interface to Pusher (pusherapp.com)'
,
'clone_url'
=>
'https://github.com/lukeredpath/libPusher.git'
,
}
GitHub
.
expects
(
:repo
).
with
(
'lukeredpath/libPusher'
).
returns
(
repo
)
GitHub
.
expects
(
:tags
).
with
(
'https://github.com/lukeredpath/libPusher'
).
returns
([{
'name'
=>
'1.4.0'
}])
GitHub
.
expects
(
:user
).
with
(
'lukeredpath'
).
returns
(
'name'
=>
'Luke Redpath'
,
'email'
=>
'luke@lukeredpath.co.uk'
)
run_command
(
'spec'
,
'create'
,
'https://github.com/lukeredpath/libPusher.git'
)
path
=
temporary_directory
+
'libPusher.podspec'
spec
=
Specification
.
from_file
(
path
)
spec
.
version
.
should
==
Version
.
new
(
'1.4.0'
)
spec
.
source
.
should
==
{
:git
=>
'https://github.com/lukeredpath/libPusher.git'
,
:tag
=>
'1.4.0'
}
File
.
open
(
path
,
'r'
)
{
|
f
|
f
.
read
.
should
.
include
':tag => "#{s.version}"'
}
end
it
'correctly reuses version variable in source if matching tag with prefix is found on github'
do
repo
=
{
'name'
=>
'libPusher'
,
'owner'
=>
{
'login'
=>
'lukeredpath'
},
'html_url'
=>
'https://github.com/lukeredpath/libPusher'
,
'description'
=>
'An Objective-C interface to Pusher (pusherapp.com)'
,
'clone_url'
=>
'https://github.com/lukeredpath/libPusher.git'
,
}
GitHub
.
expects
(
:repo
).
with
(
'lukeredpath/libPusher'
).
returns
(
repo
)
GitHub
.
expects
(
:tags
).
with
(
'https://github.com/lukeredpath/libPusher'
).
returns
([{
'name'
=>
'v1.4.0'
}])
GitHub
.
expects
(
:user
).
with
(
'lukeredpath'
).
returns
(
'name'
=>
'Luke Redpath'
,
'email'
=>
'luke@lukeredpath.co.uk'
)
run_command
(
'spec'
,
'create'
,
'https://github.com/lukeredpath/libPusher.git'
)
path
=
temporary_directory
+
'libPusher.podspec'
spec
=
Specification
.
from_file
(
path
)
spec
.
version
.
should
==
Version
.
new
(
'1.4.0'
)
spec
.
source
.
should
==
{
:git
=>
'https://github.com/lukeredpath/libPusher.git'
,
:tag
=>
'v1.4.0'
}
File
.
open
(
path
,
'r'
)
{
|
f
|
f
.
read
.
should
.
include
':tag => "v#{s.version}"'
}
end
it
"raises an informative message when the GitHub repository doesn't have any commits"
do
it
"raises an informative message when the GitHub repository doesn't have any commits"
do
repo
=
{
repo
=
{
'name'
=>
'QueryKit'
,
'name'
=>
'QueryKit'
,
...
...
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