fastlane-plugin-playship 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +59 -0
- data/lib/fastlane/plugin/playship.rb +15 -0
- data/lib/fastlane/plugin/playship/actions/playship_action.rb +56 -0
- data/lib/fastlane/plugin/playship/version.rb +5 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6ad970d70ac2bb8e0c3123c47a3282264dc695b8
|
4
|
+
data.tar.gz: 0abbb85e86ffa24b001536041d299278a32cbb6d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 07277afdf00ef33586903e9abbb77107b27a53e6154da02aa36f84b7263f9a10848a2f4ed129ba73d0e24b8e99457a1c987ae554ceb83830d618d3296b6529df
|
7
|
+
data.tar.gz: a5d32320aa2ca527a45def4b311cfbfe4cf38197dce18051414e5e1e55081e01e32b0ecebb30616e38ad8129b3d840c6b860a4a68dbb4627ae0d434b69e5924d
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Helmut Januschka <h.januschka@krone.at>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# playship plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-playship)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-playship`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin playship
|
11
|
+
```
|
12
|
+
|
13
|
+
## About
|
14
|
+
|
15
|
+
Exposes a initialized AndroidpublisherV2 instance
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
client = playship(key: "~/Desktop/CLOUD_DRIVE_OLD/FXF/FXF-ANDROID/fastlane/google_play_key.json")
|
21
|
+
```
|
22
|
+
|
23
|
+
### List in-app-purchases
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
lane :list_iaps do
|
27
|
+
client = playship(key: "~/Desktop/CLOUD_DRIVE_OLD/FXF/FXF-ANDROID/fastlane/google_play_key.json")
|
28
|
+
iaps = client.list_in_app_products("at.krone.epaper", token: nil)
|
29
|
+
|
30
|
+
next_page = nil
|
31
|
+
begin
|
32
|
+
products = client.list_in_app_products("at.krone.epaper", token: next_page)
|
33
|
+
products.inappproduct.each do | p |
|
34
|
+
UI.important("IAP: #{p.sku}")
|
35
|
+
end
|
36
|
+
next_page = products.token_pagination.next_page_token
|
37
|
+
end while next_page
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
### get a interactive playground
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
lane :playground do
|
45
|
+
require "pry"
|
46
|
+
client = playship(key: "~/Desktop/CLOUD_DRIVE_OLD/FXF/FXF-ANDROID/fastlane/google_play_key.json")
|
47
|
+
binding.pry
|
48
|
+
end
|
49
|
+
|
50
|
+
```
|
51
|
+
|
52
|
+
## Issues and Feedback
|
53
|
+
|
54
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
55
|
+
|
56
|
+
|
57
|
+
## About `fastlane`
|
58
|
+
|
59
|
+
`fastlane` is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'fastlane/plugin/playship/version'
|
2
|
+
require 'googleauth'
|
3
|
+
require 'google/apis/androidpublisher_v2'
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Playship
|
7
|
+
def self.all_classes
|
8
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Fastlane::Playship.all_classes.each do |current|
|
14
|
+
require current
|
15
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class PlayshipAction < Action
|
4
|
+
Androidpublisher = Google::Apis::AndroidpublisherV2
|
5
|
+
CredentialsLoader = Google::Auth::CredentialsLoader
|
6
|
+
def self.run(params)
|
7
|
+
scope = Androidpublisher::AUTH_ANDROIDPUBLISHER
|
8
|
+
# requires valid play store json key
|
9
|
+
service_account_json = File.open(File.expand_path(params[:key]))
|
10
|
+
auth_client = Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: service_account_json, scope: scope)
|
11
|
+
auth_client.fetch_access_token!
|
12
|
+
|
13
|
+
Google::Apis::ClientOptions.default.application_name = "fastlane-playship"
|
14
|
+
Google::Apis::ClientOptions.default.application_version = "1.0"
|
15
|
+
Google::Apis::RequestOptions.default.timeout_sec = 300
|
16
|
+
Google::Apis::RequestOptions.default.open_timeout_sec = 300
|
17
|
+
Google::Apis::RequestOptions.default.retries = 5
|
18
|
+
|
19
|
+
android_publisher = Androidpublisher::AndroidPublisherService.new
|
20
|
+
android_publisher.authorization = auth_client
|
21
|
+
android_publisher
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.description
|
25
|
+
"Playship"
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.authors
|
29
|
+
["Helmut Januschka"]
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.return_value
|
33
|
+
# If your method provides a return value, you can describe here what it does
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.details
|
37
|
+
# Optional:
|
38
|
+
"Returns a GooglePublisher client"
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.available_options
|
42
|
+
[
|
43
|
+
FastlaneCore::ConfigItem.new(key: :key,
|
44
|
+
env_name: "PLAYSHIP_KEY",
|
45
|
+
description: "AndroidPublisher JSON key",
|
46
|
+
optional: false,
|
47
|
+
type: String)
|
48
|
+
]
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.is_supported?(platform)
|
52
|
+
true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-playship
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Helmut Januschka
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-api-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: fastlane
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.14.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.14.2
|
111
|
+
description:
|
112
|
+
email: h.januschka@krone.at
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- LICENSE
|
118
|
+
- README.md
|
119
|
+
- lib/fastlane/plugin/playship.rb
|
120
|
+
- lib/fastlane/plugin/playship/actions/playship_action.rb
|
121
|
+
- lib/fastlane/plugin/playship/version.rb
|
122
|
+
homepage:
|
123
|
+
licenses:
|
124
|
+
- MIT
|
125
|
+
metadata: {}
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
requirements: []
|
141
|
+
rubyforge_project:
|
142
|
+
rubygems_version: 2.6.8
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
145
|
+
summary: Interact with Google Play Api
|
146
|
+
test_files: []
|