solidus_inter 1.2.0 → 1.3.0

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: 7aa0fdda876bf2dd7b36faa4f0ee3de9e37846e83f234efc222f935d89831417
4
- data.tar.gz: 25d93553c05adf4a56fad8ca46ac5eb5a98966daceed65a222572589e5c9eaae
3
+ metadata.gz: 3d3f4f88f750274042d3b1bd94367712b3dd24b8a17fd9cd122849b0f8cd9b40
4
+ data.tar.gz: f8e470ebe491c5c6cfa92f08efe915652962a1a36c44aa0b0bdaefbd303614eb
5
5
  SHA512:
6
- metadata.gz: 4df48e93c2cd5df49a9e14d309bf8320a6f8af512a24f4e9745cb2a32fc457992214b7184ca631d034515864d4ec91b10e65212c23be82410fca7941b7bba60b
7
- data.tar.gz: 0c37bd2d1bb18d24609d29fa90d4e56815570a068442b62c0e66e7a418ade329482d1c054e23cc932abad31bed630477e64a9afe6b25d0bde325b25388ce032d
6
+ metadata.gz: 9dcabfbb7137fb2a2aa98d647ee892faf7a778f6478cd6fe291be91194a3b3ab5ada12d3b96ed413cb40e843e2aba94204909da9435d10d154e4f18e31eb69ab
7
+ data.tar.gz: 8ab1645e4c3883dc5450284b2e29170bca5d49b059cf8c70d722d3fffa60163422fd983fbc3c069fdc79f759b056ea4f4d24e277dca2180ac4e90e0f06f8b6d1
@@ -74,11 +74,7 @@ module SolidusInter
74
74
 
75
75
  def should_skip_processing?(source)
76
76
  inter_payment = find_payment(source.txid)
77
- if inter_payment.paid?
78
- false
79
- else
80
- true
81
- end
77
+ !inter_payment.paid?
82
78
  end
83
79
 
84
80
  private
@@ -93,7 +89,8 @@ module SolidusInter
93
89
  crt: temp_file(preferences[:crt]).path,
94
90
  key: temp_file(preferences[:key]).path,
95
91
  token: account&.token,
96
- token_expires_at: account&.expires_at
92
+ token_expires_at: account&.expires_at,
93
+ test_mode: preferences[:test_mode]
97
94
  )
98
95
  SolidusInter::Account.upsert({token: client.token, expires_at: client.token_expires_at, chave_pix: client.chave_pix, spree_payment_method_id: id}, unique_by: :chave_pix)
99
96
  client
@@ -10,10 +10,6 @@ module SolidusInter
10
10
  true
11
11
  end
12
12
 
13
- def copy_initializer
14
- template "initializer.rb", "config/initializers/solidus_inter.rb"
15
- end
16
-
17
13
  def add_migrations
18
14
  run "bin/rails railties:install:migrations FROM=solidus_inter"
19
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusInter
4
- VERSION = "1.2.0"
4
+ VERSION = "1.3.0"
5
5
  end
data/lib/solidus_inter.rb CHANGED
@@ -1,6 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "solidus_inter/configuration"
4
3
  require "solidus_inter/version"
5
4
  require "solidus_inter/engine"
6
5
  require "inter_api"
6
+
7
+ module SolidusInter
8
+ class Error < StandardError; end
9
+
10
+ class Configuration
11
+ # mattr_accessor :api_key
12
+ # @@api_key = nil
13
+
14
+ # def initialize
15
+ # raise "Do not instatiate this class. Access configuration variables directly: SolidusInter::Configuration.api_key"
16
+ # end
17
+ end
18
+
19
+ def self.configure
20
+ yield(Configuration)
21
+ end
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_inter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-13 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -123,9 +123,7 @@ files:
123
123
  - db/migrate/20240527193953_create_solidus_inter_pix_payment_sources.rb
124
124
  - db/migrate/20240603132203_create_solidus_inter_accounts.rb
125
125
  - lib/generators/solidus_inter/install/install_generator.rb
126
- - lib/generators/solidus_inter/install/templates/initializer.rb
127
126
  - lib/solidus_inter.rb
128
- - lib/solidus_inter/configuration.rb
129
127
  - lib/solidus_inter/engine.rb
130
128
  - lib/solidus_inter/testing_support/factories.rb
131
129
  - lib/solidus_inter/version.rb
@@ -137,7 +135,7 @@ metadata:
137
135
  homepage_uri: https://github.com/ulysses-bull/solidus_inter#readme
138
136
  source_code_uri: https://github.com/ulysses-bull/solidus_inter
139
137
  changelog_uri: https://github.com/ulysses-bull/solidus_inter/blob/main/CHANGELOG.md
140
- post_install_message:
138
+ post_install_message:
141
139
  rdoc_options: []
142
140
  require_paths:
143
141
  - lib
@@ -155,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
153
  - !ruby/object:Gem::Version
156
154
  version: '0'
157
155
  requirements: []
158
- rubygems_version: 3.5.11
159
- signing_key:
156
+ rubygems_version: 3.5.10
157
+ signing_key:
160
158
  specification_version: 4
161
159
  summary: ''
162
160
  test_files: []
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- SolidusInter.configure do |config|
4
- # TODO: Remember to change this with the actual preferences you have implemented!
5
- # config.sample_preference = 'sample_value'
6
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusInter
4
- class Configuration
5
- # Define here the settings for this extension, e.g.:
6
- #
7
- # attr_accessor :my_setting
8
- end
9
-
10
- class << self
11
- def configuration
12
- @configuration ||= Configuration.new
13
- end
14
-
15
- alias_method :config, :configuration
16
-
17
- def configure
18
- yield configuration
19
- end
20
- end
21
- end