mydocker 1.0.0 → 1.0.1

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: 1bbba34bc8d65d1deb2600feca04462141c57e6f0c4fde0730ac0654c3a914f3
4
- data.tar.gz: 73aa8e3e892d3b4706ab3930c3961d945746f8d9afe757a34a5f88fa33cae8cf
3
+ metadata.gz: f4b93bc2c7adc44de93e6323f52446fb1bbedcb0f424bc9dff3ea68f15ea800a
4
+ data.tar.gz: a889cac0ef1e0624c9a928db70b863bb99333823412943036d9461006171fdc4
5
5
  SHA512:
6
- metadata.gz: cf4872abb6203a895a937109e443d471d926df1c0f1fd049602483446dcb59f995ba381431b74ecf2663351a41fdc4c7051d5f2a6c6145ada3f4e2ebf3bbd4fe
7
- data.tar.gz: a408b9d0b71911f030601ea277ce3c3e413aa73075e15a896b6f84b8dea604c00c55bbc68518c8520245ad3f584eab9827deab7be6bf1cdaa8c3b797fea3b4bd
6
+ metadata.gz: 0bb1b58d18e7be2c8457235b994086c642646b5a7857023f85e386cf18686b39a160e9a8bdd9e476483d4009318e897c46f4c6021e3e110847e5088ec09ccffd
7
+ data.tar.gz: 304c396e181f4f7f9b9aa10697872ce405ded4f731c9f5d23a4c7f74ee767bbd7956d297b212a8197ab1a35d63fd0b08cf8d93969470974d6e317855cacbe32c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mydocker (0.1.0)
4
+ mydocker (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,29 +1,85 @@
1
- # Mydocker
1
+ # MyDocker
2
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/mydocker`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Mydocker extends the capacity of ionic cli, providing an refined app exporting experience.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ *Shortlink https://git.io/fArWx*
6
6
 
7
- ## Installation
7
+ ## Table of Contents
8
+ - [Introduction](#introduction)
9
+ - [Installation](#installation)
10
+ - [Supported Os](#supported-os)
11
+ - [Requirements](#requirements)
12
+ - [Rubygems](#rubygems)
13
+ - [Usage](#usage)
14
+ - [Development](#development)
15
+ - [Contributing](#contributing)
16
+ - [License](#license)
17
+ - [Code of Conduct](#code-of-conduct)
18
+
19
+ ## Introduction
20
+
21
+ MyDocker comes with a collection of short commands to work with docker, think it as a url shortener for docker, confusing? check it out!
8
22
 
9
- Add this line to your application's Gemfile:
23
+ ## Installation
24
+ ### Supported OS
25
+ - Mac
26
+ - Windows
27
+ - Linux
28
+ ### Requirements
29
+ - Ruby
30
+ ### Rubygems
31
+
32
+ Install it yourself as:
33
+
34
+ ```sh
35
+ gem install mydocker
36
+ ```
10
37
 
11
- ```ruby
12
- gem 'mydocker'
38
+ ## Configuration
39
+
40
+ 1. Create a ``mydocker.yaml`` file, you can place it in any place, with this content:
41
+ ```yaml
42
+ ---
43
+ projects:
44
+ - project:
45
+ name: "project-1"
46
+ path: '/Users/demo-user/project-1'
47
+ - project:
48
+ name: "project-2"
49
+ path: '/Users/demo-user/project-2'
13
50
  ```
51
+ > Use this file to inform mydocker of your docker projects, add as many projects as you want and mydocker will provide help to these projects.
14
52
 
15
- And then execute:
53
+ 2. With Everything setup, open your command line and run
16
54
 
17
- $ bundle
55
+ ```
56
+ chris
57
+ ```
18
58
 
19
- Or install it yourself as:
59
+ > It seems to be a strange command but there is a reason, later in this tutorial I explain to little more because chris is the mydocker main command.
20
60
 
21
- $ gem install mydocker
61
+ 3. Place your ``mydocker.yaml``location in the terminal then press enter
22
62
 
63
+ 4. Now lets go to the next section on this documentation, why is chris so especial...
23
64
  ## Usage
65
+ MyDocker provides these commands up to you:
66
+ ```sh
67
+ chris up # Start project with docker-compose
68
+ ```
69
+ Can be used to boot with a code editor too
70
+ ```sh
71
+ chris up atom # Start project with docker-compose & open atom editor on the docker project
72
+ ```
73
+ If youl'd like to stop project
74
+ ```sh
75
+ chris down # Destroys project with docker-compose
76
+ ```
77
+ If youl'd like to use docker cli on a specific container
24
78
 
25
- TODO: Write usage instructions here
26
-
79
+ ```sh
80
+ chris cli
81
+ ```
82
+ > Provides access to a project container cli interface, if you do not provide any command bash will be used by default
27
83
  ## Development
28
84
 
29
85
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -32,7 +88,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
88
 
33
89
  ## Contributing
34
90
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mydocker. 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.
91
+ Bug reports and pull requests are welcome on GitHub at https://github.com/gabriellacerda/mydocker. 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
92
 
37
93
  ## License
38
94
 
@@ -40,4 +96,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
96
 
41
97
  ## Code of Conduct
42
98
 
43
- Everyone interacting in the Mydocker project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/mydocker/blob/master/CODE_OF_CONDUCT.md).
99
+ Everyone interacting in the Runapk project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/gabriellacerda/mydocker/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module Mydocker
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/mydocker.rb CHANGED
@@ -24,7 +24,7 @@ def setup()
24
24
  #
25
25
  # puts Dir.pwd
26
26
  #
27
- config = YAML.load_file("./mydocker.yaml")
27
+ config = YAML.load_file("./mydocker.yml")
28
28
  if config["docker"]["file"].length > 0
29
29
  options = [];
30
30
  user_config = YAML.load_file("#{config["docker"]["file"]}")
@@ -37,7 +37,7 @@ def setup()
37
37
 
38
38
  if selected_func == "release"
39
39
  config["docker"]["file"] = "";
40
- File.write('mydocker.yaml', config)
40
+ File.write('mydocker.yml', config)
41
41
  abort()
42
42
  end
43
43
 
@@ -87,16 +87,24 @@ def setup()
87
87
  abort()
88
88
  end
89
89
  if selected_editor == nil
90
- cmd("(cd #{working_path} && docker-compose #{selected_func} -d)")
90
+ if selected_func == 'down'
91
+ cmd("(cd #{working_path} && docker-compose #{selected_func})")
92
+ else
93
+ cmd("(cd #{working_path} && docker-compose #{selected_func} -d)")
94
+ end
91
95
  else
92
- cmd("(cd #{working_path} && docker-compose #{selected_func} -d && #{selected_editor} .)")
96
+ if selected_func == 'down'
97
+ cmd("(cd #{working_path} && docker-compose #{selected_func} && #{selected_editor} .)")
98
+ else
99
+ cmd("(cd #{working_path} && docker-compose #{selected_func} && #{selected_editor} .)")
100
+ end
93
101
  end
94
102
  phrase "MyDocker is a open source tool, if you would like to help visit: ".yellow + "https://github.com/gabriellacerda/mydocker".cyan
95
103
  else
96
104
  puts "Informe um arquivo de configuração"
97
105
  config_file_path = prompt.ask("👰 Diretório do arquivo de configuração:")
98
106
  config["docker"]["file"] = config_file_path;
99
- File.write('mydocker.yaml', config)
107
+ File.open('mydocker.yml', 'w') {|f| f.write config.to_yaml }
100
108
  # puts "#{$PROGRAM_NAME}"
101
109
  end
102
110
  end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mydocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GabrielLacerda
@@ -32,7 +32,7 @@ files:
32
32
  - lib/mydocker.rb
33
33
  - lib/mydocker/version.rb
34
34
  - mydocker.gemspec
35
- - mydocker.yaml
35
+ - mydocker.yml
36
36
  - test/mydocker_test.rb
37
37
  - test/test_helper.rb
38
38
  homepage: https://github.com/gabriellacerda/mydocker