firim 0.1.0 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71ce22fb2fae197455cca05de2c9e26dea236a89
4
- data.tar.gz: 4fb4e7dbfd738e0c2b61c2e5b47c84f2c55a06d7
3
+ metadata.gz: ab169abd7aa804f3c7a07ac15424dd555a4a6acf
4
+ data.tar.gz: 6e2261ed327dadd82040e1a2372cb83b2f594898
5
5
  SHA512:
6
- metadata.gz: f5349626a9c64773773b7dd094e315ce5f6f06ca7f11dccdafeb38a8551769fcafa5d054d2737c41784854c1e1b958b58f55a148d743022242a158497f7f00be
7
- data.tar.gz: e1c696a1ff9b3e678a106f712a0c921b4cdb2db20cdbb3bf0a2680854de1a75c97f3ddd5bb78f77f618b221444f971977cc517e1d95fb62f8cba9e8ac446aaf2
6
+ metadata.gz: 12678653c19724d0efb3acb951433c6411cfa1ce29f9f6f3e67c704287a43b246275c0465e2cbb26a1e7049e23e96bb9a6f4a535970061164e63ddc87a4a1a4a
7
+ data.tar.gz: 58f39b02b0e4059e9e71339ee80c80eff8ee5fb84eb9755cdc8f5d2a25e4afd94b027f6bd90a0f55d5d648b7795a5f624b7a6bf0fe9f989d5324de2b415b04f7
data/README.md CHANGED
@@ -32,7 +32,7 @@ Use with fastlane [fastlane-plugin-firim](fastlane-plugin-firim/)
32
32
  You can specify the app infomations in `Firimfile`, To get a list of available options run
33
33
 
34
34
  firim --help
35
-
35
+
36
36
  Upload with icon ***NOTICE: Icon must be jpg format***
37
37
 
38
38
  firim -i [your_ipa_path] -l [your_icon_path]
@@ -53,6 +53,7 @@ The gem is available as open source under the terms of the [MIT License](http://
53
53
 
54
54
  # TODO
55
55
 
56
- * Export all app infomation to a file
56
+ * Export all app infomation to a file
57
57
  * Generate a web page show all the app's link and infomations
58
- * Show the app list, and export all app infomations to a file
58
+ * Show the app list, and export all app infomations to a file
59
+ * force reset icon
data/lib/firim/options.rb CHANGED
@@ -52,9 +52,11 @@ module Firim
52
52
  FastlaneCore::ConfigItem.new(key: :app_is_show_plaza,
53
53
  description: "Whether the app show in plaza",
54
54
  is_string: false,
55
+ conflicting_options: [:app_is_opened],
55
56
  optional: true),
56
57
  FastlaneCore::ConfigItem.new(key: :app_passwd,
57
58
  description: "The app's download page password",
59
+ conflicting_options: [:app_is_opened, :app_is_show_plaza],
58
60
  optional: true),
59
61
  FastlaneCore::ConfigItem.new(key: :app_store_link_visible,
60
62
  description: "Whether show store link in download page",
@@ -71,6 +73,10 @@ module Firim
71
73
  optional: true),
72
74
  FastlaneCore::ConfigItem.new(key: :app_changelog,
73
75
  description: "The app's changelog",
76
+ optional: true),
77
+ # To file
78
+ FastlaneCore::ConfigItem.new(key: :app_info_to_file_path,
79
+ description: "Append all [app's name] : [URL] to this file",
74
80
  optional: true)
75
81
  ]
76
82
  end
data/lib/firim/runner.rb CHANGED
@@ -34,8 +34,19 @@ module Firim
34
34
 
35
35
  def run
36
36
  # FastlaneCore::PrintTable.print_values(config: get_app_info, title: "Current online infomation")
37
- @app_info.merge( upload_binary_and_icon )
37
+ @app_info.merge!( upload_binary_and_icon )
38
+ @app_info.merge!( update_app_info(@app_info["id"]))
39
+ write_app_info_to_file
40
+ options = @app_info
41
+ FastlaneCore::PrintTable.print_values(config: options, title: "#{@app_info["name"]}'s' App Info")
42
+ end
38
43
 
44
+ def write_app_info_to_file
45
+ file_path = self.options[:app_info_to_file_path]
46
+ File.open(file_path, "at") do |f|
47
+ f.write("#{@app_info["name"]}: http://fir.im/#{@app_info["short"]} \n")
48
+ UI.success "Write app info to #{file_path} successed!"
49
+ end
39
50
  end
40
51
 
41
52
  def validation_response response_data
@@ -124,11 +135,12 @@ module Firim
124
135
 
125
136
  def update_app_info id
126
137
  params = {
127
- :api_token => options[:firim_api_token]
138
+ :api_token => self.options[:firim_api_token],
139
+ :id => id
128
140
  }
129
141
  ["name", "desc", "short", "is_opened", "is_show_plaza", "passwd", "store_link_visible"].each do |k|
130
142
  key = :"app_#{k}"
131
- params[k] = options[key] if options[key] != nil
143
+ params[k] = self.options[key] if self.options[key] != nil
132
144
  end
133
145
 
134
146
  update_app_info_path = "apps/#{id}"
@@ -139,6 +151,7 @@ module Firim
139
151
  info = response.body
140
152
  validation_response info
141
153
  UI.success "Update app info successed!"
154
+ return info
142
155
  end
143
156
 
144
157
  end
data/lib/firim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Firim
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - whlsxl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-17 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core