tangany 0.0.1 → 0.0.2

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: 231c06807131406069b00182b5d48bbdae6309253401bb18231ae31b9eb3c29e
4
- data.tar.gz: 6d64215deff546b3ac0e34ced1f1f4177909749076552227a2e98ec6b5dcb793
3
+ metadata.gz: fc14c5cb9206bc4b59e4f985c1415d03527f33ba61b4e6477c008245d0b8226a
4
+ data.tar.gz: c2ddb84c20cc66e450be0044d556747b62176becd1edc3d77a21ca01f474c4b0
5
5
  SHA512:
6
- metadata.gz: 1bb6d0ed3cb5cfc1a48fe5a8eac480472218799e55b39b0cbd1906d2f78f547116e62e9e2d5f2d000ab2d9e1dcd2f0072e913c6d40dc1d81ba43295917d94839
7
- data.tar.gz: db64cc160ac9b20a417833bee56cd10a174d7e4cdad05da331718847b132a9bb22e60ce2523e40e0f26bd99b3730278736492e19a788e278c0503147d8b1e6e1
6
+ metadata.gz: 2e3442b1169b82f6febfdeaca8b219e8fe71869990108134707b290e0d8b613582445ec88acf5e9a96bde7795cd003635e5581637dfb1ffc4ffe928131f167a2
7
+ data.tar.gz: c9361bd62deb1cf57151de66f724a7a83e26d0733127505d29423cd131bdb8d30b599e2a2920eb64e9435e0ebe857433ebe1716a3e291006bf657e68579916cf
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,45 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.1]
3
+ ## 0.0.2 - 2022-12-02
4
4
 
5
- - Initial release
5
+ ### What's Changed
6
+
7
+ - README badges and gemspec links by @panteo in https://github.com/bitbond/tangany-ruby/pull/5
8
+
9
+ ## 0.0.1 - 2022-12-01
10
+
11
+ ### What's Changed
12
+
13
+ - Customers API client
14
+ - Natural persons
15
+ - List
16
+ - Create
17
+ - Retrieve
18
+ - Update
19
+ - Delete
20
+ - Customers
21
+ - List
22
+ - Create
23
+ - Retrieve
24
+ - Update
25
+ - Delete
26
+ - Wallet links
27
+ - List
28
+ - Create (both with address and wallet name)
29
+ - Retrieve
30
+ - Delete
31
+ - Custody API client
32
+ - Wallets
33
+ - List
34
+ - Create
35
+ - Retrieve
36
+ - Update
37
+ - Delete
38
+ - Wallet statuses
39
+ - Retrieve
40
+
41
+ ### New Contributors
42
+
43
+ - @panteo made their first contribution in https://github.com/bitbond/tangany-ruby/pull/2
44
+
45
+ **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.2)
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"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tangany
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
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.2
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: 2022-12-02 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
@@ -116,6 +116,8 @@ files:
116
116
  - bin/setup
117
117
  - bin/test-live
118
118
  - lib/config/chains.json
119
+ - lib/ruby_critic/formatter/badge_formatter.rb
120
+ - lib/simplecov/formatter/badge_formatter.rb
119
121
  - lib/tangany.rb
120
122
  - lib/tangany/application_contract.rb
121
123
  - lib/tangany/collection.rb
@@ -185,15 +187,15 @@ files:
185
187
  - lib/tangany/types.rb
186
188
  - lib/tangany/version.rb
187
189
  - sig/tangany.rbs
188
- homepage: https://docs.tangany.com/
190
+ homepage: https://github.com/bitbond/tangany-ruby
189
191
  licenses:
190
192
  - MIT
191
193
  metadata:
192
194
  bug_tracker_uri: https://github.com/bitbond/tangany-ruby/issues
193
195
  changelog_uri: https://github.com/bitbond/tangany-ruby/blob/master/CHANGELOG.md
194
- documentation_uri: https://docs.tangany.com/
196
+ documentation_uri: https://github.com/bitbond/tangany-ruby
195
197
  github_repo: ssh://github.com/bitbond/tangany-ruby
196
- homepage_uri: https://docs.tangany.com/
198
+ homepage_uri: https://github.com/bitbond/tangany-ruby
197
199
  source_code_uri: https://github.com/bitbond/tangany-ruby
198
200
  post_install_message:
199
201
  rdoc_options: []