Is it possible to facebook connect using Capybara-webkit driver?
All the examples I see on the Web are using the "within_window" method (like this one: https://gist.github.com/1187574) which is currently not supported by Capybara-webkit.
Thank you.
I also found only "within_window" examples, but after some more research I found a quite recent pull request on the capybara-webkit repo that solves that issue and adds support for within_window to the capybara-webkit gem
Probably the best way to go is to fetch the gem from Github instead of rubygems.
gem "capybara-webkit", git: "https://github.com/thoughtbot/capybara-webkit.git"
Let me know if it works. I haven't really tested out.
Related
I want to create a rails application that can create facebooks ads automatically. So I need to use the Facebook Marketing Api.
It seems that there are a lot of ressources for the Graph Api but I didn't find simple ressources for the Marketing Api. I only found Php and Python on Facebook website.
I found some rails gems but there is no documentation and they don't seem to be well updated.
https://github.com/oguzcanhuner/eucalyptus
https://github.com/moviepilot/zuck
I'm not a confirmed developper and I need some help/ressources to start this.
How am i supposed to do that ? Is there someone who managed to do it ? or someone that used these gems ?
Any help is appreciated, thank you in advance !
Facebook has released their in house/official facebookads gem last month to facilitate application development for Facebook Ads API using Ruby.
You can see the complete documentation for the same here.
facebookads gem covers all features in more detail as compared to the earlier gem facebook_ads.
I will suggest you go for official facebookads gem as it is just released, code quality and feature coverage is better and ofcourse it being official gem will have better support.
The best thing is facebook also have released exact same sdk in other languages also(for python), so it makes it very easy if you have build exact same functionality in some other language or if you are porting your application from some other language. In my case i am porting from python to ruby and found that both the sdk's allow using Facebook Ads API in exactly similar fashion and even project structure is also exactly the same :)
Hope it helps!
You can use the facebook_ads gem:
gem install facebook_ads
Or
gem 'facebook_ads', '~> 0.1'
The documentation is available here.
Thanks to the gem https://github.com/ambethia/recaptcha/ (version 0.3.6), I managed to integrate Google Recaptcha into my rails app. The problem is that only the old version (V1) is displayed, similar to below.
However, I would prefer to the newer version with the checkbox like below, which is much easier for the users. Any idea how to get there?
There is some discussion about this, see: https://github.com/ambethia/recaptcha/issues/112
You are free to implement the new API by yourself it's not that hard actually, and if you have the knowledge submit a pull request to the original repository with a working solution :-)
The instructions on how to implement reCaptcha can be found here: http://www.google.com/recaptcha/intro/index.html
i want to give request and get xml response so i'm using savon gem
i am facing problem with savon gem.
i tried version 3 and 2.2
with version 3 i face this problem https://stackoverflow.com/questions/20331827/savon-gem-not-getting-xml-response
with version 2.2 i face error unable to authenticate account
response = client.call(:get_models, message: {username: "xxx", secret: "xxx"})
followed savon doc version 2
how can i solve this or suggest any similar gem to savon
I have personally used Savon on several scenarios. I started with other gems (to connect to web services via SOAP), but I ended up moving to Savon. Before selecting another one, please bear in mind the way Savon responds.
There are other options you can find in RubyGems. One of them is HANDSOAP. The useful search will lead you to many others you can choose from depending on your specific needs.
Now I remember having started with soap4r, whose newest version you can find in GitHub.
Hope that helps,
What is the easiest way to work with the Google Docs API in a Ruby on Rails application? Is there a gem available?
I did find this page: Google Data on Rails, is it the most up to date resource?
The google data rails on page is really out of date, at least in a ruby 1.9.3 environment its non useful.
Having a play with the google_drive gem now....
https://github.com/gimite/google-drive-ruby#readme
I was able to get it to work by simply installing it and pasting the readme code into a file. What more can you ask for!?
You can also Bearer universal API client available in Ruby.
This way you can query Google Docs API very easily and don't even have to worry about OAuth or refresh tokens: https://www.bearer.sh/integrations/33/google-docs-api
The Google Docs developers have now released their own gem to work with the API. Here's a guide to getting started: https://developers.google.com/sheets/api/quickstart/ruby
And the gem itself can be downloaded in the normal way from Rubygems: gem install google-api-client
There's more information in the Readme for the gem's source code repository: https://github.com/google/google-api-ruby-client
you can use this gem omniauth-google-oauth2. Make configuration with consumer-key and secret-key. Add gem in Gemfile. Follow github.
Is it possible to use the page-object gem and capybara to automate Ruby on Rails testing? When I attempt to access a page object after starting up my test I receive the following error:
Unable to pick a platform for the provided browser (RuntimeError)
This makes sense as I think I'd have to pass the browser instance of capybara to the page-object, not sure if anyone else has tried this before.
There is a gem that lets you use the Page Object pattern with capybara: SitePrism. Find it here: https://github.com/natritmeyer/site_prism
Currently there is no support for capybara but it has been requested a few times. Part of the challenge is that the API was built upon selenium and watir which are much richer than capy and in it would be a very large undertaking to build add that functionality to the page-object gem to make capy behave the same way.
I've thought several times about splitting the page-object gem into a "basic" form that will allow capybara to utilize and an "advanced" form that will add the additional capabilities found in selenium and watir but haven't seen enough demand.
https://github.com/andyw8/capybara-page-object looks like it started existing in the last 8 months or so.