cocoapods-search 0.1.0 → 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 737a5f9bf12a04a61cbeafec1d193ebad0188365
4
- data.tar.gz: bd436fee79bdfaff4075edabe1cd2dd4047fc5f1
3
+ metadata.gz: 0198d41884a61de7016672ff216b88f0d33fe4db
4
+ data.tar.gz: f94a2140642899f157698f24e55eb87e1fdcd152
5
5
  SHA512:
6
- metadata.gz: 613912b5b3fe032b0a6eaa3fcfe10121f67ca16357f71dc8d1a0c44409425ef900b987ed65444e8d1fa10281d1c642c10b88822b1352ceb506f14be0fe7f51c3
7
- data.tar.gz: 1c7f1e4a88ef335ce411cd67f927de5e4f1013ba52d295063ac8a685ea336b0e74b1a25238792f37ad3263c30d2c85f2243c9c90eff2b3d373a40f4ad8ee6ac3
6
+ metadata.gz: 7b58ee34881df2bf3b021035e03afebdfedf7087e4dd046f4141f0f0ea95e18217b603f0051e15d190efea41798b9f2a0080825f47af18aa8e336e966160e974
7
+ data.tar.gz: 180202787917d8ee404a2578034f93ad1462778f20775037e6a48cd8fe7913f19674b5236a74fe1c8bdef07b04ae177d101cc490c1f70236e123bc90563a554d
data/.gitignore CHANGED
@@ -1,3 +1,39 @@
1
- .DS_Store
2
- pkg
3
- .idea/
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
35
+
36
+ /coverage/
37
+
38
+ # RubyMine Editor
39
+ .idea
@@ -0,0 +1,3 @@
1
+ [submodule "spec/fixtures/spec-repos/master"]
2
+ path = spec/fixtures/spec-repos/master
3
+ url = https://github.com/CocoaPods/Specs.git
@@ -1,15 +1,40 @@
1
1
  # Cocoapods::Search Changelog
2
2
 
3
+ ## 1.0.0.beta.1 (2015-12-30)
4
+
5
+ ##### Enhancements
6
+
7
+ * Perform full search as default, add `--simple` option to search only by
8
+ name.
9
+ [Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
10
+ [#13](https://github.com/CocoaPods/cocoapods-search/issues/13)
11
+
12
+ * Add support for tvOS and any possible future platforms.
13
+ [Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
14
+ [#11](https://github.com/CocoaPods/cocoapods-search/issues/11)
15
+
16
+ ##### Bug Fixes
17
+
18
+ * Print output in reverse order.
19
+ [Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
20
+
21
+ * Perform regexp escape on individual query words before joining them.
22
+ [Muhammed Yavuz Nuzumlalı](https://github.com/manuyavuz)
23
+ [#8](https://github.com/CocoaPods/cocoapods-search/issues/8)
24
+
25
+
3
26
  ## 0.1.0 (2015-09-03)
27
+
4
28
  * Version number must not collide with old gem called cocoapods-search 0.0.7
5
29
 
30
+
6
31
  ## 0.0.1 (2015-09-03)
7
32
 
8
- * Initial implementation. This version is an extraction from [CocoaPods](https://github.com/CocoaPods/CocoaPods).
33
+ * Initial implementation. This version is an extraction from [CocoaPods](https://github.com/CocoaPods/CocoaPods).
9
34
 
10
- Original creators:
35
+ Original creators:
11
36
  [Eloy Durán](https://github.com/alloy)
12
37
  [Fabio Pelosin](https://github.com/fabiopelosin)
13
38
 
14
39
  Extractor:
15
- [Emma Koszinowski](http://github.com/emkosz)
40
+ [Emma Koszinowski](http://github.com/emkosz)
data/Gemfile CHANGED
@@ -4,7 +4,8 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
- gem 'cocoapods'
7
+ gem 'cocoapods', :git => "https://github.com/CocoaPods/CocoaPods.git", :branch => 'master'
8
+ gem 'cocoapods-core', :git => "https://github.com/CocoaPods/Core.git", :branch => 'master'
8
9
  gem 'bacon'
9
10
  gem 'mocha-on-bacon'
10
11
  gem 'prettybacon'
@@ -1,12 +1,43 @@
1
+ GIT
2
+ remote: https://github.com/CocoaPods/CocoaPods.git
3
+ revision: 6c64eeb69443d9ab18081ad330a134cfb0e46169
4
+ branch: master
5
+ specs:
6
+ cocoapods (0.39.0)
7
+ activesupport (>= 4.0.2)
8
+ claide (~> 0.9.1)
9
+ cocoapods-core (= 0.39.0)
10
+ cocoapods-downloader (~> 0.9.3)
11
+ cocoapods-plugins (~> 0.4.2)
12
+ cocoapods-search (~> 1.0.0.beta.1)
13
+ cocoapods-stats (~> 0.6.2)
14
+ cocoapods-trunk (~> 0.6.4)
15
+ cocoapods-try (~> 0.5.1)
16
+ colored (~> 1.2)
17
+ escape (~> 0.0.4)
18
+ molinillo (~> 0.4.0)
19
+ nap (~> 1.0)
20
+ xcodeproj (~> 0.28.2)
21
+
22
+ GIT
23
+ remote: https://github.com/CocoaPods/Core.git
24
+ revision: 6c2544496ed201104e712dd95793ec7bc6a171e8
25
+ branch: master
26
+ specs:
27
+ cocoapods-core (0.39.0)
28
+ activesupport (>= 4.0.2)
29
+ fuzzy_match (~> 2.0.4)
30
+ nap (~> 1.0)
31
+
1
32
  PATH
2
33
  remote: .
3
34
  specs:
4
- cocoapods-search (0.1.0)
35
+ cocoapods-search (1.0.0.beta.1)
5
36
 
6
37
  GEM
7
38
  remote: https://rubygems.org/
8
39
  specs:
9
- activesupport (4.2.3)
40
+ activesupport (4.2.4)
10
41
  i18n (~> 0.7)
11
42
  json (~> 1.7, >= 1.7.7)
12
43
  minitest (~> 5.1)
@@ -14,33 +45,14 @@ GEM
14
45
  tzinfo (~> 1.1)
15
46
  bacon (1.2.0)
16
47
  claide (0.9.1)
17
- cocoapods (0.38.2)
18
- activesupport (>= 3.2.15)
19
- claide (~> 0.9.1)
20
- cocoapods-core (= 0.38.2)
21
- cocoapods-downloader (~> 0.9.1)
22
- cocoapods-plugins (~> 0.4.2)
23
- cocoapods-stats (~> 0.5.3)
24
- cocoapods-trunk (~> 0.6.1)
25
- cocoapods-try (~> 0.4.5)
26
- colored (~> 1.2)
27
- escape (~> 0.0.4)
28
- molinillo (~> 0.3.1)
29
- nap (~> 0.8)
30
- xcodeproj (~> 0.26.3)
31
- cocoapods-core (0.38.2)
32
- activesupport (>= 3.2.15)
33
- fuzzy_match (~> 2.0.4)
34
- nap (~> 0.8.0)
35
- cocoapods-downloader (0.9.1)
48
+ cocoapods-downloader (0.9.3)
36
49
  cocoapods-plugins (0.4.2)
37
50
  nap
38
- cocoapods-stats (0.5.3)
39
- nap (~> 0.8)
40
- cocoapods-trunk (0.6.1)
41
- nap (>= 0.8)
51
+ cocoapods-stats (0.6.2)
52
+ cocoapods-trunk (0.6.4)
53
+ nap (>= 0.8, < 2.0)
42
54
  netrc (= 0.7.8)
43
- cocoapods-try (0.4.5)
55
+ cocoapods-try (0.5.1)
44
56
  colored (1.2)
45
57
  escape (0.0.4)
46
58
  fuzzy_match (2.0.4)
@@ -52,8 +64,8 @@ GEM
52
64
  metaclass (~> 0.0.1)
53
65
  mocha-on-bacon (0.2.2)
54
66
  mocha (>= 0.13.0)
55
- molinillo (0.3.1)
56
- nap (0.8.0)
67
+ molinillo (0.4.0)
68
+ nap (1.0.0)
57
69
  netrc (0.7.8)
58
70
  prettybacon (0.0.2)
59
71
  bacon (~> 1.2)
@@ -61,7 +73,7 @@ GEM
61
73
  thread_safe (0.3.5)
62
74
  tzinfo (1.2.2)
63
75
  thread_safe (~> 0.1)
64
- xcodeproj (0.26.3)
76
+ xcodeproj (0.28.2)
65
77
  activesupport (>= 3)
66
78
  claide (~> 0.9.1)
67
79
  colored (~> 1.2)
@@ -72,8 +84,12 @@ PLATFORMS
72
84
  DEPENDENCIES
73
85
  bacon
74
86
  bundler (~> 1.3)
75
- cocoapods
87
+ cocoapods!
88
+ cocoapods-core!
76
89
  cocoapods-search!
77
90
  mocha-on-bacon
78
91
  prettybacon
79
92
  rake
93
+
94
+ BUNDLED WITH
95
+ 1.11.2
data/README.md CHANGED
@@ -2,25 +2,105 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/CocoaPods/cocoapods-search.svg)](https://travis-ci.org/CocoaPods/cocoapods-search)
4
4
 
5
- CocoaPods plugin that allows you to search your pod spec repository for specific pods matching a query.
6
-
5
+ A CocoaPods plugin that allows you to search multiple pod spec repositories for specific pods matching a query. cocoapods-search is by default included in CocoaPods.
6
+
7
7
  ## Installation
8
8
 
9
+ If you have CocoaPods, you already have cocoapods-search installed by default. If not, you can also install it as a seperate gem as followed.
10
+
9
11
  $ gem install cocoapods-search
10
12
 
11
13
  ## Usage
12
14
 
15
+ Search for pods by using the pod search command as followed.
16
+
13
17
  $ pod search QUERY
14
18
 
19
+ e.g.
20
+
21
+ $ pod search networkin
22
+
23
+ -> ACSNetworking (0.0.1)
24
+ On the basis of AFNetworking encapsulation.
25
+ pod 'ACSNetworking', '~> 0.0.1'
26
+ - Homepage: https://github.com/Hyosung/ACSNetworking
27
+ - Source: https://github.com/Hyosung/ACSNetworking.git
28
+ - Versions: 0.0.1 [master repo]
29
+
30
+
31
+ -> AFNetworking (2.5.4)
32
+ A delightful iOS and OS X networking framework.
33
+ pod 'AFNetworking', '~> 2.5.4'
34
+ - Homepage: https://github.com/AFNetworking/AFNetworking
35
+ - Source: https://github.com/AFNetworking/AFNetworking.git
36
+ - Versions: 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-RC3,
37
+ 2.0.0-RC2, 2.0.0-RC1, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0, 1.0RC3, 1.0RC2, 1.0RC1, 0.10.1, 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0,
38
+ 0.5.1 [master repo]
39
+ - Subspecs:
40
+ - AFNetworking/Serialization (2.5.4)
41
+ - AFNetworking/Security (2.5.4)
42
+ - AFNetworking/Reachability (2.5.4)
43
+ - AFNetworking/NSURLConnection (2.5.4)
44
+ - AFNetworking/NSURLSession (2.5.4)
45
+ - AFNetworking/UIKit (2.5.4)
46
+
47
+
48
+ -> AFNetworking+AutoRetry (0.0.5)
49
+ Auto Retries for AFNetworking requests
50
+ pod 'AFNetworking+AutoRetry', '~> 0.0.5'
51
+ - Homepage: https://github.com/shaioz/AFNetworking-AutoRetry
52
+ - Source: https://github.com/shaioz/AFNetworking-AutoRetry.git
53
+ - Versions: 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1 [master repo]
54
+
55
+ ...
56
+
57
+
15
58
  ### Options
16
59
 
17
60
  You can use the following options with the search command.
18
61
 
19
- | Flag | Description |
20
- |-----------|-------------|
21
- | `--regex` | Interpret the `QUERY` as a regular expression |
22
- | `--full` | Search by name, summary, and description |
23
- | `--stats` | Show additional stats (like GitHub watchers and forks) |
24
- | `--ios` | Restricts the search to Pods supported on iOS |
25
- | `--osx` | Restricts the search to Pods supported on OS X |
26
- | `--web` | Searches on cocoapods.org |
62
+ | Flag | Description |
63
+ |----------- |-------------|
64
+ | `--regex` | Interpret the `QUERY` as a regular expression |
65
+ | `--full` | Search by name, summary, and description |
66
+ | `--stats` | Show additional stats (like GitHub watchers and forks) |
67
+ | `--ios` | Restricts the search to Pods supported on iOS |
68
+ | `--osx` | Restricts the search to Pods supported on OS X |
69
+ | `--watchos` | Restricts the seach to Pods supported on Watch OS |
70
+ | `--web` | Opens a new search on cocoapods.org |
71
+
72
+
73
+ e.g.
74
+
75
+ $ pod search video --osx
76
+
77
+ -> AMCoreAudio (2.0.7)
78
+ AMCoreAudio is a Swift wrapper for Apple's CoreAudio framework
79
+ pod 'AMCoreAudio', '~> 2.0.7'
80
+ - Homepage: https://github.com/rnine/AMCoreAudio
81
+ - Source: https://github.com/rnine/AMCoreAudio.git
82
+ - Versions: 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0, 1.5, 1.4.3, 1.4.2, 1.4.1, 1.4, 1.3.2, 1.3.1, 1.3, 1.2, 1.1, 1.0.1, 1.0 [master repo]
83
+
84
+
85
+ -> AppleCoreAudioUtilityClasses@thehtb (2013.09.17)
86
+ A git mirror of Apple's Core Audio Utility Classes for better versioning and with clang/llvm fixes.
87
+ pod 'AppleCoreAudioUtilityClasses@thehtb', '~> 2013.09.17'
88
+ - Homepage: https://github.com/thehtb/AppleCoreAudioUtilityClasses
89
+ - Source: https://github.com/thehtb/AppleCoreAudioUtilityClasses.git
90
+ - Versions: 2013.09.17, 2013.2.18, 2013.1.2 [master repo]
91
+ - Subspecs:
92
+ - AppleCoreAudioUtilityClasses@thehtb/PublicUtility (2013.09.17)
93
+ - AppleCoreAudioUtilityClasses@thehtb/PublicUtility/CAProcess (2013.09.17)
94
+ - AppleCoreAudioUtilityClasses@thehtb/PublicUtility/CAAutoDisposer (2013.09.17)
95
+ - AppleCoreAudioUtilityClasses@thehtb/PublicUtility/CABitOperations (2013.09.17)
96
+ - AppleCoreAudioUtilityClasses@thehtb/PublicUtility/CASpectralProcessor (2013.09.17)
97
+
98
+
99
+ -> AudioKit (2.1.1)
100
+ Open-source audio synthesis, processing, & analysis platform.
101
+ pod 'AudioKit', '~> 2.1.1'
102
+ - Homepage: http://audiokit.io/
103
+ - Source: https://github.com/audiokit/AudioKit.git
104
+ - Versions: 2.1.1, 2.0.1, 2.0, 1.3, 1.2-01, 1.2 [master repo]
105
+
106
+ ...
@@ -4,9 +4,8 @@ module Pod
4
4
  self.summary = 'Search for pods.'
5
5
 
6
6
  self.description = <<-DESC
7
- Searches for pods, ignoring case, whose name matches `QUERY`. If the
8
- `--full` option is specified, this will also search in the summary and
9
- description of the pods.
7
+ Searches for pods, ignoring case, whose name, summary, description, or authors match `QUERY`. If the
8
+ `--simple` option is specified, this will only search in the names of the pods.
10
9
  DESC
11
10
 
12
11
  self.arguments = [
@@ -14,27 +13,30 @@ module Pod
14
13
  ]
15
14
 
16
15
  def self.options
17
- [
16
+ options = [
18
17
  ['--regex', 'Interpret the `QUERY` as a regular expression'],
19
- ['--full', 'Search by name, summary, and description'],
18
+ ['--simple', 'Search only by name'],
20
19
  ['--stats', 'Show additional stats (like GitHub watchers and forks)'],
21
- ['--ios', 'Restricts the search to Pods supported on iOS'],
22
- ['--osx', 'Restricts the search to Pods supported on OS X'],
23
- ['--watchos', 'Restricts the search to Pods supported on Watch OS'],
24
20
  ['--web', 'Searches on cocoapods.org'],
25
- ].concat(super.reject { |option, _| option == '--silent' })
21
+ ]
22
+ options += Platform.all.map do |platform|
23
+ ["--#{platform.name.to_s}", "Restricts the search to Pods supported on #{Platform.string_name(platform.to_sym)}"]
24
+ end
25
+ options << ['--no-pager', 'Do not pipe search results into a pager']
26
+ options.concat(super.reject { |option, _| option == '--silent' })
26
27
  end
27
28
 
28
29
  def initialize(argv)
29
30
  @use_regex = argv.flag?('regex')
30
- @full_text_search = argv.flag?('full')
31
+ @simple_search = argv.flag?('simple')
31
32
  @stats = argv.flag?('stats')
32
- @supported_on_ios = argv.flag?('ios')
33
- @supported_on_osx = argv.flag?('osx')
34
- @supported_on_watchos = argv.flag?('watchos')
35
33
  @web = argv.flag?('web')
34
+ @platform_filters = Platform.all.map do |platform|
35
+ argv.flag?(platform.name.to_s) ? platform.to_sym : nil
36
+ end.compact
36
37
  @query = argv.arguments! unless argv.arguments.empty?
37
38
  config.silent = false
39
+ @use_pager = argv.flag?('pager', true)
38
40
  super
39
41
  end
40
42
 
@@ -61,33 +63,36 @@ module Pod
61
63
  end
62
64
 
63
65
  def web_search
64
- query_parameter = [
65
- ('on:osx' if @supported_on_osx),
66
- ('on:ios' if @supported_on_ios),
67
- ('on:watchos' if @supported_on_watchos),
68
- @query,
69
- ].compact.flatten.join(' ')
66
+ queries = @platform_filters.map do |platform|
67
+ "on:#{platform}"
68
+ end
69
+ queries += @query
70
+ query_parameter = queries.compact.flatten.join(' ')
70
71
  url = "https://cocoapods.org/?q=#{CGI.escape(query_parameter).gsub('+', '%20')}"
71
72
  UI.puts("Opening #{url}")
72
73
  open!(url)
73
74
  end
74
75
 
75
76
  def local_search
76
- query_regex = @query.join(' ').strip
77
- query_regex = Regexp.escape(query_regex) unless @use_regex
77
+ query_regex = @query.reduce([]) { |result, q|
78
+ result << (@use_regex ? q : Regexp.escape(q))
79
+ }.join(' ').strip
78
80
 
79
- sets = SourcesManager.search_by_name(query_regex, @full_text_search)
80
- if @supported_on_ios
81
- sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
82
- end
83
- if @supported_on_osx
84
- sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
81
+ sets = SourcesManager.search_by_name(query_regex, !@simple_search)
82
+
83
+ @platform_filters.each do |platform|
84
+ sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(platform) }
85
85
  end
86
- if @supported_on_watchos
87
- sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:watchos) }
86
+
87
+ if(@use_pager)
88
+ UI.with_pager { print_sets(sets) }
89
+ else
90
+ print_sets(sets)
88
91
  end
92
+ end
89
93
 
90
- sets.each do |set|
94
+ def print_sets(sets)
95
+ sets.each do |set|
91
96
  begin
92
97
  if @stats
93
98
  UI.pod(set, :stats)
@@ -96,7 +101,7 @@ module Pod
96
101
  end
97
102
  rescue DSLError
98
103
  UI.warn "Skipping `#{set.name}` because the podspec contains errors."
99
- end
104
+ end
100
105
  end
101
106
  end
102
107
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsSearch
2
- VERSION = "0.1.0"
2
+ VERSION = '1.0.0.beta.1'.freeze
3
3
  end
@@ -17,7 +17,7 @@ module Pod
17
17
 
18
18
  it 'runs with correct parameters' do
19
19
  lambda { run_command('search', 'JSON') }.should.not.raise
20
- lambda { run_command('search', 'JSON', '--full') }.should.not.raise
20
+ lambda { run_command('search', 'JSON', '--simple') }.should.not.raise
21
21
  end
22
22
 
23
23
  it 'complains for wrong parameters' do
@@ -27,15 +27,25 @@ module Pod
27
27
  end
28
28
 
29
29
  it 'searches for a pod with name matching the given query ignoring case' do
30
- output = run_command('search', 'json')
30
+ output = run_command('search', 'json', '--simple')
31
31
  output.should.include? 'JSONKit'
32
32
  end
33
33
 
34
34
  it 'searches for a pod with name, summary, or description matching the given query ignoring case' do
35
- output = run_command('search', 'Engelhart', '--full')
35
+ output = run_command('search', 'engelhart')
36
36
  output.should.include? 'JSONKit'
37
37
  end
38
38
 
39
+ it 'searches for a pod with name, summary, or description matching the given multi-word query ignoring case' do
40
+ output = run_command('search', 'very', 'high', 'performance')
41
+ output.should.include? 'JSONKit'
42
+ end
43
+
44
+ it 'prints search results in order' do
45
+ output = run_command('search', 'lib')
46
+ output.should.match /BananaLib.*JSONKit/m
47
+ end
48
+
39
49
  it 'restricts the search to Pods supported on iOS' do
40
50
  output = run_command('search', 'BananaLib', '--ios')
41
51
  output.should.include? 'BananaLib'
@@ -50,11 +60,17 @@ module Pod
50
60
  end
51
61
 
52
62
  it 'restricts the search to Pods supported on Watch OS' do
53
- output = run_command('search', '', '--watchos')
63
+ output = run_command('search', 'a', '--watchos')
54
64
  output.should.include? 'Realm'
55
65
  output.should.not.include? 'BananaLib'
56
66
  end
57
67
 
68
+ it 'restricts the search to Pods supported on tvOS' do
69
+ output = run_command('search', 'n', '--tvos')
70
+ output.should.include? 'monkey'
71
+ output.should.not.include? 'BananaLib'
72
+ end
73
+
58
74
  it 'outputs with the silent parameter' do
59
75
  output = run_command('search', 'BananaLib', '--silent')
60
76
  output.should.include? 'BananaLib'
@@ -110,11 +126,27 @@ module Pod
110
126
  run_command('search', '--web', '--ios', 'bananalib')
111
127
  end
112
128
 
129
+ it 'includes option --watchos correctly' do
130
+ Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Awatchos%20bananalib')
131
+ run_command('search', '--web', '--watchos', 'bananalib')
132
+ end
133
+
134
+ it 'includes option --tvos correctly' do
135
+ Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Atvos%20bananalib')
136
+ run_command('search', '--web', '--tvos', 'bananalib')
137
+ end
138
+
139
+ it 'includes any new platform option correctly' do
140
+ Platform.stubs(:all).returns([Platform.ios, Platform.tvos, Platform.new('whateveros')])
141
+ Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Awhateveros%20bananalib')
142
+ run_command('search', '--web', '--whateveros', 'bananalib')
143
+ end
144
+
113
145
  it 'does not matter in which order the ios/osx options are set' do
114
- Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Aosx%20on%3Aios%20bananalib')
146
+ Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Aios%20on%3Aosx%20bananalib')
115
147
  run_command('search', '--web', '--ios', '--osx', 'bananalib')
116
148
 
117
- Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Aosx%20on%3Aios%20bananalib')
149
+ Command::Search.any_instance.expects(:open!).with('https://cocoapods.org/?q=on%3Aios%20on%3Aosx%20bananalib')
118
150
  run_command('search', '--web', '--osx', '--ios', 'bananalib')
119
151
  end
120
152
  end
@@ -5,7 +5,7 @@ module SpecHelper
5
5
  end
6
6
 
7
7
  def command(*argv)
8
- argv << '--no-ansi'
8
+ argv += ['--no-ansi', '--no-pager']
9
9
  Pod::Command.parse(argv)
10
10
  end
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Durán
@@ -10,34 +10,34 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-03 00:00:00.000000000 Z
13
+ date: 2015-12-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.3'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.3'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rake
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - '>='
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  description: Search for pods.
@@ -49,8 +49,9 @@ executables: []
49
49
  extensions: []
50
50
  extra_rdoc_files: []
51
51
  files:
52
- - ".gitignore"
53
- - ".travis.yml"
52
+ - .gitignore
53
+ - .gitmodules
54
+ - .travis.yml
54
55
  - CHANGELOG.md
55
56
  - Gemfile
56
57
  - Gemfile.lock
@@ -87,17 +88,17 @@ require_paths:
87
88
  - lib
88
89
  required_ruby_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
- - - ">="
91
+ - - '>='
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
- - - ">="
96
+ - - '>'
96
97
  - !ruby/object:Gem::Version
97
- version: '0'
98
+ version: 1.3.1
98
99
  requirements: []
99
100
  rubyforge_project:
100
- rubygems_version: 2.2.2
101
+ rubygems_version: 2.5.1
101
102
  signing_key:
102
103
  specification_version: 4
103
104
  summary: Searches for pods, ignoring case, whose name matches `QUERY`. If the `--full`