danger-ios_version_change 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +11 -8
- data/Dangerfile +6 -0
- data/Gemfile.lock +2 -1
- data/PULL_REQUEST_TEMPLATE.md +3 -0
- data/assert_danger_running_on_pr.sh +4 -0
- data/lib/ios_version_change/gem_version.rb +1 -1
- data/lib/ios_version_change/plugin.rb +8 -2
- data/spec/ios_version_change_spec.rb +0 -4
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2645f1de3d4e8d2c245e6303d72feb01434be32faa98f3a59837e9b33eb08139
|
4
|
+
data.tar.gz: 13d0bd35e9211988669dd039c1e18fff7f19159dcbaccdb619ba54a64073760f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cf11ca626ccf4027f41ea0186dda2ff80f5720f941011aaddf90278124072c05492549a6eee9f9103b063850df779d5f21feccfe37c2789ac25621e266d8360
|
7
|
+
data.tar.gz: c1cafd9e2584cad7e78699818f04639ca6cda815e099979c00979339a8370848185f001ae00475fb8fd86d26ab9e622847eabac13359e99acf366354af091fbc
|
data/.circleci/config.yml
CHANGED
@@ -16,6 +16,14 @@ jobs:
|
|
16
16
|
key: Gemfile-{{ checksum "Gemfile.lock" }}
|
17
17
|
paths:
|
18
18
|
- vendor/bundle
|
19
|
+
danger:
|
20
|
+
docker:
|
21
|
+
- image: dantoml/danger:latest
|
22
|
+
steps:
|
23
|
+
- checkout
|
24
|
+
- run: ./assert_danger_running_on_pr.sh
|
25
|
+
- run: bundle install
|
26
|
+
- run: '[ ! -z $DANGER_GITHUB_API_TOKEN ] && danger || echo "Skipping Danger for External Contributor" && exit 1'
|
19
27
|
test-lint:
|
20
28
|
working_directory: ~/code
|
21
29
|
docker:
|
@@ -46,11 +54,7 @@ jobs:
|
|
46
54
|
- run:
|
47
55
|
name: Bundle Install
|
48
56
|
command: bundle install --path vendor/bundle
|
49
|
-
- run: gem build danger-ios_version_change.gemspec
|
50
|
-
- persist_to_workspace:
|
51
|
-
root: output-gems
|
52
|
-
paths:
|
53
|
-
- danger-ios_version_change*.gem
|
57
|
+
- run: gem build danger-ios_version_change.gemspec
|
54
58
|
deploy:
|
55
59
|
working_directory: ~/code
|
56
60
|
docker:
|
@@ -68,13 +72,12 @@ jobs:
|
|
68
72
|
- run:
|
69
73
|
name: Create rubygems credientials file
|
70
74
|
command: mkdir ~/.gem; printf "%s\n%s " "---" ":rubygems_api_key:" > ~/.gem/credentials; printf $RUBYGEMS_KEY >> ~/.gem/credentials;chmod 0600 ~/.gem/credentials
|
71
|
-
-
|
72
|
-
at: output-gems
|
73
|
-
- run: gem push output-gems/danger-ios_version_change-*.gem
|
75
|
+
- run: gem build danger-ios_version_change.gemspec; gem push danger-ios_version_change*.gem
|
74
76
|
workflows:
|
75
77
|
version: 2
|
76
78
|
test-lint:
|
77
79
|
jobs:
|
80
|
+
- danger
|
78
81
|
- dependencies
|
79
82
|
- test-lint:
|
80
83
|
requires:
|
data/Dangerfile
ADDED
data/Gemfile.lock
CHANGED
@@ -18,6 +18,13 @@ module Danger
|
|
18
18
|
"ios_version_change"
|
19
19
|
end
|
20
20
|
|
21
|
+
def initialize(dangerfile)
|
22
|
+
super(dangerfile)
|
23
|
+
raise unless dangerfile.env.scm.class == Danger::GitRepo
|
24
|
+
|
25
|
+
@git = dangerfile.env.scm
|
26
|
+
end
|
27
|
+
|
21
28
|
# Ignore. Pass the git diff string here to see if the version string has been updated. Use `ios_version_change.assert_version_changed("ProjectName/Info.plist")` instead as it's more convenient sending the path to the Info.plist file.
|
22
29
|
# @return [void]
|
23
30
|
def assert_version_changed_diff(git_diff_string)
|
@@ -48,8 +55,7 @@ module Danger
|
|
48
55
|
return # rubocop:disable UnreachableCode
|
49
56
|
end
|
50
57
|
|
51
|
-
|
52
|
-
git_diff_string = git.diff[info_plist_file_path].patch
|
58
|
+
git_diff_string = @git.diff[info_plist_file_path].patch
|
53
59
|
assert_version_changed_diff(git_diff_string)
|
54
60
|
end
|
55
61
|
end
|
@@ -2,10 +2,6 @@ require File.expand_path("../spec_helper", __FILE__)
|
|
2
2
|
|
3
3
|
module Danger
|
4
4
|
describe Danger::DangerIosVersionChange do
|
5
|
-
it "should be a plugin" do
|
6
|
-
expect(Danger::DangerIosVersionChange.new(nil)).to be_a Danger::Plugin
|
7
|
-
end
|
8
|
-
|
9
5
|
#
|
10
6
|
# You should test your custom attributes and methods here
|
11
7
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-ios_version_change
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Levi Bostian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -175,14 +175,17 @@ files:
|
|
175
175
|
- ".gitignore"
|
176
176
|
- ".rubocop.yml"
|
177
177
|
- ".travis.yml"
|
178
|
+
- Dangerfile
|
178
179
|
- Gemfile
|
179
180
|
- Gemfile.lock
|
180
181
|
- Guardfile
|
181
182
|
- LICENSE.txt
|
183
|
+
- PULL_REQUEST_TEMPLATE.md
|
182
184
|
- README.md
|
183
185
|
- README_footer.md
|
184
186
|
- README_header.md
|
185
187
|
- Rakefile
|
188
|
+
- assert_danger_running_on_pr.sh
|
186
189
|
- danger-ios_version_change.gemspec
|
187
190
|
- lib/danger_ios_version_change.rb
|
188
191
|
- lib/danger_plugin.rb
|
@@ -213,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
216
|
version: '0'
|
214
217
|
requirements: []
|
215
218
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.7.3
|
217
220
|
signing_key:
|
218
221
|
specification_version: 4
|
219
222
|
summary: Assert your iOS project has changed it's version number in the XCode project.
|