cocoapods 0.33.1 → 0.34.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +171 -46
  3. data/README.md +9 -9
  4. data/bin/pod +5 -5
  5. data/bin/sandbox-pod +2 -6
  6. data/lib/cocoapods.rb +4 -4
  7. data/lib/cocoapods/command.rb +12 -10
  8. data/lib/cocoapods/command/init.rb +12 -13
  9. data/lib/cocoapods/command/inter_process_communication.rb +6 -17
  10. data/lib/cocoapods/command/lib.rb +27 -24
  11. data/lib/cocoapods/command/list.rb +9 -9
  12. data/lib/cocoapods/command/outdated.rb +4 -9
  13. data/lib/cocoapods/command/project.rb +57 -19
  14. data/lib/cocoapods/command/push.rb +0 -1
  15. data/lib/cocoapods/command/repo.rb +14 -15
  16. data/lib/cocoapods/command/repo/push.rb +24 -19
  17. data/lib/cocoapods/command/search.rb +12 -13
  18. data/lib/cocoapods/command/setup.rb +10 -9
  19. data/lib/cocoapods/command/spec.rb +67 -63
  20. data/lib/cocoapods/config.rb +21 -54
  21. data/lib/cocoapods/downloader.rb +0 -1
  22. data/lib/cocoapods/executable.rb +3 -8
  23. data/lib/cocoapods/external_sources.rb +2 -4
  24. data/lib/cocoapods/external_sources/abstract_external_source.rb +15 -10
  25. data/lib/cocoapods/external_sources/downloader_source.rb +0 -2
  26. data/lib/cocoapods/external_sources/path_source.rb +1 -4
  27. data/lib/cocoapods/external_sources/podspec_source.rb +1 -3
  28. data/lib/cocoapods/gem_version.rb +1 -2
  29. data/lib/cocoapods/generator/acknowledgements.rb +5 -8
  30. data/lib/cocoapods/generator/acknowledgements/markdown.rb +5 -7
  31. data/lib/cocoapods/generator/acknowledgements/plist.rb +9 -10
  32. data/lib/cocoapods/generator/bridge_support.rb +1 -1
  33. data/lib/cocoapods/generator/copy_resources_script.rb +10 -14
  34. data/lib/cocoapods/generator/dummy_source.rb +3 -3
  35. data/lib/cocoapods/generator/prefix_header.rb +15 -16
  36. data/lib/cocoapods/generator/target_environment_header.rb +122 -36
  37. data/lib/cocoapods/generator/xcconfig.rb +0 -4
  38. data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +74 -65
  39. data/lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb +92 -95
  40. data/lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb +48 -51
  41. data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +10 -10
  42. data/lib/cocoapods/hooks/installer_representation.rb +15 -18
  43. data/lib/cocoapods/hooks/library_representation.rb +4 -8
  44. data/lib/cocoapods/hooks/pod_representation.rb +1 -5
  45. data/lib/cocoapods/hooks_manager.rb +63 -0
  46. data/lib/cocoapods/installer.rb +60 -47
  47. data/lib/cocoapods/installer/analyzer.rb +60 -62
  48. data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +5 -8
  49. data/lib/cocoapods/installer/file_references_installer.rb +7 -10
  50. data/lib/cocoapods/installer/hooks_context.rb +74 -0
  51. data/lib/cocoapods/installer/migrator.rb +99 -0
  52. data/lib/cocoapods/installer/pod_source_installer.rb +9 -29
  53. data/lib/cocoapods/installer/target_installer.rb +7 -17
  54. data/lib/cocoapods/installer/target_installer/aggregate_target_installer.rb +40 -41
  55. data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +43 -54
  56. data/lib/cocoapods/installer/user_project_integrator.rb +54 -10
  57. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +66 -117
  58. data/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb +116 -0
  59. data/lib/cocoapods/open_uri.rb +1 -2
  60. data/lib/cocoapods/project.rb +34 -8
  61. data/lib/cocoapods/resolver.rb +43 -21
  62. data/lib/cocoapods/sandbox.rb +80 -75
  63. data/lib/cocoapods/sandbox/file_accessor.rb +3 -8
  64. data/lib/cocoapods/sandbox/headers_store.rb +6 -7
  65. data/lib/cocoapods/sandbox/path_list.rb +7 -10
  66. data/lib/cocoapods/sources_manager.rb +81 -49
  67. data/lib/cocoapods/target.rb +18 -12
  68. data/lib/cocoapods/target/aggregate_target.rb +43 -18
  69. data/lib/cocoapods/target/pod_target.rb +37 -4
  70. data/lib/cocoapods/user_interface.rb +19 -18
  71. data/lib/cocoapods/user_interface/error_report.rb +23 -4
  72. data/lib/cocoapods/validator.rb +30 -33
  73. metadata +100 -73
  74. data/lib/cocoapods/command/help.rb +0 -25
@@ -6,8 +6,8 @@ module Pod
6
6
 
7
7
  def self.options
8
8
  [[
9
- "--update", "Run `pod repo update` before listing",
10
- "--stats", "Show additional stats (like GitHub watchers and forks)"
9
+ '--update', 'Run `pod repo update` before listing',
10
+ '--stats', 'Show additional stats (like GitHub watchers and forks)'
11
11
  ]].concat(super)
12
12
  end
13
13
 
@@ -23,7 +23,7 @@ module Pod
23
23
  def run
24
24
  update_if_necessary!
25
25
 
26
- sets = SourcesManager.all_sets
26
+ sets = SourcesManager.aggregate.all_sets
27
27
  sets.each { |set| UI.pod(set, :name_and_version) }
28
28
  UI.puts "\n#{sets.count} pods were found"
29
29
  end
@@ -31,7 +31,7 @@ module Pod
31
31
  def update_if_necessary!
32
32
  if @update && config.verbose?
33
33
  UI.section("\nUpdating Spec Repositories\n".yellow) do
34
- Repo.new(ARGV.new(["update"])).run
34
+ Repo.new(ARGV.new(['update'])).run
35
35
  end
36
36
  end
37
37
  end
@@ -44,10 +44,10 @@ module Pod
44
44
  def run
45
45
  update_if_necessary!
46
46
 
47
- days = [1,2,3,5,8]
47
+ days = [1, 2, 3, 5, 8]
48
48
  dates, groups = {}, {}
49
- days.each {|d| dates[d] = Time.now - 60 * 60 * 24 * d}
50
- sets = SourcesManager.all_sets
49
+ days.each { |d| dates[d] = Time.now - 60 * 60 * 24 * d }
50
+ sets = SourcesManager.aggregate.all_sets
51
51
  statistics_provider = Config.instance.spec_statistics_provider
52
52
  creation_dates = statistics_provider.creation_dates(sets)
53
53
 
@@ -64,8 +64,8 @@ module Pod
64
64
  days.reverse.each do |d|
65
65
  sets = groups[d]
66
66
  next unless sets
67
- UI.section("\nPods added in the last #{"day".pluralize(d)}".yellow) do
68
- sorted = sets.sort_by {|s| creation_dates[s.name]}
67
+ UI.section("\nPods added in the last #{'day'.pluralize(d)}".yellow) do
68
+ sorted = sets.sort_by { |s| creation_dates[s.name] }
69
69
  mode = @stats ? :stats : :name
70
70
  sorted.each { |set| UI.pod(set, mode, statistics_provider) }
71
71
  end
@@ -9,7 +9,7 @@ module Pod
9
9
  DESC
10
10
 
11
11
  def self.options
12
- [["--no-repo-update", "Skip running `pod repo update` before install"]].concat(super)
12
+ [['--no-repo-update', 'Skip running `pod repo update` before install']].concat(super)
13
13
  end
14
14
 
15
15
  def initialize(argv)
@@ -23,11 +23,10 @@ module Pod
23
23
  # @todo fix.
24
24
  #
25
25
  def run
26
-
27
26
  if updates.empty?
28
- UI.puts "No updates are available.".yellow
27
+ UI.puts 'No updates are available.'.yellow
29
28
  else
30
- UI.section "The following updates are available:" do
29
+ UI.section 'The following updates are available:' do
31
30
  updates.each do |(name, from_version, to_version)|
32
31
  UI.puts "- #{name} #{from_version} -> #{to_version}"
33
32
  end
@@ -46,7 +45,6 @@ module Pod
46
45
  end
47
46
  end
48
47
  end
49
-
50
48
  end
51
49
 
52
50
  private
@@ -56,7 +54,7 @@ module Pod
56
54
  spec_sets.map do |set|
57
55
  spec = set.specification
58
56
  source_version = set.versions.first
59
- pod_name = spec.name
57
+ pod_name = spec.root.name
60
58
  lockfile_version = lockfile.version(pod_name)
61
59
  if source_version > lockfile_version
62
60
  [pod_name, lockfile_version, source_version]
@@ -97,9 +95,6 @@ module Pod
97
95
  config.lockfile
98
96
  end
99
97
  end
100
-
101
98
  end
102
99
  end
103
100
  end
104
-
105
-
@@ -1,16 +1,47 @@
1
1
  module Pod
2
2
  class Command
3
+ # Provides support for commands to take a user-specified `project directory`
4
+ #
5
+ module ProjectDirectory
6
+ module Options
7
+ def options
8
+ [
9
+ ['--project-directory=/project/dir/', 'The path to the root of the project directory'],
10
+ ].concat(super)
11
+ end
12
+ end
13
+
14
+ def self.included(base)
15
+ base.extend(Options)
16
+ end
17
+
18
+ def initialize(argv)
19
+ if project_directory = argv.option('project-directory')
20
+ @project_directory = Pathname.new(project_directory).expand_path
21
+ end
22
+ config.installation_root = @project_directory
23
+ super
24
+ end
25
+
26
+ def validate!
27
+ super
28
+ if @project_directory && !@project_directory.directory?
29
+ raise Informative,
30
+ "`#{@project_directory}` is not a valid directory."
31
+ end
32
+ end
33
+ end
3
34
 
4
- # Provides support the common behaviour of the `install` and `update`
35
+ # Provides support for the common behaviour of the `install` and `update`
5
36
  # commands.
6
37
  #
7
38
  module Project
8
39
  module Options
9
40
  def options
10
41
  [
11
- ["--no-clean", "Leave SCM dirs like `.git` and `.svn` intact after downloading"],
12
- ["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
13
- ["--no-repo-update", "Skip running `pod repo update` before install"],
42
+ ['--no-clean', 'Leave SCM dirs like `.git` and `.svn` intact after downloading'],
43
+ ['--no-integrate', 'Skip integration of the Pods libraries in the Xcode project(s)'],
44
+ ['--no-repo-update', 'Skip running `pod repo update` before install'],
14
45
  ].concat(super)
15
46
  end
16
47
  end
@@ -46,7 +77,7 @@ module Pod
46
77
  class Install < Command
47
78
  include Project
48
79
 
49
- self.summary = 'Install project dependencies'
80
+ self.summary = 'Install project dependencies to Podfile.lock versions'
50
81
 
51
82
  self.description = <<-DESC
52
83
  Downloads all dependencies defined in `Podfile` and creates an Xcode
@@ -76,17 +107,19 @@ module Pod
76
107
  class Update < Command
77
108
  include Project
78
109
 
79
- self.summary = 'Update outdated project dependencies'
110
+ self.summary = 'Update outdated project dependencies and create new ' \
111
+ 'Podfile.lock'
80
112
 
81
113
  self.description = <<-DESC
82
- Updates the Pods identified by the specified POD_NAMES. If no POD_NAMES are
83
- specified it updates all the Pods ignoring the contents of the Podfile.lock.
84
- This command is reserved to the update of dependencies and pod install should
85
- be used to install changes to the Podfile.
114
+ Updates the Pods identified by the specified `POD_NAMES`. If no
115
+ `POD_NAMES` are specified it updates all the Pods ignoring the contents
116
+ of the Podfile.lock.
117
+ This command is reserved to the update of dependencies and pod install
118
+ should be used to install changes to the Podfile.
86
119
  DESC
87
120
 
88
121
  self.arguments = [
89
- ['POD_NAMES...', :optional]
122
+ CLAide::Argument.new('POD_NAMES', false, true),
90
123
  ]
91
124
 
92
125
  def initialize(argv)
@@ -101,22 +134,27 @@ module Pod
101
134
  verify_lockfile_exists!
102
135
 
103
136
  # Check if all given pods are installed
104
- missing_pods = @pods.select { |pod| !config.lockfile.pod_names.include?(pod) }
137
+ missing_pods = @pods.select do |pod|
138
+ !config.lockfile.pod_names.include?(pod)
139
+ end
140
+
105
141
  if missing_pods.length > 0
106
- raise Informative, (missing_pods.length > 1 \
107
- ? "Pods %s are not installed and cannot be updated" \
108
- : "Pod %s is not installed and cannot be updated"
109
- ) % missing_pods.map { |p| "`#{p}`" }.join(', ')
142
+ if missing_pods.length > 1
143
+ message = "Pods `#{missing_pods.join('`, `')}` are not " \
144
+ 'installed and cannot be updated'
145
+ else
146
+ message = "The `#{missing_pods.first}` Pod is not installed " \
147
+ 'and cannot be updated'
148
+ end
149
+ raise Informative, message
110
150
  end
111
151
 
112
152
  run_install_with_update(:pods => @pods)
113
153
  else
114
- UI.puts "Update all pods".yellow unless @pods
154
+ UI.puts 'Update all pods'.yellow unless @pods
115
155
  run_install_with_update(true)
116
156
  end
117
157
  end
118
158
  end
119
-
120
159
  end
121
160
  end
122
-
@@ -3,7 +3,6 @@ module Pod
3
3
  class Push < Command
4
4
  self.summary = 'Temporary alias for the `pod repo push` command'
5
5
 
6
-
7
6
  def initialize(argv)
8
7
  @push_command = Repo::Push.new(argv)
9
8
  super
@@ -19,14 +19,14 @@ module Pod
19
19
  DESC
20
20
 
21
21
  self.arguments = [
22
- ['NAME', :required],
23
- ['URL', :required],
24
- ['BRANCH', :optional]
22
+ CLAide::Argument.new('NAME', true),
23
+ CLAide::Argument.new('URL', true),
24
+ CLAide::Argument.new('BRANCH', false),
25
25
  ]
26
26
 
27
27
  def self.options
28
28
  [
29
- ["--shallow", "Create a shallow clone (fast clone, but no push capabilities)"],
29
+ ['--shallow', 'Create a shallow clone (fast clone, but no push capabilities)'],
30
30
  ].concat(super)
31
31
  end
32
32
 
@@ -39,7 +39,7 @@ module Pod
39
39
  def validate!
40
40
  super
41
41
  unless @name && @url
42
- help! "Adding a repo needs a `NAME` and a `URL`."
42
+ help! 'Adding a repo needs a `NAME` and a `URL`.'
43
43
  end
44
44
  end
45
45
 
@@ -69,7 +69,7 @@ module Pod
69
69
  DESC
70
70
 
71
71
  self.arguments = [
72
- ['NAME', :optional]
72
+ CLAide::Argument.new('NAME', false),
73
73
  ]
74
74
 
75
75
  def initialize(argv)
@@ -94,11 +94,11 @@ module Pod
94
94
  DESC
95
95
 
96
96
  self.arguments = [
97
- ['NAME | DIRECTORY', :optional]
97
+ CLAide::Argument.new(%w(NAME DIRECTORY), false),
98
98
  ]
99
99
 
100
100
  def self.options
101
- [["--only-errors", "Lint presents only the errors"]].concat(super)
101
+ [['--only-errors', 'Lint presents only the errors']].concat(super)
102
102
  end
103
103
 
104
104
  def initialize(argv)
@@ -114,16 +114,16 @@ module Pod
114
114
  #
115
115
  def run
116
116
  if @name
117
- dirs = File.exists?(@name) ? [ Pathname.new(@name) ] : [ dir ]
117
+ dirs = File.exist?(@name) ? [Pathname.new(@name)] : [dir]
118
118
  else
119
- dirs = config.repos_dir.children.select {|c| c.directory?}
119
+ dirs = config.repos_dir.children.select(&:directory?)
120
120
  end
121
121
  dirs.each do |dir|
122
122
  SourcesManager.check_version_information(dir)
123
123
  UI.puts "\nLinting spec repo `#{dir.realpath.basename}`\n".yellow
124
124
 
125
125
  validator = Source::HealthReporter.new(dir)
126
- validator.pre_check do |name, version|
126
+ validator.pre_check do |_name, _version|
127
127
  UI.print '.'
128
128
  end
129
129
  report = validator.analyze
@@ -144,7 +144,7 @@ module Pod
144
144
 
145
145
  UI.puts "Analyzed #{report.analyzed_paths.count} podspecs files.\n\n"
146
146
  if report.pods_by_error.count.zero?
147
- UI.puts "All the specs passed validation.".green << "\n\n"
147
+ UI.puts 'All the specs passed validation.'.green << "\n\n"
148
148
  else
149
149
  raise Informative, "#{report.pods_by_error.count} podspecs failed validation."
150
150
  end
@@ -162,7 +162,7 @@ module Pod
162
162
  DESC
163
163
 
164
164
  self.arguments = [
165
- ['NAME', :required]
165
+ CLAide::Argument.new('NAME', true),
166
166
  ]
167
167
 
168
168
  def initialize(argv)
@@ -175,7 +175,7 @@ module Pod
175
175
  help! 'Deleting a repo needs a `NAME`.' unless @name
176
176
  help! "repo #{@name} does not exist" unless File.directory?(dir)
177
177
  help! "You do not have permission to delete the #{@name} repository." \
178
- "Perhaps try prefixing this command with sudo." unless File.writable?(dir)
178
+ 'Perhaps try prefixing this command with sudo.' unless File.writable?(dir)
179
179
  end
180
180
 
181
181
  def run
@@ -194,4 +194,3 @@ module Pod
194
194
  end
195
195
  end
196
196
  end
197
-
@@ -8,20 +8,20 @@ module Pod
8
8
  self.summary = 'Push new specifications to a spec-repo'
9
9
 
10
10
  self.description = <<-DESC
11
- Validates NAME.podspec or `*.podspec' in the current working dir, creates
12
- a directory and version folder for the pod in the local copy of
13
- REPO (~/.cocoapods/repos/[REPO]), copies the podspec file into the version
14
- directory, and finally it pushes REPO to its remote.
11
+ Validates `NAME.podspec` or `*.podspec` in the current working dir,
12
+ creates a directory and version folder for the pod in the local copy of
13
+ `REPO` (~/.cocoapods/repos/[REPO]), copies the podspec file into the
14
+ version directory, and finally it pushes `REPO` to its remote.
15
15
  DESC
16
16
 
17
17
  self.arguments = [
18
- ['REPO', :required],
19
- ['NAME.podspec', :optional]
18
+ CLAide::Argument.new('REPO', true),
19
+ CLAide::Argument.new('NAME.podspec', false),
20
20
  ]
21
21
 
22
22
  def self.options
23
- [ ["--allow-warnings", "Allows pushing even if there are warnings"],
24
- ["--local-only", "Does not perform the step of pushing REPO to its remote"] ].concat(super)
23
+ [['--allow-warnings', 'Allows pushing even if there are warnings'],
24
+ ['--local-only', 'Does not perform the step of pushing REPO to its remote']].concat(super)
25
25
  end
26
26
 
27
27
  def initialize(argv)
@@ -34,7 +34,7 @@ module Pod
34
34
 
35
35
  def validate!
36
36
  super
37
- help! "A spec-repo name is required." unless @repo
37
+ help! 'A spec-repo name is required.' unless @repo
38
38
  end
39
39
 
40
40
  def run
@@ -69,15 +69,14 @@ module Pod
69
69
  end
70
70
 
71
71
  if is_master_repo
72
- raise Informative, "To push to the CocoaPods master repo use " \
72
+ raise Informative, 'To push to the CocoaPods master repo use ' \
73
73
  "the `pod trunk push` command.\n\nIf you are using a fork of " \
74
- "the master repo for private purposes we recommend to migrate " \
75
- "to a clean private repo. To disable this check remove the " \
76
- "remote pointing to the CocoaPods master repo."
74
+ 'the master repo for private purposes we recommend to migrate ' \
75
+ 'to a clean private repo. To disable this check remove the ' \
76
+ 'remote pointing to the CocoaPods master repo.'
77
77
  end
78
78
  end
79
79
 
80
-
81
80
  # Performs a full lint against the podspecs.
82
81
  #
83
82
  def validate_podspec_files
@@ -87,7 +86,7 @@ module Pod
87
86
  validator.only_errors = @allow_warnings
88
87
  begin
89
88
  validator.validate
90
- rescue Exception
89
+ rescue
91
90
  raise Informative, "The `#{podspec}` specification does not validate."
92
91
  end
93
92
  raise Informative, "The `#{podspec}` specification does not validate." unless validator.validated?
@@ -143,7 +142,7 @@ module Pod
143
142
  FileUtils.cp(spec_file, output_path)
144
143
  Dir.chdir(repo_dir) do
145
144
  # only commit if modified
146
- if git!("status --porcelain 2>&1").include?(spec.name)
145
+ if git!('status --porcelain 2>&1').include?(spec.name)
147
146
  UI.puts " - #{message}"
148
147
  git!("add #{spec.name}")
149
148
  git!("commit --no-verify -m '#{message}'")
@@ -172,15 +171,22 @@ module Pod
172
171
  # @return [Pathname] The directory of the repository.
173
172
  #
174
173
  def repo_dir
174
+ specs_dir = Pathname.new(File.join(config.repos_dir, @repo, 'Specs'))
175
175
  dir = config.repos_dir + @repo
176
- raise Informative, "`#{@repo}` repo not found" unless dir.exist?
176
+ if specs_dir.exist?
177
+ dir = specs_dir
178
+ elsif dir.exist?
179
+ dir
180
+ else
181
+ raise Informative, "`#{@repo}` repo not found either in #{specs_dir} or #{dir}"
182
+ end
177
183
  dir
178
184
  end
179
185
 
180
186
  # @return [Array<Pathname>] The path of the specifications to push.
181
187
  #
182
188
  def podspec_files
183
- files = Pathname.glob(@podspec || "*.podspec")
189
+ files = Pathname.glob(@podspec || '*.podspec')
184
190
  raise Informative, "Couldn't find any .podspec file in current directory" if files.empty?
185
191
  files
186
192
  end
@@ -192,7 +198,6 @@ module Pod
192
198
  end
193
199
 
194
200
  #---------------------------------------------------------------------#
195
-
196
201
  end
197
202
  end
198
203
  end
@@ -10,16 +10,16 @@ module Pod
10
10
  DESC
11
11
 
12
12
  self.arguments = [
13
- ['QUERY', :required]
13
+ CLAide::Argument.new('QUERY', true),
14
14
  ]
15
15
 
16
16
  def self.options
17
17
  [
18
- ["--full", "Search by name, summary, and description"],
19
- ["--stats", "Show additional stats (like GitHub watchers and forks)"],
20
- ["--ios", "Restricts the search to Pods supported on iOS"],
21
- ["--osx", "Restricts the search to Pods supported on OS X"],
22
- ["--web", "Searches on cocoapods.org"]
18
+ ['--full', 'Search by name, summary, and description'],
19
+ ['--stats', 'Show additional stats (like GitHub watchers and forks)'],
20
+ ['--ios', 'Restricts the search to Pods supported on iOS'],
21
+ ['--osx', 'Restricts the search to Pods supported on OS X'],
22
+ ['--web', 'Searches on cocoapods.org'],
23
23
  ].concat(super.reject { |option, _| option == '--silent' })
24
24
  end
25
25
 
@@ -36,13 +36,13 @@ module Pod
36
36
 
37
37
  def validate!
38
38
  super
39
- help! "A search query is required." unless @query
39
+ help! 'A search query is required.' unless @query
40
40
 
41
41
  unless @web
42
42
  begin
43
43
  /#{@query.join(' ').strip}/
44
44
  rescue RegexpError
45
- help! "A valid regular expression is required."
45
+ help! 'A valid regular expression is required.'
46
46
  end
47
47
  end
48
48
  end
@@ -62,9 +62,9 @@ module Pod
62
62
  query_parameter = [
63
63
  ('on:osx' if @supported_on_osx),
64
64
  ('on:ios' if @supported_on_ios),
65
- @query
65
+ @query,
66
66
  ].compact.flatten.join(' ')
67
- url = "http://cocoapods.org/?q=#{CGI.escape(query_parameter).gsub("+", "%20")}"
67
+ url = "http://cocoapods.org/?q=#{CGI.escape(query_parameter).gsub('+', '%20')}"
68
68
  UI.puts("Opening #{url}")
69
69
  open!(url)
70
70
  end
@@ -72,10 +72,10 @@ module Pod
72
72
  def local_search
73
73
  sets = SourcesManager.search_by_name(@query.join(' ').strip, @full_text_search)
74
74
  if @supported_on_ios
75
- sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
75
+ sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
76
76
  end
77
77
  if @supported_on_osx
78
- sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
78
+ sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
79
79
  end
80
80
 
81
81
  statistics_provider = Config.instance.spec_statistics_provider
@@ -91,7 +91,6 @@ module Pod
91
91
  end
92
92
  end
93
93
  end
94
-
95
94
  end
96
95
  end
97
96
  end