gphotos 0.1.3 → 0.1.3.1

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: ebeab76559bd4ed56947ad1117d3e208764625e8
4
- data.tar.gz: ccf6ae3c3950723f4d03a0eee00e88fade105668
3
+ metadata.gz: 19226640730b873ce5e17db8e28d507a20ca1274
4
+ data.tar.gz: d041c96e32325de55653fe05dbb99c6c8b0a740f
5
5
  SHA512:
6
- metadata.gz: 48342084ba713b7efa7f736a64e71ac4ecfe12668ac24675f2c7de7aa6173b684ac8750c8ac2924c36c4174ffba6f40c50de3a2cfbdca70830c0e5f2cfca83ea
7
- data.tar.gz: 916aa16a1d812bee7792c8ad87b04b975fb47d46ad9ff507773c3290efbf65fbc1022c954e95f01deb1a92b8f3a581a148a789d25315bdf28d9e5649687ff7af
6
+ metadata.gz: 16c7277fdf15f3a3449941989328bc7901fe025650ff81cbe591503f0af80dc9fd11a8ec8bf8bff857e928d8bb3367f339124048f142c3fa2533ed52f897441c
7
+ data.tar.gz: 8bb65b9957220f5e14763d19df86db9235bf4733f71e299202722d0d140f454f57814191bc7ae660e460b1f623dd6beb283a68d1384520e3d80b973112372d2f
data/README.md CHANGED
@@ -41,14 +41,12 @@ Example:
41
41
 
42
42
  $ gphotos -e foo@gmail.com -p bar /path/to/image.jpg /path/to/video.mp4
43
43
 
44
- upload:
44
+ upload(2):
45
45
  /path/to/image.jpg
46
46
  /path/to/video.mp4
47
47
 
48
48
  done:
49
49
  2 uploaded
50
- 0 skipped
51
- 0 not exist
52
50
 
53
51
  Set email and password in config file, `~/.gphotos/config.yml`:
54
52
 
@@ -77,7 +77,7 @@ module Gphotos
77
77
 
78
78
  gphotos = Gphotos.new(@options.email, @options.passwd, @options.passwd_exec)
79
79
 
80
- puts 'upload:'
80
+ puts "upload(#{files.size}):"
81
81
  uploaded, skipped, not_exist = gphotos.upload(files) do |file, status|
82
82
  case status
83
83
  when :uploading
@@ -104,8 +104,8 @@ module Gphotos
104
104
  puts
105
105
  puts 'done:'
106
106
  puts "#{uploaded.size} uploaded"
107
- puts "#{skipped.size} skipped"
108
- puts "#{not_exist.size} not exist"
107
+ puts "#{skipped.size} skipped" if skipped.size > 0
108
+ puts "#{not_exist.size} not exist" if not_exist.size > 0
109
109
 
110
110
  gphotos.quit
111
111
  end
@@ -1,5 +1,4 @@
1
1
  require 'selenium-webdriver'
2
- require 'yaml'
3
2
 
4
3
  module Gphotos
5
4
  class Gphotos
@@ -10,7 +9,7 @@ module Gphotos
10
9
  prefs = {"profile" => {"managed_default_content_settings" => {"images" => 2}}}
11
10
  @driver = Selenium::WebDriver.for(:chrome, :args => ["--user-data-dir=#{user_data_dir}"], :prefs => prefs)
12
11
  @driver.manage.timeouts.implicit_wait = options[:page_timeout]
13
- @wait = Selenium::WebDriver::Wait.new(:timeout => options[:upload_timeout])
12
+ @wait_upload = Selenium::WebDriver::Wait.new(:timeout => options[:upload_timeout])
14
13
  @workaround_applied = false
15
14
  login(email, passwd, passwd_exec)
16
15
  end
@@ -59,7 +58,7 @@ module Gphotos
59
58
  end
60
59
  current_result = ''
61
60
  element.send_keys(full_path)
62
- @wait.until do
61
+ @wait_upload.until do
63
62
  alert = @driver.find_element(:css => 'div[role="alert"]')
64
63
  begin
65
64
  current_result = alert.attribute('innerText')
@@ -1,3 +1,3 @@
1
1
  module Gphotos
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gphotos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zhong Jianxin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler