cocoapods-browser 0.0.2 → 0.0.3

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: ac98c1339b92d4bb6b0079b5269d36ed3c9cd0ed
4
- data.tar.gz: 149a25e564c05ff3c43b62f2eb66ee2ddd6cd2e4
3
+ metadata.gz: 06dad5bcafffbbadae493ace59e7bee4c5aabe54
4
+ data.tar.gz: ea671c8ae65e18eb7c252cfd11ec0e9f6b96649b
5
5
  SHA512:
6
- metadata.gz: eab3753c6d0db563dfab2e7e56fd0c1bd265dbb06ed68e4a59a494b49240152e2d330b7312b11267113b95d735ee86a20baa61b128da6480cc90550f191892c1
7
- data.tar.gz: bf2e5c29cae4ae4f173e1d04e05b4e2739c0838caa0242cc3595d4cce232706fc1283cf13c523f43bc0a05f4ebdc75351cef97762eed441dbbe8463af5f9684e
6
+ metadata.gz: 36e0025638a3918eea8322b55faba7b3b88ddbc9bfaf865eec319360c250be5b3a1e76d36a8867b39c7df3b6650b9e23c2fa968f78b04d9f0150786745365020
7
+ data.tar.gz: 99046fd26b523b663889ffcad0830e5690dbc8541a87cb882ed9ad96c0fed02427905b9b4597a72533efa770b707a07dc8f3af6ed9478b71f271d22f409cc9c1
@@ -1,5 +1,5 @@
1
1
  module Cocoapods
2
2
  module Browser
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -9,7 +9,14 @@ module Pod
9
9
 
10
10
  self.arguments = '[QUERY]'
11
11
 
12
+ def self.options
13
+ [
14
+ '--spec', 'Open the podspec on the browser. github.com/tree/master/[PODNAME].podspec',
15
+ ].concat(super)
16
+ end
17
+
12
18
  def initialize(argv)
19
+ @spec = argv.flag?('spec')
13
20
  @query = argv.arguments! unless argv.arguments.empty?
14
21
  super
15
22
  end
@@ -31,15 +38,22 @@ module Pod
31
38
  begin
32
39
  pod = Specification::Set::Presenter.new(set, statistics_provider)
33
40
  next if query != pod.name
41
+
34
42
  if url = pod.homepage
43
+ if @spec && url =~ %r|^https?://github.com/|
44
+ url << "/tree/master/#{pod.name}.podspec"
45
+ else
46
+ UI.warn "Skipping `#{pod.name}` because the homgepage is only `github.com`."
47
+ next
48
+ end
35
49
  UI.puts("Opening #{url}")
36
50
  open!(url)
37
51
  opened = true
38
52
  else
39
- UI.warn "Skipping `#{set.name}` because the homepage not found."
53
+ UI.warn "Skipping `#{pod.name}` because the homepage not found."
40
54
  end
41
55
  rescue DSLError
42
- UI.warn "Skipping `#{set.name}` because the podspec contains errors."
56
+ UI.warn "Skipping `#{pod.name}` because the podspec contains errors."
43
57
  end
44
58
  end
45
59
  UI.warn "The query(`#{query}`) not found pod." unless opened
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshihiro Morimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2013-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler