fastlane-plugin-box 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/box/actions/box_action.rb +21 -5
- data/lib/fastlane/plugin/box/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50bf84e58b635cd553c7df262016d10fb3f6e08
|
4
|
+
data.tar.gz: b7cd03ca01bbc2e5867e2da7deb485573dac10a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2989b856b52b223fafe84805659c9249246ee9bab8160d7a1b5f65c142874273c0a5dd5e1a785c789ee7cfab21908dd8fc74706c06b0c541fb9a0dcd0d334ae1
|
7
|
+
data.tar.gz: 2ad85100ca3b755087b191edeed98609c50627e455f648017d262375eec5422c19372b343300d897fd977075052cf0514c2f2c53ad8af00c277aded00f8af0d3
|
@@ -1,15 +1,31 @@
|
|
1
|
+
require 'boxr'
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Actions
|
3
5
|
class BoxAction < Action
|
4
6
|
def self.run(params)
|
5
|
-
UI.message("The box plugin is working!")
|
7
|
+
# UI.message("The box plugin is working!")
|
6
8
|
ipa_file = params[:ipa]
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
|
9
|
+
|
10
|
+
#JWT methods
|
11
|
+
token = Boxr::get_enterprise_token(private_key: ENV['JWT_PRIVATE_KEY'],
|
12
|
+
private_key_password: ENV['JWT_PRIVATE_KEY_PASSWORD'],
|
13
|
+
public_key_id: ENV['JWT_PUBLIC_KEY_ID'],
|
14
|
+
enterprise_id: ENV['BOX_ENTERPRISE_ID'],
|
15
|
+
client_id: ENV['BOX_CLIENT_ID'],
|
16
|
+
client_secret: ENV['BOX_CLIENT_SECRET'])
|
17
|
+
# UI.message(token)
|
18
|
+
# client = Boxr::Client.new #uses ENV['BOX_DEVELOPER_TOKEN']
|
19
|
+
client = Boxr::Client.new(token)
|
20
|
+
|
21
|
+
folder = client.folder_from_path('/')
|
22
|
+
file = client.upload_file(ipa_file, folder)
|
23
|
+
# file = client.upload_file(ipa_file)
|
11
24
|
updated_file = client.create_shared_link_for_file(file, access: :open)
|
12
25
|
puts "Shared Link: #{updated_file.shared_link.url}"
|
26
|
+
|
27
|
+
items = client.folder_items(Boxr::ROOT)
|
28
|
+
items.each {|i| puts i.name}
|
13
29
|
end
|
14
30
|
|
15
31
|
def self.description
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Sui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: boxr
|