cody 0.1.0 → 0.7.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 +4 -4
- data/.cody/buildspec.yml +8 -0
- data/.cody/project.rb +4 -0
- data/.cody/settings.yml +13 -0
- data/.gitignore +17 -10
- data/.gitmodules +9 -0
- data/.rspec +1 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +59 -0
- data/Gemfile +3 -1
- data/Guardfile +19 -0
- data/LICENSE.txt +18 -17
- data/README.md +145 -18
- data/Rakefile +9 -2
- data/cody.gemspec +26 -12
- data/exe/cody +14 -0
- data/img/github-admin-settings-tab.png +0 -0
- data/lib/cody.rb +17 -1
- data/lib/cody/autoloader.rb +21 -0
- data/lib/cody/aws_services.rb +16 -0
- data/lib/cody/aws_services/helpers.rb +72 -0
- data/lib/cody/cli.rb +61 -0
- data/lib/cody/command.rb +82 -0
- data/lib/cody/completer.rb +159 -0
- data/lib/cody/completer/script.rb +6 -0
- data/lib/cody/completer/script.sh +10 -0
- data/lib/cody/core.rb +63 -0
- data/lib/cody/create.rb +12 -0
- data/lib/cody/default/settings.yml +3 -0
- data/lib/cody/delete.rb +27 -0
- data/lib/cody/deploy.rb +40 -0
- data/lib/cody/dsl/project.rb +119 -0
- data/lib/cody/dsl/project/ssm.rb +22 -0
- data/lib/cody/dsl/role.rb +50 -0
- data/lib/cody/dsl/schedule.rb +30 -0
- data/lib/cody/evaluate.rb +47 -0
- data/lib/cody/help.rb +9 -0
- data/lib/cody/help/completion.md +22 -0
- data/lib/cody/help/completion_script.md +3 -0
- data/lib/cody/help/deploy.md +32 -0
- data/lib/cody/help/init.md +71 -0
- data/lib/cody/help/start.md +12 -0
- data/lib/cody/init.rb +102 -0
- data/lib/cody/project.rb +72 -0
- data/lib/cody/role.rb +87 -0
- data/lib/cody/schedule.rb +102 -0
- data/lib/cody/sequence.rb +66 -0
- data/lib/cody/setting.rb +82 -0
- data/lib/cody/stack.rb +93 -0
- data/lib/cody/start.rb +69 -0
- data/lib/cody/update.rb +12 -0
- data/lib/cody/variables.rb +17 -0
- data/lib/cody/version.rb +2 -2
- data/lib/template/project/buildspec.yml +28 -0
- data/lib/template/project/project.rb.tt +29 -0
- data/lib/template/project/role.rb +2 -0
- data/lib/template/project/schedule.rb +3 -0
- data/lib/template/top/README.md +32 -0
- data/lib/template/top/settings.yml +9 -0
- data/lib/template/top/variables/base.rb +1 -0
- data/lib/template/top/variables/development.rb +1 -0
- data/lib/template/top/variables/production.rb +1 -0
- data/vendor/aws_data/CHANGELOG.md +7 -0
- data/vendor/aws_data/Gemfile +4 -0
- data/vendor/aws_data/LICENSE.txt +21 -0
- data/vendor/aws_data/README.md +42 -0
- data/vendor/aws_data/Rakefile +6 -0
- data/vendor/aws_data/aws_data.gemspec +30 -0
- data/{bin → vendor/aws_data/bin}/console +1 -1
- data/{bin → vendor/aws_data/bin}/setup +0 -0
- data/vendor/aws_data/lib/aws_data.rb +91 -0
- data/vendor/aws_data/lib/aws_data/version.rb +3 -0
- data/vendor/aws_data/spec/aws_data_spec.rb +5 -0
- data/vendor/aws_data/spec/spec_helper.rb +14 -0
- data/vendor/cfn-status/Gemfile +4 -0
- data/vendor/cfn-status/LICENSE.txt +21 -0
- data/vendor/cfn-status/README.md +56 -0
- data/vendor/cfn-status/Rakefile +6 -0
- data/vendor/cfn-status/bin/console +14 -0
- data/vendor/cfn-status/bin/setup +8 -0
- data/vendor/cfn-status/cfn-status.gemspec +30 -0
- data/vendor/cfn-status/lib/cfn/aws_service.rb +56 -0
- data/vendor/cfn-status/lib/cfn/status.rb +220 -0
- data/vendor/cfn-status/lib/cfn/status/version.rb +5 -0
- data/vendor/cfn-status/spec/cfn/status_spec.rb +81 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +1080 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +1080 -0
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +1086 -0
- data/vendor/cfn-status/spec/spec_helper.rb +14 -0
- data/vendor/cfn_camelizer/CHANGELOG.md +10 -0
- data/vendor/cfn_camelizer/Gemfile +4 -0
- data/vendor/cfn_camelizer/LICENSE.txt +21 -0
- data/vendor/cfn_camelizer/README.md +40 -0
- data/vendor/cfn_camelizer/Rakefile +6 -0
- data/vendor/cfn_camelizer/bin/console +14 -0
- data/vendor/cfn_camelizer/bin/setup +8 -0
- data/vendor/cfn_camelizer/cfn_camelizer.gemspec +32 -0
- data/vendor/cfn_camelizer/lib/camelizer.yml +33 -0
- data/vendor/cfn_camelizer/lib/cfn_camelizer.rb +92 -0
- data/vendor/cfn_camelizer/lib/cfn_camelizer/version.rb +3 -0
- data/vendor/cfn_camelizer/spec/cfn_camelizer_spec.rb +79 -0
- data/vendor/cfn_camelizer/spec/spec_helper.rb +14 -0
- metadata +268 -21
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4026befb0df7ead4c4947e968b3cc889e367b447a87980b23016fcae680ed2d6
|
|
4
|
+
data.tar.gz: 6090a0d98004b6ca2c47d4b18f34c2e0de974e7e9a6055b448ab4ac19f9ed5af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee0b4aa46328c7e82a58cdb2ed85cf95fbd22e9092a4770b96975c9cef971977258370e864fc22d188d841532be11d2be20f43aea262df7f90bee48bd7264857
|
|
7
|
+
data.tar.gz: 1a275dacb13bab8c8f0e490058501275dd6fea0eda358fa3648201e982d6e5dc48a9168dd56ed7d4473ba809cde94479f17a1a216bfd323ad0153fe5b7b47370
|
data/.cody/buildspec.yml
ADDED
data/.cody/project.rb
ADDED
data/.cody/settings.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
base:
|
|
2
|
+
# stack_naming:
|
|
3
|
+
# append_env: true # default false
|
|
4
|
+
|
|
5
|
+
development:
|
|
6
|
+
# cluster: development
|
|
7
|
+
# The aws_profile tightly binds CB_ENV to AWS_PROFILE and vice-versa.
|
|
8
|
+
# aws_profile: dev_profile
|
|
9
|
+
|
|
10
|
+
production:
|
|
11
|
+
# cluster: production
|
|
12
|
+
# The aws_profile tightly binds CB_ENV to AWS_PROFILE and vice-versa.
|
|
13
|
+
# aws_profile: prod_profile
|
data/.gitignore
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.yardoc
|
|
6
|
+
_yardoc
|
|
7
|
+
coverage
|
|
8
|
+
doc/
|
|
9
|
+
InstalledFiles
|
|
10
|
+
lib/bundler/man
|
|
11
|
+
pkg
|
|
12
|
+
rdoc
|
|
13
|
+
spec/reports
|
|
14
|
+
test/tmp
|
|
15
|
+
test/version_tmp
|
|
16
|
+
tmp
|
|
9
17
|
|
|
10
|
-
|
|
11
|
-
.rspec_status
|
|
18
|
+
Gemfile.lock
|
data/.gitmodules
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
[submodule "vendor/cfn-status"]
|
|
2
|
+
path = vendor/cfn-status
|
|
3
|
+
url = https://github.com/tongueroo/cfn-status
|
|
4
|
+
[submodule "vendor/cfn_camelizer"]
|
|
5
|
+
path = vendor/cfn_camelizer
|
|
6
|
+
url = https://github.com/tongueroo/cfn_camelizer
|
|
7
|
+
[submodule "vendor/aws_data"]
|
|
8
|
+
path = vendor/aws_data
|
|
9
|
+
url = https://github.com/tongueroo/aws_data
|
data/.rspec
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.5.6
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
|
5
|
+
|
|
6
|
+
## [0.7.0]
|
|
7
|
+
- Rename to Cody
|
|
8
|
+
- Breaking changes: .cody folder, CODY_ENV, -cody stack name suffix
|
|
9
|
+
|
|
10
|
+
## [0.6.6]
|
|
11
|
+
- add mode option: bare and full
|
|
12
|
+
|
|
13
|
+
## [0.6.5]
|
|
14
|
+
- allow no settings.yml file
|
|
15
|
+
|
|
16
|
+
## [0.6.4]
|
|
17
|
+
- fix vendor gem dependencies in gem package
|
|
18
|
+
|
|
19
|
+
## [0.6.3]
|
|
20
|
+
- add aws_data gem dependency
|
|
21
|
+
|
|
22
|
+
## [0.6.2]
|
|
23
|
+
- add s3 read-only access to default role
|
|
24
|
+
- fix settings
|
|
25
|
+
|
|
26
|
+
## [0.6.1]
|
|
27
|
+
- cody init: no variables by default
|
|
28
|
+
- fix handle rollback
|
|
29
|
+
|
|
30
|
+
## [0.6.0]
|
|
31
|
+
- named stack with -cody at the very end
|
|
32
|
+
- add docs
|
|
33
|
+
- cody init --no-variables option
|
|
34
|
+
|
|
35
|
+
## [0.5.0]
|
|
36
|
+
- add --wait option
|
|
37
|
+
- change default append_env setting to false
|
|
38
|
+
- fix default iam policy
|
|
39
|
+
|
|
40
|
+
## [0.4.0]
|
|
41
|
+
- Add managed_iam_policy support
|
|
42
|
+
- #2 Add schedule dsl
|
|
43
|
+
- starter template fix: add settings.yml for correct cb project detection
|
|
44
|
+
|
|
45
|
+
## [0.3.0]
|
|
46
|
+
- rework cb cli interface
|
|
47
|
+
- project_name as cli main parameter
|
|
48
|
+
- type option for subprojects in .cody folder
|
|
49
|
+
- update to zeitwerk for autoloading
|
|
50
|
+
|
|
51
|
+
## [0.2.0]
|
|
52
|
+
- First good release.
|
|
53
|
+
- Project and Role DSL
|
|
54
|
+
- codebuild commands: init, deploy, start
|
|
55
|
+
- lookup path support
|
|
56
|
+
- Docs in main readme and readme folder
|
|
57
|
+
|
|
58
|
+
## [0.1.0]
|
|
59
|
+
- Initial release.
|
data/Gemfile
CHANGED
data/Guardfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
guard "bundler", cmd: "bundle" do
|
|
2
|
+
watch("Gemfile")
|
|
3
|
+
watch(/^.+\.gemspec/)
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
|
7
|
+
require "guard/rspec/dsl"
|
|
8
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
|
9
|
+
|
|
10
|
+
# RSpec files
|
|
11
|
+
rspec = dsl.rspec
|
|
12
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
|
13
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
|
14
|
+
watch(rspec.spec_files)
|
|
15
|
+
|
|
16
|
+
# Ruby files
|
|
17
|
+
ruby = dsl.ruby
|
|
18
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
|
19
|
+
end
|
data/LICENSE.txt
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
1
|
Copyright (c) 2019 Tung Nguyen
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
11
12
|
|
|
12
|
-
The above copyright notice and this permission notice shall be
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
14
15
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE.
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,39 +1,166 @@
|
|
|
1
1
|
# Cody
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+
[](http://badge.fury.io/rb/cody)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Cody lets you create a AWS CodeBuild projects with a beautiful DSL.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
The documentation site is at: [cody.run](https://cody.run/)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
cody init
|
|
13
|
+
cody deploy
|
|
14
|
+
cody start
|
|
15
|
+
|
|
16
|
+
## Private Repo
|
|
17
|
+
|
|
18
|
+
IMPORTANT: Before deploying, if you are using a private repo, use [aws codebuild import-source-credentials](https://docs.aws.amazon.com/cli/latest/reference/codebuild/import-source-credentials.html) to add credentials so that codebuild can clone down the repo. Refer to the [CodeBuilld Github Oauth/](https://cody.run/docs/github_oauth/) for more info.
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
1. **init**: generate starter .cody files.
|
|
23
|
+
2. **deploy**: deploy the CodeBuild project on AWS.
|
|
24
|
+
3. **start**: kick off a CodeBuild project run.
|
|
25
|
+
|
|
26
|
+
### Init and Structure
|
|
27
|
+
|
|
28
|
+
First, run `cody init` to generate a starter `.cody` folder structure.
|
|
29
|
+
|
|
30
|
+
$ tree .cody
|
|
31
|
+
.cody
|
|
32
|
+
├── buildspec.yml
|
|
33
|
+
├── project.rb
|
|
34
|
+
└── role.rb
|
|
35
|
+
|
|
36
|
+
File | Description
|
|
37
|
+
--- | ---
|
|
38
|
+
buildspec.yml | The build commands to run. Here are the [buildspec.yml syntax docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html).
|
|
39
|
+
project.rb | The codebuild project written as a DSL. Here are the [Project DSL docs](https://cody.run/docs/dsl/project/)
|
|
40
|
+
role.rb | The IAM role associated with the codebuild project written as a DSL. Here are the [IAM Role DSL docs](https://cody.run/docs/dsl/role/)
|
|
41
|
+
|
|
42
|
+
### Deploy
|
|
43
|
+
|
|
44
|
+
Adjust the files in `.cody` to fit your needs. When you're ready, deploy the CodeBuild project with:
|
|
45
|
+
|
|
46
|
+
cody deploy PROJECT_NAME
|
|
47
|
+
|
|
48
|
+
More examples:
|
|
49
|
+
|
|
50
|
+
cody deploy # infers the CodeBuild project name from the parent folder
|
|
51
|
+
cody deploy PROJECT_NAME # explicitly specify project name
|
|
52
|
+
|
|
53
|
+
It is useful to just see the generated CloudFormation template with `--noop` mode:
|
|
54
|
+
|
|
55
|
+
cody deploy --noop # see generated CloudFormation template
|
|
56
|
+
|
|
57
|
+
For more help:
|
|
58
|
+
|
|
59
|
+
cody deploy -h
|
|
60
|
+
|
|
61
|
+
### Start
|
|
62
|
+
|
|
63
|
+
When you are ready to start a codebuild project run, you can use `codebuild start`. Examples:
|
|
64
|
+
|
|
65
|
+
cody start # infers the name from the parent folder
|
|
66
|
+
cody start PROJECT_NAME # looks up project via CodeBuild project name
|
|
67
|
+
|
|
68
|
+
The `cody start` command understands multiple identifiers. It will look up the codebuild project either via CloudFormation or the CodeBuild project name.
|
|
69
|
+
|
|
70
|
+
## Project DSL
|
|
71
|
+
|
|
72
|
+
The tool provides a DSL to create a codebuild project. Here's an example.
|
|
73
|
+
|
|
74
|
+
.cody/project.rb:
|
|
10
75
|
|
|
11
76
|
```ruby
|
|
12
|
-
|
|
77
|
+
# name("demo") # recommended to leave unset and use the conventional name that cody sets
|
|
78
|
+
github_url("https://github.com/tongueroo/demo-ufo")
|
|
79
|
+
linux_image("aws/codebuild/ruby:2.5.3-1.7.0")
|
|
80
|
+
environment_variables(
|
|
81
|
+
UFO_ENV: "development",
|
|
82
|
+
API_KEY: "ssm:/codebuild/demo/api_key" # ssm param example
|
|
83
|
+
)
|
|
13
84
|
```
|
|
14
85
|
|
|
15
|
-
|
|
86
|
+
Here's a list of some of the convenience shorthand DSL methods:
|
|
16
87
|
|
|
17
|
-
|
|
88
|
+
* github_url(url)
|
|
89
|
+
* github_source(options={})
|
|
90
|
+
* linux_image(name)
|
|
91
|
+
* linux_environment(options={})
|
|
92
|
+
* environment_variables(vars)
|
|
93
|
+
* local_cache(enable=true)
|
|
18
94
|
|
|
19
|
-
|
|
95
|
+
Please refer to [lib/codebuild/dsl/project.rb](lib/codebuild/dsl/project.rb) for the full list.
|
|
20
96
|
|
|
21
|
-
|
|
97
|
+
More slightly more control, you may be interested in the `github_source` and `linux_environment` methods. For even more control, see [DSL docs](https://cody.run/docs/dsl/).
|
|
22
98
|
|
|
23
|
-
##
|
|
99
|
+
## IAM Role DSL
|
|
24
100
|
|
|
25
|
-
|
|
101
|
+
Cody can create the IAM service role associated with the codebuild project. Here's an example:
|
|
26
102
|
|
|
27
|
-
|
|
103
|
+
.cody/role.rb:
|
|
28
104
|
|
|
29
|
-
|
|
105
|
+
```ruby
|
|
106
|
+
iam_policy("logs", "ssm")
|
|
107
|
+
```
|
|
30
108
|
|
|
31
|
-
|
|
109
|
+
For more control, here's a longer form:
|
|
32
110
|
|
|
33
|
-
|
|
111
|
+
```ruby
|
|
112
|
+
iam_policy(
|
|
113
|
+
action: [
|
|
114
|
+
"logs:CreateLogGroup",
|
|
115
|
+
"logs:CreateLogStream",
|
|
116
|
+
"logs:PutLogEvents",
|
|
117
|
+
"ssm:*",
|
|
118
|
+
],
|
|
119
|
+
effect: "Allow",
|
|
120
|
+
resource: "*"
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
You can also create managed iam policy.
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
managed_iam_policy("AmazonS3ReadOnlyAccess")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Schedule Support
|
|
131
|
+
|
|
132
|
+
.cody/schedule.rb:
|
|
133
|
+
|
|
134
|
+
```ruby
|
|
135
|
+
rate "1 day"
|
|
136
|
+
```
|
|
34
137
|
|
|
35
|
-
|
|
138
|
+
## Full DSL
|
|
36
139
|
|
|
37
|
-
|
|
140
|
+
The convenience DSL methods shown above are short and clean. They merely wrap a DSL that map to the properties of CloudFormation resources like [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) and [AWS::IAM::Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html). Refer the [DSL docs](https://cody.run/docs/dsl/) for more info.
|
|
141
|
+
|
|
142
|
+
## Type Option
|
|
143
|
+
|
|
144
|
+
By default, cody looks up files in the `.cody` folder. You can affect the behavior of the Type logic with the `--Type` option. More info [Type docs](https://cody.run/docs/type-option/).
|
|
145
|
+
|
|
146
|
+
## Installation
|
|
147
|
+
|
|
148
|
+
Add this line to your application's Gemfile:
|
|
149
|
+
|
|
150
|
+
gem "cody"
|
|
151
|
+
|
|
152
|
+
And then execute:
|
|
153
|
+
|
|
154
|
+
bundle
|
|
155
|
+
|
|
156
|
+
Or install it yourself as:
|
|
157
|
+
|
|
158
|
+
gem install cody
|
|
159
|
+
|
|
160
|
+
## Contributing
|
|
38
161
|
|
|
39
|
-
|
|
162
|
+
1. Fork it
|
|
163
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
164
|
+
3. Commit your changes (`git commit -am "Add some feature"`)
|
|
165
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
166
|
+
5. Create new Pull Request
|
data/Rakefile
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
2
|
require "rspec/core/rake_task"
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
task default: :spec
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
RSpec::Core::RakeTask.new
|
|
7
|
+
|
|
8
|
+
require_relative "lib/cody"
|
|
9
|
+
require "cli_markdown"
|
|
10
|
+
desc "Generates cli reference docs as markdown"
|
|
11
|
+
task :docs do
|
|
12
|
+
CliMarkdown::Creator.create_all(cli_class: Cody::CLI, cli_name: "cody")
|
|
13
|
+
end
|
data/cody.gemspec
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
2
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
4
|
require "cody/version"
|
|
4
5
|
|
|
@@ -7,23 +8,36 @@ Gem::Specification.new do |spec|
|
|
|
7
8
|
spec.version = Cody::VERSION
|
|
8
9
|
spec.authors = ["Tung Nguyen"]
|
|
9
10
|
spec.email = ["tongueroo@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = %q{Cody}
|
|
11
|
+
spec.summary = "Cody provides a beautiful DSL to create and manage AWS CodeBuild projects"
|
|
12
12
|
spec.homepage = "https://github.com/tongueroo/cody"
|
|
13
13
|
spec.license = "MIT"
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
20
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
15
|
+
vendor_files = Dir.glob("vendor/**/*")
|
|
16
|
+
gem_files = `git -C "#{File.dirname(__FILE__)}" ls-files -z`.split("\x0").reject do |f|
|
|
17
|
+
f.match(%r{^(test|spec|features|docs)/})
|
|
21
18
|
end
|
|
19
|
+
spec.files = gem_files + vendor_files
|
|
22
20
|
spec.bindir = "exe"
|
|
23
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
24
23
|
spec.require_paths = ["lib"]
|
|
25
24
|
|
|
26
|
-
spec.
|
|
27
|
-
spec.
|
|
28
|
-
spec.
|
|
25
|
+
spec.add_dependency "activesupport"
|
|
26
|
+
spec.add_dependency "aws-sdk-cloudformation"
|
|
27
|
+
spec.add_dependency "aws-sdk-codebuild"
|
|
28
|
+
spec.add_dependency "aws-sdk-ssm"
|
|
29
|
+
spec.add_dependency "memoist"
|
|
30
|
+
spec.add_dependency "rainbow"
|
|
31
|
+
spec.add_dependency "render_me_pretty"
|
|
32
|
+
spec.add_dependency "thor"
|
|
33
|
+
spec.add_dependency "zeitwerk"
|
|
34
|
+
|
|
35
|
+
# spec.add_dependency "aws_data" # using vendor/cfn_camelizer for now
|
|
36
|
+
# spec.add_dependency "cfn_camelizer" # using vendor/cfn_camelizer for now
|
|
37
|
+
|
|
38
|
+
spec.add_development_dependency "bundler"
|
|
39
|
+
spec.add_development_dependency "byebug"
|
|
40
|
+
spec.add_development_dependency "cli_markdown"
|
|
41
|
+
spec.add_development_dependency "rake"
|
|
42
|
+
spec.add_development_dependency "rspec"
|
|
29
43
|
end
|