henry-container 0.1.24 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- checksums.yaml.gz.asc +11 -0
- data/.gitignore +2 -2
- data/bin/release.sh +1 -1
- data/lib/henry/container/version.rb +1 -1
- data/lib/henry/email_client.rb +15 -9
- data/spec/lib/henry/email_client_spec.rb +61 -0
- data/spec/lib/henry/input_spec.rb +77 -0
- data/spec/support/files/email.file +0 -0
- data/spec/support/spec_helper.rb +1 -0
- data.tar.gz.asc +11 -0
- metadata +13 -27
- metadata.gz.asc +11 -0
- data/spec/minitest_task_spec.rb +0 -30
- data/spec/task/minitest_test_task.rb +0 -23
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZDMyMjJmMjUyMGExYWQ0ZmFkNWQzM2VhMDNkNjZhNzRiODQ1MDI2Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTEzYWY0MDJjM2E3ZGJjYzczYTBhY2QxYzg2ZTJlMTM3ZGEwOGZjZg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OGFhOWQwNGEwMDNiZmEwZGM4NGJiNDdkMzNkMGY4YTE2YWQxN2Q5ZmM4OGUx
|
10
|
+
MjllMTI4ZjA2NTQ3ZjMzY2RhYTM3ODNhNTdiMmZmOGU4MTJmZWI0YWUzMGNm
|
11
|
+
YzFjZTM1OWZmOTVkMWU3NTliOTY1Yzc3Njk5NDE5OTNmNmU3MjQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NzA1ZDMyMDFjZDFlOTEwZDBmNTgxMjI5NDljM2I3OWRmZGM0NjMyYTNjMjQ4
|
14
|
+
MWI2NGEwM2RhMzkzMmM0ZDk2ODg3ZGY0MTJlZDcwMWVkNzZiNjU1YWJmMGQ1
|
15
|
+
MmE4MGRiOTZlZDFiYWQzZGEyOWYwNTk5ZThiNDY5MjEzNDdkYjM=
|
checksums.yaml.gz.asc
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
-----BEGIN PGP SIGNATURE-----
|
2
|
+
Version: GnuPG v1.4.11 (GNU/Linux)
|
3
|
+
|
4
|
+
iQEcBAABAgAGBQJRP24aAAoJEHEygQkPTV7SQPkH/Rb2Qjktq9PudV5ty3g7LJJ2
|
5
|
+
wgQ+4maRR1U06Ej6ysHEyU3OFzMNv5lb81BvF6dtzny32qGYkKLO8oa0kFylmiQU
|
6
|
+
hMgfque4f9gjhpRIsO3buOGPrWiPx1fZXL4xjVzS9SZ0fGcMUAZe4b4C7SA4UP4h
|
7
|
+
5MibbPr05E2iwZmyi5Ea9rH0U20VTkHrHfy6q3rr9Q9wcKusE4ibh4srqU/k30hv
|
8
|
+
W5c0ZCV4J2bbS3GRKXkxtcD2TMhDP0c/nzojfXs+xDWTX975BfubPNic5f2Vswpa
|
9
|
+
YaNf/p530877SmMNTNRH1xI1cuvCtv5As3/OL5kiNoRnaEt4rkcfYxACtNgi47k=
|
10
|
+
=1c9R
|
11
|
+
-----END PGP SIGNATURE-----
|
data/.gitignore
CHANGED
data/bin/release.sh
CHANGED
data/lib/henry/email_client.rb
CHANGED
@@ -6,24 +6,30 @@ module Henry
|
|
6
6
|
class EmailClient
|
7
7
|
|
8
8
|
Mail.defaults do
|
9
|
-
delivery_method :smtp,
|
9
|
+
delivery_method :smtp,
|
10
|
+
address: 'smtp.gmail.com',
|
11
|
+
port: '587',
|
12
|
+
user_name: 'henry.despegar.reports@gmail.com',
|
13
|
+
password: 'henrydespegarreports',
|
14
|
+
authentication: :plain,
|
15
|
+
enable_starttls_auto: true
|
10
16
|
end
|
11
17
|
|
12
18
|
def self.send_file(file_path, recipients, subject='')
|
13
19
|
Mail.deliver do
|
14
|
-
from
|
15
|
-
bcc
|
16
|
-
subject
|
17
|
-
add_file
|
20
|
+
from 'Henry Reports <henry.despegar.reports@gmail.com>'
|
21
|
+
bcc recipients.join(',')
|
22
|
+
subject subject
|
23
|
+
add_file file_path
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
21
27
|
def self.send_message(message, recipients, subject='')
|
22
28
|
Mail.deliver do
|
23
|
-
from
|
24
|
-
bcc
|
25
|
-
subject
|
26
|
-
body
|
29
|
+
from 'Henry Reports <henry.despegar.reports@gmail.com>'
|
30
|
+
bcc recipients.join(',')
|
31
|
+
subject subject
|
32
|
+
body message
|
27
33
|
end
|
28
34
|
end
|
29
35
|
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require_relative '../../support/spec_helper'
|
2
|
+
|
3
|
+
describe Henry::EmailClient do
|
4
|
+
|
5
|
+
describe 'on requirement' do
|
6
|
+
|
7
|
+
let :mail_settings do
|
8
|
+
Mail::Configuration.instance.delivery_method.settings
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should set the Mail::Configuration instance params' do
|
12
|
+
mail_settings.should == {:address=>"smtp.gmail.com", :port=>"587", :domain=>"localhost.localdomain", :user_name=>"henry.despegar.reports@gmail.com", :password=>"henrydespegarreports", :authentication=>:plain, :enable_starttls_auto=>true, :openssl_verify_mode=>nil, :ssl=>nil, :tls=>nil}
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '#send_file' do
|
18
|
+
|
19
|
+
describe 'with subject' do
|
20
|
+
|
21
|
+
it 'should send the email successfully' do
|
22
|
+
Mail.should_receive :deliver
|
23
|
+
Henry::EmailClient.send_file('./spec/support/files/email.file', ['void@henry.com'], 'Test Subject')
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'without subject' do
|
29
|
+
|
30
|
+
it 'should send the email successfully' do
|
31
|
+
Mail.should_receive :deliver
|
32
|
+
Henry::EmailClient.send_file('./spec/support/files/email.file', ['void@henry.com'])
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '#send_message' do
|
40
|
+
|
41
|
+
describe 'with subject' do
|
42
|
+
|
43
|
+
it 'should send the email successfully' do
|
44
|
+
Mail.should_receive :deliver
|
45
|
+
Henry::EmailClient.send_file('Test Message', ['void@henry.com'], 'Test Subject')
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
describe 'without subject' do
|
51
|
+
|
52
|
+
it 'should send the email successfully' do
|
53
|
+
Mail.should_receive :deliver
|
54
|
+
Henry::EmailClient.send_file('Test Message', ['void@henry.com'])
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require_relative '../../support/spec_helper'
|
2
|
+
|
3
|
+
describe Henry::Input do
|
4
|
+
|
5
|
+
describe '#export!' do
|
6
|
+
|
7
|
+
let :params do
|
8
|
+
{test:'this'}
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should set the Input::EXPORT_KEY' do
|
12
|
+
Henry::Input.export! params
|
13
|
+
|
14
|
+
ENV[Henry::Input::EXPORT_KEY].should == '{"test":"this"}'
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'for an instance' do
|
18
|
+
|
19
|
+
let :input do
|
20
|
+
Henry::Input.new({test:"this instance"})
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should set the Input::EXPORT_KEY' do
|
24
|
+
input.export!
|
25
|
+
|
26
|
+
ENV[Henry::Input::EXPORT_KEY].should == '{"test":"this instance"}'
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#import!' do
|
34
|
+
|
35
|
+
describe 'when Input::EXPORT_KEY is set' do
|
36
|
+
|
37
|
+
it 'should import the Input::EXPORT_KEY as hash' do
|
38
|
+
ENV[Henry::Input::EXPORT_KEY] = '{"test":"that"}'
|
39
|
+
|
40
|
+
Henry::Input.import!.params.should == {"test"=>"that"}
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'when Input::EXPORT_KEY is not set' do
|
46
|
+
|
47
|
+
it 'should import the Input::EXPORT_KEY as hash' do
|
48
|
+
ENV[Henry::Input::EXPORT_KEY] = nil
|
49
|
+
|
50
|
+
Henry::Input.import!.params.should == {}
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'for an instance' do
|
56
|
+
|
57
|
+
describe 'when Input::EXPORT_KEY is not set' do
|
58
|
+
|
59
|
+
let :input do
|
60
|
+
Henry::Input.new
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'should import the Input::EXPORT_KEY as hash' do
|
64
|
+
ENV[Henry::Input::EXPORT_KEY] = nil
|
65
|
+
|
66
|
+
input.should_receive(:warn).with("Could not load the execution params.\nAre you running this Task via the henry-ruby-container? You should!".red)
|
67
|
+
|
68
|
+
input.import!
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative '../../lib/henry'
|
data.tar.gz.asc
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
-----BEGIN PGP SIGNATURE-----
|
2
|
+
Version: GnuPG v1.4.11 (GNU/Linux)
|
3
|
+
|
4
|
+
iQEcBAABAgAGBQJRP24aAAoJEHEygQkPTV7S/LEIAKcUQkwxc2cQtPLhLsdDxeol
|
5
|
+
SF6CUoMLuEEJZH+SgkYz/nWbcxmYX4ubFGF8zLroZZWqwvOzY4Q4SnCS8PJIXf6i
|
6
|
+
VBDZrIlM4g2bpci36/yEgjl1hicyKZH1cTovhbMMcf+6SSickU105Lgkg2BuiXGn
|
7
|
+
FDOI2rVyhaQVqVBuBN8KHwq3Iy2J9oHnMXAjixEnqWtHNhPlU6HRflumrGLLvz1U
|
8
|
+
5PCU+TG8EKPpM/J2tWFmx682Erewx4A2u/iy0Kjz6WOzS+GwEZIr7ql7NRkviaPY
|
9
|
+
kX0Fs+p0nI9Cju6e9dYK5QAVOQTIN6MjMSPnd0GZi00LqIynMk0qb9MfZj4nxv4=
|
10
|
+
=zczb
|
11
|
+
-----END PGP SIGNATURE-----
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: henry-container
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.26
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Roberto Decurnex
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: cucumber
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: minitest-reporters
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: colorize
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: trollop
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ! '>='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ! '>='
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: mail
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ! '>='
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,7 +104,6 @@ dependencies:
|
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - ! '>='
|
124
109
|
- !ruby/object:Gem::Version
|
@@ -126,7 +111,6 @@ dependencies:
|
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: yard
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
115
|
- - ! '>='
|
132
116
|
- !ruby/object:Gem::Version
|
@@ -134,7 +118,6 @@ dependencies:
|
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
122
|
- - ! '>='
|
140
123
|
- !ruby/object:Gem::Version
|
@@ -169,33 +152,36 @@ files:
|
|
169
152
|
- lib/henry/task/minitest_task.rb
|
170
153
|
- lib/henry/task/rake_task.rb
|
171
154
|
- lib/henry/task/rspec_task.rb
|
172
|
-
- spec/
|
173
|
-
- spec/
|
155
|
+
- spec/lib/henry/email_client_spec.rb
|
156
|
+
- spec/lib/henry/input_spec.rb
|
157
|
+
- spec/support/files/email.file
|
158
|
+
- spec/support/spec_helper.rb
|
174
159
|
homepage: http://henry.despegar.it
|
175
160
|
licenses: []
|
161
|
+
metadata: {}
|
176
162
|
post_install_message:
|
177
163
|
rdoc_options: []
|
178
164
|
require_paths:
|
179
165
|
- lib
|
180
166
|
required_ruby_version: !ruby/object:Gem::Requirement
|
181
|
-
none: false
|
182
167
|
requirements:
|
183
168
|
- - ! '>='
|
184
169
|
- !ruby/object:Gem::Version
|
185
170
|
version: '0'
|
186
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
|
-
none: false
|
188
172
|
requirements:
|
189
173
|
- - ! '>='
|
190
174
|
- !ruby/object:Gem::Version
|
191
175
|
version: '0'
|
192
176
|
requirements: []
|
193
177
|
rubyforge_project:
|
194
|
-
rubygems_version:
|
178
|
+
rubygems_version: 2.0.3
|
195
179
|
signing_key:
|
196
|
-
specification_version:
|
180
|
+
specification_version: 4
|
197
181
|
summary: The Ruby Container for Henry
|
198
182
|
test_files:
|
199
|
-
- spec/
|
200
|
-
- spec/
|
183
|
+
- spec/lib/henry/email_client_spec.rb
|
184
|
+
- spec/lib/henry/input_spec.rb
|
185
|
+
- spec/support/files/email.file
|
186
|
+
- spec/support/spec_helper.rb
|
201
187
|
has_rdoc:
|
metadata.gz.asc
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
-----BEGIN PGP SIGNATURE-----
|
2
|
+
Version: GnuPG v1.4.11 (GNU/Linux)
|
3
|
+
|
4
|
+
iQEcBAABAgAGBQJRP24aAAoJEHEygQkPTV7S3sQH/jsG5Wxl/5OwZs5lXwvf5OlF
|
5
|
+
kFAxq5HMsQVv2xM1Hx5pQKajy9mQLSqX/Uhg64KmOH1k85kZIT8eLGJPxX+T4I1I
|
6
|
+
HxAGyXBBRJdTwsGpzfkMBpdtkJJ5KJUK4DbTZKfMY/gTY8mnvaX4E77tcNi1Q0mW
|
7
|
+
iVK9uir/nT7z+FCJ5BRPW+jgKba2EkiOL1zx/p4DFsLclUl84IQb3i4vgluUsqWR
|
8
|
+
bF6iKnJZfTBptxNReHmPA56HwbhpJUBeq4IuhoLiV8GDsVw73mzSgYqAVo4S9Lic
|
9
|
+
wZJuJnWfDkJjPbqxoXXoB7tOOBkbVLRmSgsj2WqahU5Web9ZUHFBG44o4Qvhtsk=
|
10
|
+
=P4Tf
|
11
|
+
-----END PGP SIGNATURE-----
|
data/spec/minitest_task_spec.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'minitest/pride'
|
3
|
-
require 'henry'
|
4
|
-
require 'henry/task/minitest_task'
|
5
|
-
|
6
|
-
describe Henry::Task::MiniTestTask do
|
7
|
-
|
8
|
-
before do
|
9
|
-
@task = Henry::Task.create('name', {'class_name' => "Henry::Task::MiniTestTask"})
|
10
|
-
@task.configure({'pattern' => 'spec/task/*'})
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "MiniTest Task" do
|
14
|
-
|
15
|
-
describe "#execute" do
|
16
|
-
|
17
|
-
before do
|
18
|
-
@task.execute
|
19
|
-
@output_path = Henry::Task::MiniTestTask::OUT_PATH
|
20
|
-
end
|
21
|
-
|
22
|
-
it "must log something" do
|
23
|
-
File.open(@output_path).read.wont_be_empty
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
describe 'This is a Henry MiniTest Task test' do
|
2
|
-
|
3
|
-
it 'must be true' do
|
4
|
-
true.must_equal true
|
5
|
-
end
|
6
|
-
|
7
|
-
describe 'another spec' do
|
8
|
-
|
9
|
-
it 'should be true' do
|
10
|
-
true.must_equal true
|
11
|
-
end
|
12
|
-
|
13
|
-
describe 'another spec inside the other spec' do
|
14
|
-
|
15
|
-
it 'should be false' do
|
16
|
-
false.must_equal true
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|