firim 0.2.1 → 0.2.6
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/README.md +11 -3
- data/lib/firim/options.rb +13 -3
- data/lib/firim/runner.rb +15 -4
- data/lib/firim/version.rb +1 -1
- metadata +3 -32
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,3 +1,9 @@
|
|
1
|
+
***Important***
|
2
|
+
|
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`.
|
6
|
+
|
1
7
|
# Firim
|
2
8
|
|
3
9
|
Firim is a command tool to directly upload ipa and change app infomation on fir.im. fir.im is a Beta APP host website, you can upload ipa for AdHoc or InHouse distribution for testing.
|
@@ -37,9 +43,11 @@ Upload with icon ***NOTICE: Icon must be jpg format***
|
|
37
43
|
|
38
44
|
firim -i [your_ipa_path] -l [your_icon_path]
|
39
45
|
|
40
|
-
|
46
|
+
Use `firim_api_url` to set API URL, if `fir.im` change the Base URL. default is `https://api.fir.im`.
|
47
|
+
|
48
|
+
# Assign API Token
|
41
49
|
|
42
|
-
There are three ways to
|
50
|
+
There are three ways to assign Firim API Token
|
43
51
|
|
44
52
|
1. Set `FIRIM_TOKEN` environment variables
|
45
53
|
2. Add `token` to `macOS Keychain`
|
@@ -67,4 +75,4 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
67
75
|
* Export all app infomation to a file
|
68
76
|
* Generate a web page show all the app's link and infomations
|
69
77
|
* Show the app list, and export all app infomations to a file
|
70
|
-
* force reset icon
|
78
|
+
* force reset icon
|
data/lib/firim/options.rb
CHANGED
@@ -9,6 +9,10 @@ module Firim
|
|
9
9
|
FastlaneCore::ConfigItem.new(key: :platform,
|
10
10
|
optional: true,
|
11
11
|
description: "The fir platform, support ios/android"),
|
12
|
+
# fir.im api url
|
13
|
+
FastlaneCore::ConfigItem.new(key: :firim_api_url,
|
14
|
+
default_value: "https://api.bq04.com",
|
15
|
+
description: "fir.im api URL"),
|
12
16
|
# firim info
|
13
17
|
FastlaneCore::ConfigItem.new(key: :firim_api_token,
|
14
18
|
short_option: "-a",
|
@@ -17,6 +21,12 @@ module Firim
|
|
17
21
|
FastlaneCore::ConfigItem.new(key: :firim_username,
|
18
22
|
optional: true,
|
19
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"),
|
20
30
|
# Content path
|
21
31
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
22
32
|
optional: true,
|
@@ -56,7 +66,7 @@ module Firim
|
|
56
66
|
|
57
67
|
FastlaneCore::ConfigItem.new(key: :file,
|
58
68
|
optional: true,
|
59
|
-
description: "
|
69
|
+
description: "Don't use this for upload file"),
|
60
70
|
# APP info
|
61
71
|
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
62
72
|
description: "The app's identifier",
|
@@ -77,11 +87,11 @@ module Firim
|
|
77
87
|
FastlaneCore::ConfigItem.new(key: :app_is_show_plaza,
|
78
88
|
description: "Whether the app show in plaza",
|
79
89
|
is_string: false,
|
80
|
-
|
90
|
+
# conflicting_options: [:app_is_opened],
|
81
91
|
optional: true),
|
82
92
|
FastlaneCore::ConfigItem.new(key: :app_passwd,
|
83
93
|
description: "The app's download page password",
|
84
|
-
|
94
|
+
# conflicting_options: [:app_is_opened, :app_is_show_plaza],
|
85
95
|
optional: true),
|
86
96
|
FastlaneCore::ConfigItem.new(key: :app_store_link_visible,
|
87
97
|
description: "Whether show store link in download page",
|
data/lib/firim/runner.rb
CHANGED
@@ -7,8 +7,9 @@ module Firim
|
|
7
7
|
attr_accessor :options
|
8
8
|
attr_reader :firim_client
|
9
9
|
|
10
|
-
def
|
11
|
-
|
10
|
+
def firim_hostname
|
11
|
+
api_url = self.options[:firim_api_url]
|
12
|
+
return api_url
|
12
13
|
end
|
13
14
|
|
14
15
|
def guess_platform
|
@@ -41,7 +42,7 @@ module Firim
|
|
41
42
|
self.options[:platform] = self.guess_platform
|
42
43
|
UI.user_error!("Platform not given --platform ios/android") if self.options[:platform] == nil
|
43
44
|
|
44
|
-
@firim_client = Faraday.new(self.
|
45
|
+
@firim_client = Faraday.new(self.firim_hostname, conn_options) do |c|
|
45
46
|
c.request :url_encoded # form-encode POST params
|
46
47
|
c.adapter :net_http
|
47
48
|
c.response :json, :content_type => /\bjson$/
|
@@ -62,6 +63,7 @@ module Firim
|
|
62
63
|
@app_info.merge!( update_app_info(@app_info["id"]))
|
63
64
|
write_app_info_to_file
|
64
65
|
options = @app_info
|
66
|
+
options[:download_page_url] = download_url
|
65
67
|
FastlaneCore::PrintTable.print_values(config: options, title: "#{@app_info["name"]}'s' App Info")
|
66
68
|
end
|
67
69
|
|
@@ -69,11 +71,20 @@ module Firim
|
|
69
71
|
file_path = self.options[:app_info_to_file_path]
|
70
72
|
return if file_path == nil
|
71
73
|
File.open(file_path, "at") do |f|
|
72
|
-
|
74
|
+
d_url = download_url
|
75
|
+
f.write("#{@app_info["name"]}: #{d_url}\n")
|
73
76
|
UI.success "Write app info to #{file_path} successed!"
|
74
77
|
end
|
75
78
|
end
|
76
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
|
+
|
77
88
|
def validation_response response_data
|
78
89
|
error_code = response_data['code'].to_i
|
79
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:
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|
@@ -30,34 +30,6 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 3.0.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: faraday
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0.9'
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0.9'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: faraday_middleware
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0.9'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.9'
|
61
33
|
- !ruby/object:Gem::Dependency
|
62
34
|
name: bundler
|
63
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
112
|
- !ruby/object:Gem::Version
|
141
113
|
version: '0'
|
142
114
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.7.6
|
115
|
+
rubygems_version: 3.1.2
|
145
116
|
signing_key:
|
146
117
|
specification_version: 4
|
147
118
|
summary: fir.im command tool
|