papa 0.7.2 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 7680cd9a9cfed387fe46e40c8d004b5ebfb585847437f59d5455a56c56693f94
4
- data.tar.gz: 9aefb5cf418d21e414e413ab11eb0ae8d06e898987be284c2b8e704db08520f1
2
+ SHA1:
3
+ metadata.gz: 93e515a20ac342699b7c436983d5d933baf38040
4
+ data.tar.gz: 5db8638e6d5ec42cb22c37af240d50500a8ed8de
5
5
  SHA512:
6
- metadata.gz: a7d81c125053b3782e434492d6147cb0e1547652de7ccc95b18affb79c9e3b140c4cae44143964474c6c4d069dbb779cc056afe26a06844b2a0c299ccf282410
7
- data.tar.gz: e58806be7839fa5b449d546c879634abec82e63c8640d148d4b3116c3f58746c4b37cdfa966ee11e52c043fb3dd71980e059b59182e0d74645b4926bcf1d060d
6
+ metadata.gz: 7e6b60ed370d216183b332550c34bc59c36cba9d6dccbabd5ef95760f62c18853df15eb1e3a409392822197b4270a6377976c3ee8ea5c5c0986d62a58ef73da5
7
+ data.tar.gz: d4f72fb75bbaa18ee91c04bfced7a99fecb62684c74763c1958d80ae2d82d25219a207e8be5c98af7ea7ea00ebd8895ba50bbb70ba0d4e640c27e38e9213e2fd
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.1.5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0
4
+ * Add `whoami` and `hostname` to deployment message
5
+ * Hard reset build branch before starting `papa [hotfix, release] finish`
6
+
3
7
  ## 0.7.2
4
8
  * Change log file file format to `{TIMESTAMP}_papa_{BUILD_TYPE}_{COMMAND}.log`
5
9
  * Disallow the use of `papa [hotfix, release] add` with release and hotfix branches
@@ -11,6 +11,9 @@ module Papa
11
11
  @hostname = hostname
12
12
  @action = action
13
13
 
14
+ @user_whoami = `whoami`.chomp
15
+ @user_hostname = `hostname`.chomp
16
+
14
17
  command = "curl -X POST --data-urlencode 'payload=#{payload.to_json}' #{webhook_url}"
15
18
  super(command)
16
19
  end
@@ -18,15 +21,20 @@ module Papa
18
21
  private
19
22
 
20
23
  def payload
21
- url = "https://#{@hostname}.indinerocorp.com"
22
- {
23
- 'text' => "<!channel> Deployment to <#{url}|#{@hostname}> #{@action}."
24
- }
24
+ { 'text' => message }
25
25
  end
26
26
 
27
27
  def webhook_url
28
28
  Helper::Config.read["slack_webhook"]
29
29
  end
30
+
31
+ def message
32
+ url = "https://#{@hostname}.indinerocorp.com"
33
+ message = "<!channel> Deployment to <#{url}|#{@hostname}> #{@action}"
34
+ message << " by #{@user_whoami} at #{@user_hostname}" if @action == 'started'
35
+ message << '.'
36
+ message
37
+ end
30
38
  end
31
39
  end
32
40
  end
@@ -33,6 +33,7 @@ module Papa
33
33
  def queue(branch)
34
34
  queue = [
35
35
  Command::Git::Checkout.new(build_branch),
36
+ Command::Git::ResetHard.new('origin', build_branch),
36
37
  Command::Git::Checkout.new(branch),
37
38
  Command::Git::ResetHard.new('origin', branch),
38
39
  Command::Git::Merge.new(build_branch),
data/lib/papa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Papa
2
- VERSION = '0.7.2'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - boggs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -77,6 +77,7 @@ files:
77
77
  - ".gitignore"
78
78
  - ".papa.config.yml.example"
79
79
  - ".rspec"
80
+ - ".ruby-version"
80
81
  - ".travis.yml"
81
82
  - CHANGELOG.md
82
83
  - Gemfile
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  version: '0'
165
166
  requirements: []
166
167
  rubyforge_project:
167
- rubygems_version: 2.7.3
168
+ rubygems_version: 2.2.2
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: Helper gem for inDinero's git workflow