GithubHelp home page GithubHelp logo

boilerplate-ruby's People

Contributors

dlitvakb avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

alexrogalskiy

boilerplate-ruby's Issues

Review

  • The prerequisites are unclear: this may be on most Ruby devs workstations, but we still need to make crystal clear what's required, otherwise the ./run doesn’t work which ends the Contentful journey for someone who's in a rush.
    Maybe that can be something you detect and propose installing if it’s missing? Like a conditional gem install bundler?

  • the ./run should maybe not do both installation and running? Otherwise every time you run that's calling bundle install which is irrelevant

  • The output of the sample should give a little bit more indications of what's going on. Right now you get

Running Script:
Command: bundle exec ruby script.rb

happycat
5ETMRzkl9KM4omyMwKAOki
6KntaYXaHSyIw8M6eo26OK
7qVBlCjpWE86Oseo40gAEY
garfield
4MU1s3potiUEM2G4okYOqw
nyancat
ge1xHyH3QOWucKWCCAgIG
finn
jake

It could be probably better to have:

$ ./run

Printing the first 100 entry IDs of your space:
 - happycat
 - 5ETMRzkl9KM4omyMwKAOki
 - 6KntaYXaHSyIw8M6eo26OK
 - 7qVBlCjpWE86Oseo40gAEY
 - garfield
 - 4MU1s3potiUEM2G4okYOqw
 - nyancat
 - ge1xHyH3QOWucKWCCAgIG
 - finn
 - jake

Check out script.rb to tweak this further and get started!
  • The script.rb file should propose to do something next, and put a link to the Ruby docs for that. In this case, I would propose the following:
# You now have the basics to get started.
# You may be interested in checking out the Ruby SDK tutorial to go further: https://www.contentful.com/developers/docs/ruby/tutorials/getting-started-with-contentful-and-ruby/

./run fails with new space (bootstrapped as Product Catalogue)

Steps to reproduce

  1. Create a new space
  2. Choose "Create an example space. I'd like to see how things work first."
  3. Choose "Product Catalogue"
  4. Wait, then download boilerplate code
  5. run ./run (I'm on OSX)

Expected behavior

successfully list all entries in my space

Actual behavior

$ ./run
Checking requirements:
Checking: ruby
OK

Checking: bundler
OK

Dependencies already installed. Skipping

Running Script:
Command: bundle exec ruby script.rb

/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/asset.rb:79:in `create_files!': undefined method `[]=' for nil:NilClass (NoMethodError)
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/asset.rb:30:in `initialize'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:77:in `new'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:77:in `build_item'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:68:in `build_single'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:50:in `run'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:60:in `resolve_include'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:45:in `build_nested_resource'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:32:in `block in coerce_link_array'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:31:in `each'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:31:in `coerce_link_array'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/entry.rb:17:in `coerce'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/fields_resource.rb:100:in `block in hydrate_fields'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/fields_resource.rb:99:in `each'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/fields_resource.rb:99:in `hydrate_fields'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/fields_resource.rb:10:in `initialize'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:77:in `new'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:77:in `build_item'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:60:in `block in build_array'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:59:in `map'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:59:in `build_array'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/resource_builder.rb:49:in `run'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/client.rb:284:in `do_build_resource'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/client.rb:221:in `get'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/request.rb:30:in `get'
	from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/contentful-2.0.1/lib/contentful/client.rb:158:in `entries'
	from script.rb:19:in `<main>'

Check out script.rb to tweak this further and get started!

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.