dubbletrack_remote 0.7.5 → 0.8.0

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: da200a7c41fdf5c680e89a74a2424717f90789e950177a60e9d089ef9f072167
4
- data.tar.gz: c80f31216df67ae33bc569d85d5ea0c64d75b8ad991393b27aed227b067a251f
3
+ metadata.gz: fbd23b3429fcbcfddcd0f46d491d01e060ff2a269ae2f0b2f3d0baa37c3d1def
4
+ data.tar.gz: 9848afcc5a09b4dd37bf5ccd48eb93064d0fe15a67a606a6a92ec6ca820d04b9
5
5
  SHA512:
6
- metadata.gz: 47302702a8666b9d6e340937288c5b3016ca045f6ea59797cfdd01ba660256aa8293e32f25fa6dac65e9a7f1b52b58dbaa80cb06d2340f4ecee563855b08bafc
7
- data.tar.gz: 7fda2dc35136f7d907821f18a63236bee17f7b92f0e5b958d45e6314bbaffce03bc5ea07f2aa6676e017508e3417e8a307564512dcac6468019f39ecb97238a3
6
+ metadata.gz: 4071400ce0276d7767760886ff4f0aab2b6e9f6a7846493ea0d0f5884881dadcb9495021fea40da1b7f44069f980ca985ad166fa7718d7d3ee5d159380052a71
7
+ data.tar.gz: 90c035c0f5be2d929e06535ab587fa02b24471fb5ac4b4385bfad413484b850d9386d29aa65257ffcb5b93248d60d965dde01f949f0c6e4fcf44ee49907b55c8
@@ -18,7 +18,7 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  matrix:
21
- ruby-version: ['2.6', '2.7', '3.0']
21
+ ruby-version: ['3.1']
22
22
  steps:
23
23
  - uses: actions/checkout@v3
24
24
  - name: Set up Ruby
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.7.2
1
+ ruby 3.1.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  dubbletrack remote changelog
2
2
 
3
+ # [0.8.0](https://github.com/dubbletrack/remote/compare/v0.7.6...v0.8.0) (2024-07-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * use delay time for test ([37d3fb6](https://github.com/dubbletrack/remote/commit/37d3fb669929800277e39942f565cf1f14075854))
9
+
10
+
11
+ ### Features
12
+
13
+ * send in batches ([be99f11](https://github.com/dubbletrack/remote/commit/be99f11d13b377b1e4f751b65c9fd42c766b3217))
14
+ * update to use v2 endpoint and save uuids ([51e0e6f](https://github.com/dubbletrack/remote/commit/51e0e6f4c2208d5281feb0b8f5281924bac78e39))
15
+
16
+ ## [0.7.6](https://github.com/dubbletrack/remote/compare/v0.7.5...v0.7.6) (2023-06-15)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * remove debug statements ([8756eef](https://github.com/dubbletrack/remote/commit/8756eef2ff9322eb35d225d42d1c15a505c9db44))
22
+
3
23
  ## [0.7.5](https://github.com/dubbletrack/remote/compare/v0.7.4...v0.7.5) (2023-06-15)
4
24
 
5
25
 
@@ -1,4 +1,4 @@
1
- api_url: https://data.dubbletrack.com/api/v1/stations/[station_id]/automation
1
+ api_url: https://data.dubbletrack.com/api/v2/automation
2
2
  api_key:
3
3
  api_secret:
4
4
  automation:
@@ -55,7 +55,7 @@ Gem::Specification.new do |spec|
55
55
  spec.add_dependency "require_all", "~> 3.0"
56
56
  spec.add_dependency "rspec", "~> 3.9.0"
57
57
  spec.add_dependency "sinatra-activerecord", "~> 2.0.18"
58
- spec.add_dependency "sqlite3", "~> 1.4.2"
58
+ spec.add_dependency "sqlite3", "~> 1.5.1"
59
59
  spec.add_dependency "thor", "~> 1.0.1"
60
60
  spec.add_dependency "timecop", "~> 0.9.1"
61
61
  spec.add_dependency "tzinfo", "~> 1.2.9"
@@ -23,9 +23,7 @@ module DubbletrackRemote
23
23
 
24
24
  Thread.new do
25
25
  loop do
26
- Item.next(20).each do |item|
27
- client.send([item])
28
- end
26
+ client.send(Item.next(25))
29
27
  update # this feels redundant with the watch above
30
28
  status
31
29
  rescue => e
@@ -86,8 +84,8 @@ module DubbletrackRemote
86
84
 
87
85
  if remaining.count > 0
88
86
  puts "sending #{remaining.size} from playlist #{file_path}"
89
- Item.where(id: remaining.pluck(:id)).remaining.find_each do |item|
90
- client.send(item)
87
+ Item.where(id: remaining.pluck(:id)).remaining.find_in_batches(batch_size: 25) do |items|
88
+ client.send(items)
91
89
  end
92
90
  end
93
91
  else
@@ -328,7 +326,7 @@ module DubbletrackRemote
328
326
  playlists_path = ask "Where should I look for playlists? (This can include regex and strftime components, i.e. /Enco/Dad/STUDIO[1-2]%m%d%y.DBF)", path: true
329
327
  end
330
328
  <<~YAMS.strip
331
- api_url: https://api.dubbletrack.com/api/v1/stations/#{station_id}/automation
329
+ api_url: https://api.dubbletrack.com/api/v2/automation
332
330
  api_key: #{api_key}
333
331
  api_secret: #{api_secret}
334
332
  automation:
@@ -13,7 +13,7 @@ module DubbletrackRemote
13
13
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
14
14
  end
15
15
 
16
- @url = url # || 'https://dubbletrack.com/api/v1/stations/koop/shows/koop-automation/tracks'
16
+ @url = url # || 'https://api.dubbletrack.com/api/v2/automation'
17
17
  @key = key # || 'dt_xxxxxxxx'
18
18
  @secret = secret # || 'dts_xxxxxxxxxxxx'
19
19
  end
@@ -49,13 +49,12 @@ module DubbletrackRemote
49
49
 
50
50
  found_response = if data.size > 1
51
51
  data.find do |d|
52
- d["attributes"]["title"] == item.title &&
53
- d["attributes"]["artist_name"] == item.artist_name
52
+ d["remote_automation_id"] == item.automation_id
54
53
  end
55
54
  else
56
55
  data.first
57
56
  end
58
- item.remote_id = found_response["id"] if found_response
57
+ item.remote_id = found_response["uuid"] if found_response
59
58
  item.save
60
59
  puts item.pretty_print
61
60
  end
@@ -43,8 +43,6 @@ module DubbletrackRemote
43
43
  attrs[key] = attrs[key].mb_chars.tidy_bytes.to_s
44
44
  end
45
45
 
46
- debugger unless attrs["LENGTH"]
47
-
48
46
  attrs
49
47
  end
50
48
 
@@ -86,7 +84,6 @@ module DubbletrackRemote
86
84
  date = (hash["DATE"] || "").strip
87
85
  time = (hash["ACTSTART"] || "").strip
88
86
 
89
- debugger if hash["TITLE"] == "PSA CSA Juneteenth 23"
90
87
  duration = (hash["LENGTH"] || "0.0").to_f
91
88
  automation_id = (hash["CUT"] || "").strip
92
89
  automation_group = (hash["GROUP"] || "").strip
@@ -1,3 +1,3 @@
1
1
  module DubbletrackRemote
2
- VERSION = "0.7.5"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dubbletrack_remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Keen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -282,14 +282,14 @@ dependencies:
282
282
  requirements:
283
283
  - - "~>"
284
284
  - !ruby/object:Gem::Version
285
- version: 1.4.2
285
+ version: 1.5.1
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: 1.4.2
292
+ version: 1.5.1
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: thor
295
295
  requirement: !ruby/object:Gem::Requirement