postjob 0.3.1 → 0.3.2

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
  SHA1:
3
- metadata.gz: c176d6457b3172ff1442166970581a23ad20e34d
4
- data.tar.gz: 05dfff87b04b642e69b825673e1142ca564dd0f5
3
+ metadata.gz: e47bcd99a363a5715728af719726a814c5e574b9
4
+ data.tar.gz: c50dd5cecf1f2453bbf55e38cb3a3d15c3990013
5
5
  SHA512:
6
- metadata.gz: 72b0de9d89df11900f08cd73b341fcf11e668eed95a32cd0853f8bef973311fd03ad7c26c13e1d1171286478326c705c7d4c4b65368044f1eb505c1d686b91b2
7
- data.tar.gz: 596170acec013392c8ad2b74ab3ae5dc44f232bd36f731015c14cfa76db4563db0306f3e198cd0b9b321b27562d4837aafae0c5647bc18f9a081b88a7e0018ee
6
+ metadata.gz: 22acf73031797e4fc1b94796b01e0aef0c1dbe591b376c109730a8673151878e2f87b797d436a46ba746b67c588f88217a398a7233f0f6914d96dab91585e6b7
7
+ data.tar.gz: 2fd15eb599a3eab9a599ce2a46c2b28efa5af1b46b36a1962962de66cf5609af481e8f30bfa9869feee4694d3b11083c00feaea52a2f7893904c9ee181e8cb18
@@ -100,7 +100,7 @@ module Postjob::CLI
100
100
  def ps_show(id, *ids)
101
101
  ids = ([id] + ids).map { |s| Integer(s) }
102
102
 
103
- jobs = Simple::SQL.records <<~SQL, ids, into: Postjob::Job
103
+ jobs = Simple::SQL.all <<~SQL, ids, into: Postjob::Job
104
104
  SELECT * FROM postjob.postjobs WHERE id = ANY($1)
105
105
  SQL
106
106
 
@@ -6,14 +6,14 @@ end
6
6
  module Postjob::Queue::Search
7
7
  extend self
8
8
 
9
- def one(id, filter: {}, into: nil)
9
+ def one(id, filter: {}, into: Hash)
10
10
  query = query(page: 0, per: 1, filter: filter, id: id)
11
- Simple::SQL.record(query, into: into)
11
+ Simple::SQL.ask(query, into: into)
12
12
  end
13
13
 
14
- def all(page: 0, per: 100, filter: {}, into: nil)
14
+ def all(page: 0, per: 100, filter: {}, into: Hash)
15
15
  query = query(page: page, per: per, filter: filter)
16
- Simple::SQL.records(query, into: into)
16
+ Simple::SQL.all(query, into: into)
17
17
  end
18
18
 
19
19
  private
@@ -8,15 +8,15 @@ module TestHelper
8
8
  end
9
9
 
10
10
  def newest_job
11
- Simple::SQL.record "SELECT * FROM postjobs ORDER BY id DESC", into: Postjob::Job
11
+ Simple::SQL.ask "SELECT * FROM postjobs ORDER BY id DESC", into: Postjob::Job
12
12
  end
13
13
 
14
14
  def load_job(id_or_sql, *args)
15
15
  case id_or_sql
16
16
  when Integer
17
- Simple::SQL.record "SELECT * FROM postjobs WHERE id=$1", id_or_sql, into: Postjob::Job
17
+ Simple::SQL.ask "SELECT * FROM postjobs WHERE id=$1", id_or_sql, into: Postjob::Job
18
18
  else
19
- Simple::SQL.record id_or_sql, *args, into: Postjob::Job
19
+ Simple::SQL.ask id_or_sql, *args, into: Postjob::Job
20
20
  end
21
21
  end
22
22
 
@@ -27,7 +27,7 @@ module TestHelper
27
27
  def print_sql(sql, *args)
28
28
  require "table_print"
29
29
 
30
- records = Simple::SQL.records(sql, *args)
30
+ records = Simple::SQL.all(sql, *args)
31
31
  tp records
32
32
  end
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postjob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
@@ -120,20 +120,20 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '0.2'
123
+ version: '0.3'
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
- version: 0.2.5
126
+ version: 0.3.7
127
127
  type: :runtime
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: '0.2'
133
+ version: '0.3'
134
134
  - - ">="
135
135
  - !ruby/object:Gem::Version
136
- version: 0.2.5
136
+ version: 0.3.7
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: simple-cli
139
139
  requirement: !ruby/object:Gem::Requirement