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
761c1f69
Commit
761c1f69
authored
Jan 05, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RuboCop] Enable Style/RegexpLiteral
parent
da544fa9
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
21 deletions
+16
-21
.rubocop_todo.yml
.rubocop_todo.yml
+0
-5
create.rb
lib/cocoapods/command/spec/create.rb
+1
-1
lint.rb
lib/cocoapods/command/spec/lint.rb
+1
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-1
validator.rb
lib/cocoapods/validator.rb
+1
-1
push_spec.rb
spec/functional/command/repo/push_spec.rb
+1
-1
integration.rb
spec/integration.rb
+4
-4
path_source_spec.rb
spec/unit/external_sources/path_source_spec.rb
+1
-1
podspec_source_spec.rb
spec/unit/external_sources/podspec_source_spec.rb
+1
-1
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+3
-3
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+1
-1
validator_spec.rb
spec/unit/validator_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
761c1f69
...
...
@@ -26,8 +26,3 @@ Metrics/PerceivedComplexity:
# Configuration parameters: AllowedVariables.
Style/GlobalVars
:
Enabled
:
false
# Offense count: 12
# Configuration parameters: MaxSlashes.
Style/RegexpLiteral
:
Enabled
:
false
lib/cocoapods/command/spec/create.rb
View file @
761c1f69
...
...
@@ -25,7 +25,7 @@ module Pod
end
def
run
if
repo_id_match
=
(
@url
||
@name_or_url
).
match
(
/github.com\/([^\/\.]*\/[^\/\.]*)\.*/
)
if
repo_id_match
=
(
@url
||
@name_or_url
).
match
(
%r{github.com/([^/
\.
]*
\/
[^/
\.
]*)
\.
*}
)
repo_id
=
repo_id_match
[
1
]
data
=
github_data_for_template
(
repo_id
)
data
[
:name
]
=
@name_or_url
if
@url
...
...
lib/cocoapods/command/spec/lint.rb
View file @
761c1f69
...
...
@@ -76,7 +76,7 @@ module Pod
files
=
[]
@podspecs_paths
<<
'.'
if
@podspecs_paths
.
empty?
@podspecs_paths
.
each
do
|
path
|
if
path
=~
/https?:\/\//
if
path
=~
%r{https?://}
require
'open-uri'
output_path
=
podspecs_tmp_dir
+
File
.
basename
(
path
)
output_path
.
dirname
.
mkpath
...
...
lib/cocoapods/sources_manager.rb
View file @
761c1f69
...
...
@@ -441,7 +441,7 @@ module Pod
base
=
'master'
when
%r{github.com[:/]+(.+)/(.+)}
base
=
Regexp
.
last_match
[
1
]
when
%r{^
\S
+@(
\S
+)[:/]+(.+)$}
when
/^\S+@(\S+)[:\/]+(.+)$/
host
,
path
=
Regexp
.
last_match
.
captures
base
=
base_from_host_and_path
[
host
,
path
]
when
URI
.
regexp
...
...
lib/cocoapods/validator.rb
View file @
761c1f69
...
...
@@ -510,7 +510,7 @@ module Pod
l
.
include?
(
'note: '
)
&&
(
l
!~
/expanded from macro/
)
end
selected_lines
.
map
do
|
l
|
new
=
l
.
gsub
(
/\/tmp\/CocoaPods\/Lint\/Pods\//
,
''
)
new
=
l
.
gsub
(
%r{/tmp/CocoaPods/Lint/Pods/}
,
''
)
new
.
gsub!
(
/^ */
,
' '
)
end
end
...
...
spec/functional/command/repo/push_spec.rb
View file @
761c1f69
...
...
@@ -55,7 +55,7 @@ module Pod
# prepare the spec
spec
=
(
fixture
(
'spec-repos'
)
+
'test_repo/JSONKit/1.4/JSONKit.podspec'
).
read
spec_fix
=
spec
.
gsub
(
/https:\/\/github\.com\/johnezang\/JSONKit\.git/
,
fixture
(
'integration/JSONKit'
).
to_s
)
spec_fix
=
spec
.
gsub
(
%r{https://github
\.
com/johnezang/JSONKit
\.
git}
,
fixture
(
'integration/JSONKit'
).
to_s
)
spec_add
=
spec
.
gsub
(
/'JSONKit'/
,
"'PushTest'"
)
spec_clean
=
(
fixture
(
'spec-repos'
)
+
'test_repo/BananaLib/1.0/BananaLib.podspec'
).
read
...
...
spec/integration.rb
View file @
761c1f69
...
...
@@ -64,7 +64,7 @@ CLIntegracon.configure do |c|
end
# Register special handling for YAML files
paths
=
[
%r{Podfile
\.
lock}
,
%r{Manifest
\.
lock$}
,
%r{xcodeproj
\.
yaml$}
]
paths
=
[
/Podfile\.lock/
,
/Manifest\.lock$/
,
/xcodeproj\.yaml$/
]
c
.
has_special_handling_for
(
*
paths
)
do
|
path
|
# Remove CocoaPods version
yaml
=
File
.
open
(
path
)
{
|
f
|
YAML
.
load
(
f
)
}
...
...
@@ -73,7 +73,7 @@ CLIntegracon.configure do |c|
end
# So we don't need to compare them directly
c
.
ignores
%r{
\.
xcodeproj/}
c
.
ignores
/\.xcodeproj\//
c
.
ignores
'Podfile'
# Ignore certain OSX files
...
...
@@ -109,8 +109,8 @@ describe_cli 'pod' do
s
.
replace_path
`which git`
.
chomp
,
'GIT_BIN'
s
.
replace_path
`which hg`
.
chomp
,
'HG_BIN'
if
has_mercurial
s
.
replace_user_path
'Library/Caches/CocoaPods'
,
'CACHES_DIR'
s
.
replace_pattern
%r(
\d
{4}-
\d\d
-
\d\d
\d\d
:
\d\d
:
\d\d
[-+]
\d
{4})
,
'<#DATE#>'
s
.
replace_pattern
%r{
\(
Took
\d
+.
\d
+ seconds
\)
}
,
'(Took <#DURATION#> seconds)'
s
.
replace_pattern
/\d{4}-\d\d-\d\d \d\d:\d\d:\d\d [-+]\d{4}/
,
'<#DATE#>'
s
.
replace_pattern
/\(Took \d+.\d+ seconds\)/
,
'(Took <#DURATION#> seconds)'
end
describe
'Pod install'
do
...
...
spec/unit/external_sources/path_source_spec.rb
View file @
761c1f69
...
...
@@ -26,7 +26,7 @@ module Pod
end
it
'returns the description'
do
@subject
.
description
.
should
.
match
%r{from `.*integration/Reachability`}
@subject
.
description
.
should
.
match
/from `.*integration\/Reachability`/
end
it
'marks the Pod as local in the sandbox'
do
...
...
spec/unit/external_sources/podspec_source_spec.rb
View file @
761c1f69
...
...
@@ -16,7 +16,7 @@ module Pod
end
it
'returns the description'
do
@subject
.
description
.
should
.
match
%r{from `.*Reachability/Reachability.podspec`}
@subject
.
description
.
should
.
match
/from `.*Reachability\/Reachability.podspec`/
end
describe
'Helpers'
do
...
...
spec/unit/installer/analyzer_spec.rb
View file @
761c1f69
...
...
@@ -270,8 +270,8 @@ module Pod
analyzer
.
analyze
UI
.
warnings
.
should
.
match
/duplicate dependencies on `RestKit`/
UI
.
warnings
.
should
.
match
%r{RestKit
\(
~> 0.23.0
\)
}
UI
.
warnings
.
should
.
match
%r{RestKit
\(
<= 0.23.2
\)
}
UI
.
warnings
.
should
.
match
/RestKit \(~> 0.23.0\)/
UI
.
warnings
.
should
.
match
/RestKit \(<= 0.23.2\)/
end
#--------------------------------------#
...
...
@@ -635,7 +635,7 @@ module Pod
e
.
message
.
should
.
match
/different sources for `RestKit`/
e
.
message
.
should
.
match
%r{RestKit
\(
from `https://github.com/RestKit/RestKit.git`
\)
}
e
.
message
.
should
.
match
%r{RestKit
\(
~> 0.23.0
\)
}
e
.
message
.
should
.
match
/RestKit \(~> 0.23.0\)/
end
end
...
...
spec/unit/sources_manager_spec.rb
View file @
761c1f69
...
...
@@ -303,7 +303,7 @@ module Pod
describe
'Master repo'
do
it
'returns the master repo dir'
do
SourcesManager
.
master_repo_dir
.
to_s
.
should
.
match
/fixtures\/spec-repos\/master/
SourcesManager
.
master_repo_dir
.
to_s
.
should
.
match
%r{fixtures/spec-repos/master}
end
it
'returns whether the master repo is functional'
do
...
...
spec/unit/validator_spec.rb
View file @
761c1f69
...
...
@@ -31,7 +31,7 @@ module Pod
#
def
stub_podspec
(
pattern
=
nil
,
replacement
=
nil
)
spec
=
(
fixture
(
'spec-repos'
)
+
'master/Specs/JSONKit/1.4/JSONKit.podspec.json'
).
read
spec
.
gsub!
(
/https:\/\/github\.com\/johnezang\/JSONKit\.git/
,
fixture
(
'integration/JSONKit'
).
to_s
)
spec
.
gsub!
(
%r{https://github
\.
com/johnezang/JSONKit
\.
git}
,
fixture
(
'integration/JSONKit'
).
to_s
)
spec
.
gsub!
(
pattern
,
replacement
)
if
pattern
&&
replacement
spec
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