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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c327bb23b4188d107fc9c00b19f1aaec6bdeba2d
4
- data.tar.gz: db0d81ef887f94b4e31cdc43feff1d4cf98ad36a
3
+ metadata.gz: 74d6d2309f95782781672f56f89b7796edd07c81
4
+ data.tar.gz: f8d1fa7ccf1bd5837ddb1a6ef643ecc527f2e0d0
5
5
  SHA512:
6
- metadata.gz: 07abaea371fbcbd8856f8e0d0cec9526ad277fdfd89a1d81d5ca445dbd1c2a8f1a2696e0b509717efade212de2f808f0cce7ca5c10767381f30f77db68d3f78f
7
- data.tar.gz: 91adad27cdd65fba01006f68ceb64977e21c40dd2f24587f7cc99cbfb76148d262aa2490e20f27cc7599c755bfbe3aab8fe8bbcf4fd1c48c05f8017d122bbc89
6
+ metadata.gz: b46d6dc728f8c39efc38f40218eb0bb7ec8dd22fa829f692f78a824845acc35f3e2c14c6d2548f517b42d13383c038a3474ea47cf4f908eb3fd2d4e36920f4e6
7
+ data.tar.gz: 7fda9fa1b7b0728238b19f978934341d3854c0cbec3661c2b459a1dc815194ab5a927695138fee2b0c105e939780130e1d860936ad2dafd686de2d17ee3c1112
File without changes
data/docker-compose.yml CHANGED
@@ -4,15 +4,15 @@ volumes:
4
4
  gems:
5
5
  driver: local
6
6
  services:
7
- whales:
7
+ whally:
8
8
  image: ruby:2.3.0
9
- entrypoint: /usr/src/whales/development-entrypoint.sh
9
+ entrypoint: /usr/src/whally/development-entrypoint.sh
10
10
  command: bash
11
11
  volumes:
12
- - .:/usr/src/whales
12
+ - .:/usr/src/whally
13
13
  - gems:/usr/local/bundle
14
14
  - ../datoz-master:/usr/src/whales/datoz
15
- working_dir: /usr/src/whales
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 Whales
7
+ module Whally
8
8
  URL = 'http://whales-api.herokuapp.com'.freeze
9
9
 
10
- # Whales Commandline App
10
+ # Whally Commandline App
11
11
  class Builder < Thor
12
- include Whales
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
- Whales::Dockerfiler.new(response, @pathfile).dockerfiles
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 = Whales::GemsExtractor.new(@pathfile).collect
61
+ @gems = Whally::GemsExtractor.new(@pathfile).collect
62
62
  end
63
63
 
64
64
  def return_packages
@@ -1,7 +1,7 @@
1
1
  require 'pry'
2
2
  require 'yaml'
3
- module Whales
4
- # Get dependencies from Whales API
3
+ module Whally
4
+ # Get dependencies from Whally API
5
5
  class Dockerfiler
6
6
  def initialize(response, pathfile)
7
7
  @dockerfile = response['dockerfile']
@@ -1,4 +1,4 @@
1
- module Whales
1
+ module Whally
2
2
  # Manages a text line where gem is defined to be installed
3
3
  class Gemline
4
4
  def initialize(line)
@@ -1,4 +1,4 @@
1
- module Whales
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 << Whales::Gemline.new(line).to_gem
19
+ @collect << Whally::Gemline.new(line).to_gem
20
20
  end
21
21
  end
22
22
 
@@ -1,5 +1,5 @@
1
- module Whales
2
- # Decompose response from WhalesAPI
1
+ module Whally
2
+ # Decompose response from WhallyAPI
3
3
  class ServiceDecomposer
4
4
  def initialize(response)
5
5
  @services = []
@@ -0,0 +1,3 @@
1
+ module Whally
2
+ VERSION = '0.1.1'.freeze
3
+ end
@@ -1,4 +1,4 @@
1
- module Whales
1
+ module Whally
2
2
  # Decompose response from WhalesAPI
3
3
  class VolumeDecomposer
4
4
  def initialize(response)
data/lib/whally.rb ADDED
@@ -0,0 +1,7 @@
1
+ require 'whally/version'
2
+ require 'whally/builder'
3
+ require 'whally/gemline'
4
+ require 'whally/gems_extractor'
5
+ require 'whally/service_decomposer'
6
+ require 'whally/volume_decomposer'
7
+ require 'whally/dockerfiler'
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
  require 'thor'
3
- require './lib/whales/builder.rb'
3
+ require './lib/whally/builder.rb'
4
4
  require 'pry'
5
5
 
6
- describe Whales::Builder do
7
- let(:whales) { Whales::Builder.new }
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 'whales/version'
4
+ require 'whally/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'whally'
8
- spec.version = Whales::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 set any application on a nice whale'
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.0
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 set any application on a nice whale
125
+ description: A ruby gem to dockerize applications.
126
126
  email:
127
127
  - kurenn@icalialabs.com
128
128
  executables:
129
- - whales
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/whales
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/whales.rb
150
- - lib/whales/builder.rb
151
- - lib/whales/calves/docker_compose/default.calf
152
- - lib/whales/calves/entrypoint/rails.calf
153
- - lib/whales/calves/postgresql/postgis.calf
154
- - lib/whales/calves/postgresql/postgresql.calf
155
- - lib/whales/dockerfiler.rb
156
- - lib/whales/gemline.rb
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/whales_spec.rb
163
- - whales.gemspec
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/whales_spec.rb
186
+ - spec/whally_spec.rb
@@ -1,4 +0,0 @@
1
- version: "2"
2
-
3
- services:
4
-
@@ -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
@@ -1,3 +0,0 @@
1
- module Whales
2
- VERSION = '0.1.0'.freeze
3
- end
data/lib/whales.rb DELETED
@@ -1,7 +0,0 @@
1
- require 'whales/version'
2
- require 'whales/builder'
3
- require 'whales/gemline'
4
- require 'whales/gems_extractor'
5
- require 'whales/service_decomposer'
6
- require 'whales/volume_decomposer'
7
- require 'whales/dockerfiler'