painful_translate 0.0.1 → 0.0.2

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: 44f5d2c3c54932871779c0b79fbdcae8bef88760
4
- data.tar.gz: edd3d9871e10014f3271c25f7d95a9658a47a702
3
+ metadata.gz: c42b3128f72197baf674d64d54a3edbc9a1ecdf5
4
+ data.tar.gz: e9127b42d7976eec55a8b63446e1fb284b60d843
5
5
  SHA512:
6
- metadata.gz: ca74514e7b953fd5f4497e065db8fabafd9aef2119a2955f43582c722fef734312a774a41e1b31e32ba561bbf5d64f82c244c4135adbad138a1b8641b98f8d1d
7
- data.tar.gz: 491b1727a7fbfa9eee64dc16c3fd315c22b26bbb5f2357c4b5c87177ac3ef66e388bebfc800805ca618c2be8c798912e7b3eb57f9714563ff9df86510fde90e8
6
+ metadata.gz: 7de36b3b486301ac602215e8cadde9088474856f7d549f1f116134eb23607afd565d9bf074f38c7c1e7a5a70dd72678a73efe2ab4371e719dc05d863cc97ce1f
7
+ data.tar.gz: 101702960a01d027674e691b4a3eca9daee6c8a0ce49fbe1bbc5a7b771dc7008f124df09eec7c1d0194fb3353b6126fca034c8971a47ef796a54f77ba6532248
data/README.md CHANGED
@@ -53,7 +53,7 @@ This gem will open up selenium via capybara which, for most of you, will mean it
53
53
 
54
54
  I suggest this thing be used to make seed files and whatnot for nascent rails projects, and not actively in production.
55
55
 
56
- Also, for performance reasons, one and only one selenium session is initialized by this code. So the session will just sort of stick around until your ruby program exist.
56
+ Because the scumbag engineers at Google are getting smart with users rapidly hitting their translate site, we now refresh the session each time and sleep 3 seconds for the page to load. Go grab a drink while you wait.
57
57
 
58
58
  ---
59
59
 
@@ -4,7 +4,7 @@ class PainfulTranslate::Client
4
4
 
5
5
  class << self
6
6
  def instance
7
- @instance ||= new
7
+ new
8
8
  end
9
9
  end
10
10
 
@@ -4,6 +4,7 @@ class PainfulTranslate::TranslationPage
4
4
  @session = session
5
5
  end
6
6
  def translation_output_strings
7
+ sleep 2.seconds # give some time for Jewgle to look the page
7
8
  session.find(:xpath, '//*[@id="result_box"]').all(:css, 'span.hps').map(&:text)
8
9
  end
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module PainfulTranslate
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: painful_translate
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
  - Thomas Chen