octonaut 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +12 -4
- data/lib/octonaut.rb +2 -0
- data/lib/octonaut/commands/activity.rb +126 -0
- data/lib/octonaut/commands/contents.rb +1 -1
- data/lib/octonaut/commands/users.rb +41 -13
- data/lib/octonaut/printers/repositories.rb +1 -1
- data/lib/octonaut/utils.rb +9 -0
- data/lib/octonaut/version.rb +1 -1
- data/spec/activity_spec.rb +141 -0
- data/spec/contents_spec.rb +1 -1
- data/spec/fixtures/repositories.ls +30 -30
- data/spec/fixtures/starred.json +2522 -0
- data/spec/fixtures/starred.ls +30 -0
- data/spec/fixtures/subscribers.json +416 -0
- data/spec/fixtures/subscribers.ls +23 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/users_spec.rb +11 -0
- metadata +15 -2
data/spec/spec_helper.rb
CHANGED
@@ -5,6 +5,17 @@ RSpec.configure do |config|
|
|
5
5
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
6
6
|
config.order = 'random'
|
7
7
|
|
8
|
+
config.before do
|
9
|
+
ENV['OCTONAUT_ENV'] = 'TEST'
|
10
|
+
@plugins_path = ENV['OCTONAUT_PLUGINS_PATH']
|
11
|
+
ENV['OCTONAUT_PLUGINS_PATH'] = 'tmp/fakehome/plugins'
|
12
|
+
end
|
13
|
+
|
14
|
+
config.after do
|
15
|
+
ENV.delete('OCTONAUT_ENV')
|
16
|
+
ENV['OCTONAUT_PLUGINS_PATH'] = @plugins_path
|
17
|
+
end
|
18
|
+
|
8
19
|
config.before :each do
|
9
20
|
@old_stderr = $stderr
|
10
21
|
$stderr = StringIO.new
|
data/spec/users_spec.rb
CHANGED
@@ -24,6 +24,17 @@ describe Octonaut do
|
|
24
24
|
expect($stdout.string).to include("User or organization defunktzzz not found")
|
25
25
|
end
|
26
26
|
|
27
|
+
it "it updates a user profile" do
|
28
|
+
request = stub_patch('https://defunkt:il0veruby@api.github.com/user').
|
29
|
+
with(:email => "c@ozmm.org").
|
30
|
+
to_return(json_response("user.json"))
|
31
|
+
|
32
|
+
Octonaut.run %w(-u defunkt -p il0veruby user update --email c@ozmm.org)
|
33
|
+
|
34
|
+
expect(request).to have_been_made
|
35
|
+
expect($stdout.string).to include("User profile updated")
|
36
|
+
end
|
37
|
+
|
27
38
|
end
|
28
39
|
|
29
40
|
context "listing followers" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octonaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gli
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- LICENSE.md
|
216
216
|
- Rakefile
|
217
217
|
- octonaut.gemspec
|
218
|
+
- lib/octonaut/commands/activity.rb
|
218
219
|
- lib/octonaut/commands/authorizations.rb
|
219
220
|
- lib/octonaut/commands/common.rb
|
220
221
|
- lib/octonaut/commands/contents.rb
|
@@ -227,9 +228,11 @@ files:
|
|
227
228
|
- lib/octonaut/printers/organizations.rb
|
228
229
|
- lib/octonaut/printers/repositories.rb
|
229
230
|
- lib/octonaut/printers/users.rb
|
231
|
+
- lib/octonaut/utils.rb
|
230
232
|
- lib/octonaut/version.rb
|
231
233
|
- lib/octonaut.rb
|
232
234
|
- bin/octonaut
|
235
|
+
- spec/activity_spec.rb
|
233
236
|
- spec/authorizations_spec.rb
|
234
237
|
- spec/contents_spec.rb
|
235
238
|
- spec/fixtures/gfm.html
|
@@ -241,6 +244,10 @@ files:
|
|
241
244
|
- spec/fixtures/repositories.json
|
242
245
|
- spec/fixtures/repositories.ls
|
243
246
|
- spec/fixtures/repository.json
|
247
|
+
- spec/fixtures/starred.json
|
248
|
+
- spec/fixtures/starred.ls
|
249
|
+
- spec/fixtures/subscribers.json
|
250
|
+
- spec/fixtures/subscribers.ls
|
244
251
|
- spec/fixtures/token.json
|
245
252
|
- spec/fixtures/tokens.json
|
246
253
|
- spec/fixtures/tokens.ls
|
@@ -279,6 +286,7 @@ signing_key:
|
|
279
286
|
specification_version: 3
|
280
287
|
summary: CLI for GitHub
|
281
288
|
test_files:
|
289
|
+
- spec/activity_spec.rb
|
282
290
|
- spec/authorizations_spec.rb
|
283
291
|
- spec/contents_spec.rb
|
284
292
|
- spec/fixtures/gfm.html
|
@@ -290,6 +298,10 @@ test_files:
|
|
290
298
|
- spec/fixtures/repositories.json
|
291
299
|
- spec/fixtures/repositories.ls
|
292
300
|
- spec/fixtures/repository.json
|
301
|
+
- spec/fixtures/starred.json
|
302
|
+
- spec/fixtures/starred.ls
|
303
|
+
- spec/fixtures/subscribers.json
|
304
|
+
- spec/fixtures/subscribers.ls
|
293
305
|
- spec/fixtures/token.json
|
294
306
|
- spec/fixtures/tokens.json
|
295
307
|
- spec/fixtures/tokens.ls
|
@@ -301,3 +313,4 @@ test_files:
|
|
301
313
|
- spec/repositories_spec.rb
|
302
314
|
- spec/spec_helper.rb
|
303
315
|
- spec/users_spec.rb
|
316
|
+
has_rdoc:
|