social_snippet-registry_core 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGNmZGRhY2UyZmU2MTNkMGE3OWMyYTg1MjM1MTEyMDliYWM3MWE5Mw==
4
+ YWZmOWVmZDhiMjZkNzY1YzM5YjdiNWJjNGE1NmFlNmE3Zjc3MDFhNw==
5
5
  data.tar.gz: !binary |-
6
- ZTY3NzVkOTg5MWRjZjhkMTE2ZGRjN2E3MGJlZjgxNDU5NjJiM2RhOQ==
6
+ NGYzNmRkNDNkMzNiOWJjMDcyMTA2M2U4YzhkMmZhOTBiNDFjMWY4Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzFiM2MxOTQ3OTQyN2QzNTc1ZWY4NjdlZjc2MzljMTQyMmQ3YjJkOTVhNGI4
10
- MWU4MjdkNjc4ZWMxODQ3NjU2MGQ5YzE5MjcwYmRlYmFhNmVhOGYzYjgyY2Y5
11
- Yjc4NGU5ODU0ZmNjMTc0ZDc3MTcyZWY2NjcwOTBkZDg1MzFlNmE=
9
+ MWU3MDNlZTNhMzgzMTQ3OGViYWQ4YTJhNzlkM2U5Y2UzNDFiZDI4OTI5MDNk
10
+ ZWUxMmRkMTY4ZDI4YjU1OTNhZGVkNmExZmJkNTAxY2RiMmE0OTM4N2JjNDZj
11
+ MjlhMGRhODhhOTc5MzM1YTA3M2ViZjExYjZiZjVjYWJmMDE0MTk=
12
12
  data.tar.gz: !binary |-
13
- NmYzOWEzNGViODFkNzdkYjIzYjVlZTgyNTM4MzEwNGVhNGRmODBiMGQzYjE5
14
- OWExMDk4ZTZiMzg4OWJiM2UzMWY3YjA5NDMyMTg3ODE0ZDI5ZTFjZjdkMzdm
15
- ODY4YjQ0ZjJlYWY5NmMzNzBjN2IwNzY3NTkyMjgwZGZlZDNhMWI=
13
+ MTBkOTM2NTVkNDE2NzEwMTk0Y2MwMmQxMGRkOWJmZGVmNmFiMThhYzI0NGMz
14
+ ZGQwNGQ1N2ViYjViMjU0MzM0NTllMmUzYzQzZDExMDVmMDZjYmM2ZGNiMjZi
15
+ OTk4ZmExY2I3Y2YyODU0Mjg2MzI2M2EzYTU1NjgzY2ZlMzFiN2Q=
@@ -3,7 +3,7 @@ module SocialSnippet::Registry::WebAPI
3
3
  WebAPIv0.controllers :repositories do
4
4
 
5
5
  # GET /repositories
6
- get :index do
6
+ get :index, :provides => :json do
7
7
  if params[:q].nil?
8
8
  Repository.all_repos.to_json
9
9
  else
@@ -17,7 +17,7 @@ module SocialSnippet::Registry::WebAPI
17
17
  end.to_json
18
18
  end
19
19
 
20
- patch "/repositories" do
20
+ put "/repositories", :provides => :json do
21
21
  client = ::Octokit::Client.new(:access_token => current_account.github_access_token)
22
22
  client.auto_paginate = true
23
23
  repos = SortedSet.new
@@ -41,7 +41,11 @@ module SocialSnippet::Registry::WebAPI
41
41
 
42
42
  current_account.update_attributes :github_repos => repos.to_a
43
43
 
44
- "ok"
44
+ current_account.github_repos.map do |repo_name|
45
+ {
46
+ :name => repo_name,
47
+ }
48
+ end.to_json
45
49
  end
46
50
 
47
51
  end
@@ -1,5 +1,5 @@
1
1
  module SocialSnippet
2
2
  module RegistryCore
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_snippet-registry_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Sano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-27 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler