Giter Club home page Giter Club logo

google-spreadsheet-ruby's People

Contributors

bpot avatar eldavido avatar er1c avatar erebor avatar evgenyneu avatar gimite avatar hotchpotch avatar iamruinous avatar nalanj avatar norgg avatar phuongnd08 avatar robermorales avatar sirupsen avatar stympy avatar swhitt avatar wesgibbs avatar wkang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-spreadsheet-ruby's Issues

oauth2 error on .files?

the session.spreadsheet_by_key will work with my OAuth2 token, but I get an error with session.files

    session = GoogleSpreadsheet.login_with_oauth(@access_token)
    begin
#      @files = session.files
      @ws = session.spreadsheet_by_key("<key>").worksheets[0]

    rescue OAuth2::Error => err
      logger.debug ("OAuth2::Error (#{err.inspect})" )
      raise err
    end
"https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://spreadsheets.google.com/feeds"}, @connection=#<Faraday::Connection:0x00000102d55040 @headers={}, @params={}, @options={}, @ssl={}, @parallel_manager=nil, @scheme="https", @host="accounts.google.com", @port=nil, @path_prefix="/o/oauth2/auth", @builder=#<Faraday::Builder:0x000001032f9dc0 @handlers=[Faraday::Request::UrlEncoded, Faraday::Adapter::NetHttp]>, @app=#<Faraday::Request::UrlEncoded:0x000001032f7570 @app=#<Faraday::Adapter::NetHttp:0x000001032f7598 @app=#<Proc:0x000001032f7778@/Users/eric/.rvm/gems/ruby-1.9.3-p0/gems/faraday-0.7.5/lib/faraday/connection.rb:78 (lambda)>>>>>, @token="ya29....", @refresh_token=nil, @expires_in=3600, @expires_at=1335745463, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"bearer_token"}, @params={"token_type"=>"Bearer", "id_token"=>"......."}>
access_token.request get, https://docs.google.com/feeds/default/private/full?v=3, {:header=>{}, :headers=>{"Authorization"=>"Bearer ..."}} and its: header with Bearer %s and ...
OAuth2::Error (#<OAuth2::Error: OAuth2::Error>)

Import

What's the easiest way to copy a sheet from one domain to another?

I'm using the same two-legged OAuth credentials for both domains; access isn't a problem. I see an "export" method in the library, but not a corresponding "import".

Handle invalid token errors

Currently the plugin does not seem to have a system handling invalid token errors. When the token is invalid (wrong scope, token revoked, etc.) we just have an exception related to a nil object (since the XML only contains the error message and the spreadsheet object cannot be filled wth values).

I'm thinking about implementing this functionnality in a fork.

missing dependency with oauth?

I gem installed google-spreadsheet-ruby from gemcutter and I'm still missing the oauth gem; after installing it manually works perf

Google app-engine

Hello,

a user of my 'roo' gem sent me this email. Is this possible with your gem?

-Thomas

Hi

I am trying to open a spreadsheet hosted on my Google app-engine
account. But when i run the script, i get :

/usr/local/lib/ruby/gems/1.8/gems/gimite-google-spreadsheet-ruby-0.0.6/
lib/google_spreadsheet.rb:177:in get': Error 400 Bad Request for GET http://spreadsheets.google.com/feeds/worksheets/0Aji6nYSYa4b_dDRnOWNf... The spreadsheet at this URL could not be found. Make sure that you have the right URL and that the owner of the spreadsheet hasn&#39;t deleted it. (GoogleSpreadsheet::Error) from /usr/local/lib/ruby/gems/1.8/gems/gimite-google-spreadsheet- ruby-0.0.6/lib/google_spreadsheet.rb:305:inworksheets'
from /usr/local/lib/ruby/gems/1.8/gems/roo-1.9.0/lib/roo/google.rb:
37:in initialize' from bulktest.rb:4:innew'
from bulktest.rb:4

It is not a generic Google Account, so the spreadsheet is not located
at spreadsheets.google.com/ccc?key=XXXXX, but instead at
spreadsheets.google.com/a/domain.com/ccc?key=XXXXX. Has anyone come
across or better solved this error?

Thanks

URL used in the Spreadsheet class

Hi Guys,

In our application we would like to display a link after the Google Spreadsheet generation with the url of the spreadsheet. In order to get this url, we tried to use the function Spreadsheet::worksheets_feed_url generated by attr_reader(:worksheets_feed_url).

The problem is that this url leads to a 404 for a traditional gmail account and for a Google Apps Pro account. It seems to work almost fine however for a free a Google Apps account.

How shall we do to present to our end users the url of the generated document ?

We did the following as a work-around :

in Session::create_spreadsheet for instance,

after :

ss_url = doc.css(
"link[@rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed']").first['href']

We add :

ss_real_url = doc.css(
"link[@rel='alternate']").first['href']

and add this ss_real_url to the instance attributes of the Spreadsheet class.

Is it the right way to get this url ? If not could you give us some help ? If yes, would it be possible to add this to the plugin ?

Thanks for your help !

Olivier

Issue with calling worksheets

Following call:

session = GoogleSpreadsheet.login(login, password)
spreadsheet = session.spreadsheet_by_key(spreedsheet_key)
ws = spreadsheet.worksheets[0] 

produces:
Invalid expression: .//xmlns:link[@xmlns:@rel = 'http://schemas.google.com/spreadsheets/2006#cellsfeed']

I am using Rails 3.1 - this seems to work in IRB - I am not sure if there is something in Rails thats breaking it?
A hint would be appreciated. Thanks!

Time out errors when assigning permissions to google drive folders

Hi

I am using the gem to create folders and sub folders and assigning access to them. Looks simple enough - however I cannot get the app to work without getting a 'Time Error' or 'Response code 409 - user already has access to the folder'

Here is my requirement; I have 2 levels of folder

Main Folder [Read Access to group 1, group2 and group3]
-- Sub Folder 1 [Write Access to group 1 and group 2, no access to group 3]
-- Sub Folder 2 [Write Access to group 1 and group 3, no access to group 2]

The problem is each time is give read access to the 'Main Folder' the permission is cascaded down to sub folders 1 and 2. So each time I need to revoke the 'Read' access of each group on the Sub Folders to assign 'Write access'. It works fine until I make more than 3 consecutive requests. I get 'Time out Errors' or 'Response code 409 - user already has access to this folder' when trying to delete the Read access or assigning 'Write access'(I'm ensuring that I delete the 'Read Access' before assigning 'Write Access'.)

I wanted to know whether there is a time frame limitation on the calls I'm making or is there a better way of doing it.
My code can be found at http://paste.org/61663 (Apologies for the length of it - I'm sure there a better and faster way of doing it - your comments and advice are humbly accepted)

Thanks
Nawshine

Non ASCII Issue

When there are non ASCII characters in a String the upload stops with a TimeOut Error.

Accessing spreadsheets created by Google Apps User

When requesting a xml from the worksheet feed url, the Google API does not put the right URL in the link rel="alternate" href value, because it's always starts by spreadsheets.google.com and does not take into account Google Apps urls (that will add /a/domain.com after this).

If I'm right, the only way to have this value right is from the XML returned after a spreadsheet creation. Do you agree?

No support for authsub

Hello I am trying to use the google-spreadsheet gem with Authsub, is this possible at all?

thanks,
Joe

Sheet ACLs / permission

Does the library support changing the ACL / permissions of a spreadsheet? I don't see any functionality for doing so.

Doesn't work with Nokogiri 1.5.1

Version 1.5 of Nokogiri isn't compatible witg google-spreadsheet-ruby:

Invalid expression: .//xmlns:link[@xmlns:@rel = 'http://schemas.google.com/spreadsheets/2006#cellsfeed'] (Nokogiri::XML::XPath::SyntaxError)

1.4.7 work fine.

Specifying "max_cols" and "max_rows" when calling add_worksheet does not work as advertised

When I add a new worksheet to a given spreadsheet, I can only successfully do so if I do not specify max_cols and max_rows in my call to add_worksheet.

For example, the following works:

w = spreadsheet.add_worksheet("I can haz worksheetz!?")

But the following, does not work:

w = spreadsheet.add_worksheet("I can haz worksheetz!?", 2, 10)

The second example results in an empty worksheet being created that has 0 rows and 0 cols and cannot be edited at all.

The workaround I've been using is to create a worksheet without max_rows and max_cols, then modify those values afterwards but it would be great to get that working in the initial call to add_worksheet.

Accessing spreadsheets without login?

Hello,

if I understand correct, there are google-doc spreadsheets which can be pulicly viewed or even edited. How can I access such a spreadsheet without the need to login with this gem?

-Thomas

force_encoding breaks rails

Hi,
I'm using google-spreadsheet-ruby with Ruby-on-Rails and Ruby 1.8, but overriding String.force_encoding in GoogleSpreadsheet breaks Rails.

In a few places Rails uses this method to determine whether Ruby 1.8 or 1.9 is being used, and if force_encoding is defined then rails assumes that Ruby 1.9 is being used. This is incorrect, which can then lead to rails crashing.

Can I suggest that instead of using String.force_encoding, instead you define a new method like this:
class String

def fake_force_encoding(encoding)
if RUBY_VERSION < "1.9.0"
return self
else
return force_encoding(encoding)
end
end

end

Then change all references to "String.force_encoding" to use "String.fake_force_encoding" instead. As by doing this force_encoding is not redefined and rails will function correctly.

Thanks!

Cannot install google-spreadsheet-ruby v. 0.0.6

Hi,

trying to install or update the gem I receive this error:

sudo gem update
Updating installed gems
Updating gimite-google-spreadsheet-ruby
ERROR: While executing gem ... (Gem::FormatException)
gimite-google-spreadsheet-ruby-0.0.6 has an invalid value for @licenses

sudo ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]

sudo gem -v
1.7.1

Can you help me ?

Timeout error with utf-8 characters

Seems to happen on when sending in characters with accents

Timeout::Error

./ruby/1.9.2/lib/ruby/1.9.1/net/protocol.rb:140:in rescue in rbuf_fill' ./ruby/1.9.2/lib/ruby/1.9.1/net/protocol.rb:134:inrbuf_fill'
./ruby/1.9.2/lib/ruby/1.9.1/net/protocol.rb:116:in readuntil' ./ruby/1.9.2/lib/ruby/1.9.1/net/protocol.rb:126:inreadline'
./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:2219:in read_status_line' ./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:2208:inread_new'
./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:1191:in transport_request' ./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:1177:inrequest'
..../vendor/bundle/ruby/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in request' ./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:978:inpost'
…./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:189:in block in request_raw' ./ruby/1.9.2/lib/ruby/1.9.1/net/http.rb:627:instart'
…./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:183:in request_raw' …./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:433:inrequest'
…./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:1024:in block in save' …./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:995:ineach_slice'
…./vendor/bundle/ruby/1.9.1/gems/google-spreadsheet-ruby-0.1.6/lib/google_spreadsheet.rb:995:in `save'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.