cocoapods-check_latest 0.0.1 → 0.1.0

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: 1facf20c8e3342f34a837600b886287d06f7beb0
4
- data.tar.gz: 830cb07e0e599b4e8324d7b73c4dc5c6fe919294
3
+ metadata.gz: 16fefb9c2814563a45579773e32ed70b901e7d2c
4
+ data.tar.gz: d5b86e880b0d3894c34497070175e3d24550fa9d
5
5
  SHA512:
6
- metadata.gz: 6d03e567708cdd0e071cf4dd25bcad8fcdf99f54bde518b97f144f720900bf503643c2545b2e2a97b43881308428eb84514e8f1ea8acd9f170f9577683cdbddf
7
- data.tar.gz: b2550b5227606489e3566a5984c3337a7f75d86da1ee27baebbb3542e4d313969e80d62573e2fbf20925dce0811df86aa3b96409d5350ee89db3db0b77f2dda7
6
+ metadata.gz: 55c81945d8421c6b143170c59bfd9d7174512dd13d2d2fa7384bdaca8c36817913c0f509baa60a5c19897248967bdada0d173b602762231b64a37d7d63a74fad
7
+ data.tar.gz: f12a006e4f15b42ab06d2956c5ae3ea2dd7eaccdfd171637ce162f1fc2cb17d47d0efa814cbb805106f7e9c7c2165111c047428179f1c8ebf2b054ed16e623d9
@@ -1,11 +1,11 @@
1
1
 
2
2
  AllCops:
3
- Includes:
3
+ Include:
4
4
  - '*.gemspec'
5
5
  - Rakefile
6
6
  - Gemfile
7
7
  - Guardfile
8
- Excludes:
8
+ Exclude:
9
9
  - tmp/*
10
10
  - vendor/*
11
11
 
@@ -15,9 +15,6 @@ LineLength:
15
15
  MethodLength:
16
16
  Max: 17
17
17
 
18
- CyclomaticComplexity:
19
- Max: 8
20
-
21
18
  WordArray:
22
19
  Enabled: false
23
20
 
@@ -53,15 +50,3 @@ AlignHash:
53
50
  # TODO
54
51
  Documentation:
55
52
  Enabled: false
56
-
57
- # Currently IndentationWidth reports false positive offence around here document.
58
- IndentationWidth:
59
- Enabled: false
60
-
61
- # TODO: This should not register offences for non keyword hashes.
62
- BracesAroundHashParameters:
63
- Enabled: false
64
-
65
- # TODO: Shorten to 100.
66
- ClassLength:
67
- Max: 154
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## Development
4
+
5
+ ## v0.1.0
6
+
7
+ * Conform to CocoaPods 0.33.
8
+
9
+ ## v0.0.1
10
+
11
+ * Initial release.
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in cocoapods-head.gemspec
4
3
  gemspec
data/README.md CHANGED
@@ -1,24 +1,39 @@
1
- # Cocoapods::Head
1
+ # cocoapods-check_latest
2
2
 
3
- TODO: Write a gem description
3
+ A CocoaPods plugin that checks if the latest version of a pod is up to date.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ ```bash
8
+ $ gem install cocoapods-check_latest
9
+ ```
8
10
 
9
- gem 'cocoapods-head'
11
+ ## Usage
10
12
 
11
- And then execute:
13
+ ```bash
14
+ $ pod check-latest viewcontroller
12
15
 
13
- $ bundle
14
16
 
15
- Or install it yourself as:
17
+ -> AMBubbleTableViewController
18
+ - Homepage: https://github.com/andreamazz/AMBubbleTableView
19
+ - Latest pod version:0.5.1
20
+ - Latest version in original repo:0.5.1
16
21
 
17
- $ gem install cocoapods-head
18
22
 
19
- ## Usage
23
+ -> APPinViewController
24
+ - Homepage: https://github.com/Alterplay/APPinViewController
25
+ - Latest pod version:1.0.2
26
+ - Latest version in original repo:1.0.2
27
+
28
+
29
+ -> ARGenericTableViewController
30
+ - Homepage: https://github.com/arconsis/ARGenericTableViewController
31
+ - Latest pod version:1.0.0
32
+ - Latest version in original repo:1.0.1
33
+ Outdated!
20
34
 
21
- TODO: Write usage instructions here
35
+ ...
36
+ ```
22
37
 
23
38
  ## Contributing
24
39
 
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
1
  require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ RuboCop::RakeTask.new(:style)
7
+
8
+ task default: [:spec, :style]
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'cocoapods-check_latest'
5
- spec.version = '0.0.1' # http://semver.org/
5
+ spec.version = '0.1.0' # http://semver.org/
6
6
  spec.authors = ['Yuji Nakayama']
7
7
  spec.email = ['nkymyj@gmail.com']
8
8
  spec.description = 'A CocoaPods plugin that checks if the latest version of a pod is up to date'
@@ -15,13 +15,13 @@ Gem::Specification.new do |spec|
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
16
  spec.require_paths = ['lib']
17
17
 
18
- spec.add_runtime_dependency 'cocoapods', '~> 0.28'
18
+ spec.add_runtime_dependency 'cocoapods', '~> 0.33'
19
19
 
20
20
  spec.add_development_dependency 'bundler', '~> 1.3'
21
- spec.add_development_dependency 'rspec', '~> 2.14'
21
+ spec.add_development_dependency 'rspec', '~> 3.0'
22
22
  spec.add_development_dependency 'rake', '~> 10.1'
23
23
  spec.add_development_dependency 'simplecov', '~> 0.8'
24
- spec.add_development_dependency 'rubocop', '~> 0.15'
24
+ spec.add_development_dependency 'rubocop', '~> 0.23'
25
25
  spec.add_development_dependency 'guard-rspec', '~> 4.2'
26
26
  spec.add_development_dependency 'guard-rubocop', '~> 1.0'
27
27
  spec.add_development_dependency 'guard-shell', '~> 0.5'
@@ -1,9 +1,10 @@
1
+ # coding: utf-8
1
2
 
2
3
  module Pod
3
4
  class Command
4
5
  class CheckLatest < Command
5
6
  self.summary = 'Check if the latest version of a pod is up to date'
6
- self.arguments = '[NAME]'
7
+ self.arguments = [['NAME', :required]]
7
8
 
8
9
  def initialize(argv)
9
10
  @name = argv.shift_argument
@@ -45,9 +46,8 @@ module Pod
45
46
 
46
47
  def github_url(set)
47
48
  git_url = set.specification.source[:git]
48
- return nil unless git_url
49
- return nil unless git_url.include?('github.com/')
50
- git_url
49
+ return nil if !git_url || !git_url.include?('github.com/')
50
+ git_url.sub(/\.git$/, '')
51
51
  end
52
52
 
53
53
  def latest_version_in_repo(git_url)
@@ -55,8 +55,8 @@ module Pod
55
55
  versions_from_tags(tags).sort.last
56
56
  end
57
57
 
58
- def github_tags(git_url)
59
- GitHub.tags(git_url).map { |hash| hash['name'] }
58
+ def github_tags(github_url)
59
+ GitHub.tags(github_url).map { |hash| hash['name'] }
60
60
  end
61
61
 
62
62
  def versions_from_tags(tags)
@@ -1,4 +1,4 @@
1
-
1
+ # coding: utf-8
2
2
 
3
3
  require 'spec_helper'
4
4
  require 'cocoapods'
@@ -45,8 +45,8 @@ module Pod
45
45
  subject { command.github_url(set) }
46
46
 
47
47
  context "when the pod's source is a GitHub repository" do
48
- it 'returns the URL' do
49
- should == 'https://github.com/gh-unit/gh-unit.git'
48
+ it 'returns the URL without ".git" extension' do
49
+ is_expected.to eq('https://github.com/gh-unit/gh-unit')
50
50
  end
51
51
  end
52
52
 
@@ -55,7 +55,7 @@ module Pod
55
55
  allow_any_instance_of(Specification).to receive(:source).and_return(git: 'foo')
56
56
  end
57
57
 
58
- it { should be_nil }
58
+ it { is_expected.to be_nil }
59
59
  end
60
60
 
61
61
  context "when the pod's source is a Subversion repository" do
@@ -63,7 +63,7 @@ module Pod
63
63
  allow_any_instance_of(Specification).to receive(:source).and_return(svn: 'foo')
64
64
  end
65
65
 
66
- it { should be_nil }
66
+ it { is_expected.to be_nil }
67
67
  end
68
68
  end
69
69
 
@@ -74,7 +74,7 @@ module Pod
74
74
  let(:tags) { ['0.5.8', 'foo'] }
75
75
 
76
76
  it 'excludes the tag' do
77
- should == ['0.5.8']
77
+ is_expected.to eq(['0.5.8'])
78
78
  end
79
79
  end
80
80
 
@@ -82,7 +82,7 @@ module Pod
82
82
  let(:tags) { ['0.5.8', 'v0.5.7'] }
83
83
 
84
84
  it 'removes the prefix' do
85
- should == ['0.5.8', '0.5.7']
85
+ is_expected.to eq(['0.5.8', '0.5.7'])
86
86
  end
87
87
  end
88
88
 
@@ -90,7 +90,7 @@ module Pod
90
90
  let(:tags) { ['0.5.8', 'ver0.5.7'] }
91
91
 
92
92
  it 'removes the prefix' do
93
- should == ['0.5.8', '0.5.7']
93
+ is_expected.to eq(['0.5.8', '0.5.7'])
94
94
  end
95
95
  end
96
96
 
@@ -98,13 +98,13 @@ module Pod
98
98
  let(:tags) { ['0.5.8', 'release-0.5.7'] }
99
99
 
100
100
  it 'excludes the tag' do
101
- should == ['0.5.8']
101
+ is_expected.to eq(['0.5.8'])
102
102
  end
103
103
  end
104
104
  end
105
105
 
106
106
  describe '#latest_version_in_repo' do
107
- let(:git_url) { 'https://github.com/gh-unit/gh-unit.git' }
107
+ let(:git_url) { 'https://github.com/gh-unit/gh-unit.git' }
108
108
 
109
109
  before do
110
110
  allow(command).to receive(:github_tags)
@@ -118,7 +118,7 @@ module Pod
118
118
  end
119
119
 
120
120
  describe '#github_tags' do
121
- let(:git_url) { 'https://github.com/gh-unit/gh-unit.git' }
121
+ let(:github_url) { 'https://github.com/gh-unit/gh-unit' }
122
122
 
123
123
  let(:data) do
124
124
  [
@@ -129,11 +129,11 @@ module Pod
129
129
  end
130
130
 
131
131
  before do
132
- allow(GitHub).to receive(:tags).with(git_url).and_return(data)
132
+ allow(GitHub).to receive(:tags).with(github_url).and_return(data)
133
133
  end
134
134
 
135
135
  it 'returns an array of tag names' do
136
- tags = command.github_tags(git_url)
136
+ tags = command.github_tags(github_url)
137
137
  expect(tags).to eq(['release-0.3.6', '0.5.8', '0.5.7'])
138
138
  end
139
139
  end
@@ -9,8 +9,7 @@ RSpec.configure do |config|
9
9
  c.syntax = :expect
10
10
  end
11
11
 
12
- config.color_enabled = true
13
- config.treat_symbols_as_metadata_keys_with_true_values = true
12
+ config.color = true
14
13
  end
15
14
 
16
15
  require 'simplecov'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-check_latest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Nakayama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-14 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.28'
19
+ version: '0.33'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.28'
26
+ version: '0.33'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.14'
47
+ version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.14'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.15'
89
+ version: '0.23'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.15'
96
+ version: '0.23'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -160,12 +160,13 @@ extra_rdoc_files: []
160
160
  files:
161
161
  - ".gitignore"
162
162
  - ".rubocop.yml"
163
+ - CHANGELOG.md
163
164
  - Gemfile
164
165
  - Guardfile
165
166
  - LICENSE.txt
166
167
  - README.md
167
168
  - Rakefile
168
- - cocoapods-head.gemspec
169
+ - cocoapods-check_latest.gemspec
169
170
  - lib/cocoapods_plugin.rb
170
171
  - lib/pod/command/check_latest.rb
171
172
  - spec/.rubocop.yml
@@ -176,7 +177,6 @@ files:
176
177
  - spec/fixtures/podspec_repos/master/GHUnitIOS/0.5.8/GHUnitIOS.podspec
177
178
  - spec/pod/command/check_latest_spec.rb
178
179
  - spec/spec_helper.rb
179
- - spec_helper.rb
180
180
  homepage: https://github.com/yujinakayama/cocoapods-check_latest
181
181
  licenses:
182
182
  - MIT
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.0.14
200
+ rubygems_version: 2.2.2
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: A CocoaPods plugin that checks if the latest version of a pod is up to date
@@ -1,47 +0,0 @@
1
- # coding: utf-8
2
-
3
- RSpec.configure do |config|
4
- unless ENV['TRANSPEC_TEST']
5
- # Yes, I'm writing specs in should syntax intentionally!
6
- config.expect_with :rspec do |c|
7
- c.syntax = :should
8
- end
9
-
10
- config.mock_with :rspec do |c|
11
- c.syntax = :should
12
- end
13
- end
14
-
15
- config.color_enabled = true
16
- config.treat_symbols_as_metadata_keys_with_true_values = true
17
-
18
- config.before(:suite) do
19
- require 'rainbow'
20
- Sickill::Rainbow.enabled = false
21
-
22
- if ENV['TRAVIS']
23
- system('git config --global user.email "you@example.com"')
24
- system('git config --global user.name "Your Name"')
25
- end
26
- end
27
- end
28
-
29
- require 'simplecov'
30
- SimpleCov.coverage_dir(File.join('spec', 'coverage'))
31
-
32
- if ENV['TRAVIS']
33
- require 'coveralls'
34
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
35
- elsif ENV['CI']
36
- require 'simplecov-rcov'
37
- SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
38
- end
39
-
40
- SimpleCov.start do
41
- add_filter '/spec/'
42
- add_filter '/vendor/bundle/'
43
- end
44
-
45
- Dir[File.join(File.dirname(__FILE__), 'support', '*')].each do |path|
46
- require path
47
- end