skyfall 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 677e5fd4ee93debfd3495c7c3504642c603eeda97ddba4273d1848d3240892f6
4
- data.tar.gz: 0db72ec396022df1fb970a614bf217c2f20a04d843e6558eabc39dd74ddb8979
3
+ metadata.gz: 0c827cbd3a6c7563d7a84ea7ec0547b0b75f5bfa1626373493ede36d9c8c10c1
4
+ data.tar.gz: 840e0cb0a8d007e2aa49a7805d15b68494a87cf03c756056cc618aaba476eb25
5
5
  SHA512:
6
- metadata.gz: dc9c6ea0447c1f4310c1772ee093e88f98666ee925f6b81219c60b09a8a761f6c05a9a56449af57d270109148c3fd1a4d1420ceb8cd9a39f27d74d21c430e9cf
7
- data.tar.gz: db9097d342156c20e043b59da778fc11cb2d9281fa2c3c432744b6b4fa81e0a505dda6a4670357bdbfb435f87e7436a77fb80953a74bb0c40a7a3df457a5259e
6
+ metadata.gz: b87ccd4ee8fd5652ccb72e8b4312e03a0dbc938c01c0d47b4b0cf7896c89e9ad6e9482fd9fc914210098d7be8867a0198197db788569f63c30edbf9cf5dedc11
7
+ data.tar.gz: 86b9fcc440daeaa3e1bfea26a1707c5789bbf7141d2d21c1f279e1704c717c048807bda01f5dba05de1cfebc101715247fa0901fb9a42b641e6516f265c0e716
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
- ## [Unreleased]
1
+ ## [0.1.1] - 2023-06-13
2
2
 
3
- ## [0.1.0] - 2023-05-31
3
+ - added heartbeat thread to restart websocket if it stops responding
4
4
 
5
- - Initial release
5
+ ## [0.1.0] - 2023-06-01
6
+
7
+ - connecting to the firehose websocket
8
+
9
+ ## [0.0.1] - 2023-05-31
10
+
11
+ Initial release:
12
+
13
+ - parsing CBOR objects from a websocket message
14
+ - parsing CIDs, CAR archives and operation details from the objects
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ The zlib License
2
+
3
+ Copyright (c) 2023 Jakub Suder
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+
18
+ 2. Altered source versions must be plainly marked as such, and must not be
19
+ misrepresented as being the original software.
20
+
21
+ 3. This notice may not be removed or altered from any source distribution.
22
+
data/README.md CHANGED
@@ -1,35 +1,96 @@
1
1
  # Skyfall
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ 🌤 A Ruby gem for streaming data from the Bluesky/AtProto firehose 🦋
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/skyfall`. To experiment with that code, run `bin/console` for an interactive prompt.
6
5
 
7
- ## Installation
6
+ ## What does it do
8
7
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
8
+ Skyfall is a Ruby library for connecting to the *"firehose"* of the Bluesky social network, i.e. a websocket which
9
+ streams all new posts and everything else happening on the Bluesky network in real time. The code connects to the
10
+ websocket endpoint, decodes the messages which are encoded in some binary formats like DAG-CBOR, and returns the data as Ruby objects, which you can filter and save to some kind of database (e.g. in order to create a custom feed).
10
11
 
11
- Install the gem and add to the application's Gemfile by executing:
12
12
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
13
+ ## Installation
14
14
 
15
- If bundler is not being used to manage dependencies, install the gem by executing:
15
+ gem install skyfall
16
16
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
17
 
19
18
  ## Usage
20
19
 
21
- TODO: Write usage instructions here
20
+ Start a connection to the firehose by creating a `Skyfall::Stream` object, passing the server hostname and endpoint name:
21
+
22
+ ```rb
23
+ require 'skyfall'
24
+
25
+ sky = Skyfall::Stream.new('bsky.social', :subscribe_repos)
26
+ ```
27
+
28
+ Add event listeners to handle incoming messages and get notified of errors:
29
+
30
+ ```rb
31
+ sky.on_connect { puts "Connected" }
32
+ sky.on_disconnect { puts "Disconnected" }
33
+
34
+ sky.on_message { |m| p m }
35
+ sky.on_error { |e| puts "ERROR: #{e}" }
36
+ ```
37
+
38
+ When you're ready, open the connection by calling `connect`:
39
+
40
+ ```rb
41
+ sky.connect
42
+ ```
43
+
44
+ The connection is started asynchronously on a separate thread. If you're running this code in a simple script (and not as a part of a server), call e.g. `sleep` without arguments or `loop { STDIN.read }` to prevent the script for exiting while the connection is open.
45
+
46
+
47
+ ### Processing messages
48
+
49
+ Each message passed to `on_message` is an instance of the `WebsocketMessage` class and has such properties:
50
+
51
+ - `type` (symbol) - usually `:commit`
52
+ - `seq` (sequential number)
53
+ - `time` (Time)
54
+ - `repo` (string) - DID of the repository (user account)
55
+ - `commit` - CID of the commit
56
+ - `prev` - CID of the previous commit in that repo
57
+ - `operations` - list of operations (usually one)
58
+
59
+ Operations are objects of type `Operation` and have such properties:
60
+
61
+ - `repo` (string) - DID of the repository (user account)
62
+ - `collection` (string) - name of the relevant collection in the repository, e.g. `app.bsky.feed.post` for posts
63
+ - `path` (string) - the path part of the at:// URI - collection name + ID (rkey) of the item
64
+ - `action` (symbol) - `:create`, `:update` or `:delete`
65
+ - `uri` (string) - the at:// URI
66
+ - `type` (symbol) - short name of the collection, e.g. `:bsky_post`
67
+ - `cid` - CID of the operation/record (`nil` for delete operations)
68
+
69
+ Create and update operations will also have an attached record (JSON object) with details of the post, like etc. The record data is currently available as a Ruby hash via `raw_record` property (custom types will be added in a later version).
70
+
71
+ So for example, in order to filter only "create post" operations and print their details, you can do something like this:
72
+
73
+ ```rb
74
+ sky.on_message do |m|
75
+ next if m.type != :commit
76
+
77
+ m.operations.each do |op|
78
+ next unless op.action == :create && op.type == :bsky_post
22
79
 
23
- ## Development
80
+ puts "#{op.repo}:"
81
+ puts op.raw_record['text']
82
+ puts
83
+ end
84
+ end
85
+ ```
24
86
 
25
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
87
+ See complete example in [example/firehose.rb](https://github.com/mackuba/skyfall/blob/master/example/firehose.rb).
26
88
 
27
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
89
 
29
- ## Contributing
90
+ ## Credits
30
91
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/skyfall.
92
+ Copyright © 2023 Kuba Suder ([@mackuba.eu](https://bsky.app/profile/mackuba.eu)).
32
93
 
33
- ## License
94
+ The code is available under the terms of the [zlib license](https://choosealicense.com/licenses/zlib/) (permissive, similar to MIT).
34
95
 
35
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
96
+ Bug reports and pull requests are welcome 😎
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ lib = File.expand_path('../../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+ require 'skyfall'
7
+
8
+ sky = Skyfall::Stream.new('bsky.social', :subscribe_repos)
9
+
10
+ sky.on_message do |m|
11
+ next if m.type != :commit
12
+
13
+ m.operations.each do |op|
14
+ next unless op.action == :create && op.type == :bsky_post
15
+
16
+ puts "#{op.repo}:"
17
+ puts op.raw_record['text']
18
+ puts
19
+ end
20
+ end
21
+
22
+ sky.on_connect { puts "Connected" }
23
+ sky.on_disconnect { puts "Disconnected" }
24
+ sky.on_error { |e| puts "ERROR: #{e}" }
25
+
26
+ sky.connect
27
+ sleep
data/lib/skyfall/cid.rb CHANGED
@@ -16,6 +16,14 @@ module Skyfall
16
16
  CID.new(data[1..-1])
17
17
  end
18
18
 
19
+ def self.from_json(string)
20
+ raise DecodeError.new("Unexpected CID length") unless string.length == 59
21
+ raise DecodeError.new("Unexpected CID prefix") unless string[0] == 'b'
22
+
23
+ data = Base32.decode(string[1..-1].upcase)
24
+ CID.new(data)
25
+ end
26
+
19
27
  def initialize(data)
20
28
  @data = data
21
29
  end
@@ -7,5 +7,6 @@ module Skyfall
7
7
  BSKY_BLOCK = "app.bsky.graph.block"
8
8
  BSKY_PROFILE = "app.bsky.actor.profile"
9
9
  BSKY_LISTITEM = "app.bsky.graph.listitem"
10
+ BSKY_FEED = "app.bsky.feed.generator"
10
11
  end
11
12
  end
@@ -2,7 +2,7 @@ require_relative 'collection'
2
2
 
3
3
  module Skyfall
4
4
  class Operation
5
- attr_reader :repo, :path, :action, :cid, :record
5
+ attr_reader :repo, :path, :action, :cid
6
6
 
7
7
  def initialize(repo, path, action, cid, record)
8
8
  @repo = repo
@@ -12,6 +12,10 @@ module Skyfall
12
12
  @record = record
13
13
  end
14
14
 
15
+ def raw_record
16
+ @record
17
+ end
18
+
15
19
  def uri
16
20
  "at://#{repo}/#{path}"
17
21
  end
@@ -29,6 +33,7 @@ module Skyfall
29
33
  when Collection::BSKY_BLOCK then :bsky_block
30
34
  when Collection::BSKY_PROFILE then :bsky_profile
31
35
  when Collection::BSKY_LISTITEM then :bsky_listitem
36
+ when Collection::BSKY_FEED then :bsky_feed
32
37
  else :unknown
33
38
  end
34
39
  end
@@ -0,0 +1,159 @@
1
+ require_relative 'websocket_message'
2
+ require 'websocket-client-simple'
3
+
4
+ module Skyfall
5
+ class Stream
6
+ SUBSCRIBE_REPOS = "com.atproto.sync.subscribeRepos"
7
+
8
+ NAMED_ENDPOINTS = {
9
+ :subscribe_repos => SUBSCRIBE_REPOS
10
+ }
11
+
12
+ attr_accessor :heartbeat_timeout, :heartbeat_interval
13
+
14
+ def initialize(server, endpoint)
15
+ @endpoint = check_endpoint(endpoint)
16
+ @server = check_hostname(server)
17
+ @handlers = {}
18
+ @heartbeat_mutex = Mutex.new
19
+ @heartbeat_interval = 5
20
+ @heartbeat_timeout = 30
21
+ @last_update = nil
22
+ end
23
+
24
+ def connect
25
+ return if @websocket
26
+
27
+ url = "wss://#{@server}/xrpc/#{@endpoint}"
28
+ handlers = @handlers
29
+ stream = self
30
+
31
+ @websocket = WebSocket::Client::Simple.connect(url) do |ws|
32
+ ws.on :message do |msg|
33
+ stream.notify_heartbeat
34
+ handlers[:raw_message]&.call(msg.data)
35
+
36
+ if handlers[:message]
37
+ atp_message = Skyfall::WebsocketMessage.new(msg.data)
38
+ handlers[:message].call(atp_message)
39
+ end
40
+ end
41
+
42
+ ws.on :open do
43
+ handlers[:connect]&.call
44
+ end
45
+
46
+ ws.on :close do |e|
47
+ handlers[:disconnect]&.call(e)
48
+ end
49
+
50
+ ws.on :error do |e|
51
+ handlers[:error]&.call(e)
52
+ end
53
+ end
54
+
55
+ if @heartbeat_interval && @heartbeat_timeout && @heartbeat_thread.nil?
56
+ hb_interval = @heartbeat_interval
57
+ hb_timeout = @heartbeat_timeout
58
+
59
+ @last_update = Time.now
60
+
61
+ @heartbeat_thread = Thread.new do
62
+ loop do
63
+ sleep(hb_interval)
64
+ @heartbeat_mutex.synchronize do
65
+ if Time.now - @last_update > hb_timeout
66
+ force_restart
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+
74
+ def force_restart
75
+ @websocket.close
76
+ @websocket = nil
77
+
78
+ timeout = 5
79
+
80
+ loop do
81
+ begin
82
+ @handlers[:reconnect]&.call
83
+ connect
84
+ break
85
+ rescue Exception => e
86
+ @handlers[:error]&.call(e)
87
+ sleep(timeout)
88
+ timeout *= 2
89
+ end
90
+ end
91
+
92
+ @last_update = Time.now
93
+ end
94
+
95
+ def disconnect
96
+ return unless @websocket
97
+
98
+ @heartbeat_thread&.kill
99
+ @heartbeat_thread = nil
100
+
101
+ @websocket.close
102
+ @websocket = nil
103
+ end
104
+
105
+ def notify_heartbeat
106
+ @heartbeat_mutex.synchronize { @last_update = Time.now }
107
+ end
108
+
109
+ alias close disconnect
110
+
111
+ def on_message(&block)
112
+ @handlers[:message] = block
113
+ end
114
+
115
+ def on_raw_message(&block)
116
+ @handlers[:raw_message] = block
117
+ end
118
+
119
+ def on_connect(&block)
120
+ @handlers[:connect] = block
121
+ end
122
+
123
+ def on_disconnect(&block)
124
+ @handlers[:disconnect] = block
125
+ end
126
+
127
+ def on_error(&block)
128
+ @handlers[:error] = block
129
+ end
130
+
131
+ def on_reconnect(&block)
132
+ @handlers[:reconnect] = block
133
+ end
134
+
135
+
136
+ private
137
+
138
+ def check_endpoint(endpoint)
139
+ if endpoint.is_a?(String)
140
+ raise ArgumentError("Invalid endpoint name: #{endpoint}") if endpoint.strip.empty? || !endpoint.include?('.')
141
+ elsif endpoint.is_a?(Symbol)
142
+ raise ArgumentError("Unknown endpoint: #{endpoint}") if NAMED_ENDPOINTS[endpoint].nil?
143
+ endpoint = NAMED_ENDPOINTS[endpoint]
144
+ else
145
+ raise ArgumentError("Endpoint should be a string or a symbol")
146
+ end
147
+ end
148
+
149
+ def check_hostname(server)
150
+ if server.is_a?(String)
151
+ raise ArgumentError("Invalid server name: #{server}") if server.strip.empty? || server.include?('/')
152
+ else
153
+ raise ArgumentError("Server name should be a string")
154
+ end
155
+
156
+ server
157
+ end
158
+ end
159
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skyfall
4
- VERSION = "0.0.1"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -11,7 +11,8 @@ module Skyfall
11
11
  class WebsocketMessage
12
12
  using Skyfall::Extensions
13
13
 
14
- attr_reader :type, :repo, :time, :seq, :commit, :blocks, :operations
14
+ attr_reader :type_object, :data_object
15
+ attr_reader :type, :repo, :time, :seq, :commit, :prev, :blocks, :operations
15
16
 
16
17
  def initialize(data)
17
18
  objects = CBOR.decode_sequence(data)
@@ -25,6 +26,7 @@ module Skyfall
25
26
  raise UnsupportedError.new("Unexpected CBOR object: #{@type_object}") unless @type_object['op'] == 1
26
27
 
27
28
  @type = @type_object['t'][1..-1].to_sym
29
+ @operations = []
28
30
 
29
31
  @repo = @data_object['repo']
30
32
  @time = Time.parse(@data_object['time'])
@@ -32,7 +34,9 @@ module Skyfall
32
34
 
33
35
  return unless @type == :commit
34
36
 
35
- @commit = CID.from_cbor_tag(@data_object['commit'])
37
+ @commit = @data_object['commit'] && CID.from_cbor_tag(@data_object['commit'])
38
+ @prev = @data_object['prev'] && CID.from_cbor_tag(@data_object['prev'])
39
+
36
40
  @blocks = CarArchive.new(@data_object['blocks'])
37
41
 
38
42
  @operations = @data_object['ops'].map { |op|
@@ -44,5 +48,11 @@ module Skyfall
44
48
  Operation.new(@repo, path, action, cid, record)
45
49
  }
46
50
  end
51
+
52
+ def inspect
53
+ keys = instance_variables - [:@type_object, :@data_object, :@blocks]
54
+ vars = keys.map { |v| "#{v}=#{instance_variable_get(v).inspect}" }.join(", ")
55
+ "#<#{self.class}:0x#{object_id} #{vars}>"
56
+ end
47
57
  end
48
58
  end
data/lib/skyfall.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'skyfall/stream'
3
4
  require_relative 'skyfall/websocket_message'
4
5
  require_relative 'skyfall/version'
metadata CHANGED
@@ -1,19 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skyfall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Suder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: base32
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.3.4
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.3.4
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: cbor
15
35
  requirement: !ruby/object:Gem::Requirement
16
36
  requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.5'
17
40
  - - ">="
18
41
  - !ruby/object:Gem::Version
19
42
  version: 0.5.9.6
@@ -21,37 +44,48 @@ dependencies:
21
44
  prerelease: false
22
45
  version_requirements: !ruby/object:Gem::Requirement
23
46
  requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.5'
24
50
  - - ">="
25
51
  - !ruby/object:Gem::Version
26
52
  version: 0.5.9.6
27
53
  - !ruby/object:Gem::Dependency
28
- name: base32
54
+ name: websocket-client-simple
29
55
  requirement: !ruby/object:Gem::Requirement
30
56
  requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '0.6'
31
60
  - - ">="
32
61
  - !ruby/object:Gem::Version
33
- version: 0.3.4
62
+ version: 0.6.1
34
63
  type: :runtime
35
64
  prerelease: false
36
65
  version_requirements: !ruby/object:Gem::Requirement
37
66
  requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.6'
38
70
  - - ">="
39
71
  - !ruby/object:Gem::Version
40
- version: 0.3.4
41
- description:
72
+ version: 0.6.1
73
+ description: "\n Skyfall is a Ruby library for connecting to the \"firehose\" of
74
+ the Bluesky social network, i.e. a websocket which\n streams all new posts and
75
+ everything else happening on the Bluesky network in real time. The code connects
76
+ to the\n websocket endpoint, decodes the messages which are encoded in some binary
77
+ formats, and returns the data as Ruby\n objects, which you can filter and save
78
+ to some kind of database (e.g. in order to create a custom feed).\n "
42
79
  email:
43
80
  - jakub.suder@gmail.com
44
81
  executables: []
45
82
  extensions: []
46
83
  extra_rdoc_files: []
47
84
  files:
48
- - ".rspec"
49
85
  - CHANGELOG.md
50
- - Gemfile
51
- - Gemfile.lock
52
- - MIT-LICENSE.txt
86
+ - LICENSE.txt
53
87
  - README.md
54
- - Rakefile
88
+ - example/firehose.rb
55
89
  - lib/skyfall.rb
56
90
  - lib/skyfall/car_archive.rb
57
91
  - lib/skyfall/cid.rb
@@ -59,14 +93,17 @@ files:
59
93
  - lib/skyfall/errors.rb
60
94
  - lib/skyfall/extensions.rb
61
95
  - lib/skyfall/operation.rb
96
+ - lib/skyfall/stream.rb
62
97
  - lib/skyfall/version.rb
63
98
  - lib/skyfall/websocket_message.rb
64
99
  - sig/skyfall.rbs
65
- - skyfall.gemspec
66
100
  homepage: https://github.com/mackuba/skyfall
67
101
  licenses:
68
- - MIT
69
- metadata: {}
102
+ - Zlib
103
+ metadata:
104
+ bug_tracker_uri: https://github.com/mackuba/skyfall/issues
105
+ changelog_uri: https://github.com/mackuba/skyfall/blob/master/CHANGELOG.md
106
+ source_code_uri: https://github.com/mackuba/skyfall
70
107
  post_install_message:
71
108
  rdoc_options: []
72
109
  require_paths:
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in skyfall.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "rspec", "~> 3.0"
data/Gemfile.lock DELETED
@@ -1,38 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- skyfall (0.1.0)
5
- base32 (>= 0.3.4)
6
- cbor (>= 0.5.9.6)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- base32 (0.3.4)
12
- cbor (0.5.9.6)
13
- diff-lcs (1.5.0)
14
- rake (13.0.6)
15
- rspec (3.12.0)
16
- rspec-core (~> 3.12.0)
17
- rspec-expectations (~> 3.12.0)
18
- rspec-mocks (~> 3.12.0)
19
- rspec-core (3.12.2)
20
- rspec-support (~> 3.12.0)
21
- rspec-expectations (3.12.3)
22
- diff-lcs (>= 1.2.0, < 2.0)
23
- rspec-support (~> 3.12.0)
24
- rspec-mocks (3.12.5)
25
- diff-lcs (>= 1.2.0, < 2.0)
26
- rspec-support (~> 3.12.0)
27
- rspec-support (3.12.0)
28
-
29
- PLATFORMS
30
- arm64-darwin-21
31
-
32
- DEPENDENCIES
33
- rake (~> 13.0)
34
- rspec (~> 3.0)
35
- skyfall!
36
-
37
- BUNDLED WITH
38
- 2.4.13
data/MIT-LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2023 Kuba Suder
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
data/skyfall.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/skyfall/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "skyfall"
7
- spec.version = Skyfall::VERSION
8
- spec.authors = ["Kuba Suder"]
9
- spec.email = ["jakub.suder@gmail.com"]
10
-
11
- spec.summary = "A Ruby gem for streaming data from the Bluesky/AtProto firehose"
12
- spec.homepage = "https://github.com/mackuba/skyfall"
13
-
14
- # spec.description = "TODO: Write a longer description or delete this line."
15
-
16
- spec.license = "MIT"
17
- spec.required_ruby_version = ">= 2.6.0"
18
-
19
- # spec.metadata["homepage_uri"] = spec.homepage
20
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
21
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
22
-
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(__dir__) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
28
- end
29
- end
30
-
31
- spec.require_paths = ["lib"]
32
-
33
- spec.add_dependency 'cbor', '>= 0.5.9.6'
34
- spec.add_dependency 'base32', '>= 0.3.4'
35
- end