firim 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/firim/options.rb +6 -0
- data/lib/firim/runner.rb +11 -1
- data/lib/firim/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99d4a5e75424bb3b1bbfdccf40ccaf363ad04a2bdccc92912da706716a63119c
|
4
|
+
data.tar.gz: 5a185dc631b20f68dc485c6d877c153568e175be7e4e99ab0cb0518de3a0b728
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9d2e3d57c1b69f97ba74e26a2e27fe21754c897eb01d9ac07540293d0dff486cbbc8dbe7671c70c2b5020701bc33aabd3f03bc977a426b07b51841e7cb5cde
|
7
|
+
data.tar.gz: ce37927d5f4dea8127b5fc3c04e386252d6f5aa24c0d40432c64a14ddd19f2c5d1cbf9be120bc6d05654c2def91d19fd85303fba571f0ff11db09a11784a268f
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
***Important***
|
2
2
|
|
3
|
-
***For the reason of fir.im had changed the Base URL, pls set `firim_api_url` to `http://api.
|
3
|
+
***For the reason of fir.im had changed the Base URL, pls set `firim_api_url` to `http://fir-api.fircli.cn/` or `http://api.bq04.com`.*** [issue](https://github.com/whlsxl/firim/issues/26)
|
4
|
+
|
5
|
+
From v0.2.5, the default `firim_api_url` set to `http://api.bq04.com`.
|
4
6
|
|
5
7
|
# Firim
|
6
8
|
|
data/lib/firim/options.rb
CHANGED
@@ -21,6 +21,12 @@ module Firim
|
|
21
21
|
FastlaneCore::ConfigItem.new(key: :firim_username,
|
22
22
|
optional: true,
|
23
23
|
description: "fir.im username, a sign for identify different token"),
|
24
|
+
|
25
|
+
FastlaneCore::ConfigItem.new(key: :download_page_prefix,
|
26
|
+
short_option: "-p",
|
27
|
+
optional: true,
|
28
|
+
default_value: "http://d.firim.top/",
|
29
|
+
description: "fir.im user api token"),
|
24
30
|
# Content path
|
25
31
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
26
32
|
optional: true,
|
data/lib/firim/runner.rb
CHANGED
@@ -63,6 +63,7 @@ module Firim
|
|
63
63
|
@app_info.merge!( update_app_info(@app_info["id"]))
|
64
64
|
write_app_info_to_file
|
65
65
|
options = @app_info
|
66
|
+
options[:download_page_url] = download_url
|
66
67
|
FastlaneCore::PrintTable.print_values(config: options, title: "#{@app_info["name"]}'s' App Info")
|
67
68
|
end
|
68
69
|
|
@@ -70,11 +71,20 @@ module Firim
|
|
70
71
|
file_path = self.options[:app_info_to_file_path]
|
71
72
|
return if file_path == nil
|
72
73
|
File.open(file_path, "at") do |f|
|
73
|
-
|
74
|
+
d_url = download_url
|
75
|
+
f.write("#{@app_info["name"]}: #{d_url}\n")
|
74
76
|
UI.success "Write app info to #{file_path} successed!"
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
80
|
+
def download_url
|
81
|
+
prefix = self.options[:download_page_prefix]
|
82
|
+
if prefix[1..-1] != "/"
|
83
|
+
return "#{prefix}/#{@app_info["short"]}"
|
84
|
+
end
|
85
|
+
return "#{prefix}#{@app_info["short"]}"
|
86
|
+
end
|
87
|
+
|
78
88
|
def validation_response response_data
|
79
89
|
error_code = response_data['code'].to_i
|
80
90
|
return if error_code == 0
|
data/lib/firim/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- whlsxl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|