tiltify 0.1.2 → 0.1.5

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: 310eedb1d0a718fe03cb44d9f31c440f65fa7c8bb607f2a1c1e72c19f4837caf
4
- data.tar.gz: 366ae08257a081d8a0b4a6633841a97f6229d8587806cfb844f2bbe5cd2f63b2
3
+ metadata.gz: 111e7b1997287ffbe6456691db0a7b00b4a44c6360ab4332f523611f8dff0c65
4
+ data.tar.gz: b83b59a51d8cceb1eff88a92e269bffbe5f23ea85dfeda4f81775e9cdc2ce307
5
5
  SHA512:
6
- metadata.gz: e9764d4ef95acdf03f995dae8eeb4d869626d236b5176d25fab9affb1f879231f2a1f1ab48338537e1a927e2640d74b3faa6c86c05e6dedecf0b6bff1bf9beb2
7
- data.tar.gz: 9065cd2283a749759a757209ece3ddb494030a1142fe413942dab630bec235541b7a35c274aae98aa1551e190785e7fd8a8417949854a9cc54883627e15215dd
6
+ metadata.gz: 48f078123eec2fe85ea3b47985d422dbe83219607bc8ade029ea46eb3d3e7e4c9b9d49e154704a2f3aa65f7d7bc8a77eacc96aba2e9fd89dd90e8ace5661a912
7
+ data.tar.gz: 97f93ea9e1e960ba472bd2d7f391cd989fae47319a43f2b1b2000b0f9713258ab06d92fc72c0b40fbcfc06784ac28c5f4c905dee98c5040928a909972886b1ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiltify (0.1.2)
4
+ tiltify (0.1.5)
5
5
  faraday (~> 2.0)
6
6
 
7
7
  GEM
@@ -1,19 +1,23 @@
1
1
  module Tiltify
2
2
  class Collection
3
- attr_reader :data, :total
3
+ attr_reader :data, :total, :has_prev, :has_next
4
4
 
5
5
  def self.from_response(response, type:)
6
6
  body = response.body
7
7
 
8
8
  new(
9
9
  data: body["data"].map { |attrs| type.new(attrs) },
10
- total: body["data"].count
10
+ total: body["data"].count,
11
+ has_prev: body["links"] && !body["links"]["prev"].blank?,
12
+ has_next: body["links"] && !body["links"]["next"].blank?
11
13
  )
12
14
  end
13
15
 
14
- def initialize(data:, total:)
16
+ def initialize(data:, total:, has_prev: nil, has_next: nil)
15
17
  @data = data
16
18
  @total = total
19
+ @has_prev = has_prev
20
+ @has_next = has_next
17
21
  end
18
22
  end
19
23
  end
@@ -4,8 +4,7 @@ module Tiltify
4
4
  def initialize(options = {})
5
5
  super options
6
6
 
7
- self.created_at = Time.at(options["completedAt"].to_s[0..-4].to_i)
8
- self.updated_at = Time.at(options["updatedAt"].to_s[0..-4].to_i)
7
+ self.completed_at = Time.at(options["completedAt"].to_s[0..-4].to_i)
9
8
  end
10
9
 
11
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tiltify
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiltify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Perry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday