tangany 0.0.1 → 0.0.2
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 +4 -4
- data/.simplecov +2 -0
- data/CHANGELOG.md +42 -2
- data/Gemfile.lock +1 -1
- data/README.md +13 -0
- data/Rakefile +4 -4
- data/lib/ruby_critic/formatter/badge_formatter.rb +32 -0
- data/lib/simplecov/formatter/badge_formatter.rb +27 -0
- data/lib/tangany/version.rb +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc14c5cb9206bc4b59e4f985c1415d03527f33ba61b4e6477c008245d0b8226a
|
4
|
+
data.tar.gz: c2ddb84c20cc66e450be0044d556747b62176becd1edc3d77a21ca01f474c4b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e3442b1169b82f6febfdeaca8b219e8fe71869990108134707b290e0d8b613582445ec88acf5e9a96bde7795cd003635e5581637dfb1ffc4ffe928131f167a2
|
7
|
+
data.tar.gz: c9361bd62deb1cf57151de66f724a7a83e26d0733127505d29423cd131bdb8d30b599e2a2920eb64e9435e0ebe857433ebe1716a3e291006bf657e68579916cf
|
data/.simplecov
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.0.2 - 2022-12-02
|
4
4
|
|
5
|
-
|
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
data/README.md
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
# Tangany Ruby Library
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/tangany)
|
3
4
|
[](https://github.com/bitbond/tangany-ruby/actions/workflows/ci.yml)
|
5
|
+

|
6
|
+

|
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
|
-
|
18
|
-
|
19
|
-
|
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 = ""
|
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 = ""
|
23
|
+
File.write("README.md", File.read("README.md").gsub(/!\[Test coverage\]\(.*\)/, badge))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/tangany/version.rb
CHANGED
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.
|
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-
|
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.
|
94
|
-
https://tangany.com/ for details.
|
95
|
-
email:
|
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://
|
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://
|
196
|
+
documentation_uri: https://github.com/bitbond/tangany-ruby
|
195
197
|
github_repo: ssh://github.com/bitbond/tangany-ruby
|
196
|
-
homepage_uri: https://
|
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: []
|