osiris 1.0.8.0
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 +15 -0
- data/lib/osiris.rb +8 -0
- data/lib/osiris/deployment.rb +12 -0
- data/lib/osiris/dsl.rb +4 -0
- data/lib/osiris/zip_file_generator.rb +55 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWRiODA4NTA3M2QxOTk3ZDY5ZjViN2ZlOWNiZTQ1NTdmYTk2ZjYzNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NGI1ZDdhYTFjZTNiOWJlMmVjYjliNzg3NTIwMGQ0NDcwZjEzODAxZg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MDkxYWRjNjI0NjgyZjJiYTQ3ZThhYzNiOTA1ZGYzYmU1NmY1ZjZkMjkxZjNk
|
10
|
+
MWRiMzU5YmJjNDQyNTYzMGQ2YjA3NjViOTllNDFhNWQ5OWMxOTcyNWU3Y2Yz
|
11
|
+
YmQ1ZWVmYzk2ZmI3Nzg4ZDU2Y2M5NmViNmIxZWFiYjEzZmZjYjQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTU1YmQwNDA2ODQ2OGRiOTU4NDNjN2FmZGQxYzA4MDM5NWQ3YjFhMjc0MmU3
|
14
|
+
NWU3ODFkNzI2MWMwMDk5NGQ1ZGY2MzM2ZjNmNGMxOTY5ZjQ0OWQyZWYxM2Fl
|
15
|
+
ODBkOWNiYTdhMDc0ZGJhYjBiODNlZmExZDVjM2U1NDVjZjRkZmU=
|
data/lib/osiris.rb
ADDED
data/lib/osiris/dsl.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'zip'
|
2
|
+
# From https://github.com/rubyzip/rubyzip
|
3
|
+
# This is a simple example which uses rubyzip to
|
4
|
+
# recursively generate a zip file from the contents of
|
5
|
+
# a specified directory. The directory itself is not
|
6
|
+
# included in the archive, rather just its contents.
|
7
|
+
#
|
8
|
+
# Usage:
|
9
|
+
# directoryToZip = "/tmp/input"
|
10
|
+
# outputFile = "/tmp/out.zip"
|
11
|
+
# zf = ZipFileGenerator.new()
|
12
|
+
# zf.write(directoryToZip, outputFile)
|
13
|
+
module Osiris
|
14
|
+
class ZipFileGenerator
|
15
|
+
# Initialize with the directory to zip and the location of the output archive.
|
16
|
+
def initialize()
|
17
|
+
end
|
18
|
+
|
19
|
+
# Zip the input directory.
|
20
|
+
def write(inputDir, outputFile)
|
21
|
+
entries = Dir.entries(inputDir); entries.delete("."); entries.delete("..")
|
22
|
+
io = Zip::File.open(outputFile, Zip::File::CREATE);
|
23
|
+
|
24
|
+
writeEntries(entries, "", io, inputDir)
|
25
|
+
io.close();
|
26
|
+
end
|
27
|
+
|
28
|
+
def unzip_file(file, directory)
|
29
|
+
Zip::File.open(file) do |zip_file|
|
30
|
+
zip_file.each do |f|
|
31
|
+
extraction_location = File.join(directory, f.name)
|
32
|
+
FileUtils.mkdir_p(directory)
|
33
|
+
zip_file.extract(f, extraction_location)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# A helper method to make the recursion work.
|
39
|
+
private
|
40
|
+
def writeEntries(entries, path, io, inputDir)
|
41
|
+
entries.each { |e|
|
42
|
+
zipFilePath = path == "" ? e : File.join(path, e)
|
43
|
+
diskFilePath = File.join(inputDir, zipFilePath)
|
44
|
+
puts "Deflating " + diskFilePath
|
45
|
+
if File.directory?(diskFilePath)
|
46
|
+
io.mkdir(zipFilePath)
|
47
|
+
subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..")
|
48
|
+
writeEntries(subdir, zipFilePath, io, inputDir)
|
49
|
+
else
|
50
|
+
io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())}
|
51
|
+
end
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: osiris
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.8.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Warren Parad
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rest-client
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubyzip
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: aws-sdk
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2'
|
69
|
+
description: Osiris is a ruby library to interact with AWS Code Deploy.
|
70
|
+
email:
|
71
|
+
- wparad@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/osiris.rb
|
77
|
+
- lib/osiris/deployment.rb
|
78
|
+
- lib/osiris/dsl.rb
|
79
|
+
- lib/osiris/zip_file_generator.rb
|
80
|
+
homepage: https://github.com/wparad/Osiris
|
81
|
+
licenses:
|
82
|
+
- BSD-3-Clause
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.4.5
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: A lightweight s3 builder and code deployment tool wrapper
|
104
|
+
test_files: []
|