netsoft-danger 0.3.4 → 0.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 896e582de631d926bd01d4f5d98d0bde7f20f9a0ec129600bcea3eff09ffbb53
4
- data.tar.gz: 9613d84bcd13e28594d387b66c1d1cc379d2f6ee62857e4ddcf2bce30761466a
3
+ metadata.gz: 2b7b3e2a4fbfa992da4950813e78d8276a5f8055b4b09987d36b62b761134f8a
4
+ data.tar.gz: e7f4046f836e76a11c5fcb5e37b31acdf664e921f506f8f7312a489852418168
5
5
  SHA512:
6
- metadata.gz: 9600eeb6dc24d45393f88ce2f4e956885209974d0910bec466354fca4950de21a78fad98986f2c1593074a44c72f95d8d0760254e6b08a5b3bd6b1a6daef5d39
7
- data.tar.gz: 244fa8e69810e66bd44b37d6b156dc58229bc6ff6fe39f736928332f1209d200fc003651dc7c8f1863cc90d57dbb24f874e4075492239d33e3506829ecd752ec
6
+ metadata.gz: 2cde3fa84fa78f571710f9d52d4508410550f0e30d7795e5f925aca31902453e328ccb332db3fb003bcfd692a22a55a470eff5ed0859a87492131b5c3636aa76
7
+ data.tar.gz: 38b61ca91282d42ba78b2bd7752f0be930fc1790f751bfb7c1e53e4772d66ca74dcf3d5e756aeb8011c6da009340bbacd436c7969f1030cce123ea406aefe8d1
data/.circleci/config.yml CHANGED
@@ -124,7 +124,9 @@ jobs:
124
124
  name: Deploy to gem server
125
125
  command: |-
126
126
  ./bin/tag_check.sh
127
+ ./bin/setup-rubygems.sh
127
128
  rm -rf pkg
128
129
  gem install geminabox
129
130
  rake build
130
131
  gem inabox -g ${HUBSTAFF_GEM_SERVER} pkg/*
132
+ gem push pkg/*.gem
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Next]
8
+ ### Added
9
+ ### Changed
10
+ ### Fixed
11
+
12
+ ## [0.3.5]
13
+ ### Added
14
+ - package.json checks
15
+ ### Fixed
16
+ - requie older version of faraday until octokit is fixed (https://github.com/octokit/octokit.rb/pull/1154)
17
+
data/Dangerfile CHANGED
@@ -23,7 +23,7 @@ git.commits.each do |c|
23
23
  short = " ( #{c.sha[0..7]} )"
24
24
  has_migrations = c.diff_parent.any? {|f| f.path =~ /db\/migrate\// }
25
25
  has_schema_changes = c.diff_parent.any? {|f| f.path =~ /db\/schema\.rb/ }
26
- has_migration_msg = c.message =~ /^\[migration\]/
26
+ has_migration_msg = c.message =~ /\A\[migration\]/
27
27
  no_schema_ok = ENV['DANGER_NO_SCHEMA_OK'] || false
28
28
  if has_migrations || has_schema_changes
29
29
  unless has_migration_msg
@@ -35,27 +35,27 @@ git.commits.each do |c|
35
35
  if !has_migrations && has_schema_changes
36
36
  warn '[migration] Please checkin your migrations with your schema.rb changes' + short
37
37
  end
38
- if c.diff_parent.any? {|f| !( f.path =~ /db\/migrate\// or f.path =~ /db\/schema.rb/ ) }
38
+ if c.diff_parent.any? {|f| !( f.path =~ /db\/migrate\/|db\/schema\.rb/ ) }
39
39
  fail '[migration] Migration commit contains non-migration changes' + short
40
40
  end
41
41
  elsif has_migration_msg
42
42
  fail '[migration] Migration commit with no migrations!' + short
43
43
  end
44
44
 
45
- has_hubstaff_icon_changes = c.diff_parent.any? {|f| f.path =~ /hubstaff(icons|font)/ || f.path =~ /fontcustom-manifest/ }
45
+ has_hubstaff_icon_changes = c.diff_parent.any? {|f| f.path =~ /hubstaff(icons|font)|fontcustom-manifest/ }
46
46
  if has_hubstaff_icon_changes
47
47
  if c.diff_parent.any? {|f| !( f.path =~ /hubstaff-(icons|font)/ || f.path =~ /fontcustom-manifest/ ) }
48
48
  fail '[hubstaff-icons] Put hubstaff-icon changes into their own commit' + short
49
49
  end
50
50
  end
51
51
 
52
- has_gemfile_changes = c.diff_parent.any? {|f| f.path =~ /Gemfile/ || f.path =~ /gemspec/ }
53
- has_gemfile_msg = c.message =~ /^\[gemfile\]/
52
+ has_gemfile_changes = c.diff_parent.any? {|f| f.path =~ /Gemfile|gemspec/ }
53
+ has_gemfile_msg = c.message =~ /\A\[gemfile\]/
54
54
  if has_gemfile_changes
55
55
  unless has_gemfile_msg
56
56
  fail '[gemfile] Gemfile commits need to be prefixed with [gemfile] ' + short
57
57
  end
58
- if c.diff_parent.any? {|f| !( f.path =~ /Gemfile/ || f.path =~ /gemspec/ ) }
58
+ if c.diff_parent.any? {|f| !( f.path =~ /Gemfile|gemspec/ ) }
59
59
  fail '[gemfile] Gemfile commit contains non-gemfile changes' + short
60
60
  end
61
61
  if c.diff_parent.any? {|f| f.path == 'Gemfile.lock' }
@@ -66,6 +66,19 @@ git.commits.each do |c|
66
66
  elsif has_gemfile_msg
67
67
  fail '[gemfile] Gemfile commit has no gemfile changes!' + short
68
68
  end
69
+
70
+ has_package_changes = c.diff_parent.any? {|f| f.path =~ /package\.json|yarn\.lock/ }
71
+ has_package_msg = c.message =~ /\A\[package\.json\]/
72
+ if has_package_changes
73
+ unless has_package_msg
74
+ fail '[package.json] Package.json commits need to be prefixed with [package.json] ' + short
75
+ end
76
+ if c.diff_parent.any? {|f| !( f.path =~ /package\.json|yarn\.lock/ ) }
77
+ fail '[package.json] Package.json commit contains non-package changes' + short
78
+ end
79
+ elsif has_package_msg
80
+ fail '[package.json] Pacakge.json commit has no package changes!' + short
81
+ end
69
82
  end
70
83
 
71
84
  require 'open-uri'
@@ -0,0 +1,3 @@
1
+ mkdir ~/.gem
2
+ echo -e "---\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
3
+ chmod 0600 ~/.gem/credentials
@@ -1,3 +1,3 @@
1
1
  module NetsoftDanger
2
- VERSION = '0.3.4'.freeze
2
+ VERSION = '0.3.5'.freeze
3
3
  end
@@ -18,4 +18,5 @@ Gem::Specification.new do |s|
18
18
  s.add_development_dependency 'rake'
19
19
  s.add_runtime_dependency 'danger', '~> 5.0'
20
20
  s.add_runtime_dependency 'thor'
21
+ s.add_runtime_dependency 'faraday', '~> 0.15.0'
21
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsoft-danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - urkle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-03 00:00:00.000000000 Z
11
+ date: 2019-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.15.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.15.0
55
69
  description: Packages a Dangerfile to be used with Danger.
56
70
  email: []
57
71
  executables:
@@ -61,11 +75,13 @@ extra_rdoc_files: []
61
75
  files:
62
76
  - ".circleci/config.yml"
63
77
  - ".gitignore"
78
+ - CHANGELOG.md
64
79
  - Dangerfile
65
80
  - Gemfile
66
81
  - README.md
67
82
  - Rakefile
68
83
  - bin/netsoft-circle
84
+ - bin/setup-rubygems.sh
69
85
  - bin/tag_check.sh
70
86
  - dangerfiles/issue.js
71
87
  - dangerfiles/pr.js