logs_maino 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1db66c23fdcc0a32dd8b13afc2761c6d12149441a4eeb2c7fe387e04f2641787
4
- data.tar.gz: b944e4ebaa2c058ccdafdb8329f35cb66d7c896ebaa07c3f2f700e54cd2d11c3
3
+ metadata.gz: a044e58e03a14a6275945c61e081521e73a2091392e50c5ad6940c7033ffa6f7
4
+ data.tar.gz: d106f4ee611a0e6e32e243b1a3cc44ef93637fdebc86246d7dae0286f89b237f
5
5
  SHA512:
6
- metadata.gz: b414c3d13585065ce52d6a59b92031713e757e82e045fbdb4355af07cb912aacadfb6cb2788d117bd7121100084c22c6fe688bfd59d774a3e1e64770da5aff3b
7
- data.tar.gz: 7d556fa2a19b58980b17ec50cbb33452514d0926a16dd04987ca86855c660c42a73fa353af21772b31cd26d26f4ce68ea4bc4a4fbe7b549bcb0b6931da98fa7e
6
+ metadata.gz: 0b4bc90092bca11f9f887cb8764600b7dab57e3be65e865d9a370a8894f28d46e975e7cdebc8ab97b0f63e2b2dd0c44bfa8dcd890b1c2484ba61325ceb9ba1e7
7
+ data.tar.gz: e28dfa7e206a590f681e56dbe3e5bf9a5ee2f43bbb5fe09ac1853304eeb0b4231343a9581aecf95ab0db114d0bd1df743902b620cc3abca8a39737043913c461
data/.env CHANGED
@@ -1,4 +1,5 @@
1
1
  POSTGRES_DB=logs_maino_development
2
- POSTGRES_PASSWORD=postgres
3
2
  POSTGRES_HOST=localhost
4
3
  POSTGRES_USER=postgres
4
+ DATABASE_URL="postgres://postgres:@localhost:5432"
5
+ POSTGRES_PASSWORD=new_password
data/.gitignore CHANGED
@@ -10,8 +10,7 @@
10
10
  /test/version_tmp/
11
11
  /tmp/
12
12
 
13
- # Used by dotenv library to load environment variables.
14
- # .env
13
+ .env
15
14
 
16
15
  # Ignore Byebug command history file.
17
16
  .byebug_history
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logs_maino (0.1.0)
4
+ logs_maino (0.1.1)
5
5
  sequel
6
6
 
7
7
  GEM
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ Sequel.migration do
4
+ change do
5
+ alter_table :logs do
6
+ add_column :updated_at, DateTime, index: true
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module LogsMaino
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/models/log.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  module Models
2
2
  class Log
3
- attr_accessor :id, :created_at, :status, :data
3
+ attr_accessor :id, :created_at, :updated_at, :status, :data
4
4
 
5
5
  def initialize(attrs = {})
6
6
  attrs.each do |key, value|
7
7
  self.send("#{key}=", value) if respond_to?("#{key}=")
8
8
  end
9
- end
9
+ end
10
10
 
11
11
  def attributes_hash
12
12
  instance_variables.each_with_object({}) do |var, hash|
@@ -19,7 +19,7 @@ module Models
19
19
  end
20
20
 
21
21
  def jsonb(json)
22
- return if json.blank?
22
+ return if json.nil?
23
23
  return json if json.is_a?(String)
24
24
 
25
25
  Sequel&.pg_json(json)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logs_maino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Schnee
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-16 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description:
27
+ description:
28
28
  email:
29
29
  - david.schnee@maino.com.br
30
30
  executables: []
@@ -40,6 +40,7 @@ files:
40
40
  - bin/console
41
41
  - bin/setup
42
42
  - db/migrate/001_create_logs.rb
43
+ - db/migrate/002_add_updated_at_in_logs.rb
43
44
  - lib/config/db.rb
44
45
  - lib/logs_maino.rb
45
46
  - lib/logs_maino/version.rb
@@ -58,7 +59,7 @@ licenses: []
58
59
  metadata:
59
60
  homepage_uri: https://github.com/DavidSchnee/logs_maino
60
61
  source_code_uri: https://github.com/DavidSchnee/logs_maino
61
- post_install_message:
62
+ post_install_message:
62
63
  rdoc_options: []
63
64
  require_paths:
64
65
  - lib
@@ -73,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
74
  - !ruby/object:Gem::Version
74
75
  version: '0'
75
76
  requirements: []
76
- rubygems_version: 3.1.6
77
- signing_key:
77
+ rubygems_version: 3.5.6
78
+ signing_key:
78
79
  specification_version: 4
79
80
  summary: Repositório responsavel por salvar logs de um sistema
80
81
  test_files: []