neo4apis-github 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/neo4apis/github.rb +5 -30
- data/neo4apis-github.gemspec +2 -2
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 629b6a106fb251f012144f7205bc27043213a390
         | 
| 4 | 
            +
              data.tar.gz: 41b8269177abae025f1fac3dcb05f8d560462cb0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d9a39e2e8499787936492ceac94538db2ae13310d3b310cf88504d7bc739cbeb5ab5fe5c4210cb83122234d1c6abbd94ff2866cb127089907f108d12ec7f0083
         | 
| 7 | 
            +
              data.tar.gz: 9d699510f2b6d71a33ae238af238144c13e6439ffd6d2907d52bfb38d86ffe0b0bb652091f3791a7c09c5e6ef78ce7acd23bb6f933b9d49347b0179b1537a5f9
         | 
    
        data/README.md
    CHANGED
    
    | @@ -13,9 +13,15 @@ neo4japis_github = Neo4Apis::Github.new(Neo4j::Session.open) | |
| 13 13 |  | 
| 14 14 | 
             
            neo4japis_github.batch do
         | 
| 15 15 | 
             
              github_client.issues.list.each do |issue|
         | 
| 16 | 
            +
                # Imports:
         | 
| 17 | 
            +
                #  * The issue
         | 
| 18 | 
            +
                #  * The creator / assignee
         | 
| 19 | 
            +
                #  * The repo
         | 
| 20 | 
            +
                #  * The owner of the repo
         | 
| 16 21 | 
             
                import :Issue, issue
         | 
| 17 22 | 
             
              end
         | 
| 18 23 | 
             
            end
         | 
| 19 24 |  | 
| 20 25 | 
             
            ```
         | 
| 21 26 |  | 
| 27 | 
            +
            Current supports importing of User, Issue, and Repository
         | 
    
        data/lib/neo4apis/github.rb
    CHANGED
    
    | @@ -11,19 +11,8 @@ module Neo4Apis | |
| 11 11 | 
             
                importer :Repository do |repository|
         | 
| 12 12 | 
             
                  owner_node = import :User, repository.owner
         | 
| 13 13 |  | 
| 14 | 
            -
                  node = add_node :Repository,  | 
| 15 | 
            -
             | 
| 16 | 
            -
                    name: repository.name,
         | 
| 17 | 
            -
                    full_name: repository.full_name,
         | 
| 18 | 
            -
                    html_url: repository.html_url,
         | 
| 19 | 
            -
                    description: repository.description,
         | 
| 20 | 
            -
                    fork: repository.fork,
         | 
| 21 | 
            -
             | 
| 22 | 
            -
                    stargazers_count: repository.stargazers_count,
         | 
| 23 | 
            -
                    watchers_count: repository.watchers_count,
         | 
| 24 | 
            -
                    language: repository.language,
         | 
| 25 | 
            -
                    forks: repository.forks
         | 
| 26 | 
            -
                  }
         | 
| 14 | 
            +
                  node = add_node :Repository, repository, [:id, :name, :full_name, :html_url, :description, :fork,
         | 
| 15 | 
            +
                                                            :stargazers_count, :watchers_count, :language, :forks]
         | 
| 27 16 |  | 
| 28 17 | 
             
                  add_relationship(:has_owner, node, owner_node)
         | 
| 29 18 |  | 
| @@ -35,17 +24,8 @@ module Neo4Apis | |
| 35 24 | 
             
                  assignee_node = import :User, issue.assignee
         | 
| 36 25 | 
             
                  repository_node = import :Repository, issue.repository
         | 
| 37 26 |  | 
| 38 | 
            -
                  node = add_node :Issue,  | 
| 39 | 
            -
             | 
| 40 | 
            -
                    number: issue.number,
         | 
| 41 | 
            -
                    title: issue.title,
         | 
| 42 | 
            -
                    body: issue.body,
         | 
| 43 | 
            -
                    html_url: issue.html_url,
         | 
| 44 | 
            -
                    comments: issue.comments,
         | 
| 45 | 
            -
                    created_at: issue.created_at,
         | 
| 46 | 
            -
                    updated_at: issue.updated_at,
         | 
| 47 | 
            -
                    closed_at: issue.closed_at,
         | 
| 48 | 
            -
                  }
         | 
| 27 | 
            +
                  node = add_node :Issue, issue, [:id, :number, :title, :body, :html_url, :comments,
         | 
| 28 | 
            +
                                                  :created_at, :updated_at, :closed_at]
         | 
| 49 29 |  | 
| 50 30 | 
             
                  add_relationship(:from_repository, node, repository_node)
         | 
| 51 31 | 
             
                  add_relationship(:has_user, node, user_node)
         | 
| @@ -55,12 +35,7 @@ module Neo4Apis | |
| 55 35 | 
             
                end
         | 
| 56 36 |  | 
| 57 37 | 
             
                importer :User do |user|
         | 
| 58 | 
            -
                  add_node :User,  | 
| 59 | 
            -
                    id: user.id,
         | 
| 60 | 
            -
                    login: user.login,
         | 
| 61 | 
            -
                    html_url: user.html_url,
         | 
| 62 | 
            -
                    site_admin: user.site_admin
         | 
| 63 | 
            -
                  }
         | 
| 38 | 
            +
                  add_node :User, user, [:id, :login, :html_url, :site_admin]
         | 
| 64 39 | 
             
                end
         | 
| 65 40 |  | 
| 66 41 | 
             
              end
         | 
    
        data/neo4apis-github.gemspec
    CHANGED
    
    | @@ -3,7 +3,7 @@ $:.unshift lib unless $:.include?(lib) | |
| 3 3 |  | 
| 4 4 | 
             
            Gem::Specification.new do |s|
         | 
| 5 5 | 
             
              s.name     = "neo4apis-github"
         | 
| 6 | 
            -
              s.version  = '0.0. | 
| 6 | 
            +
              s.version  = '0.0.4'
         | 
| 7 7 | 
             
              s.required_ruby_version = ">= 1.9.1"
         | 
| 8 8 |  | 
| 9 9 | 
             
              s.authors  = "Brian Underwood"
         | 
| @@ -18,7 +18,7 @@ A ruby gem using neo4apis to make importing github data to neo4j easy | |
| 18 18 | 
             
              s.require_path = 'lib'
         | 
| 19 19 | 
             
              s.files = Dir.glob("{bin,lib,config}/**/*") + %w(README.md Gemfile neo4apis-github.gemspec)
         | 
| 20 20 |  | 
| 21 | 
            -
              s.add_dependency('neo4apis', "~> 0.0 | 
| 21 | 
            +
              s.add_dependency('neo4apis', "~> 0.1.0")
         | 
| 22 22 | 
             
              s.add_dependency('github_api', "~> 0.12.2")
         | 
| 23 23 |  | 
| 24 24 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: neo4apis-github
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Brian Underwood
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 0.0 | 
| 19 | 
            +
                    version: 0.1.0
         | 
| 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: 0.0 | 
| 26 | 
            +
                    version: 0.1.0
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: github_api
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         |