cody 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/cody/badge.rb +19 -0
- data/lib/cody/cli.rb +8 -0
- data/lib/cody/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac17434396752c71c060dec145fdf77d33b87284e80c8ed22331f2883d5c54a
|
4
|
+
data.tar.gz: ab4b5ff8c6544f6f0e430d9a8809dd1729db1d90ea21cef2ab3d3aedc07a8484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|