darujme_cz 0.3.0 → 0.4.0
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/.github/workflows/ci.yml +23 -0
- data/.rubocop.yml +12 -9
- data/CHANGELOG.md +5 -0
- data/Rakefile +1 -1
- data/darujme_cz.gemspec +13 -13
- data/lib/darujme_cz/address.rb +2 -4
- data/lib/darujme_cz/base.rb +4 -8
- data/lib/darujme_cz/connection.rb +6 -8
- data/lib/darujme_cz/donor.rb +1 -3
- data/lib/darujme_cz/pledge.rb +0 -2
- data/lib/darujme_cz/project.rb +0 -2
- data/lib/darujme_cz/transaction.rb +1 -2
- data/lib/darujme_cz/version.rb +1 -1
- data/spec/models/connect_spec.rb +3 -4
- data/spec/models/donor_spec.rb +0 -1
- data/spec/models/pledge_spec.rb +11 -13
- data/spec/models/project_spec.rb +0 -1
- data/spec/models/transaction_spec.rb +3 -4
- data/spec/spec_helper.rb +1 -2
- data/spec/support/darujme.rb +1 -1
- metadata +29 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 452801c43b67be3a0d14199311717e1616b9f7b8e966119993b2f1087e6d8257
|
4
|
+
data.tar.gz: 4218afe511c1accfc6533cbfda5db7db086cf42e4dfde730a01f331d5141840a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60d4ba973a7305f54f501d754bd868085f11798f0a2252d20450f7c926b67b81613d30ec6d987fcb468a702e542808b930ad42ddd0538bd7b0dd06d2a7d1463
|
7
|
+
data.tar.gz: 7e0ec06313c035798722f82ad92539b2cbb7fd60a54cec1956af71f5083b3f8d821001e9d863e7d61794e4bfc0cbd1da65a6e0c14cc3901779a6efb3e041cd9a
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: ci
|
2
|
+
on: [push]
|
3
|
+
jobs:
|
4
|
+
# https://docs.knapsackpro.com/2021/how-to-run-ruby-on-rails-tests-on-github-actions-using-rspec
|
5
|
+
test:
|
6
|
+
strategy:
|
7
|
+
fail-fast: false
|
8
|
+
matrix:
|
9
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
10
|
+
ruby: [ 2.6, 2.7, '3.0' ]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
env: # Rails verifies the time zone in DB is the same as the time zone of the Rails app
|
13
|
+
TZ: "Europe/Prague"
|
14
|
+
steps:
|
15
|
+
- name: Checkout code
|
16
|
+
uses: actions/checkout@v2
|
17
|
+
- name: Setup Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
bundler-cache: true
|
22
|
+
- name: RSpec
|
23
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
3
11
|
AllCops:
|
4
|
-
|
5
|
-
|
12
|
+
NewCops: enable
|
13
|
+
TargetRubyVersion: 2.5
|
6
14
|
Layout/MultilineMethodCallIndentation:
|
7
15
|
EnforcedStyle: indented_relative_to_receiver
|
8
16
|
|
@@ -15,8 +23,6 @@ Metrics/LineLength:
|
|
15
23
|
Metrics/MethodLength:
|
16
24
|
Enabled: false
|
17
25
|
|
18
|
-
Style/BracesAroundHashParameters:
|
19
|
-
EnforcedStyle: context_dependent
|
20
26
|
Style/Documentation:
|
21
27
|
Enabled: false
|
22
28
|
Style/FrozenStringLiteralComment:
|
@@ -35,6 +41,3 @@ Style/SymbolArray:
|
|
35
41
|
Enabled: false
|
36
42
|
Style/EmptyMethod:
|
37
43
|
EnforcedStyle: expanded
|
38
|
-
Layout/IndentationConsistency:
|
39
|
-
EnforcedStyle: rails
|
40
|
-
# Enabled: false
|
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
data/darujme_cz.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require "darujme_cz/version"
|
4
4
|
|
@@ -8,12 +8,13 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Lukáš Pokorný"]
|
9
9
|
spec.email = ["luk4s.pokorny@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
11
|
+
spec.summary = "Ruby library for work with Darujme.cz API"
|
12
|
+
spec.description = "Get pledges or transactions from your organization on Darujme.cz"
|
13
13
|
spec.homepage = "https://github.com/luk4s/darujme_cz"
|
14
14
|
spec.license = "GPL-3.0-or-later"
|
15
|
+
spec.required_ruby_version = '>= 2.5'
|
15
16
|
|
16
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
|
17
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
19
|
if spec.respond_to?(:metadata)
|
19
20
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
@@ -28,20 +29,19 @@ Gem::Specification.new do |spec|
|
|
28
29
|
|
29
30
|
# Specify which files should be added to the gem when it is released.
|
30
31
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
-
spec.files = Dir.chdir(File.expand_path(
|
32
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
32
33
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
34
|
end
|
34
|
-
spec.test_files = Dir[
|
35
|
+
spec.test_files = Dir["spec/**/*"]
|
35
36
|
# spec.bindir = "exe"
|
36
37
|
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
38
|
spec.require_paths = ["lib"]
|
38
39
|
|
39
|
-
spec.add_dependency
|
40
|
-
spec.add_dependency
|
41
|
-
spec.add_dependency
|
40
|
+
spec.add_dependency "activesupport", "> 5.2", "< 7"
|
41
|
+
spec.add_dependency "money", "~> 6.13"
|
42
|
+
spec.add_dependency "rest-client", "~> 2.0"
|
42
43
|
|
43
|
-
spec.add_development_dependency "
|
44
|
-
spec.add_development_dependency "
|
45
|
-
spec.add_development_dependency "
|
46
|
-
spec.add_development_dependency('webmock', '~> 3.4')
|
44
|
+
spec.add_development_dependency "rake", ">=12.3.3"
|
45
|
+
spec.add_development_dependency "rspec", "~> 3.11"
|
46
|
+
spec.add_development_dependency "webmock", "~> 3.4"
|
47
47
|
end
|
data/lib/darujme_cz/address.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
class Address
|
3
|
-
|
4
3
|
# @param [Hash] attributes
|
5
4
|
def initialize(attributes)
|
6
5
|
@source = attributes
|
7
6
|
end
|
8
7
|
|
9
8
|
def to_s
|
10
|
-
"#{@source[
|
9
|
+
"#{@source['street']}\n#{@source['postCode']} #{@source['city']}\n#{@source['country']}"
|
11
10
|
end
|
12
11
|
|
13
12
|
# alias
|
@@ -20,6 +19,5 @@ module DarujmeCz
|
|
20
19
|
@source[m]
|
21
20
|
end
|
22
21
|
end
|
23
|
-
|
24
22
|
end
|
25
|
-
end
|
23
|
+
end
|
data/lib/darujme_cz/base.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
class Base
|
3
|
-
|
4
3
|
# @abstract Define name of endpoint, which is also name of root element
|
5
4
|
def self.endpoint
|
6
5
|
raise NotImplementedError
|
@@ -8,11 +7,11 @@ module DarujmeCz
|
|
8
7
|
|
9
8
|
# @param [Hash] params
|
10
9
|
# @option params [Integer] organization_id (nil) ID of organization
|
11
|
-
def self.all(
|
10
|
+
def self.all(params = {})
|
12
11
|
where params
|
13
12
|
end
|
14
13
|
|
15
|
-
def self.where(
|
14
|
+
def self.where(params = {})
|
16
15
|
data = connection(params).get "#{base_path(params)}/#{endpoint}-by-filter", params
|
17
16
|
data[endpoint].map { |i| new(i) }
|
18
17
|
end
|
@@ -20,9 +19,9 @@ module DarujmeCz
|
|
20
19
|
def self.connection(params = {})
|
21
20
|
credentials = params.delete(:connection) || {
|
22
21
|
app_id: DarujmeCz.config.app_id,
|
23
|
-
api_key: DarujmeCz.config.app_secret
|
22
|
+
api_key: DarujmeCz.config.app_secret,
|
24
23
|
}
|
25
|
-
Connection.new
|
24
|
+
Connection.new(**credentials)
|
26
25
|
end
|
27
26
|
|
28
27
|
def self.base_path(params = {})
|
@@ -39,8 +38,6 @@ module DarujmeCz
|
|
39
38
|
@source = attributes
|
40
39
|
end
|
41
40
|
|
42
|
-
private
|
43
|
-
|
44
41
|
# @param [Array<String>] list
|
45
42
|
def self.define_attributes(list)
|
46
43
|
list.each do |attribute|
|
@@ -49,6 +46,5 @@ module DarujmeCz
|
|
49
46
|
end
|
50
47
|
end
|
51
48
|
end
|
52
|
-
|
53
49
|
end
|
54
50
|
end
|
@@ -4,7 +4,6 @@ require 'uri'
|
|
4
4
|
|
5
5
|
module DarujmeCz
|
6
6
|
class Connection
|
7
|
-
|
8
7
|
URL = "https://www.darujme.cz/api/v1"
|
9
8
|
|
10
9
|
# @param [String] app_id
|
@@ -16,16 +15,16 @@ module DarujmeCz
|
|
16
15
|
|
17
16
|
# @param [String] path
|
18
17
|
# @param [Hash] params
|
19
|
-
def get(path,
|
18
|
+
def get(path, params = {})
|
20
19
|
begin
|
21
20
|
response = RestClient.get "#{URL}/#{path}", params: { apiId: @app_id, apiSecret: @api_key }.merge(params)
|
22
|
-
rescue RestClient::Exception =>
|
23
|
-
handle_response_error(
|
21
|
+
rescue RestClient::Exception => e
|
22
|
+
handle_response_error(e)
|
24
23
|
end
|
25
24
|
parse_response(response)
|
26
25
|
end
|
27
26
|
|
28
|
-
def post(path,
|
27
|
+
def post(path, data = {})
|
29
28
|
# @todo
|
30
29
|
raise NotImplementedError
|
31
30
|
end
|
@@ -36,15 +35,14 @@ module DarujmeCz
|
|
36
35
|
# @raise [RestClient::Exception]
|
37
36
|
def handle_response_error(exception)
|
38
37
|
data = parse_response(exception.response)
|
39
|
-
exception.message += "\n#{data[
|
38
|
+
exception.message += "\n#{data['message']}"
|
40
39
|
raise exception
|
41
40
|
end
|
42
41
|
|
43
42
|
def parse_response(response)
|
44
43
|
JSON.parse(response.body)
|
45
|
-
rescue JSON::ParserError =>
|
44
|
+
rescue JSON::ParserError => _e
|
46
45
|
{}
|
47
46
|
end
|
48
|
-
|
49
47
|
end
|
50
48
|
end
|
data/lib/darujme_cz/donor.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
class Donor
|
3
|
-
|
4
3
|
delegate :city, :street, :post_code, :postal_code, :country, to: :address
|
5
4
|
# @param [Hash] attributes
|
6
5
|
def initialize(attributes)
|
@@ -20,6 +19,5 @@ module DarujmeCz
|
|
20
19
|
@source[m]
|
21
20
|
end
|
22
21
|
end
|
23
|
-
|
24
22
|
end
|
25
|
-
end
|
23
|
+
end
|
data/lib/darujme_cz/pledge.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
# @see https://www.darujme.cz/doc/api/v1/index.html#endpoint-get-organization-organizationid-pledges-by-filter
|
3
3
|
class Pledge < Base
|
4
|
-
|
5
4
|
delegate :name, :address, :city, :street, :post_code, :postal_code, :country, to: :donor
|
6
5
|
|
7
6
|
def self.endpoint
|
@@ -47,6 +46,5 @@ module DarujmeCz
|
|
47
46
|
def project
|
48
47
|
@project ||= Project.find project_id
|
49
48
|
end
|
50
|
-
|
51
49
|
end
|
52
50
|
end
|
data/lib/darujme_cz/project.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
# @see https://www.darujme.cz/doc/api/v1/index.html#endpoint-get-project-projectid
|
3
3
|
class Project < Base
|
4
|
-
|
5
4
|
def self.endpoint
|
6
5
|
"project"
|
7
6
|
end
|
@@ -43,7 +42,6 @@ module DarujmeCz
|
|
43
42
|
value
|
44
43
|
end
|
45
44
|
end
|
46
|
-
|
47
45
|
end
|
48
46
|
end
|
49
47
|
# project_id = 1201275
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module DarujmeCz
|
2
2
|
# @see https://www.darujme.cz/doc/api/v1/index.html#endpoint-get-organization-organizationid-transactions-by-filter
|
3
3
|
class Transaction < Base
|
4
|
-
|
5
4
|
def self.endpoint
|
6
5
|
"transactions"
|
7
6
|
end
|
@@ -50,4 +49,4 @@ module DarujmeCz
|
|
50
49
|
end
|
51
50
|
end
|
52
51
|
end
|
53
|
-
end
|
52
|
+
end
|
data/lib/darujme_cz/version.rb
CHANGED
data/spec/models/connect_spec.rb
CHANGED
@@ -3,11 +3,10 @@ RSpec.describe DarujmeCz::Connection do
|
|
3
3
|
|
4
4
|
describe ".get" do
|
5
5
|
it "get all" do
|
6
|
-
stub_request(:get, "https://www.darujme.cz/api/v1/organization/22/pledges-by-filter?apiId=22&apiSecret=8d948b1")
|
7
|
-
to_return(status: 200, body: file_fixture("pledges.json"))
|
6
|
+
stub_request(:get, "https://www.darujme.cz/api/v1/organization/22/pledges-by-filter?apiId=22&apiSecret=8d948b1")
|
7
|
+
.to_return(status: 200, body: file_fixture("pledges.json"))
|
8
8
|
data = subject.get "organization/22/pledges-by-filter"
|
9
9
|
expect(data).to include "pledges"
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
|
-
end
|
12
|
+
end
|
data/spec/models/donor_spec.rb
CHANGED
data/spec/models/pledge_spec.rb
CHANGED
@@ -2,8 +2,8 @@ require "rest-client"
|
|
2
2
|
RSpec.describe DarujmeCz::Pledge do
|
3
3
|
describe ".all" do
|
4
4
|
it "get all" do
|
5
|
-
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
6
|
-
to_return(status: 200, body: file_fixture("pledges.json"))
|
5
|
+
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
6
|
+
.to_return(status: 200, body: file_fixture("pledges.json"))
|
7
7
|
|
8
8
|
pledges = described_class.all
|
9
9
|
expect(pledges).to be_a Array
|
@@ -18,15 +18,15 @@ RSpec.describe DarujmeCz::Pledge do
|
|
18
18
|
it "without credentials" do
|
19
19
|
DarujmeCz.config.app_id = nil
|
20
20
|
|
21
|
-
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId&apiSecret=#{DarujmeCz.config.app_secret}")
|
22
|
-
to_return(status: 400, body: darujme_cz_response_error(message: "Missing required parameter").to_json)
|
21
|
+
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId&apiSecret=#{DarujmeCz.config.app_secret}")
|
22
|
+
.to_return(status: 400, body: darujme_cz_response_error(message: "Missing required parameter").to_json)
|
23
23
|
|
24
24
|
expect { described_class.all }.to raise_exception RestClient::BadRequest, "400 Bad Request\nMissing required parameter"
|
25
25
|
end
|
26
26
|
|
27
27
|
it "pass custom organization_id" do
|
28
|
-
stub = stub_request(:get, "https://www.darujme.cz/api/v1/organization/33/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
29
|
-
|
28
|
+
stub = stub_request(:get, "https://www.darujme.cz/api/v1/organization/33/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
29
|
+
.to_return(status: 200, body: file_fixture("pledges.json"))
|
30
30
|
|
31
31
|
described_class.all(organization_id: 33)
|
32
32
|
expect(stub).to have_been_made
|
@@ -35,8 +35,8 @@ RSpec.describe DarujmeCz::Pledge do
|
|
35
35
|
|
36
36
|
describe ".where" do
|
37
37
|
it "fromOutgoingDate" do
|
38
|
-
stub = stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}&fromOutgoingDate=#{Date.today.strftime(
|
39
|
-
|
38
|
+
stub = stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/pledges-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}&fromOutgoingDate=#{Date.today.strftime('%Y-%m-%d')}")
|
39
|
+
.to_return(status: 200, body: file_fixture("pledges.json"))
|
40
40
|
described_class.where fromOutgoingDate: Date.today
|
41
41
|
|
42
42
|
expect(stub).to have_been_made
|
@@ -47,10 +47,9 @@ RSpec.describe DarujmeCz::Pledge do
|
|
47
47
|
subject { described_class.new json["pledges"][0] }
|
48
48
|
|
49
49
|
describe "attributes" do
|
50
|
-
|
51
50
|
it "inspect" do
|
52
51
|
expect(subject.project_id).to eq 4563
|
53
|
-
expect(subject.id).to eq
|
52
|
+
expect(subject.id).to eq 1_203_450
|
54
53
|
end
|
55
54
|
end
|
56
55
|
|
@@ -92,10 +91,9 @@ RSpec.describe DarujmeCz::Pledge do
|
|
92
91
|
|
93
92
|
describe "#project" do
|
94
93
|
before :each do
|
95
|
-
stub_request(:get, "https://www.darujme.cz/api/v1/project/4563?apiId=123&apiSecret=abcd")
|
96
|
-
to_return(status: 200, body: { project: JSON.parse(file_fixture("project.json").read) }.to_json)
|
94
|
+
stub_request(:get, "https://www.darujme.cz/api/v1/project/4563?apiId=123&apiSecret=abcd")
|
95
|
+
.to_return(status: 200, body: { project: JSON.parse(file_fixture("project.json").read) }.to_json)
|
97
96
|
end
|
98
97
|
it { expect(subject.project).to be_a DarujmeCz::Project }
|
99
98
|
end
|
100
|
-
|
101
99
|
end
|
data/spec/models/project_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
RSpec.describe DarujmeCz::Transaction do
|
2
2
|
describe ".all" do
|
3
3
|
it "get all" do
|
4
|
-
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/transactions-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
5
|
-
to_return(status: 200, body: file_fixture("transactions.json"))
|
4
|
+
stub_request(:get, "https://www.darujme.cz/api/v1/organization/#{DarujmeCz.config.organization_id}/transactions-by-filter?apiId=#{DarujmeCz.config.app_id}&apiSecret=#{DarujmeCz.config.app_secret}")
|
5
|
+
.to_return(status: 200, body: file_fixture("transactions.json"))
|
6
6
|
|
7
7
|
pledges = described_class.all
|
8
8
|
expect(pledges).to be_a Array
|
@@ -50,5 +50,4 @@ RSpec.describe DarujmeCz::Transaction do
|
|
50
50
|
it { expect(subject.refund?).to eq true }
|
51
51
|
it { expect(subject.pending?).to eq false }
|
52
52
|
end
|
53
|
-
|
54
|
-
end
|
53
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,7 @@ RSpec.configure do |config|
|
|
16
16
|
c.syntax = :expect
|
17
17
|
end
|
18
18
|
|
19
|
-
Dir.glob(File.expand_path('
|
19
|
+
Dir.glob(File.expand_path('support/*.rb', __dir__)).sort.each do |file|
|
20
20
|
require file
|
21
21
|
end
|
22
22
|
config.before(:each) do
|
@@ -24,5 +24,4 @@ RSpec.configure do |config|
|
|
24
24
|
DarujmeCz.config.app_secret = "abcd"
|
25
25
|
DarujmeCz.config.organization_id = "2"
|
26
26
|
end
|
27
|
-
|
28
27
|
end
|
data/spec/support/darujme.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darujme_cz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukáš Pokorný
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '5.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: money
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,48 +58,34 @@ dependencies:
|
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '2.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.0'
|
69
61
|
- !ruby/object:Gem::Dependency
|
70
62
|
name: rake
|
71
63
|
requirement: !ruby/object:Gem::Requirement
|
72
64
|
requirements:
|
73
|
-
- - "
|
65
|
+
- - ">="
|
74
66
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
67
|
+
version: 12.3.3
|
76
68
|
type: :development
|
77
69
|
prerelease: false
|
78
70
|
version_requirements: !ruby/object:Gem::Requirement
|
79
71
|
requirements:
|
80
|
-
- - "
|
72
|
+
- - ">="
|
81
73
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
74
|
+
version: 12.3.3
|
83
75
|
- !ruby/object:Gem::Dependency
|
84
76
|
name: rspec
|
85
77
|
requirement: !ruby/object:Gem::Requirement
|
86
78
|
requirements:
|
87
79
|
- - "~>"
|
88
80
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
81
|
+
version: '3.11'
|
90
82
|
type: :development
|
91
83
|
prerelease: false
|
92
84
|
version_requirements: !ruby/object:Gem::Requirement
|
93
85
|
requirements:
|
94
86
|
- - "~>"
|
95
87
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
88
|
+
version: '3.11'
|
97
89
|
- !ruby/object:Gem::Dependency
|
98
90
|
name: webmock
|
99
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +107,7 @@ executables: []
|
|
115
107
|
extensions: []
|
116
108
|
extra_rdoc_files: []
|
117
109
|
files:
|
110
|
+
- ".github/workflows/ci.yml"
|
118
111
|
- ".gitignore"
|
119
112
|
- ".rspec"
|
120
113
|
- ".rubocop.yml"
|
@@ -157,7 +150,7 @@ metadata:
|
|
157
150
|
homepage_uri: https://github.com/luk4s/darujme_cz
|
158
151
|
source_code_uri: https://github.com/luk4s/darujme_cz
|
159
152
|
changelog_uri: https://github.com/luk4s/darujme_cz/CHANGELOG.md
|
160
|
-
post_install_message:
|
153
|
+
post_install_message:
|
161
154
|
rdoc_options: []
|
162
155
|
require_paths:
|
163
156
|
- lib
|
@@ -165,27 +158,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
158
|
requirements:
|
166
159
|
- - ">="
|
167
160
|
- !ruby/object:Gem::Version
|
168
|
-
version: '
|
161
|
+
version: '2.5'
|
169
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
163
|
requirements:
|
171
164
|
- - ">="
|
172
165
|
- !ruby/object:Gem::Version
|
173
166
|
version: '0'
|
174
167
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
176
|
-
signing_key:
|
168
|
+
rubygems_version: 3.3.8
|
169
|
+
signing_key:
|
177
170
|
specification_version: 4
|
178
171
|
summary: Ruby library for work with Darujme.cz API
|
179
172
|
test_files:
|
180
|
-
- spec/
|
181
|
-
- spec/
|
173
|
+
- spec/darujme_cz_spec.rb
|
174
|
+
- spec/fixtures/files/donor.json
|
175
|
+
- spec/fixtures/files/pledges.json
|
176
|
+
- spec/fixtures/files/project.json
|
177
|
+
- spec/fixtures/files/transactions.json
|
182
178
|
- spec/models/connect_spec.rb
|
183
|
-
- spec/models/transaction_spec.rb
|
184
|
-
- spec/models/pledge_spec.rb
|
185
179
|
- spec/models/donor_spec.rb
|
180
|
+
- spec/models/pledge_spec.rb
|
181
|
+
- spec/models/project_spec.rb
|
182
|
+
- spec/models/transaction_spec.rb
|
183
|
+
- spec/spec_helper.rb
|
186
184
|
- spec/support/darujme.rb
|
187
|
-
- spec/fixtures/files/project.json
|
188
|
-
- spec/fixtures/files/donor.json
|
189
|
-
- spec/fixtures/files/transactions.json
|
190
|
-
- spec/fixtures/files/pledges.json
|
191
|
-
- spec/darujme_cz_spec.rb
|