cody 0.9.2 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 613a51a376f19128f7d1ecb1d421eb677a7c55897d9bb160e64295ce9da49698
4
- data.tar.gz: dfdbaa2b3a541dcc0c2d1b854e7e3caaa37f8d4acd3319727919755c80594679
3
+ metadata.gz: 9ac17434396752c71c060dec145fdf77d33b87284e80c8ed22331f2883d5c54a
4
+ data.tar.gz: ab4b5ff8c6544f6f0e430d9a8809dd1729db1d90ea21cef2ab3d3aedc07a8484
5
5
  SHA512:
6
- metadata.gz: adcc42d7053cd3627fdcf69fb47d6ac249e1bf8fd913c0b6a7adcfead2664e87e6f4482abc3cc363f3b769b6672256c2c3121fc7954313148deeaa445494b632
7
- data.tar.gz: 34bb3767de9f1af046ee1d5f41a03a7269c168490c2a13ae54729c70028977a3a2bef2af83a7a72d9cb5c95fc2d81e855ec316406f984b4d7b70cb7bdad73501
6
+ metadata.gz: 65d3c74359eb9f40788fb48c6b78e48e4565c6a2a016388ca001818e0011153d6eb1fed87b4ad97ef9526907bb58965e31f418ba2f3cb167dac2e1f57495fddb
7
+ data.tar.gz: f81511a9c4bfce6a9db58df63c84fcf6418bbf2092e48a54521bc29a9ed71baf4cb1f3e38fb6c78c327ffb1411838692b87be4b14e374f7015b29396f02507a7
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.9.3]
7
+ - #22 add badge command
8
+
6
9
  ## [0.9.2]
7
10
  - #21 update to amazonlinux2-x86_64-standard:2.0 image
8
11
 
data/lib/cody/badge.rb ADDED
@@ -0,0 +1,19 @@
1
+ module Cody
2
+ class Badge < Base
3
+ def run
4
+ resp = codebuild.batch_get_projects(names: [@full_project_name])
5
+ project = resp.projects.first
6
+ unless project
7
+ puts "Project not found: #{@full_project_name}"
8
+ return
9
+ end
10
+
11
+ url = project.badge.badge_request_url
12
+ if @options[:markdown]
13
+ puts "![CodeBuild](#{url})"
14
+ else
15
+ puts url
16
+ end
17
+ end
18
+ end
19
+ end
data/lib/cody/cli.rb CHANGED
@@ -75,6 +75,14 @@ module Cody
75
75
  Logs.new(options.merge(project_name: project_name)).run
76
76
  end
77
77
 
78
+ desc "badge", "show the codebuild badge."
79
+ long_desc Help.text(:list)
80
+ option :markdown, default: true, type: :boolean, desc: "Show the markdown that can be copied and pasted"
81
+ common_options.call
82
+ def badge(project_name=nil)
83
+ Badge.new(options.merge(project_name: project_name)).run
84
+ end
85
+
78
86
  desc "completion *PARAMS", "Prints words for auto-completion."
79
87
  long_desc Help.text(:completion)
80
88
  def completion(*params)
data/lib/cody/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cody
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-27 00:00:00.000000000 Z
11
+ date: 2020-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -276,6 +276,7 @@ files:
276
276
  - lib/cody/autoloader.rb
277
277
  - lib/cody/aws_services.rb
278
278
  - lib/cody/aws_services/helpers.rb
279
+ - lib/cody/badge.rb
279
280
  - lib/cody/base.rb
280
281
  - lib/cody/cli.rb
281
282
  - lib/cody/command.rb