phoseum-cli 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/phoseum-cli +9 -10
  3. metadata +2 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79b0cc59910f35dcbdd5a260cb32aae60678cc168e2adeb45a6ecee9f4cbd34a
4
- data.tar.gz: 57538eade56ae69d9fe3e093032265914d557dbe9fd7fa0eac17af22e478e670
3
+ metadata.gz: dcb29425ea8aa603aa478db7af70a3606f0db955c74a3f333299a6c95cebd8a6
4
+ data.tar.gz: 3c1f78e8aaa4990a24c2296402566cb20f1790570fac5addf7f49df462a01c99
5
5
  SHA512:
6
- metadata.gz: 9e23015f5dbef4a6e07fef4ba1fb77fcd7b9431fa23349d592edd97b4eca56971b891a82623dc4fd56cc3771907e3f33becae531c1d23c1747add6ccc8e886a6
7
- data.tar.gz: eb073ffac401ca46c43bf93166db6ae6f59d3c43508bf0bdbbd87636e432e4c948100cdc858c8ae24cd5285eeddb215b0752c1ef758f1560b7edb5e786d7c207
6
+ metadata.gz: 6588d392a9a9baa63f1ee78148c18f32748706d0828a8c4746f9b29edc6016355c19d5d4ec60687f2da690841a18209ac151239d9ab1969fb69a5f3c1f4fac6d
7
+ data.tar.gz: 2397bdeb3ca17ac719d805d19b3c215a6849340baf1ef7bb0ac4aa0ac1bc487fd3bc50e16bf0f98e6e074f6de1bd5c964d23b877c7811feb1ac19c29cfbfecb0
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/ruby
2
+ # encoding: UTF-8
2
3
 
3
4
  require "phoseum/phoseum-common-lib"
4
5
  $config = load_config('cli')
@@ -7,7 +8,6 @@ require "phoseum/phoseum-cli-lib"
7
8
  load_gem('uri')
8
9
  load_gem('json')
9
10
  load_gem('date')
10
- load_gem('nokogiri')
11
11
  load_gem('mini_magick')
12
12
 
13
13
  require 'optparse'
@@ -98,8 +98,8 @@ def upload(album)
98
98
  error += 1
99
99
  end
100
100
  rescue
101
- puts "Error on Server".red if $DEBUG
102
- puts Nokogiri::HTML(response.body).text
101
+ puts "The server sent out an Error:".red
102
+ puts clean_html(response.body)
103
103
  exit 1
104
104
  end
105
105
 
@@ -168,7 +168,6 @@ def health(what='',name='')
168
168
  end
169
169
  begin
170
170
  list = JSON.parse(response.body)
171
- # puts list
172
171
  if list['error']
173
172
  puts list['error'].red
174
173
  exit 1
@@ -177,8 +176,8 @@ def health(what='',name='')
177
176
  data=list['success']
178
177
  end
179
178
  rescue
180
- puts "Error on Login".red if $DEBUG
181
- puts Nokogiri::HTML(response.body).text
179
+ puts "The server sent out an Error:".red
180
+ puts clean_html(response.body)
182
181
  exit 1
183
182
  end
184
183
 
@@ -237,7 +236,6 @@ def user_mgmt(action,user,pass='',role='')
237
236
  end
238
237
  begin
239
238
  list = JSON.parse(response.body)
240
- # puts list
241
239
  if list['error']
242
240
  puts list['error'].red
243
241
  exit 1
@@ -247,8 +245,8 @@ def user_mgmt(action,user,pass='',role='')
247
245
  puts data
248
246
  end
249
247
  rescue
250
- puts "Error on Login".red if $DEBUG
251
- puts Nokogiri::HTML(response.body).text
248
+ puts "Error on Login".red
249
+ puts clean_html(response.body)
252
250
  end
253
251
  exit 0
254
252
  end
@@ -303,7 +301,8 @@ def user_login()
303
301
  return list['token']
304
302
  end
305
303
  rescue
306
- puts Nokogiri::HTML(response.body).text
304
+ puts "The server sent out an Error:".red
305
+ puts clean_html(response.body)
307
306
  return false
308
307
  end
309
308
  return false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phoseum-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julio C Hegedus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-02 00:00:00.000000000 Z
11
+ date: 2020-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yaml
@@ -90,26 +90,6 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 3.0.0
93
- - !ruby/object:Gem::Dependency
94
- name: nokogiri
95
- requirement: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '1.10'
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: 1.10.10
103
- type: :runtime
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '1.10'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 1.10.10
113
93
  - !ruby/object:Gem::Dependency
114
94
  name: mini_magick
115
95
  requirement: !ruby/object:Gem::Requirement