cocoapods-check_latest 0.0.1 → 0.1.0
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 +4 -4
- data/.rubocop.yml +2 -17
- data/CHANGELOG.md +11 -0
- data/Gemfile +0 -1
- data/README.md +25 -10
- data/Rakefile +7 -0
- data/{cocoapods-head.gemspec → cocoapods-check_latest.gemspec} +4 -4
- data/lib/pod/command/check_latest.rb +6 -6
- data/spec/pod/command/check_latest_spec.rb +13 -13
- data/spec/spec_helper.rb +1 -2
- metadata +11 -11
- data/spec_helper.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16fefb9c2814563a45579773e32ed70b901e7d2c
|
4
|
+
data.tar.gz: d5b86e880b0d3894c34497070175e3d24550fa9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55c81945d8421c6b143170c59bfd9d7174512dd13d2d2fa7384bdaca8c36817913c0f509baa60a5c19897248967bdada0d173b602762231b64a37d7d63a74fad
|
7
|
+
data.tar.gz: f12a006e4f15b42ab06d2956c5ae3ea2dd7eaccdfd171637ce162f1fc2cb17d47d0efa814cbb805106f7e9c7c2165111c047428179f1c8ebf2b054ed16e623d9
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
AllCops:
|
3
|
-
|
3
|
+
Include:
|
4
4
|
- '*.gemspec'
|
5
5
|
- Rakefile
|
6
6
|
- Gemfile
|
7
7
|
- Guardfile
|
8
|
-
|
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
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,39 @@
|
|
1
|
-
#
|
1
|
+
# cocoapods-check_latest
|
2
2
|
|
3
|
-
|
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
|
-
|
7
|
+
```bash
|
8
|
+
$ gem install cocoapods-check_latest
|
9
|
+
```
|
8
10
|
|
9
|
-
|
11
|
+
## Usage
|
10
12
|
|
11
|
-
|
13
|
+
```bash
|
14
|
+
$ pod check-latest viewcontroller
|
12
15
|
|
13
|
-
$ bundle
|
14
16
|
|
15
|
-
|
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
|
-
|
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
|
-
|
35
|
+
...
|
36
|
+
```
|
22
37
|
|
23
38
|
## Contributing
|
24
39
|
|
data/Rakefile
CHANGED
@@ -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
|
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.
|
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', '~>
|
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.
|
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 = '
|
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
|
49
|
-
|
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(
|
59
|
-
GitHub.tags(
|
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
|
-
|
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 {
|
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 {
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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(:
|
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(
|
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(
|
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
|
data/spec/spec_helper.rb
CHANGED
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
|
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:
|
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.
|
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.
|
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: '
|
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: '
|
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.
|
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.
|
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-
|
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.
|
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
|
data/spec_helper.rb
DELETED
@@ -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
|