Code Monkey home page Code Monkey logo

driveshaft's People

Contributors

abstrctn avatar kevinschaul avatar samjacoby 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

Watchers

 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

driveshaft's Issues

Links in ArchieML sometimes handled incorrectly

In the following google doc, if the last TKTKTK » is a link, the link is malformed in the output

[items]

use: y
kicker: TK
text: TK  |  TKTK  |  TKTKTK »
items: [
  {
    "use": "y",
    "kicker": "TK",
    "text": "TK  |  TKTK  |  <a href="http://www.nytimes.com">"
}

Files should publish with utf-8 charset

Content-Type is currently set to application/json without a specified charset, leading to mangled smartquotes and other non-ASCII characters.

archieml.rb and spreadsheet.rb should both specify a charset when setting the Content-Type for uploading to S3 and direct download.

"no implicit conversion of nil into Hash" Error

I'm getting this error when I try to publish a sheet and can't seem to pinpoint the problem.

I have published other sheets using driveshaft, but am running into errors with this one.

Is there a size limit to the sheet? or some sort of misconfiguration that would lead to this error?

Web authentication requires access to Google+ API

The after callback in the authentication module makes a call to the Google+ API to retrieve the authenticating user's email address for identification.

Current instructions do not include Google+ as a required API. Not enabling it results in an error that is not surfaced, and if web authentication is required using the DRIVESHAFT_SETTINGS_AUTH_REQUIRED setting, would result in an authentication redirect loop.

TODOs:

  • Add use of Google+ API to the docs
  • Surface error as a flash message when it occurs
  • Possibly include a page where flash messages can be shown for apps with AUTH_REQUIRED turned on

I'm guessing this is the cause of #15 and #12.

OAuth callback loop

Running Driveshaft from Heroku, and set up OAuth with Google. Accepting the OAuth permissions redirects back to the Driveshaft callback and then immediately triggers the request dialog again. Assuming I have something misconfigured, but can't pinpoint where.

can't publish in a way that's HTTPS

Driveshaft can't publish in a way that the output JSON file is accessible over HTTPS.

https://int.nyt.com/ doesn't work because the cert is for s3.amazonaws.com.

https://int.nyt.com.s3.amazonaws.com/ doesn't work because wildcard certs only match one level of dots down.

The solution, I think, is to make Driveshaft publish to a bucket with no dots in the name. I think @buth is creating one, called newsdev-secure-internal or something or like.

static assets not generated during build on Heroku

Any suggestions for making sure static assets are generated as part of the build process on Heroku?

screen shot 2017-03-13 at 3 27 03 pm

The cause seems to be that the Node buildpack wasn't executed on initial deployment:

remote:  ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rack

The build was initiated via Heroku CLI because the Deploy to Heroku button build process repeatedly failed. Thanks!

What's "log in" button for?

Wilson noticed today that clicking login takes you through Google OAUTH but redirects you to localhost:3000.

Do we need to log in at all?

If so, we should fix.

Cache Google API hits

Ensure we're not hitting the Google API more often than is necessary.

A main example to check is the discovered_api calls, and whether those can be cached somewhere.

Hash syntax error prevents app from initializing

A change introduced in 9fb8d34 includes an invalid ruby hash:

commit 9fb8d349c79e7bd2a6aef4ddcb38da6ca3f44fd9
Author: Michael Strickland <[email protected]>
Date:   Thu Oct 22 16:44:23 2015 -0400

    Return error message with backtrace.

diff --git a/lib/driveshaft/app.rb b/lib/driveshaft/app.rb
index c81a48d..a8c29bf 100644
--- a/lib/driveshaft/app.rb
+++ b/lib/driveshaft/app.rb
@@ -118,9 +118,12 @@ module Driveshaft
       rescue Exception => e
         status 200
         export = {
-          content_type: 'application/json',
-          backtrace: e.backtrace,
-          body: "Error converting #{@file['title'] || @file['id']} into #{@export_format}. (#{e.message})"
+          content_type: 'application/json; charset=utf-8',
+          body: {
+            "message": "Error converting #{@file['title'] || @file['id']} into #{@export_format}. (#{e.message})",
+            "backtrace": e.backtrace,
+            "status": "error"
+          }
         }
       end

Feature request: "Publish All" button on index

Would be handy in a lot of cases to trigger republishes on all destinations for all files in the index list. Or even a button on each list item in the index that publishes that file to all it's destinations with an optional dropdown to select an individual destination to publish.

NoMethodError when using OAuth2 login

Hey all, great project. I was following the Web Application Google Drive instructions here and received the following error after attempting to authenticate with my Google account:

Puma caught this error: undefined method `join' for #<String:0x007f5fc83d2e10> (NoMethodError)

I'm on Ubuntu 14.04 and have Ruby 2.2.1 installed with rbenv.

After searching for this error online, I discovered this discussion in the Sinatra repo: sinatra/sinatra#951. Apparently, Sinatra 1.4.5 (the version driveshaft is built on) has some issues with updated versions of Rack. I bumped Sinatra to 1.4.6 and attempted to authenticate again which gave me a NoMethodError at https://github.com/newsdev/driveshaft/blob/develop/lib/driveshaft/auth.rb#L130

NoMethodError at /auth/callback undefined method `first' for nil:NilClass

I'll keep diagnosing but I'm curious if y'all have any ideas. Any guidance would be great. Thanks! I look forward to using this project regularly!

Empty response for download (likely authentication issue)

Thanks for (what I hope is) a great project. I am having some troubles just getting some basics running.

I can get the application running locally, but unless the spreadsheet is viewable to the world, all I get is an { } empty object when I go to [id]/download.

For instance, the demo spreadsheet works:
http://localhost:9292/16NZKPy_kyWb_c0jBLo_sTvyoGUrs-ISG7uMDHBMgM5U/download?

But, a test one that is not viewable to the world just gives me back the empty object:
http://localhost:9292/1Pg6ycnWBBUcyb1XaoZttVLffXL40LjSkdZSAclTc3-o/download?

A little debugging, looks like Google is saying the file is not found, which I think its a proxy for permissions issues, but the documentation is not super clear on how that's supposed to work (and Google's API console changes daily).

I have set up a a Google API project and given access to Drive and Google+ and created two credentials, one for GOOGLE_APICLIENT_KEY and the other for GOOGLE_APICLIENT_SERVICEACCOUNT and these are set as environment variables.

I don't know Ruby or Sinatra very well, so maybe I just need to find a way to get a bit more debugging information.

Thanks!

Display user's available Drive files on index

At the moment, Driveshaft lets you specify a Google Spreadsheet that lists other Drive files to use as an index page, which can work for an organization that keeps a shared collection of files. But because it's asynchronous (it needs to be published to S3), and has to be manually entered, it's less useful for individuals.

An alternative might be to render a user's available drive files on the index page? Rendering the contents of a shared folder might also be useful, and might even be more relevant for an organization than the current setup.

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.