tumblr_client icon indicating copy to clipboard operation
tumblr_client copied to clipboard

doesnt work with faraday 0.9.2

Open isidzukuri opened this issue 8 years ago • 5 comments

Tumblr.configure do |config| config.consumer_key = "A4U....." config.consumer_secret = "aK8...." config.oauth_token = "A4U....." config.oauth_token_secret = "aK8..." end

client = Tumblr::Client.new # client = Tumblr::Client.new(:client => :httpclient) client.info

NoMethodError: undefined methodclient=' for #Faraday::ConnectionOptions:0x0000000310f948 from /var/lib/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:31:in block in update' from /var/lib/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:20:ineach' from /var/lib/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:20:in update' from /var/lib/gems/2.1.0/gems/faraday-0.9.2/lib/faraday/options.rb:52:inmerge' from /var/lib/gems/2.1.0/gems/faraday-0.9.2/lib/faraday.rb:69:in new' from /var/lib/gems/2.1.0/gems/tumblr_client-0.8.2/lib/tumblr/connection.rb:19:inconnection' from /var/lib/gems/2.1.0/gems/tumblr_client-0.8.2/lib/tumblr/request.rb:8:in get_response' from /var/lib/gems/2.1.0/gems/tumblr_client-0.8.2/lib/tumblr/request.rb:26:inget' from /var/lib/gems/2.1.0/gems/tumblr_client-0.8.2/lib/tumblr/user.rb:5:in info'

Will somebody fix it?

isidzukuri avatar May 03 '16 11:05 isidzukuri

  • 1, please!

ghost avatar Aug 23 '16 18:08 ghost

+1

aprotsyk avatar Sep 23 '16 23:09 aprotsyk

Hm, i can't seem to reproduce this. For instance, on ruby 2.1.0 with the following gems:

~ >ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
~ >gem install tumblr_client
Fetching: mime-types-data-3.2016.0521.gem (100%)
Successfully installed mime-types-data-3.2016.0521
Fetching: mime-types-3.1.gem (100%)
Successfully installed mime-types-3.1
Fetching: oauth-0.5.1.gem (100%)
Successfully installed oauth-0.5.1
Fetching: simple_oauth-0.3.1.gem (100%)
Successfully installed simple_oauth-0.3.1
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.9.2.gem (100%)
Successfully installed faraday-0.9.2
Fetching: faraday_middleware-0.9.2.gem (100%)
Successfully installed faraday_middleware-0.9.2
Fetching: tumblr_client-0.8.5.gem (100%)
Successfully installed tumblr_client-0.8.5
8 gems installed
~ >irb
2.1.0 :001 > require 'tumblr_client'
2.1.0 :002 > Tumblr.configure do |config|
2.1.0 :003 >       config.consumer_key = "[..]"
2.1.0 :004?>     config.consumer_secret = "[..]"
2.1.0 :005?>     config.oauth_token = "[..]"
2.1.0 :006?>     config.oauth_token_secret = "[..]"
2.1.0 :007?>   end
2.1.0 :008 > client = Tumblr::Client.new(:client => :httpclient)
2.1.0 :009 > client.posts('staff.tumblr.com')['total_posts']
 => 1807

Can you share the output of gem list? And the ruby version if you're on some other version than 2.1.0.

defect avatar Sep 24 '16 03:09 defect

$ ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

$ gem list

*** LOCAL GEMS ***

actioncable (5.0.0) actionmailer (5.0.0, 4.2.6, 4.2.5, 4.1.10) actionpack (5.0.0, 4.2.6, 4.2.5, 4.1.10) actionview (5.0.0, 4.2.6, 4.2.5, 4.1.10) activejob (5.0.0, 4.2.6, 4.2.5) activemodel (5.0.0, 4.2.6, 4.2.5, 4.1.10) activerecord (5.0.0, 4.2.6, 4.2.5, 4.1.10) activesupport (5.0.0, 4.2.6, 4.2.5, 4.1.10) airbrussh (1.1.0) angularjs-rails (1.5.0) arel (7.1.1, 6.0.3, 5.0.1.20140414130214) ast (2.3.0) awesome_print (1.7.0, 1.6.1) bcrypt (3.1.11) bigdecimal (1.2.8) binding_of_caller (0.7.2) builder (3.2.2) bundler (1.12.4) bundler-unload (1.0.2) byebug (9.0.5, 8.2.2) capistrano (3.6.0, 2.15.9) capistrano-bundler (1.1.4) capistrano-harrow (0.5.2) capistrano-rails (1.1.7) carrierwave (0.11.0) carrierwave-neo4j (2.0.1) carrierwave-processing (1.1.0) chronic (0.10.2) coffee-rails (4.1.1, 4.0.1) coffee-script (2.4.1) coffee-script-source (1.10.0, 1.9.1.1) colored (1.2) colorize (0.8.1, 0.7.7) commonjs (0.2.7) concurrent-ruby (1.0.2, 1.0.1) crass (1.0.2) debug_inspector (0.0.2) devise (4.2.0) did_you_mean (1.0.0) diff-lcs (1.2.5) domain_name (0.5.20160310, 0.5.25) erubis (2.7.0) execjs (2.7.0, 2.6.0) executable-hooks (1.3.2) exifr (1.2.4) faker (1.6.3) faraday (0.9.2) faraday_middleware (0.10.0) faraday_middleware-multi_json (0.0.6) gem-wrappers (1.2.7) geoip (1.6.1) globalid (0.3.7, 0.3.6) google-translate (1.1.2) gpx_utils (0.0.1) hashie (2.1.2) highline (1.7.8) hike (1.2.3) htmlentities (4.3.4) httmultiparty (0.3.16) http-cookie (1.0.2) httparty (0.13.7) httpclient (2.8.0) i18n (0.7.0) io-console (0.4.5) jbuilder (2.6.0, 2.4.1, 2.3.2) jquery-rails (4.2.1, 4.1.1, 3.1.4) json (1.8.3) json_pure (1.8.3) jwt (1.5.4) less (2.6.0) less-rails (2.7.1) loofah (2.0.3) mail (2.6.4, 2.6.3) mechanize (2.7.3, 2.1.1) method_source (0.8.2) mime-types (3.1, 3.0, 2.6.2) mime-types-data (3.2016.0521, 3.2016.0221) mimemagic (0.3.1) mini_portile (0.6.2) mini_portile2 (2.1.0, 2.0.0) minitest (5.9.0, 5.8.3, 5.8.2) multi_json (1.12.1, 1.12.0, 1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) mysql (2.9.1) mysql2 (0.3.20) neo4j (7.0.6) neo4j-core (6.1.4) neo4j-rake_tasks (0.5.4) net-http-digest_auth (1.4) net-http-persistent (2.9.4) net-scp (1.2.1) net-sftp (2.1.2) net-ssh (3.2.0) net-ssh-gateway (1.2.0) net-telnet (0.1.1) nio4r (1.2.1) nokogiri (1.6.8, 1.6.7.2, 1.6.6.2) nokogumbo (1.4.7) ntlm-http (0.1.1) oauth (0.5.1) oauth2 (1.2.0) omniauth (1.3.1) omniauth-facebook (4.0.0) omniauth-google-oauth2 (0.4.1) omniauth-oauth2 (1.4.0, 1.3.1) orm_adapter (0.5.0) os (0.9.6) parser (2.3.1.3) pkg-config (1.1.7) power_assert (0.2.6) powerpack (0.1.1) protected_attributes (1.1.3) psych (2.0.17) puma (3.2.0) quiet_assets (1.1.0) rack (2.0.1, 1.6.4, 1.5.5) rack-test (0.6.3) rails (5.0.0, 4.2.6, 4.2.5, 4.1.10) rails-deprecated_sanitizer (1.0.3) rails-dom-testing (2.0.1, 1.0.7) rails-html-sanitizer (1.0.3) railties (5.0.0, 4.2.6, 4.2.5, 4.1.10) rainbow (2.1.0) rake (11.2.2, 11.1.2, 10.4.2) rdoc (4.2.2, 4.2.1, 4.2.0) redis (3.2.2) redis-objects (1.2.1) resource_accessor (1.2.4) responders (2.3.0) rmagick (2.15.4) rspec (3.5.0) rspec-core (3.5.3) rspec-expectations (3.5.0) rspec-mocks (3.5.0) rspec-support (3.5.0) rubocop (0.43.0) ruby-prof (0.15.8) ruby-progressbar (1.8.1) rubygems-bundler (1.4.4) rubyzip (1.2.0) rvm (1.11.3.9) sanitize (4.0.1) sass (3.4.22, 3.4.21, 3.2.19) sass-rails (5.0.6, 5.0.4, 4.0.5) sdoc (0.4.1) soundcloud (0.3.2) spring (1.7.2, 1.4.0) sprockets (3.7.0, 3.6.0, 3.5.2, 2.12.4) sprockets-rails (3.1.1, 3.0.4, 2.3.3) sqlite3 (1.3.11) sshkit (1.11.1) test-unit (3.1.5) thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5, 2.0.2, 1.4.1) tubesock (0.2.6) turbolinks (5.0.1, 2.5.3) turbolinks-source (5.0.0) twitter-bootstrap-rails (3.2.2) tzinfo (1.2.2) uglifier (3.0.2, 3.0.0, 2.7.2) unf (0.1.4) unf_ext (0.0.7.2, 0.0.7.1) unicode-display_width (1.1.1) unidecoder (1.1.2) vimeo (1.5.4) warden (1.2.6) web-console (2.3.0) webrobots (0.1.2, 0.1.1) websocket (1.2.2) websocket-driver (0.6.4) websocket-extensions (0.1.2) whatlanguage (1.0.5) whenever (0.9.7) yt (0.25.35) zip (2.0.2) zipruby (0.3.6)

isidzukuri avatar Sep 24 '16 08:09 isidzukuri

I just updated gem to latest version and problem resolved.

aprotsyk avatar Sep 25 '16 07:09 aprotsyk

Works if in Gemfile:

gem 'tumblr_client', git: 'https://github.com/tumblr/tumblr_client.git'

then

bundle install
# Using tumblr_client 0.8.6 (was 0.8.5) from https://github.com/tumblr/tumblr_client.git (at master@a72b7f4)

isidzukuri avatar Jun 01 '24 10:06 isidzukuri