auto_flick 0.1.0 → 0.1.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: d3fa3bb6a9013c238cace3fbaa42939004ccea91
4
- data.tar.gz: 20be05e9a5e503a8bb4a07be8444e89234dc4cfd
3
+ metadata.gz: ca240eb7230a10618b917e473fea55e0182de86b
4
+ data.tar.gz: c188ee46d072313ded6ffb994a9bfc1534fb3266
5
5
  SHA512:
6
- metadata.gz: f00b5f1cf3597b9460ff1db26e33d9a3cece62f6515c2a57c9bb0bd7139c137b0838464add9927c1b727670240de0358a4117f5aa1b720d7fe58d8d943c3d5da
7
- data.tar.gz: 251ec4925706607a1556b0299e08b5ec8fb27e47240c101c19e4f7f7b328515ac38f57e7fad1d2beb0216a118d0285143e5fe04e408e812705ad49d568c3317a
6
+ metadata.gz: aa9c6274bba04d91241829daac46a312539d30283801e72a8b1747c0deec0bcfca22f782879d80393918237159d74030bb5d6358bb74c1ee40f02d188964c355
7
+ data.tar.gz: 3b585c727844bb982fb55d5c0b0fea9334c76b81a556bb7b94d965ae433be80247fb1de968ab60e18038618cd8de8fa6e0c4592e4948d47739403202822b661f
data/README.md CHANGED
@@ -5,7 +5,7 @@ Inspired by kzeng10 and stegastore.
5
5
 
6
6
  ## Installation
7
7
 
8
- Note: This gem uses phantomjs. For mac: `brew install phantomjs`.
8
+ Note: This gem uses phantomjs. `brew install phantomjs` or `npm install phantomjs`.
9
9
 
10
10
  Add this line to your application's Gemfile:
11
11
 
@@ -29,10 +29,10 @@ Configure the gem:
29
29
 
30
30
  ```ruby
31
31
  AutoFlick.config({
32
- username: "my username here"
33
- password: "my password here"
34
- api_key: "my api key here",
35
- shared_secret: "my api secret here"
32
+ username: "my_username_here",
33
+ password: "my_password_here",
34
+ api_key: "my_api_key_here",
35
+ shared_secret: "my_api_secret_here"
36
36
  })
37
37
  ```
38
38
 
@@ -22,28 +22,23 @@ end
22
22
 
23
23
  def get_key(auth_url, username, password)
24
24
  begin
25
+
25
26
  visit auth_url
26
27
 
27
28
  fill_in('username', :with => username)
28
29
  fill_in('passwd', :with => password)
29
30
  click_button "login-signin"
30
-
31
- visit auth_url
32
-
33
- fill_in('username', :with => username)
34
- fill_in('passwd', :with => password)
35
- click_button "login-signin"
36
-
37
- click_button "OK, I'LL AUTHORIZE IT"
38
31
 
32
+ click_button "OK, I'LL AUTHORIZE IT"
33
+
39
34
  key = find("#Main span").text
40
-
41
- rescue Exception => e
42
- puts e.message
43
- end
44
35
 
45
- page.driver.quit
46
- File.delete("cookies.text")
36
+ rescue Capybara::ElementNotFound => e
37
+ retry
38
+ ensure
39
+ page.driver.quit
40
+ File.delete("cookies.text")
41
+ end
47
42
 
48
43
  return key
49
44
  end
@@ -24,7 +24,7 @@ module AutoFlick
24
24
  token = flickr.get_request_token
25
25
  auth_url = flickr.get_authorize_url(token['oauth_token'], :perms => 'write')
26
26
  verify = Api.get_key(auth_url, @username, @password)
27
-
27
+
28
28
  begin
29
29
  flickr.get_access_token(token['oauth_token'], token['oauth_token_secret'], verify)
30
30
  login = flickr.test.login
@@ -1,3 +1,3 @@
1
1
  module AutoFlick
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_flick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-22 00:00:00.000000000 Z
11
+ date: 2016-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara