coins_paid_api 1.3.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +53 -0
- data/coins_paid_api.gemspec +1 -1
- data/lib/coins_paid/api/callback_data.rb +1 -0
- data/lib/coins_paid/api/withdrawal.rb +0 -1
- data/spec/callback_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/withdrawal_spec.rb +0 -1
- metadata +10 -11
- data/.circleci/config.yml +0 -108
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae63814f5c622b449302060a1d1bc2695a58a9b6fe1b105dcd02fe222ab28ab5
|
4
|
+
data.tar.gz: 427f336033b8974fa444a4a6d37616e92f52af18a1f07636096ae8e2eec5d36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e1590d6e1ac41a1d68fc99b1e59f319ee451c9ad5edf884750efd358d9f0a93e72613ed2a82fc94107083aa8654394e352d7d103e955a007b0df9c0edb9a35c
|
7
|
+
data.tar.gz: 2c23d8505878c8a9293a76de9c7e2484e5160eb7bcbb848b5e6e2109426a5be6281040627465719d3991ff3d001680f201f07aea89166bd4fa80d718bd711654
|
@@ -0,0 +1,53 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: Web Application
|
3
|
+
agent:
|
4
|
+
machine:
|
5
|
+
type: e1-standard-2
|
6
|
+
os_image: ubuntu2004
|
7
|
+
auto_cancel:
|
8
|
+
running:
|
9
|
+
when: "branch != 'master'"
|
10
|
+
blocks:
|
11
|
+
- name: Install dependencies
|
12
|
+
task:
|
13
|
+
jobs:
|
14
|
+
- name: Run Bundler
|
15
|
+
commands:
|
16
|
+
- checkout
|
17
|
+
- cache restore gems-$SEMAPHORE_GIT_SHA
|
18
|
+
- sem-version ruby 2.7.5
|
19
|
+
- bundle config set --local path 'vendor/bundle'
|
20
|
+
- bundle install --jobs=4 --retry=3
|
21
|
+
- cache store gems-$SEMAPHORE_GIT_SHA vendor/bundle
|
22
|
+
- name: Download CC
|
23
|
+
commands:
|
24
|
+
- mkdir -p cc/
|
25
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64 > ~/cc/cc-test-reporter
|
26
|
+
- chmod +x ~/cc/cc-test-reporter
|
27
|
+
- cache store cc-test-reporter ~/cc/cc-test-reporter
|
28
|
+
- name: Run Tests
|
29
|
+
task:
|
30
|
+
env_vars:
|
31
|
+
- name: COVERAGE
|
32
|
+
value: '1'
|
33
|
+
jobs:
|
34
|
+
- name: Run Rspec
|
35
|
+
commands:
|
36
|
+
- checkout
|
37
|
+
- cache restore cc-test-reporter
|
38
|
+
- cache restore gems-$SEMAPHORE_GIT_SHA
|
39
|
+
- sem-version ruby 2.7.5
|
40
|
+
- bundle config set --local path 'vendor/bundle'
|
41
|
+
- bundle exec rspec spec
|
42
|
+
- ~/cc/cc-test-reporter format-coverage -t simplecov -o ~/cc/codeclimate.rspec.json tmp/coverage/.resultset.json
|
43
|
+
- cache store rspec-report-$SEMAPHORE_GIT_SHA ~/cc/codeclimate.rspec.json
|
44
|
+
- name: Upload CC report
|
45
|
+
task:
|
46
|
+
secrets:
|
47
|
+
- name: private-repo
|
48
|
+
jobs:
|
49
|
+
- name: Upload coverage result
|
50
|
+
commands:
|
51
|
+
- cache restore cc-test-reporter
|
52
|
+
- cache restore rspec-report-$SEMAPHORE_GIT_SHA
|
53
|
+
- ~/cc/cc-test-reporter upload-coverage -i ~/cc/codeclimate.rspec.json
|
data/coins_paid_api.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'coins_paid_api'
|
3
3
|
s.authors = ['Artem Biserov(artembiserov)', 'Oleg Ivanov(morhekil)']
|
4
|
-
s.version = '1.
|
4
|
+
s.version = '2.1.0'
|
5
5
|
s.files = `git ls-files`.split("\n")
|
6
6
|
s.summary = 'Coins Paid Integration'
|
7
7
|
s.license = 'MIT'
|
data/spec/callback_spec.rb
CHANGED
@@ -36,6 +36,7 @@ describe CoinsPaid::API, '.callback' do
|
|
36
36
|
status: 'confirmed',
|
37
37
|
error: '',
|
38
38
|
crypto_address: {
|
39
|
+
address: '123abc',
|
39
40
|
currency: 'BTC'
|
40
41
|
},
|
41
42
|
transactions: [
|
@@ -60,6 +61,7 @@ describe CoinsPaid::API, '.callback' do
|
|
60
61
|
status: 'cancelled',
|
61
62
|
error: 'Invalid params: expected a hex-encoded hash with 0x prefix.',
|
62
63
|
crypto_address: {
|
64
|
+
address: '123abc',
|
63
65
|
currency: 'BTC'
|
64
66
|
},
|
65
67
|
transactions: [
|
@@ -82,6 +84,7 @@ describe CoinsPaid::API, '.callback' do
|
|
82
84
|
foreign_id: '20',
|
83
85
|
error: '',
|
84
86
|
crypto_address: {
|
87
|
+
address: '1k2btnz8cqnfbphaq729mdj8w6g3w2nbbl',
|
85
88
|
currency: 'EUR'
|
86
89
|
},
|
87
90
|
transactions: [
|
@@ -106,6 +109,7 @@ describe CoinsPaid::API, '.callback' do
|
|
106
109
|
foreign_id: '20',
|
107
110
|
error: 'Invalid params: expected a hex-encoded hash with 0x prefix.',
|
108
111
|
crypto_address: {
|
112
|
+
address: '1k2btnz8cqnfbphaq729mdj8w6g3w2nbbl',
|
109
113
|
currency: 'EUR'
|
110
114
|
},
|
111
115
|
transactions: [
|
data/spec/spec_helper.rb
CHANGED
data/spec/withdrawal_spec.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coins_paid_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Biserov(artembiserov)
|
8
8
|
- Oleg Ivanov(morhekil)
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-struct
|
@@ -81,16 +81,16 @@ dependencies:
|
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '3.7'
|
84
|
-
description:
|
85
|
-
email:
|
84
|
+
description:
|
85
|
+
email:
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- ".circleci/config.yml"
|
91
90
|
- ".gitignore"
|
92
91
|
- ".rspec"
|
93
92
|
- ".rubocop.yml"
|
93
|
+
- ".semaphore/semaphore.yml"
|
94
94
|
- Gemfile
|
95
95
|
- coins_paid_api.gemspec
|
96
96
|
- lib/coins_paid/api.rb
|
@@ -113,11 +113,11 @@ files:
|
|
113
113
|
- spec/support/shared/data.rb
|
114
114
|
- spec/take_address_spec.rb
|
115
115
|
- spec/withdrawal_spec.rb
|
116
|
-
homepage:
|
116
|
+
homepage:
|
117
117
|
licenses:
|
118
118
|
- MIT
|
119
119
|
metadata: {}
|
120
|
-
post_install_message:
|
120
|
+
post_install_message:
|
121
121
|
rdoc_options: []
|
122
122
|
require_paths:
|
123
123
|
- lib
|
@@ -132,9 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
|
-
|
136
|
-
|
137
|
-
signing_key:
|
135
|
+
rubygems_version: 3.1.6
|
136
|
+
signing_key:
|
138
137
|
specification_version: 4
|
139
138
|
summary: Coins Paid Integration
|
140
139
|
test_files: []
|
data/.circleci/config.yml
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
version: 2.0
|
2
|
-
defaults: &defaults
|
3
|
-
docker:
|
4
|
-
- image: circleci/ruby:2.5-stretch-node
|
5
|
-
working_directory: ~/coins_paid_api
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
checkout_code:
|
9
|
-
<<: *defaults
|
10
|
-
steps:
|
11
|
-
- checkout
|
12
|
-
- run: mkdir log
|
13
|
-
- save_cache:
|
14
|
-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
|
15
|
-
paths:
|
16
|
-
- ~/coins_paid_api
|
17
|
-
|
18
|
-
download_cc_reporter:
|
19
|
-
<<: *defaults
|
20
|
-
steps:
|
21
|
-
- run:
|
22
|
-
name: Download cc-test-reporter
|
23
|
-
command: |
|
24
|
-
mkdir -p cc/
|
25
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc/cc-test-reporter
|
26
|
-
chmod +x ./cc/cc-test-reporter
|
27
|
-
- persist_to_workspace:
|
28
|
-
root: ~/coins_paid_api
|
29
|
-
paths:
|
30
|
-
- cc/cc-test-reporter
|
31
|
-
|
32
|
-
run_bundler:
|
33
|
-
<<: *defaults
|
34
|
-
steps:
|
35
|
-
- restore_cache:
|
36
|
-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
|
37
|
-
- restore_cache:
|
38
|
-
key: v1-bundle-{{ checksum "Gemfile" }}
|
39
|
-
- run: echo "export rvm_ignore_gemsets_flag=1" >> ~/.rvmrc
|
40
|
-
- run: sudo apt-get update && sudo apt-get install -y libsodium-dev
|
41
|
-
- run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
42
|
-
- save_cache:
|
43
|
-
key: v1-bundle-{{ checksum "Gemfile" }}
|
44
|
-
paths:
|
45
|
-
- ~/coins_paid_api/vendor/bundle
|
46
|
-
|
47
|
-
run_rspec_tests:
|
48
|
-
<<: *defaults
|
49
|
-
docker:
|
50
|
-
- image: circleci/ruby:2.5-stretch-node
|
51
|
-
environment:
|
52
|
-
RACK_ENV: "test"
|
53
|
-
CIRCLE_ARTIFACTS: "./tmp"
|
54
|
-
steps:
|
55
|
-
- restore_cache:
|
56
|
-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
|
57
|
-
- restore_cache:
|
58
|
-
key: v1-bundle-{{ checksum "Gemfile" }}
|
59
|
-
- attach_workspace:
|
60
|
-
at: ~/coins_paid_api
|
61
|
-
- run: sudo apt-get update && sudo apt-get install -y libsodium-dev
|
62
|
-
- run: bundle check --path vendor/bundle
|
63
|
-
- run: bundle exec rspec spec
|
64
|
-
- run: ./cc/cc-test-reporter format-coverage -t simplecov -o cc/codeclimate.rspec.json tmp/coverage/.resultset.json
|
65
|
-
- persist_to_workspace:
|
66
|
-
root: ~/coins_paid_api
|
67
|
-
paths:
|
68
|
-
- cc/codeclimate.rspec.json
|
69
|
-
|
70
|
-
upload_cc_coverage:
|
71
|
-
<<: *defaults
|
72
|
-
steps:
|
73
|
-
- attach_workspace:
|
74
|
-
at: ~/coins_paid_api
|
75
|
-
- run:
|
76
|
-
name: Upload coverage results to Code Climate
|
77
|
-
command: |
|
78
|
-
./cc/cc-test-reporter upload-coverage -i cc/codeclimate.rspec.json
|
79
|
-
|
80
|
-
deploy:
|
81
|
-
<<: *defaults
|
82
|
-
steps:
|
83
|
-
- restore_cache:
|
84
|
-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
|
85
|
-
- restore_cache:
|
86
|
-
key: v1-bundle-{{ checksum "Gemfile" }}
|
87
|
-
- run: mkdir -p ~/.ssh && ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
88
|
-
- run: sudo apt-get update && sudo apt-get install -y libsodium-dev
|
89
|
-
- run: bundle check --path vendor/bundle
|
90
|
-
- run: bundle exec rake deploy:branch_or_label
|
91
|
-
|
92
|
-
workflows:
|
93
|
-
version: 2
|
94
|
-
build_test_deploy:
|
95
|
-
jobs:
|
96
|
-
- checkout_code
|
97
|
-
- download_cc_reporter:
|
98
|
-
requires:
|
99
|
-
- checkout_code
|
100
|
-
- run_bundler:
|
101
|
-
requires:
|
102
|
-
- download_cc_reporter
|
103
|
-
- run_rspec_tests:
|
104
|
-
requires:
|
105
|
-
- run_bundler
|
106
|
-
- upload_cc_coverage:
|
107
|
-
requires:
|
108
|
-
- run_rspec_tests
|