skyfall 0.0.1 → 0.1.0

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: 4045bf9dcd6a2ed5078cb557a64dc67c9e3d3c829a2909d9451c72c89f591c42
4
+ data.tar.gz: 1b2813d54fbd7cdd34334404f1e9607d05bbf923584009eedd0b630f8182fd7b
5
5
  SHA512:
6
- metadata.gz: dc9c6ea0447c1f4310c1772ee093e88f98666ee925f6b81219c60b09a8a761f6c05a9a56449af57d270109148c3fd1a4d1420ceb8cd9a39f27d74d21c430e9cf
7
- data.tar.gz: db9097d342156c20e043b59da778fc11cb2d9281fa2c3c432744b6b4fa81e0a505dda6a4670357bdbfb435f87e7436a77fb80953a74bb0c40a7a3df457a5259e
6
+ metadata.gz: 5c439017a0d277eb20977600847e74c8d52570ebb4eed3db5c39624d573b44dcc7b2404154131cf828f15df97b132a2b16de2eb608b6ed3a64e52c5a8f80b1e1
7
+ data.tar.gz: feadd80a468759c3a1a62b634e22ac4aa950bad708ffed6d7ed77b575a21c8841c01a0dc145da039f36203be0f92695d251f76e41de395d2296b4a1afd0e87fe
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
- ## [Unreleased]
1
+ ## [0.1.0] - 2023-06-01
2
2
 
3
- ## [0.1.0] - 2023-05-31
3
+ - connecting to the firehose websocket
4
4
 
5
- - Initial release
5
+ ## [0.0.1] - 2023-05-31
6
+
7
+ Initial release:
8
+
9
+ - parsing CBOR objects from a websocket message
10
+ - 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,95 @@
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
56
+ - `operations` - list of operations (usually one)
57
+
58
+ Operations are objects of type `Operation` and have such properties:
59
+
60
+ - `repo` (string) - DID of the repository (user account)
61
+ - `collection` (string) - name of the relevant collection in the repository, e.g. `app.bsky.feed.post` for posts
62
+ - `path` (string) - the path part of the at:// URI - collection name + ID (rkey) of the item
63
+ - `action` (symbol) - `:create`, `:update` or `:delete`
64
+ - `uri` (string) - the at:// URI
65
+ - `type` (symbol) - short name of the collection, e.g. `:bsky_post`
66
+ - `cid` - CID
67
+
68
+ Most 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).
69
+
70
+ So for example, in order to filter only "create post" operations and print their details, you can do something like this:
71
+
72
+ ```rb
73
+ sky.on_message do |m|
74
+ next if m.type != :commit
75
+
76
+ m.operations.each do |op|
77
+ next unless op.action == :create && op.type == :bsky_post
22
78
 
23
- ## Development
79
+ puts "#{op.repo}:"
80
+ puts op.raw_record['text']
81
+ puts
82
+ end
83
+ end
84
+ ```
24
85
 
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.
86
+ See complete example in [example/firehose.rb](https://github.com/mackuba/skyfall/blob/master/example/firehose.rb).
26
87
 
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
88
 
29
- ## Contributing
89
+ ## Credits
30
90
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/skyfall.
91
+ Copyright © 2023 Kuba Suder ([@mackuba.eu](https://bsky.app/profile/mackuba.eu)).
32
92
 
33
- ## License
93
+ The code is available under the terms of the [zlib license](https://choosealicense.com/licenses/zlib/) (permissive, similar to MIT).
34
94
 
35
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
95
+ 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
@@ -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
@@ -0,0 +1,101 @@
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
+ def initialize(server, endpoint)
13
+ @endpoint = check_endpoint(endpoint)
14
+ @server = check_hostname(server)
15
+ @handlers = {}
16
+ end
17
+
18
+ def connect
19
+ return if @websocket
20
+
21
+ url = "wss://#{@server}/xrpc/#{@endpoint}"
22
+ handlers = @handlers
23
+
24
+ @websocket = WebSocket::Client::Simple.connect(url) do |ws|
25
+ ws.on :message do |msg|
26
+ handlers[:raw_message]&.call(msg.data)
27
+
28
+ if handlers[:message]
29
+ atp_message = Skyfall::WebsocketMessage.new(msg.data)
30
+ handlers[:message].call(atp_message)
31
+ end
32
+ end
33
+
34
+ ws.on :open do
35
+ handlers[:connect]&.call
36
+ end
37
+
38
+ ws.on :close do |e|
39
+ handlers[:disconnect]&.call(e)
40
+ end
41
+
42
+ ws.on :error do |e|
43
+ handlers[:error]&.call(e)
44
+ end
45
+ end
46
+ end
47
+
48
+ def disconnect
49
+ return unless @websocket
50
+
51
+ @websocket.close
52
+ @websocket = nil
53
+ end
54
+
55
+ alias close disconnect
56
+
57
+ def on_message(&block)
58
+ @handlers[:message] = block
59
+ end
60
+
61
+ def on_raw_message(&block)
62
+ @handlers[:raw_message] = block
63
+ end
64
+
65
+ def on_connect(&block)
66
+ @handlers[:connect] = block
67
+ end
68
+
69
+ def on_disconnect(&block)
70
+ @handlers[:disconnect] = block
71
+ end
72
+
73
+ def on_error(&block)
74
+ @handlers[:error] = block
75
+ end
76
+
77
+
78
+ private
79
+
80
+ def check_endpoint(endpoint)
81
+ if endpoint.is_a?(String)
82
+ raise ArgumentError("Invalid endpoint name: #{endpoint}") if endpoint.strip.empty? || !endpoint.include?('.')
83
+ elsif endpoint.is_a?(Symbol)
84
+ raise ArgumentError("Unknown endpoint: #{endpoint}") if NAMED_ENDPOINTS[endpoint].nil?
85
+ endpoint = NAMED_ENDPOINTS[endpoint]
86
+ else
87
+ raise ArgumentError("Endpoint should be a string or a symbol")
88
+ end
89
+ end
90
+
91
+ def check_hostname(server)
92
+ if server.is_a?(String)
93
+ raise ArgumentError("Invalid server name: #{server}") if server.strip.empty? || server.include?('/')
94
+ else
95
+ raise ArgumentError("Server name should be a string")
96
+ end
97
+
98
+ server
99
+ end
100
+ end
101
+ 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.0"
5
5
  end
@@ -11,6 +11,7 @@ module Skyfall
11
11
  class WebsocketMessage
12
12
  using Skyfall::Extensions
13
13
 
14
+ attr_reader :type_object, :data_object
14
15
  attr_reader :type, :repo, :time, :seq, :commit, :blocks, :operations
15
16
 
16
17
  def initialize(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'])
@@ -44,5 +46,11 @@ module Skyfall
44
46
  Operation.new(@repo, path, action, cid, record)
45
47
  }
46
48
  end
49
+
50
+ def inspect
51
+ keys = instance_variables - [:@type_object, :@data_object, :@blocks]
52
+ vars = keys.map { |v| "#{v}=#{instance_variable_get(v).inspect}" }.join(", ")
53
+ "#<#{self.class}:0x#{object_id} #{vars}>"
54
+ end
47
55
  end
48
56
  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,7 +1,7 @@
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.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Suder
@@ -10,10 +10,33 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2023-06-01 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