lucy_dockerunner 0.1.4 → 0.1.5

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: 53e94959b2b2e657d75c97d7e4c3d7657d712df97c12177d83e3410402691705
4
- data.tar.gz: d18ce98ae20af0851862335e5b09864c5a3ac215319154273ed8044b309274a1
3
+ metadata.gz: 4446f3dd1ecb3193d0868bd3247ffa451352bddee1cf81e5d8e9bf9aad3936cb
4
+ data.tar.gz: cc912d91c7691de292b7ea115a0fcada45871057d3a10e69132a088cdad5c294
5
5
  SHA512:
6
- metadata.gz: a2d9027e40592cec52e4b9701ffcf26f654b2d75661f19b6d5a25ccfa3353840e51a16cae3c050130222db8df87bfc49d29102e6bd1cc44b2ea6c9b21375e6c3
7
- data.tar.gz: f7d6fee82bb28d4060a93cc0889678b1f415a96e14fb0ee136d53ab621c790e1ef4df799ebd36268cc312483fd41e9f7aaf25d4ce8fda15cf9c5844733c2ad6f
6
+ metadata.gz: 1e48250f0baca9e750660853c344d4cf99abf7e6290d12aebb2ea07955e1964076af66417bdb391cf719d7f337c989c23bc9879bf0c722ee88dc370306e7a41c
7
+ data.tar.gz: fd287ccf462d6017fc054ccf2e7075a6f17ccf871c24c4a29d60126adc8ab8394bd13462a0773dfb917584ad76649853354679b4705148365f92e7a97d22eb86
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lucy_dockerunner (0.1.4)
4
+ lucy_dockerunner (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LucyDockerunner
2
2
 
3
- Lucy Dockerunner is a Ruby gem that provides a simple wrapper around the Docker Compose CLI to make it easier to run Docker Compose commands from Ruby.
3
+ Lucy Dockerunner is a Ruby gem that provides a simple wrapper around the Docker Compose CLI to make it easier to run Docker Compose commands from Ruby On Rails projects.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/lucy_dockerunner.svg)](https://badge.fury.io/rb/lucy_dockerunner)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -8,6 +8,8 @@ Lucy Dockerunner is a Ruby gem that provides a simple wrapper around the Docker
8
8
 
9
9
  Ruby version: >= 2.6.0
10
10
 
11
+ This gem version: 0.1.4
12
+
11
13
  ## Installation
12
14
 
13
15
  You can install the gem by executing:
@@ -18,6 +20,15 @@ Or add it to your Gemfile:
18
20
 
19
21
  gem 'lucy_dockerunner'
20
22
 
23
+ ## Usage
24
+
25
+ ### Add the following code to your Rakefile to load the tasks
26
+ ````ruby
27
+ require 'lucy_dockerunner'
28
+
29
+ LucyDockerunner.load_tasks
30
+ ````
31
+
21
32
  ###### Docker actions
22
33
  * `rake compose:install` - build docker compose and migrate the database
23
34
  * `rake compose:build` - build docker compose services
@@ -78,7 +89,7 @@ http://localhost
78
89
 
79
90
 
80
91
  ## References
81
- The code code inside the 'lib/rake/hooks.rb' file is based on the code of the [rake-hooks](https://github.com/guillermo/rake-hooks) from Guillermo Iguaran, Joel Moss as described in the [Ruby Toolbox](https://www.ruby-toolbox.com/projects/rake-hooks) page.
92
+ The code code inside the 'lib/rake/lucyd_hooks.rb' file is based on the code of the [rake-hooks](https://github.com/guillermo/rake-hooks) from Guillermo Iguaran, Joel Moss as described in the [Ruby Toolbox](https://www.ruby-toolbox.com/projects/rake-hooks) page.
82
93
  ## Contributing
83
94
 
84
95
  Bug reports and pull requests are welcome on GitHub at https://github.com/JesusGautamah/lucy_dockerunner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/JesusGautamah/lucy_dockerunner/blob/master/CODE_OF_CONDUCT.md).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucyDockerunner
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Rake::Hooks from https://github.com/guillermo/rake-hooks, authors Guillermo Iguaran, Joel Moss
3
+ # Rake::LucydHooks from https://github.com/guillermo/rake-hooks, authors Guillermo Iguaran, Joel Moss
4
4
  module Rake
5
- module Hooks
5
+ module LucydHooks
6
6
  def before(*task_names, &new_task)
7
7
  task_names.each do |task_name|
8
8
  old_task = Rake.application.instance_variable_get("@tasks").delete(task_name.to_s)
@@ -39,5 +39,5 @@ module Rake
39
39
  end
40
40
  end
41
41
 
42
- Rake::DSL.include Rake::Hooks if defined?(Rake::DSL)
43
- include Rake::Hooks unless self.class.included_modules.include?(Rake::Hooks)
42
+ Rake::DSL.include Rake::LucydHooks if defined?(Rake::DSL)
43
+ include Rake::LucydHooks unless self.class.included_modules.include?(Rake::LucydHooks)
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "rake"
4
4
  require_relative "task_helpers/compose_taskhelper"
5
- require_relative "../rake/hooks"
5
+ require_relative "../rake/lucyd_hooks"
6
6
 
7
7
  def tasks_names
8
8
  @tasks_names = %w[install build up down restart clean_all clean_volumes clean_orphans clean_images clean_networks
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rake"
4
+ require_relative "task_helpers/compose_taskhelper"
5
+ require_relative "../rake/lucyd_hooks"
6
+
7
+ def task_helper
8
+ @task_helper ||= TaskHelpers::ComposeTaskhelper.new
9
+ end
10
+
11
+ def compose_command
12
+ @compose_comand ||= task_helper.compose_command
13
+ end
14
+
15
+ namespace :compose_assets do
16
+ task :precompile do
17
+ puts "Precompiling Assets..."
18
+ system "sudo #{compose_command} run web rake assets:precompile"
19
+ puts "Precompiling Assets... Done!"
20
+ end
21
+
22
+ task :clean do
23
+ puts "Cleaning Assets..."
24
+ system "sudo #{compose_command} run web rake assets:clean"
25
+ puts "Cleaning Assets... Done!"
26
+ end
27
+
28
+ task :clobber do
29
+ puts "Clobbering Assets..."
30
+ system "sudo #{compose_command} run web rake assets:clobber"
31
+ puts "Clobbering Assets... Done!"
32
+ end
33
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucy_dockerunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JesusGautamah
@@ -32,9 +32,10 @@ files:
32
32
  - Rakefile
33
33
  - lib/lucy_dockerunner.rb
34
34
  - lib/lucy_dockerunner/version.rb
35
- - lib/rake/hooks.rb
35
+ - lib/rake/lucyd_hooks.rb
36
36
  - lib/tasks/.keep
37
37
  - lib/tasks/compose.rake
38
+ - lib/tasks/compose_assets.rake
38
39
  - lib/tasks/compose_db.rake
39
40
  - lib/tasks/compose_logs.rake
40
41
  - lib/tasks/compose_prod.rake