origen 0.6.3 → 0.6.4
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/version.rb +1 -1
- data/lib/origen/application.rb +44 -0
- data/lib/origen/application/release.rb +1 -1
- data/lib/origen/users/user.rb +11 -3
- data/lib/origen/utility/mailer.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a6f307efbb9972715b248f12bc59f2edd3f8432
|
4
|
+
data.tar.gz: f033097d7efbd060767547b8c456a76d24bd7374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd7f4c1e713696f2cbd322cf912ad1b6e90adc16f08a70620ee0008ca2eca60c6d2cb02039d23981003dd856a318e36756a71de4bee7ab6734bfa21afdc5f58
|
7
|
+
data.tar.gz: e59b86bafdea83a70a17f4fedaf194fe118de3f433a82cc2fb8ffb8070fc7b1614fd6fe196bb8fb633ad6c24d3a85cab9c7c2cba3396cf76ddec37b50ddcf0a8
|
data/config/version.rb
CHANGED
data/lib/origen/application.rb
CHANGED
@@ -176,6 +176,50 @@ module Origen
|
|
176
176
|
@namespace ||= self.class.to_s.split('::').first.gsub('_', '').sub('Application', '')
|
177
177
|
end
|
178
178
|
|
179
|
+
# Returns array of email addresses in the DEV maillist file
|
180
|
+
def maillist_dev
|
181
|
+
maillist_parse(maillist_dev_file)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns array of email addresses in the PROD maillist file
|
185
|
+
def maillist_prod
|
186
|
+
maillist_parse(maillist_prod_file)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns default location of DEV maillist file (customize locally if needed)
|
190
|
+
def maillist_dev_file
|
191
|
+
Origen.app.root.to_s + '/config/maillist_dev.txt'
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns default location of PROD maillist file (customize locally if needed)
|
195
|
+
def maillist_prod_file
|
196
|
+
Origen.app.root.to_s + '/config/maillist_prod.txt'
|
197
|
+
end
|
198
|
+
|
199
|
+
# Parses maillist file and returns an array of email address
|
200
|
+
def maillist_parse(file)
|
201
|
+
maillist = []
|
202
|
+
|
203
|
+
# if file doesn't exist, just return empty array, otherwise, parse for emails
|
204
|
+
if File.exist?(file)
|
205
|
+
File.readlines(file).each do |line|
|
206
|
+
if index = (line =~ /\#/)
|
207
|
+
# line contains some kind of comment
|
208
|
+
# check if there is any useful info, ignore it not
|
209
|
+
unless line[0, index].strip.empty?
|
210
|
+
maillist << Origen::Users::User.new(line[0, index].strip).email
|
211
|
+
end
|
212
|
+
else
|
213
|
+
# if line is not empty, generate an email
|
214
|
+
unless line.strip.empty?
|
215
|
+
maillist << Origen::Users::User.new(line.strip).email
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
maillist
|
221
|
+
end
|
222
|
+
|
179
223
|
# Returns an array of users who have subscribed for production release
|
180
224
|
# notifications for the given application on the website
|
181
225
|
def subscribers_prod
|
@@ -76,7 +76,7 @@ Your workspace has local modifications that are preventing the requested action
|
|
76
76
|
Origen.app.listeners_for(:after_release_tag).each do |listener|
|
77
77
|
listener.after_release_tag(tag, note, type, selector, options)
|
78
78
|
end
|
79
|
-
|
79
|
+
@mailer.send_release_notice(tag, note, type, selector) unless options[:silent]
|
80
80
|
Origen.app.listeners_for(:after_release_email).each do |listener|
|
81
81
|
listener.after_release_email(tag, note, type, selector, options)
|
82
82
|
end
|
data/lib/origen/users/user.rb
CHANGED
@@ -74,9 +74,17 @@ module Origen
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def email
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
if current?
|
78
|
+
@email ||= ENV['ORIGEN_EMAIL'] || email_from_rc || begin
|
79
|
+
if Origen.site_config.email_domain
|
80
|
+
"#{id}@#{Origen.site_config.email_domain}"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
else
|
84
|
+
@email ||= begin
|
85
|
+
if Origen.site_config.email_domain
|
86
|
+
"#{id}@#{Origen.site_config.email_domain}"
|
87
|
+
end
|
80
88
|
end
|
81
89
|
end
|
82
90
|
end
|
@@ -82,14 +82,14 @@ or a member of the development team.
|
|
82
82
|
END3
|
83
83
|
|
84
84
|
if external?(type)
|
85
|
-
to =
|
85
|
+
to = Origen.app.maillist_prod + Origen.app.maillist_dev
|
86
86
|
if config.release_email_subject
|
87
87
|
subject = "[#{Origen.app.namespace}] New Official Release: #{config.release_email_subject}"
|
88
88
|
else
|
89
89
|
subject = "[#{Origen.app.namespace}] New Official Release"
|
90
90
|
end
|
91
91
|
else
|
92
|
-
to =
|
92
|
+
to = Origen.app.maillist_dev
|
93
93
|
if config.release_email_subject
|
94
94
|
subject = "[#{Origen.app.namespace}] New Development Tag: #{config.release_email_subject}"
|
95
95
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|