{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/24281159","id":24281159,"diff_hunk":"@@ -176,10 +165,21 @@ To install to a different location, set the install prefix:\n \n This would install cfacter into `~/bin`, `~/lib`, and `~/include`.\n \n-To install the gem (assumes gem is already built):\n+Ruby Usage\n+----------\n+\n+Currently cfacter doesn't automatically define the Facter API when required.\n+This is to prevent cfacter from colliding with the Ruby version of Facter.\n+\n+To use the Facter API from Ruby, call the `CFacter#initialize` method:\n \n-    $ cd gem\n-    $ gem install pkg/cfacter*.gem\n+```ruby\n+    require 'cfacter'\n+    CFacter.initialize","path":"README.md","position":74,"original_position":74,"commit_id":"13e53ed2191a736f0a48a10a5f1453c5b688262a","original_commit_id":"13e53ed2191a736f0a48a10a5f1453c5b688262a","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"body":"Note that cfacter.rb still keeps the expected interface for `puppet --cfacter`.  Eventually cfacter.rb will be replaced with facter.rb and we'll simply require libfacter by default without an initialize call as a stand-in replacement for Ruby Facter.  i.e. all you have to do is `require 'facter'` and it \"just works\".","created_at":"2015-02-06T23:46:31Z","updated_at":"2015-02-06T23:46:31Z","html_url":"https://github.com/puppetlabs/cfacter/pull/286#discussion_r24281159","pull_request_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/24281159"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/286#discussion_r24281159"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286","id":28851685,"html_url":"https://github.com/puppetlabs/cfacter/pull/286","diff_url":"https://github.com/puppetlabs/cfacter/pull/286.diff","patch_url":"https://github.com/puppetlabs/cfacter/pull/286.patch","issue_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/286","number":286,"state":"open","locked":false,"title":"(WIP) Remove cfacter gem and FFI dependency.","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"body":"Previously we had a gem/ directory that defined the cfacter gem.\r\nThis was no longer being used as the Ruby API is actually implemented\r\nentirely in libfacter (i.e. in C++).  We kept it around to install\r\ncfacter.rb, but that was being done independently of the gem.\r\n\r\nThis commit removes the gem entirely and moves the specs over to the\r\nlib/ directory.  Additionally, the FFI dependency has been removed in\r\nfavor of having Ruby directly require libfacter as an extension.","created_at":"2015-02-06T23:39:57Z","updated_at":"2015-02-06T23:46:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e82c28652a72db169ba56fe72f6da61c180ee13a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/286/comments","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/13e53ed2191a736f0a48a10a5f1453c5b688262a","head":{"label":"peterhuene:cfact/198","ref":"cfact/198","sha":"13e53ed2191a736f0a48a10a5f1453c5b688262a","user":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"repo":{"id":19052426,"name":"cfacter","full_name":"peterhuene/cfacter","owner":{"login":"peterhuene","id":509666,"avatar_url":"https://avatars.githubusercontent.com/u/509666?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhuene","html_url":"https://github.com/peterhuene","followers_url":"https://api.github.com/users/peterhuene/followers","following_url":"https://api.github.com/users/peterhuene/following{/other_user}","gists_url":"https://api.github.com/users/peterhuene/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhuene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhuene/subscriptions","organizations_url":"https://api.github.com/users/peterhuene/orgs","repos_url":"https://api.github.com/users/peterhuene/repos","events_url":"https://api.github.com/users/peterhuene/events{/privacy}","received_events_url":"https://api.github.com/users/peterhuene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterhuene/cfacter","description":"","fork":true,"url":"https://api.github.com/repos/peterhuene/cfacter","forks_url":"https://api.github.com/repos/peterhuene/cfacter/forks","keys_url":"https://api.github.com/repos/peterhuene/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterhuene/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterhuene/cfacter/teams","hooks_url":"https://api.github.com/repos/peterhuene/cfacter/hooks","issue_events_url":"https://api.github.com/repos/peterhuene/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/peterhuene/cfacter/events","assignees_url":"https://api.github.com/repos/peterhuene/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/peterhuene/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/peterhuene/cfacter/tags","blobs_url":"https://api.github.com/repos/peterhuene/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterhuene/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterhuene/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterhuene/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterhuene/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/peterhuene/cfacter/languages","stargazers_url":"https://api.github.com/repos/peterhuene/cfacter/stargazers","contributors_url":"https://api.github.com/repos/peterhuene/cfacter/contributors","subscribers_url":"https://api.github.com/repos/peterhuene/cfacter/subscribers","subscription_url":"https://api.github.com/repos/peterhuene/cfacter/subscription","commits_url":"https://api.github.com/repos/peterhuene/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterhuene/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterhuene/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterhuene/cfacter/issues/comments/{number}","contents_url":"https://api.github.com/repos/peterhuene/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/peterhuene/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterhuene/cfacter/merges","archive_url":"https://api.github.com/repos/peterhuene/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterhuene/cfacter/downloads","issues_url":"https://api.github.com/repos/peterhuene/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/peterhuene/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/peterhuene/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/peterhuene/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterhuene/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/peterhuene/cfacter/releases{/id}","created_at":"2014-04-23T01:16:12Z","updated_at":"2015-01-26T23:48:25Z","pushed_at":"2015-02-06T23:35:49Z","git_url":"git://github.com/peterhuene/cfacter.git","ssh_url":"git@github.com:peterhuene/cfacter.git","clone_url":"https://github.com/peterhuene/cfacter.git","svn_url":"https://github.com/peterhuene/cfacter","homepage":null,"size":6481,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"0d6213247bab28e851e2a709f1e1b4377d64fd5a","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17602228,"name":"cfacter","full_name":"puppetlabs/cfacter","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/cfacter","description":"Collect and display system facts from a C++ library.","fork":false,"url":"https://api.github.com/repos/puppetlabs/cfacter","forks_url":"https://api.github.com/repos/puppetlabs/cfacter/forks","keys_url":"https://api.github.com/repos/puppetlabs/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/cfacter/teams","hooks_url":"https://api.github.com/repos/puppetlabs/cfacter/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/cfacter/events","assignees_url":"https://api.github.com/repos/puppetlabs/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/cfacter/tags","blobs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/cfacter/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/cfacter/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/cfacter/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/cfacter/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/cfacter/subscription","commits_url":"https://api.github.com/repos/puppetlabs/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/cfacter/merges","archive_url":"https://api.github.com/repos/puppetlabs/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/cfacter/downloads","issues_url":"https://api.github.com/repos/puppetlabs/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/cfacter/releases{/id}","created_at":"2014-03-10T17:48:17Z","updated_at":"2015-02-06T23:16:54Z","pushed_at":"2015-02-06T23:16:54Z","git_url":"git://github.com/puppetlabs/cfacter.git","ssh_url":"git@github.com:puppetlabs/cfacter.git","clone_url":"https://github.com/puppetlabs/cfacter.git","svn_url":"https://github.com/puppetlabs/cfacter","homepage":"https://tickets.puppetlabs.com/browse/CFACT","size":79673,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":4,"forks":29,"open_issues":4,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/286"},"issue":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/286"},"comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/286/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/286/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/cfacter/statuses/13e53ed2191a736f0a48a10a5f1453c5b688262a"}}}}