ButterCMS / buttercms-ruby

Ruby API client for ButterCMS (https://buttercms.com)
Other
25 stars 21 forks source link

Path is a string, not a Hash #20

Closed HamptonMakes closed 3 years ago

HamptonMakes commented 3 years ago

This is to address #19

Unfortunately our suggested code change doesn't work, as the path is a string, not a Hash.

Running the specs locally on main vs this branch, I can confirm passage locally.


ButterCMS
  .request
    raises NotFound on 404
    with an api token
      should make an api request
    without an api token
      should throw an argument error

ButterCMS::ButterCollection
  implements #items
  implements #meta
  implements #count
  marshal load
    restores the ButterResource dynamic methods

ButterCMS::ButterResource
  auto-generated methods
    creates attribute reader methods for data pairs
  .all
    should make a request with the correct endpoint
    should return a collection
  .find
    should make a request with the correct endpoint
    should return one object

ButterCMS::Content
  has meta and collection info

ButterCMS::HashToObject
  .convert
    converts hash to object

Finished in 0.01827 seconds (files took 0.16291 seconds to load)
14 examples, 0 failures
HamptonMakes commented 3 years ago

Also, we would be happy to setup Github Action CI if that would help this project!

jakelumetta commented 3 years ago

@ParamagicDev - mind taking a look at this one?

KonnorRogers commented 3 years ago

@jakelumetta looks good to me! I totally realized I used encode_www_form instead of encode_www_form_component 🤦 ! Apologies! strong work @hcatlin !

jakelumetta commented 3 years ago

Thanks gents!

jakelumetta commented 3 years ago

Deployed https://rubygems.org/gems/buttercms-ruby/versions/2.0