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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fccb78cae34398e6073397a4489fb789438e5877
4
- data.tar.gz: d5bbfe809731d62d8463215fc1bf793e9ebec704
3
+ metadata.gz: e50bf84e58b635cd553c7df262016d10fb3f6e08
4
+ data.tar.gz: b7cd03ca01bbc2e5867e2da7deb485573dac10a7
5
5
  SHA512:
6
- metadata.gz: efafd73baceaafd19d83107e8504054582179432a8bc56f3a0b461b34fad9f5c7b17b9b965439ea71980165bf15ef15ea01b6ee726615dff369c85b1ccd91df5
7
- data.tar.gz: 8ef214716819fbaa6acfbfffbcf6f25ab070c43c9d1192e735521f438c19d16a8d181974a0b75c307aa92c260872ba670a69f75310b44b7cb59926a257f7a8c9
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
- client = Boxr::Client.new #uses ENV['BOX_DEVELOPER_TOKEN']
8
- # folder = client.folder_from_path('/some/directory/structure')
9
- # file = client.upload_file(ipa_file, folder)
10
- file = client.upload_file(ipa_file)
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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Box
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-03 00:00:00.000000000 Z
11
+ date: 2017-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: boxr