docker-build 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +2 -0
- data/docker-build.gemspec +12 -0
- data/lib/composer.rb +23 -0
- data/lib/docker-build.rb +29 -0
- metadata +48 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a434fb576ae6ef655c71e679c880217f0031bf72
|
4
|
+
data.tar.gz: d457b785a31977be383974265d768d244df37f04
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1acdd18a44b45f99a322066802f0321949b3b42eda5459164d1aeaac0c5d66d7657a4bd9c534beac1ac51551c0f2bbf711b8330363b6d3cf4c476a0da2ac821e
|
7
|
+
data.tar.gz: 5684b5ec005a45f452badf5bba7557c8fbbda64c7bebc3b68fe4f87d5561a323c4f407e89a266cf437c853acd9cb670538a2081564062b3f2bd5a0b4b7b30ca9
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 VJ Patel
|
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 all
|
13
|
+
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 THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'docker-build'
|
3
|
+
s.version = `git describe --abbrev=0`.strip()
|
4
|
+
s.date = `date +"%Y-%m-%d"`.strip()
|
5
|
+
s.summary = 'Preset tasks for Rake'
|
6
|
+
s.description = 'Preset tasks for Rake when building projects'
|
7
|
+
s.authors = ['VJ Patel']
|
8
|
+
s.email = 'meetthevj@gmail.com'
|
9
|
+
s.files = `git ls-files`.split("\n")
|
10
|
+
s.homepage = 'http://rubygems.org/gems/docker-build'
|
11
|
+
s.license = 'MIT'
|
12
|
+
end
|
data/lib/composer.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
class Composer
|
2
|
+
|
3
|
+
def self.development
|
4
|
+
self.get_composer
|
5
|
+
puts '---- Running development Composer installation'
|
6
|
+
fail 'Composer development installation failed' unless
|
7
|
+
system self.get_docker_command + 'install --verbose --profile'
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.production
|
11
|
+
self.get_composer
|
12
|
+
puts '---- Running production Composer installation'
|
13
|
+
fail 'Composer production installation failed' unless
|
14
|
+
system self.get_docker_command + 'install --no-dev --optimize-autoloader --no-interaction --verbose --profile'
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
def self.get_docker_command
|
19
|
+
puts '---- Launching Composer container'
|
20
|
+
return 'docker run --rm -v `pwd`:/app composer/composer '
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/lib/docker-build.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class DockerBuild
|
2
|
+
|
3
|
+
def self.composer
|
4
|
+
Composer
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.symfony
|
8
|
+
Symfony
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.npm
|
12
|
+
Npm
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.nginx
|
16
|
+
Nginx
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.test
|
20
|
+
Test
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
require 'composer'
|
26
|
+
require 'symfony/symfony'
|
27
|
+
require 'npm/npm'
|
28
|
+
require 'test/test'
|
29
|
+
require 'nginx'
|
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: docker-build
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- VJ Patel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-23 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Preset tasks for Rake when building projects
|
14
|
+
email: meetthevj@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- LICENSE
|
20
|
+
- README.md
|
21
|
+
- docker-build.gemspec
|
22
|
+
- lib/composer.rb
|
23
|
+
- lib/docker-build.rb
|
24
|
+
homepage: http://rubygems.org/gems/docker-build
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 2.4.6
|
45
|
+
signing_key:
|
46
|
+
specification_version: 4
|
47
|
+
summary: Preset tasks for Rake
|
48
|
+
test_files: []
|