khalti 0.2.0 → 0.2.1

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: 0d349aa4b31e87cb15894680e1164ffa59a7bab668388ffe98b05eaf3a6bfb44
4
- data.tar.gz: 825b86c0034a05286bf996a7790b2aa7d427a73b853e49fd1f0a01f412ad1671
3
+ metadata.gz: 6fc1c7d7e2ea71c02b8b13ee6fe76bfa2e64afd8c2012210b31d7dd477ea5bac
4
+ data.tar.gz: 29f86229897532fd83c5dfd3c121ccc696af12e0ebaebf406b80fd0f6e145600
5
5
  SHA512:
6
- metadata.gz: 6a30ec1cc2a1b44ce39c3fc74eabe373aeb454f897b55476f3f506fef2c154d185f46c4384c9effc25a95f336655106c2ab8b2d88d62cd72aa4bf3d60af03203
7
- data.tar.gz: 22bc9c2fb9180066fa6d54112aa74de1174e883433b70c33867afa69ff45585db448271d6f50fd04251a95a5ca93c408c45fe2a0201715d9438eace5755769b2
6
+ metadata.gz: 82e908232caac20504906f679e46d7e644fd3f14a6b2b990ace2d8cea4e2b19bef0b082143988523d11ba4e9ff88ceffbd54cbcd9f55bc609d5f3ddf69bf83df
7
+ data.tar.gz: edd0ce4ffddc9928e3f2e78f0227524c1373ab8ca24ba0cd79e9311f7b7ca6d15f5d6d7e5ea197fb67f74183df16d3b78e21a6eededb0128b89344f611a9635d
@@ -1,2 +1,18 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.5
3
+
4
+ # Commonly used screens these days easily fit more than 80 characters.
5
+ Metrics/LineLength:
6
+ Max: 120
7
+
8
+ # Too short methods lead to extraction of single-use methods, which can make
9
+ # the code easier to read (by naming things), but can also clutter the class
10
+ Metrics/MethodLength:
11
+ Max: 20
12
+
13
+ # The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
14
+ Metrics/ClassLength:
15
+ Max: 1500
16
+
17
+ Metrics/BlockLength:
18
+ ExcludedMethods: ['describe', 'context']
@@ -1,8 +1,12 @@
1
- sudo: false
1
+ os:
2
+ - linux
3
+ dist: bionic
2
4
  language: ruby
3
5
  rvm:
4
- - 2.5.0
6
+ - 2.6
7
+ - 2.5
5
8
  before_install: gem install bundler -v 1.16.1
9
+ env:
10
+ - KHALTI_SECRET_KEY=your_secret_key
6
11
  script:
7
- - export KHALTI_SECRET_KEY=your_secret_key
8
- - bundle exec rspec spec
12
+ - bundle exec rspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- khalti (0.2.0)
4
+ khalti (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -19,7 +19,7 @@ GEM
19
19
  hashdiff (0.3.7)
20
20
  json (2.1.0)
21
21
  public_suffix (3.0.2)
22
- rake (10.5.0)
22
+ rake (13.0.1)
23
23
  rspec (3.7.0)
24
24
  rspec-core (~> 3.7.0)
25
25
  rspec-expectations (~> 3.7.0)
@@ -52,7 +52,7 @@ DEPENDENCIES
52
52
  bundler (~> 1.16)
53
53
  codecov (~> 0.1)
54
54
  khalti!
55
- rake (~> 10.0)
55
+ rake (~> 13.0)
56
56
  rspec (~> 3.0)
57
57
  webmock (~> 3.3)
58
58
 
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_development_dependency 'bundler', '~> 1.16'
34
34
  spec.add_development_dependency 'codecov', '~> 0.1'
35
- spec.add_development_dependency 'rake', '~> 10.0'
35
+ spec.add_development_dependency 'rake', '~> 13.0'
36
36
  spec.add_development_dependency 'rspec', '~> 3.0'
37
37
  spec.add_development_dependency 'webmock', '~> 3.3'
38
38
  end
@@ -37,8 +37,7 @@ module Khalti
37
37
 
38
38
  def validate_content_type(content_type)
39
39
  return if content_type == 'application/json'
40
- raise Errors::InvalidResponseError,
41
- 'Content-type is not application/json.'
40
+ raise Errors::InvalidResponseError, 'Content-type is not application/json.'
42
41
  end
43
42
 
44
43
  def extract_response(res)
@@ -25,14 +25,12 @@ module Khalti
25
25
 
26
26
  def validate_token_length(val)
27
27
  return if val.strip.size >= 22
28
- raise Errors::InvalidTokenError, 'Ensure token has at least ' \
29
- '22 characters.'
28
+ raise Errors::InvalidTokenError, 'Ensure token has at least 22 characters.'
30
29
  end
31
30
 
32
31
  def validate_ammount(val)
33
32
  return if Integer(val).positive?
34
- raise Errors::InvalidAmountError, 'Ensure amount is ' \
35
- 'greater than 0 paisa.'
33
+ raise Errors::InvalidAmountError, 'Ensure amount is greater than 0 paisa.'
36
34
  end
37
35
  end
38
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Khalti
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: khalti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Degendra Sivakoti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2020-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -125,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.7.3
128
+ rubygems_version: 3.0.3
130
129
  signing_key:
131
130
  specification_version: 4
132
131
  summary: Ruby gem for Khalti online transaction platform.