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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f25088f5a97c86be652ed10b3a2ebcc4dc73a0a0
4
- data.tar.gz: bb9ea09f5f929ee5e4a4b72a19e72589a5ac90dd
3
+ metadata.gz: fd3d933afab6a50e60af4b68843682dd96d5319e
4
+ data.tar.gz: 315248e774ddffbaed9ecb88cf3f93278940b1bf
5
5
  SHA512:
6
- metadata.gz: 7fd5880f890d41cf33014f2b92588488b149eb608064087623fd6cd347b318acb16a8707c64818f773ef7e27b73d9f0ba2b2d9b14e4ca903cd9321ef57a92288
7
- data.tar.gz: 9e632e1eb146607736c8052b06d31346a336a02ed7c9e77fd00fa06c1043e14cbd20b3a4cb5d477c1e9f0e39ef1432c39adb657cad520e0d42aecf6dae4f868f
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
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  module HammerCLIImport
21
21
  def self.version
22
- @version ||= Gem::Version.new('0.10.21')
22
+ @version ||= Gem::Version.new('0.10.22')
23
23
  end
24
24
  end
25
25
  # vim: autoindent tabstop=2 shiftwidth=2 expandtab softtabstop=2 filetype=ruby
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.21
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-07-27 00:00:00.000000000 Z
12
+ date: 2015-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hammer_cli