dockman 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +233 -0
- data/.gitlab-ci.yml +40 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +12 -0
- data/VERSION +1 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/dockman.gemspec +54 -0
- data/exe/dockman +9 -0
- data/lib/dockman/cli/entry.rb +32 -0
- data/lib/dockman/config.rb +5 -0
- data/lib/dockman/extensions/pathname.rb +21 -0
- data/lib/dockman/version.rb +3 -0
- data/lib/dockman.rb +18 -0
- data/lib/generators/dockman/dockify/setup/USAGE +12 -0
- data/lib/generators/dockman/dockify/setup/setup_generator.rb +29 -0
- data/lib/generators/dockman/dockify/setup/templates/.keep +0 -0
- data/lib/generators/dockman/dockify/skeleton/USAGE +15 -0
- data/lib/generators/dockman/dockify/skeleton/skeleton_generator.rb +45 -0
- data/lib/generators/dockman/dockify/skeleton/templates/.dockerignore +54 -0
- data/lib/generators/dockman/dockify/skeleton/templates/.keep +0 -0
- data/lib/generators/dockman/dockify/skeleton/templates/Dockerfile +48 -0
- data/lib/generators/dockman/dockify/skeleton/templates/config/database.yml +89 -0
- data/lib/generators/dockman/dockify/skeleton/templates/docker-compose.dbs.yml +71 -0
- data/lib/generators/dockman/dockify/skeleton/templates/docker-compose.yml +65 -0
- data/lib/generators/dockman/dockify/skeleton/templates/docker-sync.yml +7 -0
- data/lib/generators/dockman/dockify/skeleton/templates/envrc.erb +27 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/create_db_user.sh +10 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/init-user-db.sh +9 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/start-dev.sh +22 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/validate-migrated +7 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/wait-for +79 -0
- data/lib/generators/dockman/dockify/skeleton/templates/infra/scripts/wait-for-it.sh +178 -0
- data/vendor/.keep +0 -0
- metadata +296 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4d2cd14d3962c24807755bbc48d0ac30de472442b076550dbde1f1cafcf38c53
|
4
|
+
data.tar.gz: d6dd05b5b1a53898ab74fab75f0ec26c20b2dc6d4c9e1f8c8addbde5ee268f0a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f7132fc4e9370ddb3e23cccd4996dc392f337a7bae753c67005e2d686434756bbbcc61e4e3f9c57a36255c6685e2bf79b97259b29ad509258390b6af420d3e97
|
7
|
+
data.tar.gz: 4ac79f00484b2bca784325de7e2e33c9b89dff8de57176f544c29e740b74e53434844b32ce84f7aabde66099651f00500526ed33b0458045ff7d65bc9e938700
|
data/.gitignore
ADDED
@@ -0,0 +1,233 @@
|
|
1
|
+
.idea/
|
2
|
+
.rbenv-gemsets
|
3
|
+
warehouse/
|
4
|
+
# Created by https://www.gitignore.io/api/ruby,rails,rubymine+all,osx
|
5
|
+
# Edit at https://www.gitignore.io/?templates=ruby,rails,rubymine+all,osx
|
6
|
+
|
7
|
+
### OSX ###
|
8
|
+
# General
|
9
|
+
.DS_Store
|
10
|
+
.AppleDouble
|
11
|
+
.LSOverride
|
12
|
+
|
13
|
+
# Icon must end with two \r
|
14
|
+
Icon
|
15
|
+
|
16
|
+
# Thumbnails
|
17
|
+
._*
|
18
|
+
|
19
|
+
# Files that might appear in the root of a volume
|
20
|
+
.DocumentRevisions-V100
|
21
|
+
.fseventsd
|
22
|
+
.Spotlight-V100
|
23
|
+
.TemporaryItems
|
24
|
+
.Trashes
|
25
|
+
.VolumeIcon.icns
|
26
|
+
.com.apple.timemachine.donotpresent
|
27
|
+
|
28
|
+
# Directories potentially created on remote AFP share
|
29
|
+
.AppleDB
|
30
|
+
.AppleDesktop
|
31
|
+
Network Trash Folder
|
32
|
+
Temporary Items
|
33
|
+
.apdisk
|
34
|
+
|
35
|
+
### Rails ###
|
36
|
+
*.rbc
|
37
|
+
capybara-*.html
|
38
|
+
.rspec
|
39
|
+
/log
|
40
|
+
/tmp
|
41
|
+
/db/*.sqlite3
|
42
|
+
/db/*.sqlite3-journal
|
43
|
+
/public/system
|
44
|
+
/coverage/
|
45
|
+
/spec/tmp
|
46
|
+
*.orig
|
47
|
+
rerun.txt
|
48
|
+
pickle-email-*.html
|
49
|
+
|
50
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
51
|
+
config/initializers/secret_token.rb
|
52
|
+
config/master.key
|
53
|
+
|
54
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
55
|
+
# config/secrets.yml
|
56
|
+
|
57
|
+
# dotenv
|
58
|
+
# TODO Comment out this rule if environment variables can be committed
|
59
|
+
.env
|
60
|
+
|
61
|
+
## Environment normalization:
|
62
|
+
/.bundle
|
63
|
+
/vendor/bundle
|
64
|
+
|
65
|
+
# these should all be checked in to normalize the environment:
|
66
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
67
|
+
Gemfile.lock
|
68
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
69
|
+
.rvmrc
|
70
|
+
|
71
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
72
|
+
/vendor/assets/bower_components
|
73
|
+
*.bowerrc
|
74
|
+
bower.json
|
75
|
+
|
76
|
+
# Ignore pow environment settings
|
77
|
+
.powenv
|
78
|
+
|
79
|
+
# Ignore Byebug command history file.
|
80
|
+
.byebug_history
|
81
|
+
|
82
|
+
# Ignore node_modules
|
83
|
+
node_modules/
|
84
|
+
|
85
|
+
# Ignore precompiled javascript packs
|
86
|
+
/public/packs
|
87
|
+
/public/packs-test
|
88
|
+
/public/assets
|
89
|
+
|
90
|
+
# Ignore yarn files
|
91
|
+
/yarn-error.log
|
92
|
+
yarn-debug.log*
|
93
|
+
.yarn-integrity
|
94
|
+
|
95
|
+
# Ignore uploaded files in development
|
96
|
+
/storage/*
|
97
|
+
!/storage/.keep
|
98
|
+
|
99
|
+
### Ruby ###
|
100
|
+
*.gem
|
101
|
+
/.config
|
102
|
+
/InstalledFiles
|
103
|
+
/pkg/
|
104
|
+
/spec/reports/
|
105
|
+
/spec/examples.txt
|
106
|
+
/test/tmp/
|
107
|
+
/test/version_tmp/
|
108
|
+
/tmp/
|
109
|
+
|
110
|
+
# Used by dotenv library to load environment variables.
|
111
|
+
# .env
|
112
|
+
|
113
|
+
## Specific to RubyMotion:
|
114
|
+
.dat*
|
115
|
+
.repl_history
|
116
|
+
build/
|
117
|
+
*.bridgesupport
|
118
|
+
build-iPhoneOS/
|
119
|
+
build-iPhoneSimulator/
|
120
|
+
|
121
|
+
## Specific to RubyMotion (use of CocoaPods):
|
122
|
+
#
|
123
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
124
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
125
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
126
|
+
#
|
127
|
+
# vendor/Pods/
|
128
|
+
|
129
|
+
## Documentation cache and generated files:
|
130
|
+
/.yardoc/
|
131
|
+
/_yardoc/
|
132
|
+
/doc/
|
133
|
+
/rdoc/
|
134
|
+
|
135
|
+
## Environment normalization:
|
136
|
+
/.bundle/
|
137
|
+
/lib/bundler/man/
|
138
|
+
|
139
|
+
# for a library or gem, you might want to ignore these files since the code is
|
140
|
+
# intended to run in multiple environments; otherwise, check them in:
|
141
|
+
# Gemfile.lock
|
142
|
+
# .ruby-version
|
143
|
+
# .ruby-gemset
|
144
|
+
|
145
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
146
|
+
|
147
|
+
### RubyMine+all ###
|
148
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
149
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
150
|
+
|
151
|
+
# User-specific stuff
|
152
|
+
.idea/**/workspace.xml
|
153
|
+
.idea/**/tasks.xml
|
154
|
+
.idea/**/usage.statistics.xml
|
155
|
+
.idea/**/dictionaries
|
156
|
+
.idea/**/shelf
|
157
|
+
|
158
|
+
# Generated files
|
159
|
+
.idea/**/contentModel.xml
|
160
|
+
|
161
|
+
# Sensitive or high-churn files
|
162
|
+
.idea/**/dataSources/
|
163
|
+
.idea/**/dataSources.ids
|
164
|
+
.idea/**/dataSources.local.xml
|
165
|
+
.idea/**/sqlDataSources.xml
|
166
|
+
.idea/**/dynamic.xml
|
167
|
+
.idea/**/uiDesigner.xml
|
168
|
+
.idea/**/dbnavigator.xml
|
169
|
+
|
170
|
+
# Gradle
|
171
|
+
.idea/**/gradle.xml
|
172
|
+
.idea/**/libraries
|
173
|
+
|
174
|
+
# Gradle and Maven with auto-import
|
175
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
176
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
177
|
+
# auto-import.
|
178
|
+
# .idea/modules.xml
|
179
|
+
# .idea/*.iml
|
180
|
+
# .idea/modules
|
181
|
+
|
182
|
+
# CMake
|
183
|
+
cmake-build-*/
|
184
|
+
|
185
|
+
# Mongo Explorer plugin
|
186
|
+
.idea/**/mongoSettings.xml
|
187
|
+
|
188
|
+
# File-based project format
|
189
|
+
*.iws
|
190
|
+
|
191
|
+
# IntelliJ
|
192
|
+
out/
|
193
|
+
|
194
|
+
# mpeltonen/sbt-idea plugin
|
195
|
+
.idea_modules/
|
196
|
+
|
197
|
+
# JIRA plugin
|
198
|
+
atlassian-ide-plugin.xml
|
199
|
+
|
200
|
+
# Cursive Clojure plugin
|
201
|
+
.idea/replstate.xml
|
202
|
+
|
203
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
204
|
+
com_crashlytics_export_strings.xml
|
205
|
+
crashlytics.properties
|
206
|
+
crashlytics-build.properties
|
207
|
+
fabric.properties
|
208
|
+
|
209
|
+
# Editor-based Rest Client
|
210
|
+
.idea/httpRequests
|
211
|
+
|
212
|
+
# Android studio 3.1+ serialized cache file
|
213
|
+
.idea/caches/build_file_checksums.ser
|
214
|
+
|
215
|
+
### RubyMine+all Patch ###
|
216
|
+
# Ignores the whole .idea folder and all .iml files
|
217
|
+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
218
|
+
|
219
|
+
/.idea/
|
220
|
+
|
221
|
+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
222
|
+
|
223
|
+
*.iml
|
224
|
+
modules.xml
|
225
|
+
.idea/misc.xml
|
226
|
+
*.ipr
|
227
|
+
|
228
|
+
# End of https://www.gitignore.io/api/ruby,rails,rubymine+all,osx
|
229
|
+
/infra/
|
230
|
+
.pry_history
|
231
|
+
/.ruby-version
|
232
|
+
/.rbenv-gemsets
|
233
|
+
/.rspec_status
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# This file is a template, and might need editing before it works on your project.
|
2
|
+
# Official language image. Look for the different tagged releases at:
|
3
|
+
# https://hub.docker.com/r/library/ruby/tags/
|
4
|
+
image: "ruby:2.5.1"
|
5
|
+
|
6
|
+
# Cache gems in between builds
|
7
|
+
cache:
|
8
|
+
paths:
|
9
|
+
- vendor/bundle
|
10
|
+
|
11
|
+
# This is a basic example for a gem or script which doesn't use
|
12
|
+
# services such as redis or postgres
|
13
|
+
before_script:
|
14
|
+
- "git config --global user.name 'petrosp'"
|
15
|
+
- "git config --global user.email 'petros@rolling.space'"
|
16
|
+
- ruby -v # Print out ruby version for debugging
|
17
|
+
- gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image
|
18
|
+
- bundle install -j $(nproc) --path vendor/bundle # Install dependencies into ./vendor/ruby
|
19
|
+
|
20
|
+
# Optional - Delete if not using `rubocop`
|
21
|
+
#rubocop:
|
22
|
+
# script:
|
23
|
+
# - rubocop
|
24
|
+
|
25
|
+
rspec:
|
26
|
+
script:
|
27
|
+
- bundle exec rspec
|
28
|
+
|
29
|
+
# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk
|
30
|
+
# are supported too: https://github.com/travis-ci/dpl
|
31
|
+
deploy:
|
32
|
+
only:
|
33
|
+
- develop
|
34
|
+
script:
|
35
|
+
- mkdir -p ~/.gem
|
36
|
+
- 'echo "---" > ~/.gem/credentials'
|
37
|
+
- 'echo ":rubygems_api_key: $RUBYGEMS_KEY" >> ~/.gem/credentials'
|
38
|
+
- chmod 0600 ~/.gem/credentials
|
39
|
+
- gem signin
|
40
|
+
- bundle exec rake release
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at petros@ams-ix.net. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 petrosp
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Dockman
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dockman`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'dockman'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install dockman
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/petrosp/dockman. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Dockman project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/petrosp/dockman/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rubygems/tasks'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
# require 'rake/version_task'
|
5
|
+
#
|
6
|
+
# Rake::VersionTask.new do |task|
|
7
|
+
# task.with_git_tag = true
|
8
|
+
# end
|
9
|
+
RSpec::Core::RakeTask.new(:spec)
|
10
|
+
|
11
|
+
task :default => :spec
|
12
|
+
Gem::Tasks.new(push: false)
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.2
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "dockman"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
require "pry"
|
12
|
+
Pry.start
|
13
|
+
|
14
|
+
# require "irb"
|
15
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/dockman.gemspec
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "dockman/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "dockman"
|
8
|
+
spec.version = Dockman::VERSION
|
9
|
+
spec.authors = ["Petros Papadopoulos"]
|
10
|
+
spec.email = ["petros@rolling.space"]
|
11
|
+
|
12
|
+
spec.summary = %q{Dockman manages docker-compose files for your server needs}
|
13
|
+
spec.description = %q{Dockman reads partial docker-compose configurations and concatenates them in a single master file.}
|
14
|
+
spec.homepage = "https://gitlab.com/petrosp/dockman"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata["allowed_push_host"] = "Set to 'http://mygemserver.com'"
|
21
|
+
|
22
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
23
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
24
|
+
spec.metadata["changelog_uri"] = spec.homepage
|
25
|
+
else
|
26
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
27
|
+
"public gem pushes."
|
28
|
+
end
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = "exe"
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
|
39
|
+
spec.add_dependency 'actionpack', ['>= 4.1', '< 6']
|
40
|
+
spec.add_dependency 'activesupport', ['>= 4.1', '< 6']
|
41
|
+
spec.add_dependency 'thor'
|
42
|
+
spec.add_dependency 'awesome_print', '~> 1.8.0'
|
43
|
+
spec.add_dependency "anyway_config", "~> 1.0"
|
44
|
+
spec.add_dependency 'tty-tree'
|
45
|
+
spec.add_dependency 'tty-table'
|
46
|
+
spec.add_dependency 'docker-compose'
|
47
|
+
|
48
|
+
spec.add_development_dependency 'rake', "~> 12.3"
|
49
|
+
spec.add_development_dependency 'rubygems-tasks', '~> 0.2'
|
50
|
+
spec.add_development_dependency 'bundler', "~> 1.17"
|
51
|
+
spec.add_development_dependency 'version'
|
52
|
+
spec.add_development_dependency 'rspec', "~> 3.5"
|
53
|
+
spec.add_development_dependency 'pry'
|
54
|
+
end
|
data/exe/dockman
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'tty-tree'
|
2
|
+
require 'tty-table'
|
3
|
+
|
4
|
+
module Dockman
|
5
|
+
module Cli
|
6
|
+
class Entry < Thor
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
desc 'gps','Show all processes'
|
10
|
+
def gps
|
11
|
+
say 'placeholder'
|
12
|
+
end
|
13
|
+
|
14
|
+
# desc 'setup', 'Initial setup of the jrc-cli'
|
15
|
+
# subcommand :setup, Jrc::CLI::Setup
|
16
|
+
# register Doku::Cli::Template, 'template', 'template', 'Initial setup of the thory-cli'
|
17
|
+
|
18
|
+
# desc 'template', 'performs template operations'
|
19
|
+
# subcommand :template, Doku::Cli::Template
|
20
|
+
|
21
|
+
# desc 'active', 'Display the active issue'
|
22
|
+
# subcommand :active, Jrc::CLI::Issue::CurrentIssue
|
23
|
+
|
24
|
+
# desc 'activate ISSUEID', 'Set an issue active'
|
25
|
+
# subcommand :activate, Jrc::CLI::Issue::CurrentIssue
|
26
|
+
# def activate(issue_id)
|
27
|
+
# Jrc::CLI::Issue::CurrentIssue.new.activate issue_id
|
28
|
+
# end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Dockman
|
2
|
+
module Extensions
|
3
|
+
module Pathname
|
4
|
+
|
5
|
+
def self.included(base)
|
6
|
+
base.extend ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
module ClassMethods
|
10
|
+
|
11
|
+
def home
|
12
|
+
home_dir = ENV.fetch('HOME')
|
13
|
+
new home_dir
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
Pathname.include Dockman::Extensions::Pathname
|
data/lib/dockman.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'erb'
|
2
|
+
require 'thor'
|
3
|
+
require 'awesome_print'
|
4
|
+
require 'anyway'
|
5
|
+
require 'pathname'
|
6
|
+
require 'ostruct'
|
7
|
+
require 'docker/compose'
|
8
|
+
|
9
|
+
require 'dockman/version'
|
10
|
+
require 'dockman/extensions/pathname'
|
11
|
+
require 'dockman/config'
|
12
|
+
|
13
|
+
module Dockman
|
14
|
+
class Error < StandardError; end
|
15
|
+
# Your code goes here...
|
16
|
+
end
|
17
|
+
|
18
|
+
require 'dockman/cli/entry'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Dockman
|
2
|
+
module Dockify
|
3
|
+
class SetupGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
|
7
|
+
desc 'This will install some needed Gems'
|
8
|
+
|
9
|
+
def add_rspec
|
10
|
+
gem_group :development, :test do
|
11
|
+
gem 'rspec-rails', '~> 3.5.2'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def add_guard
|
16
|
+
gem_group :development do
|
17
|
+
gem 'guard-rspec', '~> 4.7', require: false
|
18
|
+
gem 'spring-commands-rspec'
|
19
|
+
gem 'rubocop'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def finalize
|
24
|
+
system 'bundle install'
|
25
|
+
system 'bundle exec guard init rspec'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
File without changes
|