appveyor-api 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.circle.yml +8 -0
  3. data/.github/CONTRIBUTING.md +5 -0
  4. data/.gitignore +50 -0
  5. data/.rubocop.yml +10 -0
  6. data/.ruby-version +1 -0
  7. data/Gemfile +5 -0
  8. data/Gemfile.lock +112 -0
  9. data/Guardfile +22 -0
  10. data/LICENSE +674 -0
  11. data/README.md +26 -0
  12. data/appveyor.gemspec +37 -0
  13. data/lib/appveyor-api.rb +6 -0
  14. data/lib/appveyor-api/build.rb +34 -0
  15. data/lib/appveyor-api/client.rb +78 -0
  16. data/lib/appveyor-api/collaborators.rb +21 -0
  17. data/lib/appveyor-api/deployment.rb +47 -0
  18. data/lib/appveyor-api/environments.rb +116 -0
  19. data/lib/appveyor-api/projects.rb +116 -0
  20. data/lib/appveyor-api/response.rb +26 -0
  21. data/lib/appveyor-api/roles.rb +17 -0
  22. data/lib/appveyor-api/users.rb +24 -0
  23. data/spec/appveyor-api/client_spec.rb +16 -0
  24. data/spec/appveyor-api/environment_spec.rb +153 -0
  25. data/spec/appveyor-api/environments_spec.rb +48 -0
  26. data/spec/appveyor-api/project_spec.rb +109 -0
  27. data/spec/cassettes/add_FTP_environment_cassette.yml +49 -0
  28. data/spec/cassettes/create_environment_cassette.yml +49 -0
  29. data/spec/cassettes/delete_environment.yml +42 -0
  30. data/spec/cassettes/dev_environment_cassette.yml +93 -0
  31. data/spec/cassettes/environment_12168.yml +47 -0
  32. data/spec/cassettes/environment_cassette.yml +93 -0
  33. data/spec/cassettes/environment_list_after_delete.yml +46 -0
  34. data/spec/cassettes/environment_list_cassette.yml +49 -0
  35. data/spec/cassettes/find_environment_12168.yml +47 -0
  36. data/spec/cassettes/find_production_environment.yml +95 -0
  37. data/spec/cassettes/project_list.yml +60 -0
  38. data/spec/cassettes/projects_list.yml +288 -0
  39. data/spec/cassettes/update_FTP_environment_cassette.yml +49 -0
  40. data/spec/cassettes/update_environment_cassette.yml +49 -0
  41. data/spec/spec_helper.rb +28 -0
  42. metadata +299 -0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://ci.appveyor.com/api/environments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"deploymentEnvironmentId":11400,"name":"production","provider":"FTP","settings":{"providerSettings":[{"name":"server","value":{"value":"ftp.server.com","isEncrypted":false}},{"name":"username","value":{"value":"ftp-user","isEncrypted":false}},{"name":"password","value":{"value":"password","isEncrypted":true}}],"environmentVariables":[{"name":"my-var","value":{"value":"123","isEncrypted":false}}]}}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Authorization:
13
+ - Bearer <APPVEYOR_API_KEY>
14
+ User-Agent:
15
+ - Faraday v0.9.2
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Expires:
32
+ - "-1"
33
+ Server:
34
+ - Microsoft-IIS/8.5
35
+ X-Aspnet-Version:
36
+ - 4.0.30319
37
+ X-Powered-By:
38
+ - ASP.NET
39
+ Date:
40
+ - Tue, 18 Oct 2016 12:46:08 GMT
41
+ Content-Length:
42
+ - '1130'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"deploymentEnvironmentId":11413,"accountId":33256,"name":"production","provider":"FTP","environmentAccessKey":"fnliibmdyjat7d8w","settings":{"providerSettings":[{"name":"server","value":{"isEncrypted":false,"value":"ftp.server.com"}},{"name":"username","value":{"isEncrypted":false,"value":"ftp-user"}},{"name":"password","value":{"isEncrypted":true,"value":"password"}}],"environmentVariables":[{"name":"my-var","value":{"isEncrypted":false,"value":"123"}}],"notifications":[]},"projectsMode":0,"selectedProjects":[],"securityDescriptor":{"accessRightDefinitions":[{"name":"View","description":"View"},{"name":"Deploy","description":"Deploy
46
+ build"},{"name":"Update","description":"Update"},{"name":"Delete","description":"Delete"}],"roleAces":[{"roleId":53960,"name":"Administrator","isAdmin":true,"accessRights":[{"name":"View","allowed":true},{"name":"Deploy","allowed":true},{"name":"Update","allowed":true},{"name":"Delete","allowed":true}]},{"roleId":53961,"name":"User","isAdmin":false,"accessRights":[{"name":"View"},{"name":"Deploy"},{"name":"Update"},{"name":"Delete"}]}]},"created":"2016-10-18T12:46:07.6314842+00:00"}'
47
+ http_version:
48
+ recorded_at: Tue, 18 Oct 2016 12:46:07 GMT
49
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+ require 'appveyor-api'
3
+ require 'webmock/rspec'
4
+ require 'vcr'
5
+
6
+ RSpec.configure do |config|
7
+ config.expect_with :rspec do |expectations|
8
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
9
+ end
10
+
11
+ config.mock_with :rspec do |mocks|
12
+ mocks.verify_partial_doubles = true
13
+ end
14
+
15
+ config.run_all_when_everything_filtered = true
16
+ config.default_formatter = 'doc' if config.files_to_run.one?
17
+
18
+ config.disable_monkey_patching!
19
+ # config.order = :random
20
+ # Kernel.srand config.seed
21
+ end
22
+
23
+ VCR.configure do |c|
24
+ c.cassette_library_dir = 'spec/cassettes'
25
+ c.hook_into :webmock
26
+ c.configure_rspec_metadata!
27
+ c.filter_sensitive_data('<APPVEYOR_API_KEY>') { ENV['APPVEYOR_API_KEY'] }
28
+ end
metadata ADDED
@@ -0,0 +1,299 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: appveyor-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dan Webb
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-11-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '11.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '11.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: vcr
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rb-readline
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.5'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.5'
83
+ - !ruby/object:Gem::Dependency
84
+ name: growl
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.14'
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'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.7'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.7'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.5'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.5'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.12'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.12'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec_junit_formatter
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.2'
167
+ - !ruby/object:Gem::Dependency
168
+ name: faraday
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.9.2
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 0.9.2
181
+ - !ruby/object:Gem::Dependency
182
+ name: faraday_middleware
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 0.10.0
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 0.10.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: json
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '2.0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '2.0'
209
+ description: Gem to wrap AppVeyor API for simpler interactions with the AppVeyor Api
210
+ email:
211
+ - dan.webb@damacus.io
212
+ executables: []
213
+ extensions: []
214
+ extra_rdoc_files: []
215
+ files:
216
+ - ".circle.yml"
217
+ - ".github/CONTRIBUTING.md"
218
+ - ".gitignore"
219
+ - ".rubocop.yml"
220
+ - ".ruby-version"
221
+ - Gemfile
222
+ - Gemfile.lock
223
+ - Guardfile
224
+ - LICENSE
225
+ - README.md
226
+ - appveyor.gemspec
227
+ - lib/appveyor-api.rb
228
+ - lib/appveyor-api/build.rb
229
+ - lib/appveyor-api/client.rb
230
+ - lib/appveyor-api/collaborators.rb
231
+ - lib/appveyor-api/deployment.rb
232
+ - lib/appveyor-api/environments.rb
233
+ - lib/appveyor-api/projects.rb
234
+ - lib/appveyor-api/response.rb
235
+ - lib/appveyor-api/roles.rb
236
+ - lib/appveyor-api/users.rb
237
+ - spec/appveyor-api/client_spec.rb
238
+ - spec/appveyor-api/environment_spec.rb
239
+ - spec/appveyor-api/environments_spec.rb
240
+ - spec/appveyor-api/project_spec.rb
241
+ - spec/cassettes/add_FTP_environment_cassette.yml
242
+ - spec/cassettes/create_environment_cassette.yml
243
+ - spec/cassettes/delete_environment.yml
244
+ - spec/cassettes/dev_environment_cassette.yml
245
+ - spec/cassettes/environment_12168.yml
246
+ - spec/cassettes/environment_cassette.yml
247
+ - spec/cassettes/environment_list_after_delete.yml
248
+ - spec/cassettes/environment_list_cassette.yml
249
+ - spec/cassettes/find_environment_12168.yml
250
+ - spec/cassettes/find_production_environment.yml
251
+ - spec/cassettes/project_list.yml
252
+ - spec/cassettes/projects_list.yml
253
+ - spec/cassettes/update_FTP_environment_cassette.yml
254
+ - spec/cassettes/update_environment_cassette.yml
255
+ - spec/spec_helper.rb
256
+ homepage: https://github.com/damacus/appveyor-api
257
+ licenses:
258
+ - MIT
259
+ metadata: {}
260
+ post_install_message:
261
+ rdoc_options: []
262
+ require_paths:
263
+ - lib
264
+ required_ruby_version: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - ">="
267
+ - !ruby/object:Gem::Version
268
+ version: '0'
269
+ required_rubygems_version: !ruby/object:Gem::Requirement
270
+ requirements:
271
+ - - ">="
272
+ - !ruby/object:Gem::Version
273
+ version: '0'
274
+ requirements: []
275
+ rubyforge_project:
276
+ rubygems_version: 2.6.7
277
+ signing_key:
278
+ specification_version: 4
279
+ summary: Gem to wrap AppVeyor API
280
+ test_files:
281
+ - spec/appveyor-api/client_spec.rb
282
+ - spec/appveyor-api/environment_spec.rb
283
+ - spec/appveyor-api/environments_spec.rb
284
+ - spec/appveyor-api/project_spec.rb
285
+ - spec/cassettes/add_FTP_environment_cassette.yml
286
+ - spec/cassettes/create_environment_cassette.yml
287
+ - spec/cassettes/delete_environment.yml
288
+ - spec/cassettes/dev_environment_cassette.yml
289
+ - spec/cassettes/environment_12168.yml
290
+ - spec/cassettes/environment_cassette.yml
291
+ - spec/cassettes/environment_list_after_delete.yml
292
+ - spec/cassettes/environment_list_cassette.yml
293
+ - spec/cassettes/find_environment_12168.yml
294
+ - spec/cassettes/find_production_environment.yml
295
+ - spec/cassettes/project_list.yml
296
+ - spec/cassettes/projects_list.yml
297
+ - spec/cassettes/update_FTP_environment_cassette.yml
298
+ - spec/cassettes/update_environment_cassette.yml
299
+ - spec/spec_helper.rb