cody 1.0.1 → 1.0.2

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
2
  SHA256:
3
- metadata.gz: 13988c2d00cdc267da97b361bc2345a39cdb4d9b4919c18c74643f5b545b5e18
4
- data.tar.gz: 33e6ac92deb5858b85fb85a68657a18dfb9a9a224b76bc8317dce62b3a1efb76
3
+ metadata.gz: f7a7aef69b13119002518200397cd29e961a44bcc5b1af86ee8b7b10257e79bb
4
+ data.tar.gz: 7c5da7d1e3a0f1387df351d86ae77c28b8dde56554461c69085c71c7cdf61764
5
5
  SHA512:
6
- metadata.gz: d6d0df76e76c60d4df42165020be8077d17318da0c077a90bbcf1f799b1fe7deed90c819061d610b3e8cba713c276ccca36da47fa5e91650301a271728f867c3
7
- data.tar.gz: a956e457a24eda488c74127005996d90282179c57d442fea5f87889bbefff2f2d23cd49e33a2d646fdd912b75beb417e2a7d3b0ad1dda7da76c8895d17f3957b
6
+ metadata.gz: d7d882be7a9814bba876894c67f4fbe436893d97882d6cfab2af80b56dd39df89ddb126f208da8b13e3df6d18eef3375850cc6522158014047d41ff10f8e9cc3
7
+ data.tar.gz: 4023dfde8116141efe8a83be416882c6d44c64bdd228918bee6ac13735d8d706b3474fcbe2b4cb623f1e2241437a00d92093f998fb1ff34ff86e68cb814c4d8b
@@ -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
+ ## [1.0.2]
7
+ - #30 Allow multiple git providers
8
+
6
9
  ## [1.0.1]
7
10
  - fix EventsRuleRole Service camelcase
8
11
 
@@ -32,6 +32,16 @@ module Cody::Dsl
32
32
  @properties[:Source][:Location] = url
33
33
  end
34
34
 
35
+ # Convenience wrapper methods
36
+ def git_provider(type="GITHUB")
37
+ @properties[:Source][:Type] = type
38
+ end
39
+
40
+ # Convenience wrapper methods
41
+ def git_branch(branch_or_tag)
42
+ @properties[:SourceVersion] = branch_or_tag
43
+ end
44
+
35
45
  def buildspec(file=".cody/buildspec.yaml")
36
46
  @properties[:Source][:BuildSpec] = file
37
47
  end
@@ -49,14 +59,17 @@ module Cody::Dsl
49
59
 
50
60
  def github_source(options={})
51
61
  source = {
52
- Type: "GITHUB",
62
+ Type: options[:Type] || "GITHUB",
53
63
  Location: options[:Location],
54
64
  GitCloneDepth: 1,
55
65
  GitSubmodulesConfig: { fetch_submodules: true },
56
66
  BuildSpec: options[:BuildSpec] || ".cody/buildspec.yml", # options[:Buildspec] accounts for type already
57
- ReportBuildStatus: true,
58
67
  }
59
68
 
69
+ if source[:Type] =~ /GITHUB/
70
+ source[:ReportBuildStatus] = true
71
+ end
72
+
60
73
  if options[:OauthToken]
61
74
  source[:Auth] = {
62
75
  Type: "OAUTH",
@@ -53,7 +53,6 @@ module Cody
53
53
  # Type: "OAUTH",
54
54
  # # Resource: "", # required
55
55
  # },
56
- ReportBuildStatus: true,
57
56
  }
58
57
  }
59
58
  end
@@ -1,3 +1,3 @@
1
1
  module Cody
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
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: 1.0.1
4
+ version: 1.0.2
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-08-09 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport