appengine 0.4.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,6 @@
1
- # Copyright 2017 Google Inc. All rights reserved.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
@@ -11,20 +13,18 @@
11
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
- ;
15
16
 
16
- require "shellwords"
17
17
 
18
+ require "shellwords"
19
+ require "English"
18
20
 
19
21
  module AppEngine
20
22
  module Util
21
-
22
23
  ##
23
24
  # A collection of utility functions and classes for interacting with an
24
25
  # installation of the gcloud SDK.
25
26
  #
26
27
  module Gcloud
27
-
28
28
  ##
29
29
  # Base class for gcloud related errors.
30
30
  #
@@ -68,7 +68,6 @@ module AppEngine
68
68
  end
69
69
 
70
70
  class << self
71
-
72
71
  ##
73
72
  # @private
74
73
  # Returns the path to the gcloud binary, or nil if the binary could
@@ -78,8 +77,13 @@ module AppEngine
78
77
  #
79
78
  def binary_path
80
79
  unless defined? @binary_path
81
- @binary_path = `which gcloud`.strip
82
- @binary_path = nil if @binary_path.empty?
80
+ @binary_path =
81
+ if ::Gem.win_platform?
82
+ `where gcloud` == "" ? nil : "gcloud"
83
+ else
84
+ path = `which gcloud`.strip
85
+ path.empty? ? nil : path
86
+ end
83
87
  end
84
88
  @binary_path
85
89
  end
@@ -107,9 +111,10 @@ module AppEngine
107
111
  #
108
112
  def current_project
109
113
  unless defined? @current_project
110
- @current_project = execute [
114
+ params = [
111
115
  "config", "list", "core/project", "--format=value(core.project)"
112
- ], capture: true
116
+ ]
117
+ @current_project = execute params, capture: true
113
118
  @current_project = nil if @current_project.empty?
114
119
  end
115
120
  @current_project
@@ -143,7 +148,7 @@ module AppEngine
143
148
  binary_path!
144
149
  current_project!
145
150
  auths = execute ["auth", "list", "--format=value(account)"],
146
- capture: true
151
+ capture: true
147
152
  raise GcloudNotAuthenticated if auths.empty?
148
153
  end
149
154
 
@@ -162,12 +167,17 @@ module AppEngine
162
167
  # depending on the value of the `capture` parameter.
163
168
  #
164
169
  def execute args, echo: false, capture: false, assert: true
165
- joined_args = ::Shellwords.join args
166
- cmd = "#{binary_path!} #{joined_args}"
170
+ cmd_array = [binary_path!] + args
171
+ cmd =
172
+ if ::Gem.win_platform?
173
+ cmd_array.join " "
174
+ else
175
+ ::Shellwords.join cmd_array
176
+ end
167
177
  puts cmd if echo
168
178
  result = capture ? `#{cmd}` : system(cmd)
169
- code = $?.exitstatus
170
- raise GcloudFailed.new($?.exitstatus) if assert && code != 0
179
+ code = $CHILD_STATUS.exitstatus
180
+ raise GcloudFailed, code if assert && code != 0
171
181
  result
172
182
  end
173
183
 
@@ -182,9 +192,7 @@ module AppEngine
182
192
  def capture args
183
193
  execute args, capture: true
184
194
  end
185
-
186
195
  end
187
196
  end
188
-
189
197
  end
190
198
  end
@@ -1,4 +1,6 @@
1
- # Copyright 2016 Google Inc. All rights reserved.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
@@ -11,11 +13,9 @@
11
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
- ;
15
16
 
16
- module AppEngine
17
17
 
18
+ module AppEngine
18
19
  # The current version of this gem, as a string.
19
- VERSION = '0.4.3'.freeze
20
-
20
+ VERSION = "0.6.0"
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-20 00:00:00.000000000 Z
11
+ date: 2020-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-env
@@ -16,84 +16,160 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: stackdriver
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.7'
33
+ version: '0.20'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.20.1
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: '0.7'
43
+ version: '0.20'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.20.1
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: bundler
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '1.15'
53
+ version: '2.0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '1.15'
60
+ version: '2.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: google-style
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 1.24.0
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 1.24.0
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: minitest
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - "~>"
60
80
  - !ruby/object:Gem::Version
61
- version: '5.0'
81
+ version: '5.11'
62
82
  type: :development
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
86
  - - "~>"
67
87
  - !ruby/object:Gem::Version
68
- version: '5.0'
88
+ version: '5.11'
89
+ - !ruby/object:Gem::Dependency
90
+ name: minitest-focus
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.1'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.1'
103
+ - !ruby/object:Gem::Dependency
104
+ name: minitest-rg
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '5.2'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '5.2'
69
117
  - !ruby/object:Gem::Dependency
70
118
  name: rake
71
119
  requirement: !ruby/object:Gem::Requirement
72
120
  requirements:
73
121
  - - "~>"
74
122
  - !ruby/object:Gem::Version
75
- version: '11.0'
123
+ version: '12.0'
76
124
  type: :development
77
125
  prerelease: false
78
126
  version_requirements: !ruby/object:Gem::Requirement
79
127
  requirements:
80
128
  - - "~>"
81
129
  - !ruby/object:Gem::Version
82
- version: '11.0'
130
+ version: '12.0'
83
131
  - !ruby/object:Gem::Dependency
84
132
  name: rdoc
85
133
  requirement: !ruby/object:Gem::Requirement
86
134
  requirements:
87
135
  - - "~>"
88
136
  - !ruby/object:Gem::Version
89
- version: '4.2'
137
+ version: '6.0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '6.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: redcarpet
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '3.4'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '3.4'
159
+ - !ruby/object:Gem::Dependency
160
+ name: toys
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '0.11'
90
166
  type: :development
91
167
  prerelease: false
92
168
  version_requirements: !ruby/object:Gem::Requirement
93
169
  requirements:
94
170
  - - "~>"
95
171
  - !ruby/object:Gem::Version
96
- version: '4.2'
172
+ version: '0.11'
97
173
  - !ruby/object:Gem::Dependency
98
174
  name: yard
99
175
  requirement: !ruby/object:Gem::Requirement
@@ -111,9 +187,9 @@ dependencies:
111
187
  description: The appengine gem is a set of classes, plugins, and tools for integration
112
188
  with Google App Engine. It provides access to the App Engine runtime environment,
113
189
  including logging to the Google Cloud Console and interrogation of hosting properties.
114
- It also provides rake tasks for managing your App Engine application, for example
115
- to run production maintenance commands. This gem is not required to deploy your
116
- Ruby application to App Engine.
190
+ It also provides Rake tasks for managing your App Engine application, for example
191
+ to run production maintenance commands such as database migrations. This gem is
192
+ NOT required to deploy your Ruby application to App Engine.
117
193
  email:
118
194
  - dazuma@gmail.com
119
195
  executables: []
@@ -125,7 +201,7 @@ files:
125
201
  - CONTRIBUTING.md
126
202
  - LICENSE
127
203
  - README.md
128
- - Rakefile
204
+ - data/exec_standard_entrypoint.rb.erb
129
205
  - lib/appengine.rb
130
206
  - lib/appengine/env.rb
131
207
  - lib/appengine/exec.rb
@@ -135,7 +211,7 @@ files:
135
211
  - lib/appengine/version.rb
136
212
  homepage: https://github.com/GoogleCloudPlatform/appengine-ruby
137
213
  licenses:
138
- - Apache 2.0
214
+ - Apache-2.0
139
215
  metadata: {}
140
216
  post_install_message:
141
217
  rdoc_options: []
@@ -145,15 +221,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
221
  requirements:
146
222
  - - ">="
147
223
  - !ruby/object:Gem::Version
148
- version: 2.0.0
224
+ version: 2.4.0
149
225
  required_rubygems_version: !ruby/object:Gem::Requirement
150
226
  requirements:
151
227
  - - ">="
152
228
  - !ruby/object:Gem::Version
153
229
  version: '0'
154
230
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.6.13
231
+ rubygems_version: 3.0.3
157
232
  signing_key:
158
233
  specification_version: 4
159
234
  summary: Google App Engine integration tools
data/Rakefile DELETED
@@ -1,42 +0,0 @@
1
- # Copyright 2016 Google Inc. All rights reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- ;
15
-
16
- require 'bundler/gem_tasks'
17
- require 'rake/testtask'
18
- require 'rdoc/task'
19
-
20
- CLEAN << ['pkg', 'doc']
21
-
22
- ::Rake::TestTask.new do |t|
23
- t.libs << 'test'
24
- t.libs << 'lib'
25
- t.test_files = ::FileList['test/test_*.rb']
26
- end
27
-
28
- ::RDoc::Task.new do |rd|
29
- rd.rdoc_dir = 'doc'
30
- rd.main = 'README.md'
31
- rd.rdoc_files.include 'README.md', 'CONTRIBUTING.md', 'CHANGELOG.md', 'lib/**/*.rb'
32
- rd.options << '--line-numbers'
33
- rd.options << '--all'
34
- end
35
-
36
- require "yard"
37
- require "yard/rake/yardoc_task"
38
- YARD::Rake::YardocTask.new
39
-
40
- load "lib/appengine/tasks.rb"
41
-
42
- task :default => [:test]