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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d10b9f9286fc4d3c9c4897f048d5f559fa8b3c4b5526d5810dc48d8136532dcd
4
- data.tar.gz: 5506efee56904e79f3fee67b422ad39a10f306ddc7aab45a75150c94a8e561e4
3
+ metadata.gz: 99d4a5e75424bb3b1bbfdccf40ccaf363ad04a2bdccc92912da706716a63119c
4
+ data.tar.gz: 5a185dc631b20f68dc485c6d877c153568e175be7e4e99ab0cb0518de3a0b728
5
5
  SHA512:
6
- metadata.gz: 071a4bbacde1eebd65ba5c4bd228ac8baa5a755f7185ddc0c9d245c05ca00dff4040d95beeff0b6b76bcc23dd3c31bae86972635f478dace601e499f5dd992cc
7
- data.tar.gz: cbd0e92fcfb4c6b0a87653c0fac6fbba70defbebd592237c8154780b94d43888a9a84e8282d13f50fbb129a3f099b8dda3a74fc08f734300094dd1b0d60b7741
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
- # Assgin API Token
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 assgin Firim API Token
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
@@ -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: "Path to your pkg file"),
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
- conflicting_options: [:app_is_opened],
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
- conflicting_options: [:app_is_opened, :app_is_show_plaza],
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",
@@ -7,8 +7,9 @@ module Firim
7
7
  attr_accessor :options
8
8
  attr_reader :firim_client
9
9
 
10
- def self.firim_hostname
11
- return "http://api.fir.im/"
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.class.firim_hostname, conn_options) do |c|
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
- f.write("#{@app_info["name"]}: http://fir.im/#{@app_info["short"]} \n")
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
@@ -1,3 +1,3 @@
1
1
  module Firim
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.6"
3
3
  end
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.1
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: 2018-05-24 00:00:00.000000000 Z
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
- rubyforge_project:
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