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
b115181d
Unverified
Commit
b115181d
authored
Dec 11, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Dec 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7278 from amorde/devpod-podspec-ruby
Set development pods' podspecs syntax to Ruby when appropriate
parents
7980d84d
88bc3edf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
CHANGELOG.md
CHANGELOG.md
+4
-0
file_references_installer.rb
...xcode/pods_project_generator/file_references_installer.rb
+4
-1
project.rb
lib/cocoapods/project.rb
+13
-3
project_spec.rb
spec/unit/project_spec.rb
+9
-0
No files found.
CHANGELOG.md
View file @
b115181d
...
@@ -16,6 +16,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -16,6 +16,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
iv-mexx
](
https://github.com/iv-mexx
)
[
iv-mexx
](
https://github.com/iv-mexx
)
[
#7204
](
https://github.com/CocoaPods/CocoaPods/pull/7204
)
[
#7204
](
https://github.com/CocoaPods/CocoaPods/pull/7204
)
*
Set syntax of podspecs from development pods to Ruby when appropriate
[
Eric Amorde
](
https://github.com/amorde
)
[
#7278
](
https://github.com/CocoaPods/CocoaPods/pull/7278
)
*
Add support for editing the podspec, license, README, license, and docs of local development pods
*
Add support for editing the podspec, license, README, license, and docs of local development pods
[
Eric Amorde
](
https://github.com/amorde
)
[
Eric Amorde
](
https://github.com/amorde
)
[
#7093
](
https://github.com/CocoaPods/CocoaPods/pull/7093
)
[
#7093
](
https://github.com/CocoaPods/CocoaPods/pull/7093
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb
View file @
b115181d
...
@@ -119,7 +119,10 @@ module Pod
...
@@ -119,7 +119,10 @@ module Pod
paths
=
file_accessor
.
developer_files
paths
=
file_accessor
.
developer_files
paths
.
each
do
|
path
|
paths
.
each
do
|
path
|
group
=
pods_project
.
group_for_spec
(
root_name
,
:developer
)
group
=
pods_project
.
group_for_spec
(
root_name
,
:developer
)
pods_project
.
add_file_reference
(
path
,
group
,
false
)
ref
=
pods_project
.
add_file_reference
(
path
,
group
,
false
)
if
path
.
extname
==
'.podspec'
pods_project
.
mark_ruby_file_ref
(
ref
)
end
end
end
end
end
end
end
...
...
lib/cocoapods/project.rb
View file @
b115181d
...
@@ -221,12 +221,22 @@ module Pod
...
@@ -221,12 +221,22 @@ module Pod
#
#
def
add_podfile
(
podfile_path
)
def
add_podfile
(
podfile_path
)
new_file
(
podfile_path
,
:project
).
tap
do
|
podfile_ref
|
new_file
(
podfile_path
,
:project
).
tap
do
|
podfile_ref
|
podfile_ref
.
xc_language_specification_identifier
=
'xcode.lang.ruby'
mark_ruby_file_ref
(
podfile_ref
)
podfile_ref
.
explicit_file_type
=
'text.script.ruby'
podfile_ref
.
last_known_file_type
=
'text'
end
end
end
end
# Sets the syntax of the provided file reference to be Ruby, in the case that
# the file does not already have a ".rb" file extension (ex. the Podfile)
#
# @param [PBXFileReference] file_ref
# The file reference to change
#
def
mark_ruby_file_ref
(
file_ref
)
file_ref
.
xc_language_specification_identifier
=
'xcode.lang.ruby'
file_ref
.
explicit_file_type
=
'text.script.ruby'
file_ref
.
last_known_file_type
=
'text'
end
# Adds a new build configuration to the project and populates it with
# Adds a new build configuration to the project and populates it with
# default settings according to the provided type.
# default settings according to the provided type.
#
#
...
...
spec/unit/project_spec.rb
View file @
b115181d
...
@@ -246,6 +246,15 @@ module Pod
...
@@ -246,6 +246,15 @@ module Pod
ref
=
@project
.
add_file_reference
(
sym_file
,
@group
)
ref
=
@project
.
add_file_reference
(
sym_file
,
@group
)
ref
.
hierarchy_path
.
should
==
'/Pods/BananaLib/file.m'
ref
.
hierarchy_path
.
should
==
'/Pods/BananaLib/file.m'
end
end
it
'sets syntax to ruby when requested'
do
Pathname
.
any_instance
.
stubs
(
:realpath
).
returns
(
@file
)
ref
=
@project
.
add_file_reference
(
@file
,
@group
)
@project
.
mark_ruby_file_ref
(
ref
)
ref
.
xc_language_specification_identifier
.
should
==
'xcode.lang.ruby'
ref
.
explicit_file_type
.
should
==
'text.script.ruby'
ref
.
last_known_file_type
.
should
==
'text'
end
end
end
#----------------------------------------#
#----------------------------------------#
...
...
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