sipo_mailer 0.0.1 → 0.0.2
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 +4 -4
- data/config/adresar.csv.example +2 -0
- data/config/config.yml.example +1 -1
- data/docker-compose.yml +0 -1
- data/lib/sipo_mailer/utils/installer.rb +23 -7
- data/sipo_mailer.gemspec +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfb8d067f081a1b7165a024e92ce6d24abcefc4f
|
4
|
+
data.tar.gz: '090fb0f9d81912c3f89f95f03b6569118d0ea0d3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48f23393984863d33b0a00c3ebc87ab60911fde1b148943c32db9da6a52841aba45221c4acc9501c7b45dc114039d78848bc3730f4817d30c2f3f43e32d6d8c0
|
7
|
+
data.tar.gz: 4bb01be08990d2005806aac04f737e7c8b682b8e73428a7964b905fb0cd06f272d2eac95131cd83c9bf228ee90a0d0ad3744bc18e3b7d9a50b7bd7ff2cd97a78
|
data/config/config.yml.example
CHANGED
data/docker-compose.yml
CHANGED
@@ -5,7 +5,8 @@ module SipoMailer
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
def install
|
8
|
-
create_dir
|
8
|
+
create_dir
|
9
|
+
copy_files
|
9
10
|
end
|
10
11
|
|
11
12
|
def create_dir
|
@@ -13,16 +14,31 @@ module SipoMailer
|
|
13
14
|
result == 0
|
14
15
|
end
|
15
16
|
|
16
|
-
def
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
def copy_files
|
18
|
+
copy_file(config_example, CONFIG_FILE)
|
19
|
+
copy_file(book_example, 'adresar.csv')
|
20
|
+
end
|
21
|
+
|
22
|
+
def copy_file(src, dest)
|
23
|
+
return false if File.exist? dest
|
24
|
+
File.open("#{config_dir}/#{dest}", 'w') do |file|
|
25
|
+
source = File.open(src)
|
26
|
+
file.write(source.readlines.join(''))
|
27
|
+
source.close
|
22
28
|
end
|
23
29
|
true
|
24
30
|
end
|
25
31
|
|
32
|
+
def config_example
|
33
|
+
example_path = Gem.bin_path('sipo_mailer', 'mailer').split('/')[0..-3]
|
34
|
+
[example_path, 'config', "#{CONFIG_FILE}.example"].join('/')
|
35
|
+
end
|
36
|
+
|
37
|
+
def book_example
|
38
|
+
example_path = Gem.bin_path('sipo_mailer', 'mailer').split('/')[0..-3]
|
39
|
+
[example_path, 'config', 'adresar.csv.example'].join('/')
|
40
|
+
end
|
41
|
+
|
26
42
|
def config
|
27
43
|
[config_dir, CONFIG_FILE].join('/')
|
28
44
|
end
|
data/sipo_mailer.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.name = 'sipo_mailer'
|
3
|
-
s.version = '0.0.
|
2
|
+
s.name = 'sipo_mailer' # remember to change /Users/landovsky/git/sipo/lib/sipo_mailer/utils/installer.rb:27
|
3
|
+
s.version = '0.0.2'
|
4
4
|
s.summary = 'Command-line aplikace na odesílání souborů jako příloh na email dle CSV adresáře.'
|
5
5
|
s.author = 'Tomáš Landovský'
|
6
6
|
s.email = 'landovsky@gmail.com'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sipo_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomáš Landovský
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- Gemfile.lock
|
124
124
|
- bin/console
|
125
125
|
- bin/mailer
|
126
|
+
- config/adresar.csv.example
|
126
127
|
- config/config.yml.example
|
127
128
|
- docker-compose.yml
|
128
129
|
- lib/sipo_mailer.rb
|