appengine 0.4.6 → 0.5.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,12 +77,13 @@ module AppEngine
78
77
  #
79
78
  def binary_path
80
79
  unless defined? @binary_path
81
- if Gem.win_platform?
82
- @binary_path = `where gcloud` == '' ? nil : 'gcloud'
83
- else
84
- @binary_path = `which gcloud`.strip
85
- @binary_path = nil if @binary_path.empty?
86
- end
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
87
87
  end
88
88
  @binary_path
89
89
  end
@@ -111,9 +111,10 @@ module AppEngine
111
111
  #
112
112
  def current_project
113
113
  unless defined? @current_project
114
- @current_project = execute [
114
+ params = [
115
115
  "config", "list", "core/project", "--format=value(core.project)"
116
- ], capture: true
116
+ ]
117
+ @current_project = execute params, capture: true
117
118
  @current_project = nil if @current_project.empty?
118
119
  end
119
120
  @current_project
@@ -147,7 +148,7 @@ module AppEngine
147
148
  binary_path!
148
149
  current_project!
149
150
  auths = execute ["auth", "list", "--format=value(account)"],
150
- capture: true
151
+ capture: true
151
152
  raise GcloudNotAuthenticated if auths.empty?
152
153
  end
153
154
 
@@ -166,13 +167,17 @@ module AppEngine
166
167
  # depending on the value of the `capture` parameter.
167
168
  #
168
169
  def execute args, echo: false, capture: false, assert: true
169
- joined_args = Gem.win_platform? ? args.join(" ") : Shellwords.join(args)
170
-
171
- 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
172
177
  puts cmd if echo
173
178
  result = capture ? `#{cmd}` : system(cmd)
174
- code = $?.exitstatus
175
- raise GcloudFailed.new($?.exitstatus) if assert && code != 0
179
+ code = $CHILD_STATUS.exitstatus
180
+ raise GcloudFailed, code if assert && code != 0
176
181
  result
177
182
  end
178
183
 
@@ -187,9 +192,7 @@ module AppEngine
187
192
  def capture args
188
193
  execute args, capture: true
189
194
  end
190
-
191
195
  end
192
196
  end
193
-
194
197
  end
195
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.6'.freeze
20
-
20
+ VERSION = "0.5.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.6
4
+ version: 0.5.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: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-env
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.2'
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.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: stackdriver
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,70 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.16'
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: google-style
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.3'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: minitest
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '5.0'
75
+ version: '5.11'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '5.11'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-focus
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest-rg
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '5.2'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
108
  - - "~>"
67
109
  - !ruby/object:Gem::Version
68
- version: '5.0'
110
+ version: '5.2'
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: rake
71
113
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +136,48 @@ dependencies:
94
136
  - - "~>"
95
137
  - !ruby/object:Gem::Version
96
138
  version: '6.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: redcarpet
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.4'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.4'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 0.64.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 0.64.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: toys
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.8'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.8'
97
181
  - !ruby/object:Gem::Dependency
98
182
  name: yard
99
183
  requirement: !ruby/object:Gem::Requirement
@@ -111,9 +195,9 @@ dependencies:
111
195
  description: The appengine gem is a set of classes, plugins, and tools for integration
112
196
  with Google App Engine. It provides access to the App Engine runtime environment,
113
197
  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.
198
+ It also provides Rake tasks for managing your App Engine application, for example
199
+ to run production maintenance commands such as database migrations. This gem is
200
+ NOT required to deploy your Ruby application to App Engine.
117
201
  email:
118
202
  - dazuma@gmail.com
119
203
  executables: []
@@ -125,7 +209,7 @@ files:
125
209
  - CONTRIBUTING.md
126
210
  - LICENSE
127
211
  - README.md
128
- - Rakefile
212
+ - data/exec_standard_entrypoint.rb.erb
129
213
  - lib/appengine.rb
130
214
  - lib/appengine/env.rb
131
215
  - lib/appengine/exec.rb
@@ -135,7 +219,7 @@ files:
135
219
  - lib/appengine/version.rb
136
220
  homepage: https://github.com/GoogleCloudPlatform/appengine-ruby
137
221
  licenses:
138
- - Apache 2.0
222
+ - Apache-2.0
139
223
  metadata: {}
140
224
  post_install_message:
141
225
  rdoc_options: []
@@ -145,7 +229,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
229
  requirements:
146
230
  - - ">="
147
231
  - !ruby/object:Gem::Version
148
- version: 2.0.0
232
+ version: 2.3.0
149
233
  required_rubygems_version: !ruby/object:Gem::Requirement
150
234
  requirements:
151
235
  - - ">="
@@ -153,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
237
  version: '0'
154
238
  requirements: []
155
239
  rubyforge_project:
156
- rubygems_version: 2.7.6
240
+ rubygems_version: 2.7.6.2
157
241
  signing_key:
158
242
  specification_version: 4
159
243
  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]