hammer_cli_import 0.10.21 → 0.10.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_import/configfile.rb +9 -0
- data/lib/hammer_cli_import/version.rb +1 -1
- 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: fd3d933afab6a50e60af4b68843682dd96d5319e
|
4
|
+
data.tar.gz: 315248e774ddffbaed9ecb88cf3f93278940b1bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a2ce56ba645f8a5fc738aebcd86cac01b3e787f51bd0c58699e14c038d6e380d916af7d476faae27de386fe987e2102517d428587f5420be8466c45b97faa04
|
7
|
+
data.tar.gz: d4e246366c12b7064afda69b35eb0e7b81e51617ac832d53682688826c9a3cfb80678674129b15ac67d412b79965e4701dab15c5ae5bb032115546adc763547c
|
@@ -86,6 +86,9 @@ module HammerCLIImport
|
|
86
86
|
owning_org = lookup_entity_in_cache(:organizations,
|
87
87
|
{'id' => get_translated_id(:organizations, data['org_id'].to_i)})
|
88
88
|
org_name = owning_org['name'].gsub(/[^0-9a-zA-Z]*/, '').downcase
|
89
|
+
if org_name.empty?
|
90
|
+
org_name = 'orgid' + owning_org['id'].to_s
|
91
|
+
end
|
89
92
|
chan_name = data['channel'].gsub(/[^0-9a-zA-Z_]/, '_').downcase
|
90
93
|
return org_name + '-' + chan_name
|
91
94
|
end
|
@@ -194,6 +197,12 @@ module HammerCLIImport
|
|
194
197
|
# Everybody gets a name, which is 'path' with '/' chgd to '_'
|
195
198
|
data['name'] = data['path'].gsub('/', '_')
|
196
199
|
|
200
|
+
# UTF8 names are Issues, for Pulp - downgrade
|
201
|
+
data['name'] = data['name'].gsub(/[^0-9a-zA-Z+\-\.]*/, '')
|
202
|
+
if data['name'].empty?
|
203
|
+
data['name'] = 'file_id' + data['file_id']
|
204
|
+
end
|
205
|
+
|
197
206
|
# If we're not type='file', done - return data
|
198
207
|
return data unless data['file_type'] == 'file'
|
199
208
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "@mkollar"
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hammer_cli
|