tangany 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 231c06807131406069b00182b5d48bbdae6309253401bb18231ae31b9eb3c29e
4
- data.tar.gz: 6d64215deff546b3ac0e34ced1f1f4177909749076552227a2e98ec6b5dcb793
3
+ metadata.gz: 8494b7c73b8b81a74f65f763c5d1875c60cc41515bee6caf6655f7e187752963
4
+ data.tar.gz: deb5d9d7e13d9fd6f765ef4ed15727e8f3e8840ed3bdd7fb60f1eb7f2b98bf82
5
5
  SHA512:
6
- metadata.gz: 1bb6d0ed3cb5cfc1a48fe5a8eac480472218799e55b39b0cbd1906d2f78f547116e62e9e2d5f2d000ab2d9e1dcd2f0072e913c6d40dc1d81ba43295917d94839
7
- data.tar.gz: db64cc160ac9b20a417833bee56cd10a174d7e4cdad05da331718847b132a9bb22e60ce2523e40e0f26bd99b3730278736492e19a788e278c0503147d8b1e6e1
6
+ metadata.gz: bd198f5dce065c4c7915743d0624913f5637538f0120e7262066cd28cc1a26754418f1c59ca13e09b881727ec0a0ccc297bf94613570644bc2a676d02ac19f7f
7
+ data.tar.gz: 35bda8d7bc3825a5934bcef0841c322dd23966ad02f179960c6a626a19425dc0b7cfcc511538d83546d00eb373edd37cb9d9f8582369f73be1a662151c35c219
data/.simplecov CHANGED
@@ -1,4 +1,6 @@
1
1
  SimpleCov.configure do
2
+ add_filter "/lib/ruby_critic/"
3
+ add_filter "/lib/simplecov/"
2
4
  add_filter "/lib/tangany/version.rb"
3
5
  add_filter "/spec/"
4
6
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.1]
3
+ ## 0.0.3 - 2023-01-16
4
4
 
5
- - Initial release
5
+ ## What's Changed
6
+
7
+ - Better logging in test live by @panteo in https://github.com/bitbond/tangany-ruby/pull/6
8
+
9
+ **Full Changelog**: https://github.com/bitbond/tangany-ruby/compare/v0.0.2...v0.0.3
10
+
11
+ ## 0.0.2 - 2022-12-02
12
+
13
+ ### What's Changed
14
+
15
+ - README badges and gemspec links by @panteo in https://github.com/bitbond/tangany-ruby/pull/5
16
+
17
+ **Full Changelog**: https://github.com/bitbond/tangany-ruby/compare/v0.0.1...v0.0.2
18
+
19
+ ## 0.0.1 - 2022-12-01
20
+
21
+ ### What's Changed
22
+
23
+ - Customers API client
24
+ - Natural persons
25
+ - List
26
+ - Create
27
+ - Retrieve
28
+ - Update
29
+ - Delete
30
+ - Customers
31
+ - List
32
+ - Create
33
+ - Retrieve
34
+ - Update
35
+ - Delete
36
+ - Wallet links
37
+ - List
38
+ - Create (both with address and wallet name)
39
+ - Retrieve
40
+ - Delete
41
+ - Custody API client
42
+ - Wallets
43
+ - List
44
+ - Create
45
+ - Retrieve
46
+ - Update
47
+ - Delete
48
+ - Wallet statuses
49
+ - Retrieve
50
+
51
+ ### New Contributors
52
+
53
+ - @panteo made their first contribution in https://github.com/bitbond/tangany-ruby/pull/2
54
+
55
+ **Full Changelog**: https://github.com/bitbond/tangany-ruby/commits/v0.0.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tangany (0.0.1)
4
+ tangany (0.0.3)
5
5
  activesupport (>= 6.0, < 8.0.0)
6
6
  dry-struct (>= 1.6, < 2.0.0)
7
7
  dry-validation (>= 1.10, < 2.0.0)
data/README.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # Tangany Ruby Library
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/tangany.svg)](https://badge.fury.io/rb/tangany)
3
4
  [![CI](https://github.com/bitbond/tangany-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/bitbond/tangany-ruby/actions/workflows/ci.yml)
5
+ ![Test coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
6
+ ![Code quality](https://img.shields.io/badge/quality-93%25-green)
4
7
 
5
8
  The Tangany Ruby library provides convenient access to the Tangany APIs from applications written in the Ruby language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.
6
9
 
7
10
  ---
8
11
 
12
+ ## Documentation
13
+
14
+ See the [API docs](https://docs.tangany.com) for more details.
15
+
9
16
  ## Installation
10
17
 
11
18
  You don't need this source code unless you want to modify the gem. If you just want to use the package, just run:
@@ -276,6 +283,12 @@ wallet_link = customers_client.wallet_links.create(
276
283
  wallet_link = customers_client.wallet_links.retrieve("wl_123456789")
277
284
  ```
278
285
 
286
+ #### Delete wallet link
287
+
288
+ ```ruby
289
+ response = customers_client.wallet_links.delete("wl_123456789")
290
+ ```
291
+
279
292
  ---
280
293
 
281
294
  ## Custody API
data/Rakefile CHANGED
@@ -14,10 +14,10 @@ task :quality_check do
14
14
 
15
15
  puts "== Quality report generation ".ljust(80, "=")
16
16
  puts
17
- paths = FileList.new(
18
- "lib/**/*.rb"
19
- ).join(" ")
20
- abort unless system("rubycritic #{paths}")
17
+ excluded_paths = FileList.new("lib/ruby_critic/**/*", "lib/simplecov/**/*")
18
+ paths = FileList.new("lib/**/*.rb").exclude(*excluded_paths).join(" ")
19
+ badge_formatter_path = File.expand_path("../lib/ruby_critic/formatter/badge_formatter.rb", __FILE__)
20
+ abort unless system("rubycritic #{paths} --custom-format #{badge_formatter_path}:RubyCritic::Formatter::BadgeFormatter")
21
21
  end
22
22
 
23
23
  desc "Regenerates the fixtures"
data/SECURITY.md ADDED
@@ -0,0 +1,8 @@
1
+ # Security Policy
2
+
3
+ ### Reporting a vulnerability
4
+
5
+ Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors.
6
+
7
+ Security issues in this open-source project can be safely reported to [service@bitbond.com](mailto:service@bitbond.com).
8
+ Bitbond's security team will triage your report and respond according to its impact.
data/bin/test-live CHANGED
@@ -148,7 +148,7 @@ begin
148
148
 
149
149
  puts "== Tests run... ".ljust(80, "=")
150
150
  rescue => e
151
- puts e.message
151
+ puts " -> \e[31m#{e.message}\e[0m"
152
152
  exit 1
153
153
  ensure
154
154
  puts
@@ -0,0 +1,32 @@
1
+ module RubyCritic
2
+ module Formatter
3
+ class BadgeFormatter
4
+ COLORS = {
5
+ 0..59 => "red",
6
+ 60..69 => "orange",
7
+ 70..79 => "yellow",
8
+ 80..89 => "yellowgreen",
9
+ 90..94 => "green",
10
+ 95..100 => "brightgreen"
11
+ }.freeze
12
+
13
+ def initialize(analysed_modules)
14
+ @percentage = analysed_modules.score.to_i
15
+ end
16
+
17
+ def generate_report
18
+ readme_update
19
+ end
20
+
21
+ private
22
+
23
+ attr_reader :percentage
24
+
25
+ def readme_update
26
+ color = COLORS.find { |range, _| range.include?(percentage) }.last
27
+ badge = "![Code quality](https://img.shields.io/badge/quality-#{percentage}%25-#{color})"
28
+ File.write("README.md", File.read("README.md").gsub(/!\[Code quality\]\(.*\)/, badge))
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,27 @@
1
+ module SimpleCov
2
+ module Formatter
3
+ class BadgeFormatter
4
+ COLORS = {
5
+ 0..69 => "red",
6
+ 70..79 => "orange",
7
+ 80..89 => "yellow",
8
+ 90..94 => "yellowgreen",
9
+ 95..99 => "green",
10
+ 100..100 => "brightgreen"
11
+ }.freeze
12
+
13
+ def format(result)
14
+ percentage = result.source_files.covered_percent.to_i
15
+ readme_update(percentage)
16
+ end
17
+
18
+ private
19
+
20
+ def readme_update(percentage)
21
+ color = COLORS.find { |range, _| range.include?(percentage) }.last
22
+ badge = "![Test coverage](https://img.shields.io/badge/coverage-#{percentage}%25-#{color})"
23
+ File.write("README.md", File.read("README.md").gsub(/!\[Test coverage\]\(.*\)/, badge))
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,6 +2,7 @@ module Tangany
2
2
  module Customers
3
3
  class NaturalPersonsResource < Resource
4
4
  BASE_PATH = "entities/natural-persons"
5
+
5
6
  def create(**params)
6
7
  NaturalPerson.new(post_request(BASE_PATH, body: sanitize_params!(params).to_json).body)
7
8
  end
@@ -1,3 +1,3 @@
1
1
  module Tangany
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tangany
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bitbond
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-01 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -90,9 +90,9 @@ dependencies:
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: 2.8.0
93
- description: Tangany is a German provider for custody of digital assets and crypto.See
94
- https://tangany.com/ for details.
95
- email: support@bitbond.com
93
+ description: Tangany is a German provider for custody of digital assets and crypto.
94
+ See https://tangany.com/ for details.
95
+ email: service@bitbond.com
96
96
  executables:
97
97
  - console
98
98
  - setup
@@ -112,10 +112,13 @@ files:
112
112
  - LICENSE.txt
113
113
  - README.md
114
114
  - Rakefile
115
+ - SECURITY.md
115
116
  - bin/console
116
117
  - bin/setup
117
118
  - bin/test-live
118
119
  - lib/config/chains.json
120
+ - lib/ruby_critic/formatter/badge_formatter.rb
121
+ - lib/simplecov/formatter/badge_formatter.rb
119
122
  - lib/tangany.rb
120
123
  - lib/tangany/application_contract.rb
121
124
  - lib/tangany/collection.rb
@@ -185,15 +188,15 @@ files:
185
188
  - lib/tangany/types.rb
186
189
  - lib/tangany/version.rb
187
190
  - sig/tangany.rbs
188
- homepage: https://docs.tangany.com/
191
+ homepage: https://github.com/bitbond/tangany-ruby
189
192
  licenses:
190
193
  - MIT
191
194
  metadata:
192
195
  bug_tracker_uri: https://github.com/bitbond/tangany-ruby/issues
193
196
  changelog_uri: https://github.com/bitbond/tangany-ruby/blob/master/CHANGELOG.md
194
- documentation_uri: https://docs.tangany.com/
197
+ documentation_uri: https://github.com/bitbond/tangany-ruby
195
198
  github_repo: ssh://github.com/bitbond/tangany-ruby
196
- homepage_uri: https://docs.tangany.com/
199
+ homepage_uri: https://github.com/bitbond/tangany-ruby
197
200
  source_code_uri: https://github.com/bitbond/tangany-ruby
198
201
  post_install_message:
199
202
  rdoc_options: []