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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a3c642c9a5bcebbf4dc0e46539485292f87e2b67
4
- data.tar.gz: bbcb141e85319ac865ae3585f2ef264fa55a53cc
2
+ SHA256:
3
+ metadata.gz: 2645f1de3d4e8d2c245e6303d72feb01434be32faa98f3a59837e9b33eb08139
4
+ data.tar.gz: 13d0bd35e9211988669dd039c1e18fff7f19159dcbaccdb619ba54a64073760f
5
5
  SHA512:
6
- metadata.gz: 7fbb75d98296c3e440b5a51ac510ceea2c7e7d273a3a5d23961ddbd706a48b85525766d3dbd0966b4c2c5f0b099180dc085d0f08c5b0dcbcf892c2307f7fe796
7
- data.tar.gz: 3ad2b3e26a3eadc900b487245a04210538811066bab47c55e0e959320a73ec561a2e4c6a928cd18bc300796fe0041046ddbff0e04dee172c11a03e057da7388a
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; mkdir output-gems; mv danger-ios_version_change*.gem output-gems/
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
- - attach_workspace:
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
@@ -0,0 +1,6 @@
1
+ if github.branch_for_base == "master"
2
+ diff = git.diff_for_file("lib/ios_version_change/gem_version.rb")
3
+ if !diff
4
+ fail 'You did not update the gem version.'
5
+ end
6
+ end
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-ios_version_change (0.1.0)
4
+ danger-ios_version_change (0.1.4)
5
5
  danger-plugin-api (~> 1.0)
6
+ git
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
@@ -0,0 +1,3 @@
1
+ - [ ] Update `lib/ios_version_change/gem_version.rb` to latest version. Bump it!
2
+ - [ ] Tests all pass.
3
+ - [ ] After merge, make a git tag release.
@@ -0,0 +1,4 @@
1
+ if [[ -z "${CI_PULL_REQUESTS}" ]]; then
2
+ echo -e "\033[31merror: Danger requires a pull request to function correctly\033[0m"
3
+ exit 1
4
+ fi
@@ -1,3 +1,3 @@
1
1
  module IosVersionChange
2
- VERSION = "0.1.3".freeze
2
+ VERSION = "0.1.4".freeze
3
3
  end
@@ -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
- git = Git.open(Dir.pwd)
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.3
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-06 00:00:00.000000000 Z
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.6.11
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.