s3_downloader 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.autotest +25 -0
- data/History.txt +6 -0
- data/Manifest.txt +8 -0
- data/README.txt +57 -0
- data/Rakefile +24 -0
- data/bin/s3_downloader +3 -0
- data/lib/s3_downloader.rb +22 -0
- data/test/test_s3_downloader.rb +9 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 669da3ea7eed135a7025b82340da6189ea43b76b0b6d2bfba4802c353a8953cf
|
4
|
+
data.tar.gz: 7490eb4cabf91fab88a6e7a7659265e94a44bf880364b08795e0713f469d4da8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f2b3eaac6517abb1b7887e716a8de739c499759efbedec90365aaf189afc478d806dc2996a151ed03222af5155d0b5c728c010d0b2666a5e988eb7be079e660f
|
7
|
+
data.tar.gz: 49b0220824b920c45609d330dcb444fcb458b49103f7994600535da48ac3811c27eaa047b51fe667786fd18f496aee3fd142ccfd301ce611147ae6c82c4b3b1f
|
data/.autotest
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "autotest/restart"
|
4
|
+
|
5
|
+
# Autotest.add_hook :initialize do |at|
|
6
|
+
# at.testlib = "minitest/unit"
|
7
|
+
#
|
8
|
+
# at.extra_files << "../some/external/dependency.rb"
|
9
|
+
#
|
10
|
+
# at.libs << ":../some/external"
|
11
|
+
#
|
12
|
+
# at.add_exception "vendor"
|
13
|
+
#
|
14
|
+
# at.add_mapping(/dependency.rb/) do |f, _|
|
15
|
+
# at.files_matching(/test_.*rb$/)
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# %w(TestA TestB).each do |klass|
|
19
|
+
# at.extra_class_map[klass] = "test/test_misc.rb"
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
|
23
|
+
# Autotest.add_hook :run_command do |at|
|
24
|
+
# system "rake build"
|
25
|
+
# end
|
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
= s3_downloader
|
2
|
+
|
3
|
+
home :: https://whoami.encoding-enigma.com
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
stuff
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
stuff
|
12
|
+
|
13
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
stuff
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
stuff
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
stuff
|
24
|
+
|
25
|
+
== DEVELOPERS:
|
26
|
+
|
27
|
+
After checking out the source, run:
|
28
|
+
|
29
|
+
$ rake newb
|
30
|
+
|
31
|
+
This task will install any missing dependencies, run the tests/specs,
|
32
|
+
and generate the RDoc.
|
33
|
+
|
34
|
+
== LICENSE:
|
35
|
+
|
36
|
+
(The MIT License)
|
37
|
+
|
38
|
+
Copyright (c) 2020 JG
|
39
|
+
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
41
|
+
a copy of this software and associated documentation files (the
|
42
|
+
'Software'), to deal in the Software without restriction, including
|
43
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
44
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
45
|
+
permit persons to whom the Software is furnished to do so, subject to
|
46
|
+
the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be
|
49
|
+
included in all copies or substantial portions of the Software.
|
50
|
+
|
51
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
52
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
53
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
54
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
55
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
56
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
57
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
|
6
|
+
# Hoe.plugin :compiler
|
7
|
+
# Hoe.plugin :gem_prelude_sucks
|
8
|
+
# Hoe.plugin :inline
|
9
|
+
# Hoe.plugin :minitest
|
10
|
+
# Hoe.plugin :racc
|
11
|
+
# Hoe.plugin :rcov
|
12
|
+
# Hoe.plugin :rdoc
|
13
|
+
|
14
|
+
Hoe.spec "s3_downloader" do
|
15
|
+
# HEY! If you fill these out in ~/.hoe_template/default/Rakefile.erb then
|
16
|
+
# you'll never have to touch them again!
|
17
|
+
# (delete this comment too, of course)
|
18
|
+
|
19
|
+
developer("JG", "joshua.groeschl@tutanota.com")
|
20
|
+
|
21
|
+
license "MIT" # this should match the license in the README
|
22
|
+
end
|
23
|
+
|
24
|
+
# vim: syntax=ruby
|
data/bin/s3_downloader
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
gem 'aws-sdk-s3'
|
2
|
+
|
3
|
+
class S3Downloader
|
4
|
+
VERSION = "1.1.0"
|
5
|
+
|
6
|
+
attr_reader :download_location
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@s3_bucket_name = 'routes-for-radarr'
|
10
|
+
@file_name = 'api_routes.yml'
|
11
|
+
@s3_bucket_object = Aws::S3::Bucket.new(@s3_bucket_name).object(@file_name)
|
12
|
+
@download_location = "/tmp/#{@file_name}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def download_routes
|
16
|
+
@s3_bucket_object.download_file(@download_location) unless check_for_existing_routes_file
|
17
|
+
end
|
18
|
+
|
19
|
+
def check_for_existing_routes_file
|
20
|
+
File.exists?(@download_location)
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: s3_downloader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- JG
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rdoc
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: hoe
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.22'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3.22'
|
47
|
+
description: stuff
|
48
|
+
email:
|
49
|
+
- joshua.groeschl@tutanota.com
|
50
|
+
executables:
|
51
|
+
- s3_downloader
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files:
|
54
|
+
- History.txt
|
55
|
+
- Manifest.txt
|
56
|
+
- README.txt
|
57
|
+
files:
|
58
|
+
- ".autotest"
|
59
|
+
- History.txt
|
60
|
+
- Manifest.txt
|
61
|
+
- README.txt
|
62
|
+
- Rakefile
|
63
|
+
- bin/s3_downloader
|
64
|
+
- lib/s3_downloader.rb
|
65
|
+
- test/test_s3_downloader.rb
|
66
|
+
homepage: https://whoami.encoding-enigma.com
|
67
|
+
licenses:
|
68
|
+
- MIT
|
69
|
+
metadata:
|
70
|
+
homepage_uri: https://whoami.encoding-enigma.com
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options:
|
73
|
+
- "--main"
|
74
|
+
- README.txt
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
requirements: []
|
88
|
+
rubygems_version: 3.0.3
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: stuff
|
92
|
+
test_files: []
|