cocoapods-show 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1abf5159ceafc8b058035ba673fe093f7ba59f5d
4
+ data.tar.gz: d401484fccd7573ea8864b24bc73bae7a148237f
5
+ SHA512:
6
+ metadata.gz: 954162f8abd378a1423a35698f02202f8f3f19d850c11d25ac71fe3516842fbf54bb8ad48cb18a76c4d1d148e0bdb54da28c97a3103a08b22fa859760c1c0aad
7
+ data.tar.gz: 7bbd02a194964a317fb4d255232b4b3d91cbe8ea509c51047d6a8e7a9563dbba828874bbe6e85cc96b832270b928290bcc276b1d42d945534371b6af4becb085
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 Ian Pearce
2
+
3
+ The MIT License (MIT)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ List installed CocoaPods
2
+ ========================
3
+
4
+ A way to quickly see what pods (and versions) are installed in your project.
5
+
6
+ For fans of Bundler's `bundle list`.
7
+
8
+ ## Installation
9
+
10
+ ```
11
+ $ gem install cocoapods-show
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ $ pod show
18
+ ```
19
+
20
+ Output:
21
+
22
+ ```
23
+ Installed pods:
24
+ * AWSCore (2.2.5)
25
+ * AWSS3 (2.2.5)
26
+ * Bolts (1.2.2)
27
+ ...
28
+ ```
29
+
30
+ ### Or filter:
31
+
32
+ ```
33
+ $ pod show AWS
34
+ ```
35
+
36
+ Output:
37
+
38
+ ```
39
+ Installed pods:
40
+ * AWSCore (2.2.5)
41
+ * AWSS3 (2.2.5)
42
+ ```
43
+
44
+ ## Can't I just look at Podfile.lock?
45
+
46
+ Yup.
@@ -0,0 +1,19 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "cocoapods-show"
7
+ spec.version = "0.0.1"
8
+ spec.authors = ["Ian Pearce"]
9
+ spec.email = ["ian@ianpearce.org"]
10
+
11
+ spec.summary = %q{Use `pod show` to list installed CocoaPods for a project}
12
+ spec.homepage = "https://github.com/peeinears/cocoapods-show"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.bindir = "exe"
17
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
+ end
@@ -0,0 +1 @@
1
+ require 'pod/command/show'
@@ -0,0 +1,45 @@
1
+ module Pod
2
+ class Command
3
+ class Show < Command
4
+
5
+ self.summary = 'List installed pods'
6
+ self.description = <<-DESC
7
+ Lists pods and their versions installed in the current project.
8
+
9
+ If optional `POD_NAME` provided the results will be filtered to
10
+ matching pods.
11
+ DESC
12
+ self.arguments = [
13
+ CLAide::Argument.new('POD_NAME', false)
14
+ ]
15
+
16
+ attr_reader :filter
17
+
18
+ def initialize(argv)
19
+ @filter = argv.shift_argument
20
+ super
21
+ end
22
+
23
+ def run
24
+ verify_lockfile_exists!
25
+ section_title = "Installed pods"
26
+ section_title += " matching '#{filter}'" if filter
27
+ UI.section("#{section_title}:") do
28
+ config_hash = config.lockfile.to_hash
29
+ config_hash['PODS'].each do |pod|
30
+ pod = pod.keys.first if pod.is_a?(Hash)
31
+ next if filter && pod.scan(filter).empty?
32
+ pod_name, version = Specification.name_and_version_from_string(pod)
33
+ pod_source = config_hash['CHECKOUT OPTIONS'][pod_name]
34
+ if pod_source && pod_source[:commit]
35
+ git_version = pod_source[:commit][0,7]
36
+ version = "#{version} #{git_version}"
37
+ end
38
+ UI.puts " * #{pod_name} (#{version})"
39
+ end
40
+ end
41
+ end
42
+
43
+ end
44
+ end
45
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-show
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ian Pearce
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - ian@ianpearce.org
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE
21
+ - README.md
22
+ - cocoapods-show.gemspec
23
+ - lib/cocoapods_plugin.rb
24
+ - lib/pod/command/show.rb
25
+ homepage: https://github.com/peeinears/cocoapods-show
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.8
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Use `pod show` to list installed CocoaPods for a project
49
+ test_files: []