Toot toooooooot (Bluesky-Mastodon cross-poster)

Compare changes

Choose any two refs to compare.

+27 -25
Gemfile.lock
··· 1 1 GEM 2 2 remote: https://rubygems.org/ 3 3 specs: 4 - activemodel (7.2.2.1) 5 - activesupport (= 7.2.2.1) 6 - activerecord (7.2.2.1) 7 - activemodel (= 7.2.2.1) 8 - activesupport (= 7.2.2.1) 4 + activemodel (7.2.3) 5 + activesupport (= 7.2.3) 6 + activerecord (7.2.3) 7 + activemodel (= 7.2.3) 8 + activesupport (= 7.2.3) 9 9 timeout (>= 0.4.0) 10 - activesupport (7.2.2.1) 10 + activesupport (7.2.3) 11 11 base64 12 12 benchmark (>= 0.3) 13 13 bigdecimal ··· 19 19 minitest (>= 5.1) 20 20 securerandom (>= 0.3) 21 21 tzinfo (~> 2.0, >= 2.0.5) 22 - base64 (0.2.0) 23 - benchmark (0.4.1) 24 - bigdecimal (3.2.2) 25 - concurrent-ruby (1.3.5) 26 - connection_pool (2.5.3) 27 - didkit (0.2.3) 22 + base64 (0.3.0) 23 + benchmark (0.5.0) 24 + bigdecimal (4.0.1) 25 + concurrent-ruby (1.3.6) 26 + connection_pool (3.0.2) 27 + didkit (0.3.1) 28 28 drb (2.2.3) 29 - i18n (1.14.7) 29 + i18n (1.14.8) 30 30 concurrent-ruby (~> 1.0) 31 - io-console (0.7.2) 32 - json (2.10.2) 31 + io-console (0.8.2) 32 + json (2.18.0) 33 33 logger (1.7.0) 34 34 mini_portile2 (2.8.9) 35 35 minisky (0.5.0) 36 36 base64 (~> 0.1) 37 - minitest (5.25.5) 38 - net-http (0.4.1) 39 - uri 37 + minitest (6.0.1) 38 + prism (~> 1.5) 39 + net-http (0.9.1) 40 + uri (>= 0.11.1) 41 + prism (1.7.0) 40 42 securerandom (0.4.1) 41 - sqlite3 (2.7.1) 43 + sqlite3 (2.9.0) 42 44 mini_portile2 (~> 2.8.0) 43 - sqlite3 (2.7.1-aarch64-linux-gnu) 44 - sqlite3 (2.7.1-arm64-darwin) 45 - sqlite3 (2.7.1-x86_64-linux-gnu) 46 - timeout (0.4.3) 45 + sqlite3 (2.9.0-aarch64-linux-gnu) 46 + sqlite3 (2.9.0-arm64-darwin) 47 + sqlite3 (2.9.0-x86_64-linux-gnu) 48 + timeout (0.6.0) 47 49 tzinfo (2.0.6) 48 50 concurrent-ruby (~> 1.0) 49 - uri (0.13.2) 50 - yaml (0.3.0) 51 + uri (0.13.3) 52 + yaml (0.4.0) 51 53 52 54 PLATFORMS 53 55 aarch64-linux
+1 -3
app/bluesky_account.rb
··· 17 17 exit 1 18 18 end 19 19 20 - pds = did.get_document.pds_endpoint.gsub('https://', '') 21 - 22 - @sky.host = pds 20 + @sky.host = did.document.pds_host 23 21 @sky.user.id = handle 24 22 @sky.user.pass = password 25 23
+1 -1
app/tootify.rb
··· 211 211 212 212 def fetch_record_by_at_uri(quote_uri) 213 213 repo, collection, rkey = quote_uri.split('/')[2..4] 214 - pds = DID.new(repo).get_document.pds_endpoint 214 + pds = DID.new(repo).document.pds_host 215 215 sky = Minisky.new(pds, nil) 216 216 resp = sky.get_request('com.atproto.repo.getRecord', { repo: repo, collection: collection, rkey: rkey }) 217 217 resp['value']
+1 -1
tootify
··· 39 39 40 40 if name =~ /\A[^@]+@[^@]+\z/ 41 41 app.login_to_mastodon(name) 42 - elsif name =~ /\A@[^@]+\z/ 42 + elsif name =~ /\A@?[^@]+\z/ 43 43 app.login_to_bluesky(name) 44 44 elsif name.nil? 45 45 print_help