whally 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/{whales → whally} +0 -0
- data/docker-compose.yml +4 -4
- data/lib/{whales → whally}/builder.rb +5 -5
- data/lib/{whales → whally}/dockerfiler.rb +2 -2
- data/lib/{whales → whally}/gemline.rb +1 -1
- data/lib/{whales → whally}/gems_extractor.rb +2 -2
- data/lib/{whales → whally}/service_decomposer.rb +2 -2
- data/lib/whally/version.rb +3 -0
- data/lib/{whales → whally}/volume_decomposer.rb +1 -1
- data/lib/whally.rb +7 -0
- data/spec/{whales_spec.rb → whally_spec.rb} +3 -3
- data/{whales.gemspec → whally.gemspec} +4 -4
- metadata +16 -20
- data/lib/whales/calves/docker_compose/default.calf +0 -4
- data/lib/whales/calves/entrypoint/rails.calf +0 -17
- data/lib/whales/calves/postgresql/postgis.calf +0 -18
- data/lib/whales/calves/postgresql/postgresql.calf +0 -18
- data/lib/whales/version.rb +0 -3
- data/lib/whales.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d6d2309f95782781672f56f89b7796edd07c81
|
4
|
+
data.tar.gz: f8d1fa7ccf1bd5837ddb1a6ef643ecc527f2e0d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b46d6dc728f8c39efc38f40218eb0bb7ec8dd22fa829f692f78a824845acc35f3e2c14c6d2548f517b42d13383c038a3474ea47cf4f908eb3fd2d4e36920f4e6
|
7
|
+
data.tar.gz: 7fda9fa1b7b0728238b19f978934341d3854c0cbec3661c2b459a1dc815194ab5a927695138fee2b0c105e939780130e1d860936ad2dafd686de2d17ee3c1112
|
data/bin/{whales → whally}
RENAMED
File without changes
|
data/docker-compose.yml
CHANGED
@@ -4,15 +4,15 @@ volumes:
|
|
4
4
|
gems:
|
5
5
|
driver: local
|
6
6
|
services:
|
7
|
-
|
7
|
+
whally:
|
8
8
|
image: ruby:2.3.0
|
9
|
-
entrypoint: /usr/src/
|
9
|
+
entrypoint: /usr/src/whally/development-entrypoint.sh
|
10
10
|
command: bash
|
11
11
|
volumes:
|
12
|
-
- .:/usr/src/
|
12
|
+
- .:/usr/src/whally
|
13
13
|
- gems:/usr/local/bundle
|
14
14
|
- ../datoz-master:/usr/src/whales/datoz
|
15
|
-
working_dir: /usr/src/
|
15
|
+
working_dir: /usr/src/whally
|
16
16
|
tty: true
|
17
17
|
stdin_open: true
|
18
18
|
environment:
|
@@ -4,12 +4,12 @@ require 'nokogiri'
|
|
4
4
|
require 'rest-client'
|
5
5
|
require 'json'
|
6
6
|
|
7
|
-
module
|
7
|
+
module Whally
|
8
8
|
URL = 'http://whales-api.herokuapp.com'.freeze
|
9
9
|
|
10
|
-
#
|
10
|
+
# Whally Commandline App
|
11
11
|
class Builder < Thor
|
12
|
-
include
|
12
|
+
include Whally
|
13
13
|
include Thor::Actions
|
14
14
|
|
15
15
|
def initialize(args = [], local_options = {}, config = {})
|
@@ -23,7 +23,7 @@ module Whales
|
|
23
23
|
@pathfile = pathfile.gsub('Gemfile', '')
|
24
24
|
scan_gems
|
25
25
|
response = return_packages
|
26
|
-
|
26
|
+
Whally::Dockerfiler.new(response, @pathfile).dockerfiles
|
27
27
|
if @gems.include?('rails')
|
28
28
|
add_development_files
|
29
29
|
end
|
@@ -58,7 +58,7 @@ module Whales
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def scan_gems
|
61
|
-
@gems =
|
61
|
+
@gems = Whally::GemsExtractor.new(@pathfile).collect
|
62
62
|
end
|
63
63
|
|
64
64
|
def return_packages
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Whally
|
2
2
|
# Extract gems from a gemfile
|
3
3
|
class GemsExtractor
|
4
4
|
attr_reader :collect
|
@@ -16,7 +16,7 @@ module Whales
|
|
16
16
|
file = File.open(@pathfile, 'r')
|
17
17
|
|
18
18
|
file.each_line do |line|
|
19
|
-
@collect <<
|
19
|
+
@collect << Whally::Gemline.new(line).to_gem
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/lib/whally.rb
ADDED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'thor'
|
3
|
-
require './lib/
|
3
|
+
require './lib/whally/builder.rb'
|
4
4
|
require 'pry'
|
5
5
|
|
6
|
-
describe
|
7
|
-
let(:whales) {
|
6
|
+
describe Whally::Builder do
|
7
|
+
let(:whales) { Whally::Builder.new }
|
8
8
|
let(:nude_pathfile) { 'example' }
|
9
9
|
let(:pathfile) { 'example/Gemfile' }
|
10
10
|
after(:each) do
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'whally/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'whally'
|
8
|
-
spec.version =
|
8
|
+
spec.version = Whally::VERSION
|
9
9
|
spec.authors = ['Abraham Kuri']
|
10
10
|
spec.email = ['kurenn@icalialabs.com']
|
11
11
|
|
12
|
-
spec.summary = 'A ruby gem to dockerize applications'
|
13
|
-
spec.description = 'A ruby gem to
|
12
|
+
spec.summary = 'A ruby gem to dockerize applications.'
|
13
|
+
spec.description = 'A ruby gem to dockerize applications.'
|
14
14
|
spec.homepage = 'https://github.com/IcaliaLabs/whales'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whally
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abraham Kuri
|
@@ -122,11 +122,11 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: A ruby gem to
|
125
|
+
description: A ruby gem to dockerize applications.
|
126
126
|
email:
|
127
127
|
- kurenn@icalialabs.com
|
128
128
|
executables:
|
129
|
-
-
|
129
|
+
- whally
|
130
130
|
extensions: []
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
@@ -140,27 +140,23 @@ files:
|
|
140
140
|
- LICENSE.txt
|
141
141
|
- README.md
|
142
142
|
- Rakefile
|
143
|
-
- bin/
|
143
|
+
- bin/whally
|
144
144
|
- development-entrypoint.sh
|
145
145
|
- docker-compose.yml
|
146
146
|
- example/Dockerfile
|
147
147
|
- example/Gemfile
|
148
148
|
- example/docker-compose.yml
|
149
|
-
- lib/
|
150
|
-
- lib/
|
151
|
-
- lib/
|
152
|
-
- lib/
|
153
|
-
- lib/
|
154
|
-
- lib/
|
155
|
-
- lib/
|
156
|
-
- lib/
|
157
|
-
- lib/whales/gems_extractor.rb
|
158
|
-
- lib/whales/service_decomposer.rb
|
159
|
-
- lib/whales/version.rb
|
160
|
-
- lib/whales/volume_decomposer.rb
|
149
|
+
- lib/whally.rb
|
150
|
+
- lib/whally/builder.rb
|
151
|
+
- lib/whally/dockerfiler.rb
|
152
|
+
- lib/whally/gemline.rb
|
153
|
+
- lib/whally/gems_extractor.rb
|
154
|
+
- lib/whally/service_decomposer.rb
|
155
|
+
- lib/whally/version.rb
|
156
|
+
- lib/whally/volume_decomposer.rb
|
161
157
|
- spec/spec_helper.rb
|
162
|
-
- spec/
|
163
|
-
-
|
158
|
+
- spec/whally_spec.rb
|
159
|
+
- whally.gemspec
|
164
160
|
homepage: https://github.com/IcaliaLabs/whales
|
165
161
|
licenses:
|
166
162
|
- MIT
|
@@ -184,7 +180,7 @@ rubyforge_project:
|
|
184
180
|
rubygems_version: 2.6.3
|
185
181
|
signing_key:
|
186
182
|
specification_version: 4
|
187
|
-
summary: A ruby gem to dockerize applications
|
183
|
+
summary: A ruby gem to dockerize applications.
|
188
184
|
test_files:
|
189
185
|
- spec/spec_helper.rb
|
190
|
-
- spec/
|
186
|
+
- spec/whally_spec.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# The Docker App Container's development entrypoint.
|
2
|
-
# This is a script used by the project's Docker development environment to
|
3
|
-
# setup the app containers and databases upon runnning.
|
4
|
-
|
5
|
-
set -e
|
6
|
-
|
7
|
-
: ${APP_PATH:="/app"}
|
8
|
-
: ${APP_TEMP_PATH:="$APP_PATH/tmp"}
|
9
|
-
|
10
|
-
# In case of a bad reset, delete pid file
|
11
|
-
if [ -e /$APP_TEMP_PATH/tmp/pids/server.pid ]
|
12
|
-
then rm /$APP_TEMP_PATH/pids/server.pid
|
13
|
-
fi
|
14
|
-
|
15
|
-
# Check gems
|
16
|
-
bundle
|
17
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
volumes:
|
2
|
-
postgres-data:
|
3
|
-
driver: local
|
4
|
-
db:
|
5
|
-
image: mdillon/postgis:9.5
|
6
|
-
ports:
|
7
|
-
- 5432:5432
|
8
|
-
volumes:
|
9
|
-
- postgres-data:/var/lib/postgresql/data
|
10
|
-
environment:
|
11
|
-
POSTGRES_PASSWORD: 12341234
|
12
|
-
|
13
|
-
services:
|
14
|
-
services_name:
|
15
|
-
links:
|
16
|
-
- db
|
17
|
-
environment:
|
18
|
-
DATABASE_URL: postgis://postgres:12341234@db:5432/db_development
|
@@ -1,18 +0,0 @@
|
|
1
|
-
volumes:
|
2
|
-
postgres-data:
|
3
|
-
driver: local
|
4
|
-
|
5
|
-
services:
|
6
|
-
db:
|
7
|
-
image: postgres:9.5
|
8
|
-
ports:
|
9
|
-
- 5432:5432
|
10
|
-
volumes:
|
11
|
-
- postgres-data:/var/lib/postgresql/data
|
12
|
-
environment:
|
13
|
-
POSTGRES_PASSWORD: 12341234
|
14
|
-
services_name:
|
15
|
-
links:
|
16
|
-
- db
|
17
|
-
environment:
|
18
|
-
DATABASE_URL: postgres://postgres:12341234@db:5432/taptofund_db_development
|
data/lib/whales/version.rb
DELETED