elasticrepo 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7f36ab128dd1ab868c62c913f801844c741b9a6
4
- data.tar.gz: e3b38f7d56903186d1c459392b1f4e7672532e1d
3
+ metadata.gz: e5faef8abc98c1d6a95300aaf6f96860262f1b06
4
+ data.tar.gz: 5b8297daf86e30243d558d41ef27d2d872b5df12
5
5
  SHA512:
6
- metadata.gz: a2941bb568f584d06be29bf02cf79400533202d925618e9df3de5154fcd59615cebd542b0bda77b00464f0c47fe1388d3dca09622e47715817019a284fd4ef7c
7
- data.tar.gz: 77d580f0fde838b7bfa535e76ba54a855169c659516baaf76475952c588a651dfdd88739cb4d6c6476404d8771eddc7c92bb37b0698e3925e66ffb725b8e7057
6
+ metadata.gz: f02b11d5c6bc25b4829d31413ebd5d4451cab249aa6ccf9a26beda758a831bcd9464ce3b184bcd31784504470f6784dd014c7564eba45d3016b6fac20f467df5
7
+ data.tar.gz: b095a26fe1a5d31e74763a69a6e00cca7e12739679161bc709113d812e891fb04337690f0cdd07a916f6e9d32760ea94a20b00f541892dcd11d84215ab17bc87
@@ -5,7 +5,6 @@ module Elasticrepo
5
5
  # GET /users/:user/starred
6
6
  # extract fields subset from each repo
7
7
  # then get back an array of lighter repos
8
-
9
8
  def initialize owner
10
9
  repos = Octokit.starred owner
11
10
  @repos = repos.map!{|repo|Elasticrepo::RepoSubset.new(repo)}
@@ -1,16 +1,17 @@
1
1
  module Elasticrepo
2
2
  class Indexer
3
3
 
4
- def initialize(owner)
5
- @owner = owner
4
+ def initialize
6
5
  @idx = "repositories"
7
6
  end
8
-
9
- def import
10
- # extract subset fields by user repositories starred list
11
- # GET /users/:user/starred
12
- #
13
- repos = Elasticrepo::Extractor.new(@owner).repos
7
+
8
+ # given a user, extract his starred repositories, then index the list with Tire
9
+ #
10
+ # GET /users/:user/starred
11
+ # http://developer.github.com/v3/repos/#list-user-repositories
12
+ #
13
+ def starred(owner)
14
+ repos = Elasticrepo::Extractor.new(owner).repos
14
15
  # index the extraction
15
16
  #
16
17
  Tire::Index.new(@idx) do
@@ -20,7 +21,7 @@ module Elasticrepo
20
21
  # Refresh the index for immediate searching
21
22
  #
22
23
  refresh
23
- end
24
+ end
24
25
  end
25
26
 
26
27
  def import_with_map
@@ -1,3 +1,3 @@
1
1
  module Elasticrepo
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,59 +1,50 @@
1
1
  require "spec_helper"
2
- # API ref.: GET /users/:user/starred
3
- # http://developer.github.com/v3/repos/
4
- # https://github.com/pengwynn/octokit/blob/master/lib/octokit/client/users.rb
5
-
6
- describe Elasticrepo::Extractor do
7
- let(:fixture_repos) { Yajl::Parser.parse(fixture("repositories.json").read) }
8
- let(:live_extracted) { Elasticrepo::Extractor.new("lapaty") }
9
-
10
- describe "#extract" do
11
-
12
- context "specs debugging" do
13
- it "print the content of running specs" do
14
- print "live_extracted.repos: #{live_extracted.repos} \n \n"
15
- print "live_extracted.repos.class: #{live_extracted.repos.class} \n \n"
16
- print "live_extracted.repos.to_json: #{live_extracted.repos.to_json} \n \n"
17
- print "live_extracted.repos[0].to_json: #{live_extracted.repos[0].to_json} \n \n"
18
- print "live_extracted.repos[0].owner: #{live_extracted.repos[0].owner} \n \n"
19
- print "live_extracted.repos[0].organization: #{live_extracted.repos[0].organization} \n \n"
20
-
21
- print "fixture_repos: #{fixture_repos} \n \n"
22
- print "fixture_repos.class: #{fixture_repos.class} \n \n"
23
- print "fixture_repos.to_json: #{fixture_repos[0].to_json} \n \n"
24
- print "fixture_repos[0].to_json: #{fixture_repos[0].to_json} \n \n"
25
- print "fixture_repos[0]['owner']['login']: #{fixture_repos[0]['owner']['login']} \n \n"
26
- print "fixture_repos[0]['organization']: #{fixture_repos[0]['organization']} \n \n"
27
- end
28
- end
29
-
30
- context "extract fields subset from each repo" do
31
- its("fixture_repos[0]['id']") { fixture_repos[0]['id'].should eq live_extracted.repos[0].id }
32
- #its("fixture_repos[0]['owner']['login']") { fixture_repos[0]['owner']['login'].should eq live_extracted.repos[0].owner['login'] }
33
- its("fixture_repos[0]['name']") { fixture_repos[0]['name'].should eq live_extracted.repos[0].name }
34
- its("fixture_repos[0]['url']") { fixture_repos[0]['url'].should eq live_extracted.repos[0].url }
35
- its("fixture_repos[0]['description']") { fixture_repos[0]['description'].should eq live_extracted.repos[0].description }
36
- its("fixture_repos[0]['created_at']") { fixture_repos[0]['created_at'].should eq live_extracted.repos[0].created_at }
37
- its("fixture_repos[0]['pushed_at']") { fixture_repos[0]['pushed_at'].should eq live_extracted.repos[0].pushed_at }
38
- #its("fixture_repos[0]['organization']") { fixture_repos[0]['organization'].should eq live_extracted.repos[0].organization }
39
- its("fixture_repos[0]['language']") { fixture_repos[0]['language'].should eq live_extracted.repos[0].language }
40
- its("fixture_repos[0]['full_name']") { fixture_repos[0]['full_name'].should eq live_extracted.repos[0].full_name }
41
- #its("fixture_repos[0]['updated_at']") { fixture_repos[0]['updated_at'].should eq live_extracted.repos[0].updated_at }
42
-
43
- its("fixture_repos[1]['id']") { fixture_repos[1]['id'].should eq live_extracted.repos[1].id }
44
- #its("fixture_repos[1]['owner']['login']") { fixture_repos[1]['owner']['login'].should eq live_extracted.repos[1].owner['login'] }
45
- its("fixture_repos[1]['url']") { fixture_repos[1]['url'].should eq live_extracted.repos[1].url }
46
- its("fixture_repos[1]['description']") { fixture_repos[1]['description'].should eq live_extracted.repos[1].description }
47
- its("fixture_repos[1]['name']") { fixture_repos[1]['name'].should eq live_extracted.repos[1].name }
48
- its("fixture_repos[1]['created_at']") { fixture_repos[1]['created_at'].should eq live_extracted.repos[1].created_at }
49
- its("fixture_repos[1]['pushed_at']") { fixture_repos[1]['pushed_at'].should eq live_extracted.repos[1].pushed_at }
50
- #its("fixture_repos[1]['organization']") { fixture_repos[1]['organization'].should eq live_extracted.repos[1].organization }
51
- its("fixture_repos[1]['full_name']") { fixture_repos[1]['full_name'].should eq live_extracted.repos[1].full_name }
52
- its("fixture_repos[1]['language']") { fixture_repos[1]['language'].should eq live_extracted.repos[1].language }
53
- #its("fixture_repos[1]['updated_at']") { fixture_repos[1]['updated_at'].should eq live_extracted.repos[1].updated_at }
54
- end
55
-
56
- end
57
-
58
- end
59
2
 
3
+ # API ref.: GET /users/:user/starred
4
+ # http://developer.github.com/v3/repos/
5
+ # https://github.com/pengwynn/octokit/blob/master/lib/octokit/client/users.rb
6
+
7
+ describe Elasticrepo::Extractor, :vcr => { :cassette_name => "v3/users/_get/lapaty/starred" } do
8
+
9
+ subject(:extracted) { Elasticrepo::Extractor.new("lapaty") }
10
+
11
+ describe "#new" do
12
+ # describe "GET /repos/:owner/:repo" do
13
+ # it 'gets "lgs/elasticrepo" repository (JSON)' do
14
+ # VCR.use_cassette('v3/repos/#get/lgs/elasticrepo') do
15
+ # response = Faraday.get 'https://api.github.com/repos/lgs/elasticrepo'
16
+ # response.body.should include("1573")
17
+ # response.body.should include("9416045")
18
+ # response.body.should include("elasticrepo")
19
+ # response.body.should include("lgs/elasticrepo")
20
+ # response.body.should include("Indexing GitHub repository with ElasticSearch")
21
+ # end
22
+ # end
23
+ # end
24
+
25
+ context "debugging specs print out" do
26
+ it "print the content of running specs" do
27
+ print "extracted.repos.class: #{extracted.repos.class} \n \n"
28
+ print "extracted.repos.inspect: #{extracted.repos.inspect} \n \n"
29
+ print "extracted.repos[0].id: #{extracted.repos[0].id} \n \n"
30
+ print "extracted.repos[0].owner #{extracted.repos[0].owner} \n \n"
31
+ end
32
+ end
33
+
34
+ context "extract fields subset from each repo" do
35
+ its("repos[0]['id']") { extracted.repos[0].id.should eq 5392501 }
36
+ its("repos[0]['owner']") { extracted.repos[0].owner.should eq "cainlevy" }
37
+ its("repos[0]['url']") { extracted.repos[0].url.should eq "https://api.github.com/repos/cainlevy/photor" }
38
+ its("repos[0]['description']") { extracted.repos[0].description.should eq "Photo Organizer (in Ruby)" }
39
+ its("repos[0]['name']") { extracted.repos[0].name.should eq "photor" }
40
+ its("repos[0]['created_at']") { extracted.repos[0].created_at.should eq "2012-08-12T22:26:08Z" }
41
+ its("repos[0]['pushed_at']") { extracted.repos[0].pushed_at.should eq "2013-02-19T03:11:10Z" }
42
+ its("repos[0]['organization']") { extracted.repos[0].organization.should eq "User" }
43
+ its("repos[0]['full_name']") { extracted.repos[0].full_name.should eq "cainlevy/photor" }
44
+ its("repos[0]['language']") { extracted.repos[0].language.should eq "Ruby" }
45
+ its("repos[0]['updated_at']") { extracted.repos[0].updated_at.should eq "2013-03-13T02:05:33Z" }
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -1,45 +1,36 @@
1
1
  require "spec_helper"
2
2
 
3
- describe Elasticrepo::Indexer do
4
- let(:elastic_repo) { Elasticrepo::Indexer.new("lapaty") }
5
- subject(:import) { elastic_repo.import }
3
+ describe Elasticrepo::Indexer, :vcr => { :cassette_name => "v3/users/_get/lapaty/starred" } do
6
4
 
7
- context "print Elasticrepo::import instantiation for debugging purposes" do
8
- its("elastic_repo") { print "#{elastic_repo} \n \n" }
9
- its("elastic_repo.class") { print "#{elastic_repo.class} \n \n" }
10
- its("elastic_repo.inspect") { print "#{elastic_repo.inspect} \n \n" }
11
- end
12
-
13
- context "print before instance import for debugging purposes" do
14
- its("import") { print "import: #{import} \n \n" }
15
- its("import.class") { print "import.class: #{import.class} \n \n" }
16
- its("import.inspect") { print "import.inspect: #{import.inspect} \n \n" }
17
- end
5
+ let(:indexer) { Elasticrepo::Indexer.new }
6
+ subject(:starred_import) { indexer.starred("lapaty") }
18
7
 
19
- #[{"id":5392501,"owner":"cainlevy","name":"photor","url":"https://api.github.com/elastic_repo/cainlevy/photor","description":"Photo Organizer (in Ruby)","created_at":"2012-08-12T22:26:08Z","pushed_at":"2013-02-19T03:11:10Z","organization":"User","full_name":"cainlevy/photor","language":"Ruby","updated_at":"2013-03-13T02:05:33Z"},{"id":612595,"owner":"aino","name":"galleria","url":"https://api.github.com/elastic_repo/aino/galleria","description":"The JavaScript Image Gallery","created_at":"2010-04-15T21:11:51Z","pushed_at":"2013-03-01T20:16:55Z","organization":"Organization","full_name":"aino/galleria","language":"JavaScript","updated_at":"2013-04-18T06:30:41Z"}]
20
-
21
- # describe "GET index" do
22
- # it "assigns all reports as @reports" do
23
- # report = Report.create! valid_attributes
24
- # get :index, {}, valid_session
25
- # assigns(:reports).should include(report)
26
- # end
27
- # end
28
-
29
- describe "#import" do
30
- context "searching" do
8
+
9
+ describe "#starred" do
10
+ context "print starred_import instance for debugging purposes" do
11
+ its("starred_import") { print "starred_import: #{starred_import} \n \n" }
12
+ its("starred_import.class") { print "starred_import.class: #{starred_import.class} \n \n" }
13
+ its("starred_import.inspect") { print "starred_import.inspect: #{starred_import.inspect} \n \n" }
14
+ end
15
+ context "searching with Tire" do
31
16
  # see also: https://github.com/ferpetrelli/elasticsearch_tire_test
32
- subject { elastic_repo.delete }
33
- subject { import }
34
17
  let(:search) { Tire::Search::Search.new("repositories") }
35
-
36
- it "find one repo matching" do
18
+ it "find one repo matching 'Image Gall' description" do
37
19
  search.query { string('description:*mage Gall') }
38
20
  search.results.count.should == 1
39
21
  end
40
-
41
- its("print search results: ") { print "#{search.results}" }
22
+ its("print search results: ") { print "#{search.results.inspect}" }
23
+ end
24
+ end
25
+
26
+ describe "#delete" do
27
+ subject { starred_import.delete }
28
+ # see also: https://github.com/ferpetrelli/elasticsearch_tire_test
29
+ let(:search) { Tire::Search::Search.new("repositories") }
30
+ # subject { starred_import }
31
+ it "cannot find a repo matching 'Image Gall' description anymore" do
32
+ search.query { string('description:*mage Gall') }
33
+ search.results.count.should == 1
42
34
  end
43
35
  end
44
-
45
36
  end
@@ -1,25 +1,38 @@
1
1
  require "spec_helper"
2
2
 
3
- # API ref.: GET /repos/:owner/:repo
3
+ # GitHub API ref.:
4
+ # GET /repos/:owner/:repo
4
5
  # http://developer.github.com/v3/repos/
6
+ describe Elasticrepo::RepoSubset, :vcr => { :cassette_name => "v3/repos/_get/lgs/elasticrepo" } do
5
7
 
6
- describe Elasticrepo::RepoSubset do
7
- let(:parsed) { Yajl::Parser.parse(fixture("repository.json").read) }
8
+ let(:repo) { Faraday.get('https://api.github.com/repos/lgs/elasticrepo').body }
9
+ let(:parsed) { Yajl::Parser.parse(repo) }
8
10
  subject { Elasticrepo::RepoSubset.new(parsed) }
9
11
 
10
- context "checks extracted fields" do
11
- its(:id) { should eq(2126244) }
12
- its(:owner) { should eq("twitter") }
13
- its(:name) { should eq("bootstrap") }
14
- its(:url){ should eq("https://api.github.com/repos/twitter/bootstrap") }
15
- its(:description) { should eq("Sleek, intuitive, and powerful front-end framework for faster and easier web development.") }
16
- its(:created_at) { should eq("2011-07-29T21:19:00Z") }
17
- its(:pushed_at) { should eq("2013-04-13T03:56:36Z") }
18
- its(:organization) { should eq("Organization") }
19
- its(:full_name) { should eq("twitter/bootstrap") }
20
- its(:language) { should eq("JavaScript") }
21
- its(:updated_at) { should eq("2013-04-13T19:12:09Z") }
22
- end
23
- end
12
+ describe "#new" do
13
+ context "checks the full repo subset of extracted fields" do
14
+ its(:id) { should eq(9416045) }
15
+ its(:id) { should_not eq(94160450) }
16
+
17
+ its(:owner) { should eq("lgs") }
18
+ its(:owner) { should_not eq("l-g-s") }
19
+
20
+ its(:name) { should eq("elasticrepo") }
21
+ its(:url){ should eq("https://api.github.com/repos/lgs/elasticrepo") }
22
+ its(:description) { should eq("Indexing GitHub repository with ElasticSearch") }
24
23
 
24
+ its(:created_at) { should eq("2013-04-13T15:57:03Z") }
25
+ its(:created_at) { should_not eq("2013-05-13T15:57:03Z") }
25
26
 
27
+ its(:pushed_at) { should eq("2013-06-02T09:33:42Z") }
28
+ its(:pushed_at) { should_not eq("2013-07-02T09:33:42Z") }
29
+
30
+ its(:organization) { should eq("User") }
31
+ its(:full_name) { should eq("lgs/elasticrepo") }
32
+ its(:language) { should eq("Ruby") }
33
+
34
+ its(:updated_at) { should eq("2013-06-02T09:33:42Z") }
35
+ its(:updated_at) { should_not eq("2013-07-02T09:33:42Z") }
36
+ end
37
+ end
38
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,11 +2,27 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
3
3
 
4
4
  require 'elasticrepo'
5
- #require 'json_spec'
6
- #require 'fakeweb'
5
+ require 'faraday'
7
6
  require 'octokit'
8
7
  require 'tire'
9
8
  require 'yajl'
9
+ require 'vcr'
10
+
11
+ VCR.configure do |c|
12
+ c.configure_rspec_metadata!
13
+ c.cassette_library_dir = 'spec/vcr_cassettes'
14
+ c.hook_into :faraday
15
+ c.default_cassette_options = { :serialize_with => :json }
16
+ #c.ignore_request do |request|
17
+ # URI(request.uri).uri == 'https://api.github.com/users/lapaty/starred'
18
+ #end
19
+ end
20
+
21
+ RSpec.configure do |c|
22
+ # so we can use `:vcr` rather than `:vcr => true`;
23
+ # in RSpec 3 this will no longer be necessary.
24
+ c.treat_symbols_as_metadata_keys_with_true_values = true
25
+ end
10
26
 
11
27
  def fixture_path
12
28
  File.expand_path("../fixtures", __FILE__)
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/lgs/elasticrepo","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.7"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Sun, 02 Jun 2013 11:52:01 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"connection":["close"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["59"],"vary":["Accept, Accept-Encoding"],"cache-control":["public, max-age=60, s-maxage=60"],"last-modified":["Sun, 02 Jun 2013 09:33:42 GMT"],"etag":["\"1e621803794261a6e2dc9d39f6be13f7\""],"x-github-media-type":["github.beta"],"x-content-type-options":["nosniff"],"access-control-allow-credentials":["true"],"access-control-expose-headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"access-control-allow-origin":["*"]},"body":{"encoding":"UTF-8","string":"{\"id\":9416045,\"name\":\"elasticrepo\",\"full_name\":\"lgs/elasticrepo\",\"owner\":{\"login\":\"lgs\",\"id\":1573,\"avatar_url\":\"https://secure.gravatar.com/avatar/9c7d80ebc20ab8994e51b9f7518909ae?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\"gravatar_id\":\"9c7d80ebc20ab8994e51b9f7518909ae\",\"url\":\"https://api.github.com/users/lgs\",\"html_url\":\"https://github.com/lgs\",\"followers_url\":\"https://api.github.com/users/lgs/followers\",\"following_url\":\"https://api.github.com/users/lgs/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/lgs/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/lgs/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/lgs/subscriptions\",\"organizations_url\":\"https://api.github.com/users/lgs/orgs\",\"repos_url\":\"https://api.github.com/users/lgs/repos\",\"events_url\":\"https://api.github.com/users/lgs/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/lgs/received_events\",\"type\":\"User\"},\"private\":false,\"html_url\":\"https://github.com/lgs/elasticrepo\",\"description\":\"Indexing GitHub repository with ElasticSearch\",\"fork\":false,\"url\":\"https://api.github.com/repos/lgs/elasticrepo\",\"forks_url\":\"https://api.github.com/repos/lgs/elasticrepo/forks\",\"keys_url\":\"https://api.github.com/repos/lgs/elasticrepo/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/lgs/elasticrepo/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/lgs/elasticrepo/teams\",\"hooks_url\":\"https://api.github.com/repos/lgs/elasticrepo/hooks\",\"issue_events_url\":\"https://api.github.com/repos/lgs/elasticrepo/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/lgs/elasticrepo/events\",\"assignees_url\":\"https://api.github.com/repos/lgs/elasticrepo/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/lgs/elasticrepo/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/lgs/elasticrepo/tags\",\"blobs_url\":\"https://api.github.com/repos/lgs/elasticrepo/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/lgs/elasticrepo/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/lgs/elasticrepo/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/lgs/elasticrepo/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/lgs/elasticrepo/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/lgs/elasticrepo/languages\",\"stargazers_url\":\"https://api.github.com/repos/lgs/elasticrepo/stargazers\",\"contributors_url\":\"https://api.github.com/repos/lgs/elasticrepo/contributors\",\"subscribers_url\":\"https://api.github.com/repos/lgs/elasticrepo/subscribers\",\"subscription_url\":\"https://api.github.com/repos/lgs/elasticrepo/subscription\",\"commits_url\":\"https://api.github.com/repos/lgs/elasticrepo/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/lgs/elasticrepo/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/lgs/elasticrepo/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/lgs/elasticrepo/issues/comments/{number}\",\"contents_url\":\"https://api.github.com/repos/lgs/elasticrepo/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/lgs/elasticrepo/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/lgs/elasticrepo/merges\",\"archive_url\":\"https://api.github.com/repos/lgs/elasticrepo/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/lgs/elasticrepo/downloads\",\"issues_url\":\"https://api.github.com/repos/lgs/elasticrepo/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/lgs/elasticrepo/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/lgs/elasticrepo/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/lgs/elasticrepo/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/lgs/elasticrepo/labels{/name}\",\"created_at\":\"2013-04-13T15:57:03Z\",\"updated_at\":\"2013-06-02T09:33:42Z\",\"pushed_at\":\"2013-06-02T09:33:42Z\",\"git_url\":\"git://github.com/lgs/elasticrepo.git\",\"ssh_url\":\"git@github.com:lgs/elasticrepo.git\",\"clone_url\":\"https://github.com/lgs/elasticrepo.git\",\"svn_url\":\"https://github.com/lgs/elasticrepo\",\"homepage\":null,\"size\":576,\"watchers_count\":0,\"language\":\"Ruby\",\"has_issues\":true,\"has_downloads\":true,\"has_wiki\":true,\"forks_count\":0,\"mirror_url\":null,\"open_issues_count\":0,\"forks\":0,\"open_issues\":0,\"watchers\":0,\"master_branch\":\"master\",\"default_branch\":\"master\",\"network_count\":0}"},"http_version":null},"recorded_at":"Sun, 02 Jun 2013 11:52:01 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/users/lapaty/starred","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Octokit Ruby Gem 1.24.0"],"Accept":["application/vnd.github.beta+json"]}},"response":{"status":{"code":200,"message":null},"headers":{"server":["GitHub.com"],"date":["Mon, 03 Jun 2013 20:58:55 GMT"],"content-type":["application/json; charset=utf-8"],"transfer-encoding":["chunked"],"connection":["close"],"status":["200 OK"],"x-ratelimit-limit":["60"],"x-ratelimit-remaining":["59"],"vary":["Accept, Accept-Encoding"],"cache-control":["public, max-age=60, s-maxage=60"],"last-modified":["Sun, 12 Aug 2012 22:26:08 GMT"],"etag":["\"f2a40bc805dfd564ce4b780bfa27b961\""],"x-github-media-type":["github.beta; format=json"],"x-content-type-options":["nosniff"],"access-control-allow-credentials":["true"],"access-control-expose-headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"access-control-allow-origin":["*"]},"body":{"encoding":"UTF-8","string":"[{\"id\":5392501,\"name\":\"photor\",\"full_name\":\"cainlevy/photor\",\"owner\":{\"login\":\"cainlevy\",\"id\":4449,\"avatar_url\":\"https://secure.gravatar.com/avatar/2573ddee29779e76b7da7d3c2c9ff18d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\"gravatar_id\":\"2573ddee29779e76b7da7d3c2c9ff18d\",\"url\":\"https://api.github.com/users/cainlevy\",\"html_url\":\"https://github.com/cainlevy\",\"followers_url\":\"https://api.github.com/users/cainlevy/followers\",\"following_url\":\"https://api.github.com/users/cainlevy/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/cainlevy/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/cainlevy/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/cainlevy/subscriptions\",\"organizations_url\":\"https://api.github.com/users/cainlevy/orgs\",\"repos_url\":\"https://api.github.com/users/cainlevy/repos\",\"events_url\":\"https://api.github.com/users/cainlevy/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/cainlevy/received_events\",\"type\":\"User\"},\"private\":false,\"html_url\":\"https://github.com/cainlevy/photor\",\"description\":\"Photo Organizer (in Ruby)\",\"fork\":false,\"url\":\"https://api.github.com/repos/cainlevy/photor\",\"forks_url\":\"https://api.github.com/repos/cainlevy/photor/forks\",\"keys_url\":\"https://api.github.com/repos/cainlevy/photor/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/cainlevy/photor/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/cainlevy/photor/teams\",\"hooks_url\":\"https://api.github.com/repos/cainlevy/photor/hooks\",\"issue_events_url\":\"https://api.github.com/repos/cainlevy/photor/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/cainlevy/photor/events\",\"assignees_url\":\"https://api.github.com/repos/cainlevy/photor/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/cainlevy/photor/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/cainlevy/photor/tags\",\"blobs_url\":\"https://api.github.com/repos/cainlevy/photor/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/cainlevy/photor/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/cainlevy/photor/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/cainlevy/photor/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/cainlevy/photor/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/cainlevy/photor/languages\",\"stargazers_url\":\"https://api.github.com/repos/cainlevy/photor/stargazers\",\"contributors_url\":\"https://api.github.com/repos/cainlevy/photor/contributors\",\"subscribers_url\":\"https://api.github.com/repos/cainlevy/photor/subscribers\",\"subscription_url\":\"https://api.github.com/repos/cainlevy/photor/subscription\",\"commits_url\":\"https://api.github.com/repos/cainlevy/photor/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/cainlevy/photor/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/cainlevy/photor/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/cainlevy/photor/issues/comments/{number}\",\"contents_url\":\"https://api.github.com/repos/cainlevy/photor/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/cainlevy/photor/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/cainlevy/photor/merges\",\"archive_url\":\"https://api.github.com/repos/cainlevy/photor/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/cainlevy/photor/downloads\",\"issues_url\":\"https://api.github.com/repos/cainlevy/photor/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/cainlevy/photor/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/cainlevy/photor/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/cainlevy/photor/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/cainlevy/photor/labels{/name}\",\"created_at\":\"2012-08-12T22:26:08Z\",\"updated_at\":\"2013-03-13T02:05:33Z\",\"pushed_at\":\"2013-02-19T03:11:10Z\",\"git_url\":\"git://github.com/cainlevy/photor.git\",\"ssh_url\":\"git@github.com:cainlevy/photor.git\",\"clone_url\":\"https://github.com/cainlevy/photor.git\",\"svn_url\":\"https://github.com/cainlevy/photor\",\"homepage\":null,\"size\":312,\"watchers_count\":4,\"language\":\"Ruby\",\"has_issues\":true,\"has_downloads\":true,\"has_wiki\":true,\"forks_count\":0,\"mirror_url\":null,\"open_issues_count\":0,\"forks\":0,\"open_issues\":0,\"watchers\":4,\"master_branch\":\"master\",\"default_branch\":\"master\"},{\"id\":612595,\"name\":\"galleria\",\"full_name\":\"aino/galleria\",\"owner\":{\"login\":\"aino\",\"id\":245015,\"avatar_url\":\"https://secure.gravatar.com/avatar/e7269063b056757594eea1e8f4c8bcb1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png\",\"gravatar_id\":\"e7269063b056757594eea1e8f4c8bcb1\",\"url\":\"https://api.github.com/users/aino\",\"html_url\":\"https://github.com/aino\",\"followers_url\":\"https://api.github.com/users/aino/followers\",\"following_url\":\"https://api.github.com/users/aino/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/aino/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/aino/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/aino/subscriptions\",\"organizations_url\":\"https://api.github.com/users/aino/orgs\",\"repos_url\":\"https://api.github.com/users/aino/repos\",\"events_url\":\"https://api.github.com/users/aino/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/aino/received_events\",\"type\":\"Organization\"},\"private\":false,\"html_url\":\"https://github.com/aino/galleria\",\"description\":\"The JavaScript Image Gallery\",\"fork\":false,\"url\":\"https://api.github.com/repos/aino/galleria\",\"forks_url\":\"https://api.github.com/repos/aino/galleria/forks\",\"keys_url\":\"https://api.github.com/repos/aino/galleria/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/aino/galleria/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/aino/galleria/teams\",\"hooks_url\":\"https://api.github.com/repos/aino/galleria/hooks\",\"issue_events_url\":\"https://api.github.com/repos/aino/galleria/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/aino/galleria/events\",\"assignees_url\":\"https://api.github.com/repos/aino/galleria/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/aino/galleria/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/aino/galleria/tags\",\"blobs_url\":\"https://api.github.com/repos/aino/galleria/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/aino/galleria/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/aino/galleria/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/aino/galleria/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/aino/galleria/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/aino/galleria/languages\",\"stargazers_url\":\"https://api.github.com/repos/aino/galleria/stargazers\",\"contributors_url\":\"https://api.github.com/repos/aino/galleria/contributors\",\"subscribers_url\":\"https://api.github.com/repos/aino/galleria/subscribers\",\"subscription_url\":\"https://api.github.com/repos/aino/galleria/subscription\",\"commits_url\":\"https://api.github.com/repos/aino/galleria/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/aino/galleria/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/aino/galleria/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/aino/galleria/issues/comments/{number}\",\"contents_url\":\"https://api.github.com/repos/aino/galleria/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/aino/galleria/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/aino/galleria/merges\",\"archive_url\":\"https://api.github.com/repos/aino/galleria/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/aino/galleria/downloads\",\"issues_url\":\"https://api.github.com/repos/aino/galleria/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/aino/galleria/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/aino/galleria/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/aino/galleria/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/aino/galleria/labels{/name}\",\"created_at\":\"2010-04-15T21:11:51Z\",\"updated_at\":\"2013-06-03T13:34:40Z\",\"pushed_at\":\"2013-05-22T13:43:21Z\",\"git_url\":\"git://github.com/aino/galleria.git\",\"ssh_url\":\"git@github.com:aino/galleria.git\",\"clone_url\":\"https://github.com/aino/galleria.git\",\"svn_url\":\"https://github.com/aino/galleria\",\"homepage\":\"galleria.io\",\"size\":464,\"watchers_count\":1216,\"language\":\"JavaScript\",\"has_issues\":true,\"has_downloads\":false,\"has_wiki\":false,\"forks_count\":224,\"mirror_url\":null,\"open_issues_count\":58,\"forks\":224,\"open_issues\":58,\"watchers\":1216,\"master_branch\":\"master\",\"default_branch\":\"master\"}]"},"http_version":null},"recorded_at":"Mon, 03 Jun 2013 20:58:55 GMT"}],"recorded_with":"VCR 2.5.0"}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticrepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca G. Soave
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-13 00:00:00.000000000 Z
11
+ date: 2013-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -63,6 +63,8 @@ files:
63
63
  - lib/elasticrepo/version.rb
64
64
  - lib/elasticrepo/indexer.rb
65
65
  - lib/elasticrepo/extractor.rb
66
+ - spec/vcr_cassettes/v3/repos/_get/lgs/elasticrepo.json
67
+ - spec/vcr_cassettes/v3/users/_get/lapaty/starred.json
66
68
  - spec/elasticrepo/extractor_spec.rb
67
69
  - spec/elasticrepo/repo_subset_spec.rb
68
70
  - spec/elasticrepo/indexer_spec.rb
@@ -96,3 +98,4 @@ signing_key:
96
98
  specification_version: 4
97
99
  summary: Index GitHub repositories with ElasticSearch.
98
100
  test_files: []
101
+ has_rdoc: false