podspec_bump 0.0.2 → 0.0.3
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/README.md +4 -7
- data/lib/podspec_bump/version.rb +1 -1
- data/lib/podspec_bump.rb +1 -1
- data/podspec_bump.gemspec +2 -2
- data/spec/podspec_bump_spec.rb +76 -2
- data/spec/spec_helper.rb +25 -0
- data/wercker.yml +27 -0
- metadata +7 -7
- data/.travis.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fec20716ffdf427df44e239e6bbdb3cc44a452c2
|
4
|
+
data.tar.gz: a21e1343a76473418212d252dd45a4acc16425a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd32147031f08d46f446d0eaf728fc9c9b49a2c748602a3b3c0c13ffde7a5e178953046584060dcf04555045a557df2431220bb9db4579191c29a469141e54bf
|
7
|
+
data.tar.gz: 6c81ed108f5631815449c9c891dddc61bd8eb9f6555c083cf49f0ed00a7624d7f183ede03fe5ff7e3d06a66a874a3326b5d7e3d25783e9fd1d3b371e0f2aebc3
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
[![Gem Version](https://
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/podspec_bump.svg)](http://badge.fury.io/rb/podspec_bump)
|
2
|
+
[![wercker status](https://app.wercker.com/status/90ee9101067ce48b2c689f6b688baf91/s "wercker status")](https://app.wercker.com/project/bykey/90ee9101067ce48b2c689f6b688baf91)
|
2
3
|
|
3
4
|
# PodspecBump
|
4
5
|
|
@@ -26,19 +27,15 @@ Or install it yourself as:
|
|
26
27
|
Curent version
|
27
28
|
|
28
29
|
```
|
29
|
-
|
30
|
+
podspec_bump current
|
30
31
|
```
|
31
32
|
|
32
33
|
Bump (major, minor, patch, pre)
|
33
34
|
|
34
35
|
```
|
35
|
-
|
36
|
+
podspec_bump patch
|
36
37
|
```
|
37
38
|
|
38
|
-
## Todo
|
39
|
-
|
40
|
-
test...
|
41
|
-
|
42
39
|
## Contributing
|
43
40
|
|
44
41
|
1. Fork it ( https://github.com/[my-github-username]/podspec_bump/fork )
|
data/lib/podspec_bump/version.rb
CHANGED
data/lib/podspec_bump.rb
CHANGED
data/podspec_bump.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "rspec", '
|
24
|
-
spec.add_development_dependency "colorize", '
|
23
|
+
spec.add_development_dependency "rspec", '>= 0'
|
24
|
+
spec.add_development_dependency "colorize", '>= 0'
|
25
25
|
end
|
data/spec/podspec_bump_spec.rb
CHANGED
@@ -1,11 +1,85 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe PodspecBump do
|
4
|
+
|
5
|
+
after do
|
6
|
+
File.delete('fixture.podspec') if File.exist?('fixture.podspec')
|
7
|
+
end
|
8
|
+
|
4
9
|
it 'has a version number' do
|
5
10
|
expect(PodspecBump::VERSION).not_to be nil
|
6
11
|
end
|
7
12
|
|
8
|
-
it '
|
9
|
-
expect(false).to
|
13
|
+
it 'fail if it cannot find anything to bump' do
|
14
|
+
expect(podspec_bump('current', fail: false)).to include 'Not found your spec file'
|
10
15
|
end
|
16
|
+
|
17
|
+
it 'fail without command' do
|
18
|
+
write_podspec
|
19
|
+
expect(podspec_bump('', fail: false)).to include 'Invalid option. Choose between major,minor,patch,current.'
|
20
|
+
end
|
21
|
+
|
22
|
+
it "show help" do
|
23
|
+
expect(podspec_bump("--help")).to include 'podspec_bump current'
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'version in fixture.podspec' do
|
27
|
+
before do
|
28
|
+
write_podspec
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'current is correct version' do
|
32
|
+
expect(podspec_bump('current', fail: false)).to include 'Current version: 4.2.3'
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'patch is correct version' do
|
36
|
+
expect(podspec_bump('patch', fail: false)).to include '4.2.4'
|
37
|
+
expect(read('fixture.podspec')).to include '4.2.4'
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'minor is correct version' do
|
41
|
+
expect(podspec_bump('minor', fail: false)).to include '4.3.0'
|
42
|
+
expect(read('fixture.podspec')).to include '4.3.0'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'major is correct version' do
|
46
|
+
expect(podspec_bump('major', fail: false)).to include '5.0.0'
|
47
|
+
expect(read('fixture.podspec')).to include '5.0.0'
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'podspec_bump more then 10' do
|
51
|
+
expect(podspec_bump("patch")).to include '4.2.4'
|
52
|
+
expect(podspec_bump("patch")).to include '4.2.5'
|
53
|
+
expect(podspec_bump("patch")).to include '4.2.6'
|
54
|
+
expect(podspec_bump("patch")).to include '4.2.7'
|
55
|
+
expect(podspec_bump("patch")).to include '4.2.8'
|
56
|
+
expect(podspec_bump("patch")).to include '4.2.9'
|
57
|
+
expect(podspec_bump("patch")).to include '4.2.10'
|
58
|
+
expect(podspec_bump("patch")).to include '4.2.11'
|
59
|
+
expect(read('fixture.podspec')).to include '"4.2.11"'
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def podspec_bump(command='', options={})
|
67
|
+
cmdline = "#{File.expand_path("../../bin/podspec_bump", __FILE__)} #{command}"
|
68
|
+
run cmdline, options
|
69
|
+
end
|
70
|
+
|
71
|
+
def write_podspec(version = '"4.2.3"')
|
72
|
+
write 'fixture.podspec', <<-RUBY.sub(" "*6, "")
|
73
|
+
Pod::Spec.new do |s|
|
74
|
+
s.name = "PodspecBump"
|
75
|
+
s.version = #{version}
|
76
|
+
s.summary = "summary summary"
|
77
|
+
s.homepage = "https://github.com"
|
78
|
+
s.license = 'MIT'
|
79
|
+
s.author = { "nakajijapan" => "test@google.com" }
|
80
|
+
s.source = { :git => "https://github.com/" :tag => s.version.to_s }
|
81
|
+
end
|
82
|
+
RUBY
|
83
|
+
end
|
84
|
+
|
11
85
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,2 +1,27 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
2
|
require 'podspec_bump'
|
3
|
+
|
4
|
+
module SpecHelpers
|
5
|
+
module InstanceMethods
|
6
|
+
def write(file, content)
|
7
|
+
folder = File.dirname(file)
|
8
|
+
run "mkdir -p #{folder}" unless File.exist?(folder)
|
9
|
+
File.open(file, 'w'){|f| f.write content }
|
10
|
+
end
|
11
|
+
|
12
|
+
def read(file)
|
13
|
+
File.read(file)
|
14
|
+
end
|
15
|
+
|
16
|
+
def run(cmd, options={})
|
17
|
+
result = `#{cmd} 2>&1`
|
18
|
+
raise "FAILED #{cmd} --> #{result}" if $?.success? != !options[:fail]
|
19
|
+
result
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
RSpec.configure do |c|
|
26
|
+
c.include SpecHelpers::InstanceMethods
|
27
|
+
end
|
data/wercker.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# This references the default Ruby container from
|
2
|
+
# the Docker Hub.
|
3
|
+
# https://registry.hub.docker.com/_/ruby/
|
4
|
+
# If you want to use a specific version you would use a tag:
|
5
|
+
# ruby:2.2.2
|
6
|
+
box: ruby
|
7
|
+
# You can also use services such as databases. Read more on our dev center:
|
8
|
+
# http://devcenter.wercker.com/docs/services/index.html
|
9
|
+
# services:
|
10
|
+
# - postgres
|
11
|
+
# http://devcenter.wercker.com/docs/services/postgresql.html
|
12
|
+
|
13
|
+
# - mongodb
|
14
|
+
# http://devcenter.wercker.com/docs/services/mongodb.html
|
15
|
+
|
16
|
+
# This is the build pipeline. Pipelines are the core of wercker
|
17
|
+
# Read more about pipelines on our dev center
|
18
|
+
# http://devcenter.wercker.com/docs/pipelines/index.html
|
19
|
+
build:
|
20
|
+
# Steps make up the actions in your pipeline
|
21
|
+
# Read more about steps on our dev center:
|
22
|
+
# http://devcenter.wercker.com/docs/steps/index.html
|
23
|
+
steps:
|
24
|
+
- bundle-install
|
25
|
+
- script:
|
26
|
+
name: rspec
|
27
|
+
code: bundle exec rspec
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: podspec_bump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nakajijapan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,28 +42,28 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '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
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: colorize
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: A command line tools to bump podspec version for CocoaPods. Inspired
|
@@ -77,7 +77,6 @@ extra_rdoc_files: []
|
|
77
77
|
files:
|
78
78
|
- ".gitignore"
|
79
79
|
- ".rspec"
|
80
|
-
- ".travis.yml"
|
81
80
|
- Gemfile
|
82
81
|
- LICENSE.txt
|
83
82
|
- README.md
|
@@ -88,6 +87,7 @@ files:
|
|
88
87
|
- podspec_bump.gemspec
|
89
88
|
- spec/podspec_bump_spec.rb
|
90
89
|
- spec/spec_helper.rb
|
90
|
+
- wercker.yml
|
91
91
|
homepage: http://www.nakajijapan.net
|
92
92
|
licenses:
|
93
93
|
- MIT
|
data/.travis.yml
DELETED