auto_flick 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca240eb7230a10618b917e473fea55e0182de86b
4
- data.tar.gz: c188ee46d072313ded6ffb994a9bfc1534fb3266
3
+ metadata.gz: 4d8c713621cb6650d91d84c67981306e04446d32
4
+ data.tar.gz: 3a03a5b88561263c0ce81fb06e2561ef86eb9a9a
5
5
  SHA512:
6
- metadata.gz: aa9c6274bba04d91241829daac46a312539d30283801e72a8b1747c0deec0bcfca22f782879d80393918237159d74030bb5d6358bb74c1ee40f02d188964c355
7
- data.tar.gz: 3b585c727844bb982fb55d5c0b0fea9334c76b81a556bb7b94d965ae433be80247fb1de968ab60e18038618cd8de8fa6e0c4592e4948d47739403202822b661f
6
+ metadata.gz: 00cc4f42a6273d74507044e5abc6f6f3700bcb725ab5877013ff7c9ea134cd1e5d212aba8f6013c1a83dc6cf53861d8bea23d37628bd17e53c770ea4610588bb
7
+ data.tar.gz: 59dd5cbb39a46ee2cf62215213450acea38dbfbf16fbffa1d4de59417478f36d6fce1358d2f13ab2fe1e09119bf4f521729f60333b8c5138dc0d690d455ead30
data/README.md CHANGED
@@ -44,6 +44,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
44
44
 
45
45
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
46
46
 
47
+ ## Publishing
48
+
49
+ **This is for me to remember**
50
+ update version number.
51
+ `rake install`
52
+ `gem push pkg/auto_flick-0.1.1.gem`
53
+ done.
54
+
47
55
  ## Contributing
48
56
 
49
57
  Bug reports and pull requests are welcome on GitHub at https://github.com/freeslugs/auto_flick. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -23,28 +23,23 @@ module AutoFlick
23
23
 
24
24
  def self.get_key(auth_url, username, password)
25
25
  begin
26
+
26
27
  visit auth_url
27
28
 
28
29
  fill_in('username', :with => username)
29
30
  fill_in('passwd', :with => password)
30
31
  click_button "login-signin"
31
-
32
- visit auth_url
33
-
34
- fill_in('username', :with => username)
35
- fill_in('passwd', :with => password)
36
- click_button "login-signin"
37
-
38
- click_button "OK, I'LL AUTHORIZE IT"
39
32
 
33
+ click_button "OK, I'LL AUTHORIZE IT"
34
+
40
35
  key = find("#Main span").text
41
-
42
- rescue Exception => e
43
- puts e.message
44
- end
45
36
 
46
- page.driver.quit
47
- File.delete("cookies.text")
37
+ rescue Capybara::ElementNotFound => e
38
+ retry
39
+ ensure
40
+ page.driver.quit
41
+ File.delete("cookies.text")
42
+ end
48
43
 
49
44
  return key
50
45
  end
@@ -1,3 +1,3 @@
1
1
  module AutoFlick
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_flick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilad
@@ -113,7 +113,6 @@ files:
113
113
  - auto_flick.gemspec
114
114
  - bin/console
115
115
  - bin/setup
116
- - capybara.rb
117
116
  - lib/auto_flick.rb
118
117
  - lib/auto_flick/api.rb
119
118
  - lib/auto_flick/version.rb
@@ -1,44 +0,0 @@
1
- require 'capybara'
2
- require 'capybara/dsl'
3
- require 'capybara/poltergeist'
4
-
5
- include Capybara::DSL
6
-
7
-
8
- Capybara.register_driver :poltergeist do |app|
9
- Capybara::Poltergeist::Driver.new(app, {
10
- :js_errors => false,
11
- :cookies_enabled => true,
12
- :phantomjs_options => ["--cookies-file=cookies.text"]
13
- })
14
- end
15
-
16
- Capybara.javascript_driver = :poltergeist
17
-
18
- Capybara.configure do |config|
19
- config.run_server = false
20
- config.default_driver = :poltergeist
21
- end
22
-
23
- def get_key(auth_url, username, password)
24
- begin
25
-
26
- visit auth_url
27
-
28
- fill_in('username', :with => username)
29
- fill_in('passwd', :with => password)
30
- click_button "login-signin"
31
-
32
- click_button "OK, I'LL AUTHORIZE IT"
33
-
34
- key = find("#Main span").text
35
-
36
- rescue Capybara::ElementNotFound => e
37
- retry
38
- ensure
39
- page.driver.quit
40
- File.delete("cookies.text")
41
- end
42
-
43
- return key
44
- end