ZReviewTender 1.0.7 → 1.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 +4 -4
- data/bin/ZReviewTender +16 -5
- data/lib/Models/Review.rb +10 -10
- data/lib/Processors/SlackProcessor.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 401f2fc6c474a7a9b49f4e09e9574ec9af12ba4e86666da4a8c51926d1f4dc8e
|
4
|
+
data.tar.gz: 81bcfd837a752fa6efff0f07131d8246eedf9c3feff8b585648a5cd9ba10524c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 211bf7f2044c407689c4b96236b34801fc1c2dafe56fd23fca39accdc5e2d31345109dd2708a5aef246e5c1885542f1b549653357487b644018a8b96640f70ee
|
7
|
+
data.tar.gz: aa679ef890c73f22ee8cc3a143d1c4c6714d549193f763ef5bceb20b32bc788953c92324f0b6a7422eaba8633f2bd3e0b758ca10f1111cdd27d4906168b0841e
|
data/bin/ZReviewTender
CHANGED
@@ -8,6 +8,7 @@ require "Models/AppleConfig"
|
|
8
8
|
require "Models/AndroidConfig"
|
9
9
|
require "Models/Processor"
|
10
10
|
require "Helper"
|
11
|
+
require "ZLogger"
|
11
12
|
require "AppleFetcher"
|
12
13
|
require "AndroidFetcher"
|
13
14
|
require "optparse"
|
@@ -94,8 +95,6 @@ class Main
|
|
94
95
|
processors = Helper.unwrapRequiredParameter(configYMLObj, 'processors')
|
95
96
|
if processors.nil?
|
96
97
|
processors = []
|
97
|
-
else
|
98
|
-
processors = processors.select{ |processor| processor.select{ |key, value| value["enable"] == true }}
|
99
98
|
end
|
100
99
|
|
101
100
|
if processors.length < 1
|
@@ -104,6 +103,9 @@ class Main
|
|
104
103
|
|
105
104
|
processors.each do |processor|
|
106
105
|
processor.each do |key, value|
|
106
|
+
if value["enable"] != true
|
107
|
+
next
|
108
|
+
end
|
107
109
|
processorClass = Helper.unwrapRequiredParameter(value, "class")
|
108
110
|
require "Processors/#{processorClass}"
|
109
111
|
fetcher.registerProcessor(eval("#{processorClass}.new(#{value}, '#{configFilePath}', '#{ENV['PWD'] || ::Dir.pwd}')"))
|
@@ -121,6 +123,15 @@ end
|
|
121
123
|
begin
|
122
124
|
Main.new()
|
123
125
|
rescue => e
|
124
|
-
|
125
|
-
|
126
|
-
|
126
|
+
logger = ZLogger.new(ENV['PWD'] || ::Dir.pwd)
|
127
|
+
title = "#Error: #{e.class} #{e.message}"
|
128
|
+
body = e.backtrace
|
129
|
+
|
130
|
+
logger.logError("===RUNTIME EXCEPTION START===")
|
131
|
+
logger.logError(title)
|
132
|
+
logger.logError(body)
|
133
|
+
logger.logError("===RUNTIME EXCEPTION END===")
|
134
|
+
|
135
|
+
puts title
|
136
|
+
puts body
|
137
|
+
end
|
data/lib/Models/Review.rb
CHANGED
@@ -3,15 +3,15 @@ $lib = File.expand_path('../', File.dirname(__FILE__))
|
|
3
3
|
class Review
|
4
4
|
attr_accessor :platform, :id, :userName, :rating, :title, :body, :createdDateTimestamp, :url, :appVersion, :territory
|
5
5
|
def initialize(platform, id, userName, rating, title, body, createdDateTimestamp, url, appVersion, territory)
|
6
|
-
@platform = platform
|
7
|
-
@id = id
|
8
|
-
@userName = userName
|
9
|
-
@rating = rating
|
10
|
-
@title = title
|
11
|
-
@body = body
|
12
|
-
@createdDateTimestamp = createdDateTimestamp
|
13
|
-
@url = url
|
14
|
-
@appVersion = appVersion
|
15
|
-
@territory = territory
|
6
|
+
@platform = platform # 來源平台 android or apple
|
7
|
+
@id = id # review id
|
8
|
+
@userName = userName # reviewer
|
9
|
+
@rating = rating # 給予的 rating, 1~5
|
10
|
+
@title = title # review 標題 (android 無此資料)
|
11
|
+
@body = body # review 內容
|
12
|
+
@createdDateTimestamp = createdDateTimestamp # review 建立時間
|
13
|
+
@url = url # 前往 review 的連結 (apple 不提供後台指定到某個 review 的連結)
|
14
|
+
@appVersion = appVersion # app 版本號
|
15
|
+
@territory = territory # apple: 地區(TWN/JPN...), android: 語系(zh-tw/en...)
|
16
16
|
end
|
17
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ZReviewTender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZhgChgLi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-http
|
@@ -109,6 +109,6 @@ requirements: []
|
|
109
109
|
rubygems_version: 3.0.3
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
|
-
summary: ZReviewTender uses brand new App Store & Google Play API to
|
113
|
-
|
112
|
+
summary: ZReviewTender uses brand new App Store & Google Play API to fetch App reviews
|
113
|
+
and integration your workflow.
|
114
114
|
test_files: []
|