{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments/26803086","id":26803086,"diff_hunk":"@@ -0,0 +1,69 @@\n+require 'hocon/impl'\n+require 'hocon/impl/abstract_config_value'\n+\n+class Hocon::Impl::ConfigReference < Hocon::Impl::AbstractConfigValue\n+  attr_reader :expr\n+\n+  def initialize(origin, expr, prefix_length = 0)\n+    super(origin)\n+    @expr = expr\n+    @prefix_length = prefix_length\n+  end\n+\n+  # ConfigReference should be a firewall against NotPossibleToResolve going\n+  # further up the stack; it should convert everything to ConfigException.\n+  # This way it 's impossible for NotPossibleToResolve to \"escape\" since\n+  # any failure to resolve has to start with a ConfigReference.\n+  def resolve_substitutions(context, source)\n+    new_context = context.add_cycle_marker(self)\n+    begin\n+      result_with_path = source.lookup_subst(new_context, @expr, @prefix_length)\n+      new_context = result_with_path.result.context\n+\n+      if result_with_path.result.value != nil\n+        if Hocon::Impl::ConfigImpl.trace_substitution_enabled\n+          Hocon::Impl::ConfigImpl.trace(\n+              \"recursively resolving #{resultWithPath} which was the resolution of #{expr} against #{source}\",\n+              depth)\n+        end\n+\n+        recursive_resolve_source =\n+            result_with_path.path_from_root.last, result_with_path.path_from_root","path":"lib/hocon/impl/config_reference.rb","position":31,"original_position":31,"commit_id":"bc71ba0f3abeab9e4e7336971ce9ee8aaf38be97","original_commit_id":"bc71ba0f3abeab9e4e7336971ce9ee8aaf38be97","user":{"login":"KevinCorcoran","id":2945462,"avatar_url":"https://avatars.githubusercontent.com/u/2945462?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinCorcoran","html_url":"https://github.com/KevinCorcoran","followers_url":"https://api.github.com/users/KevinCorcoran/followers","following_url":"https://api.github.com/users/KevinCorcoran/following{/other_user}","gists_url":"https://api.github.com/users/KevinCorcoran/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinCorcoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinCorcoran/subscriptions","organizations_url":"https://api.github.com/users/KevinCorcoran/orgs","repos_url":"https://api.github.com/users/KevinCorcoran/repos","events_url":"https://api.github.com/users/KevinCorcoran/events{/privacy}","received_events_url":"https://api.github.com/users/KevinCorcoran/received_events","type":"User","site_admin":false},"body":"Haha, yes, ruby--","created_at":"2015-03-19T22:11:54Z","updated_at":"2015-03-19T22:11:54Z","html_url":"https://github.com/puppetlabs/ruby-hocon/pull/28#discussion_r26803086","pull_request_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments/26803086"},"html":{"href":"https://github.com/puppetlabs/ruby-hocon/pull/28#discussion_r26803086"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28","id":31567027,"html_url":"https://github.com/puppetlabs/ruby-hocon/pull/28","diff_url":"https://github.com/puppetlabs/ruby-hocon/pull/28.diff","patch_url":"https://github.com/puppetlabs/ruby-hocon/pull/28.patch","issue_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/28","number":28,"state":"open","locked":false,"title":"(TK-162) implement concatenation and substitution","user":{"login":"KevinCorcoran","id":2945462,"avatar_url":"https://avatars.githubusercontent.com/u/2945462?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinCorcoran","html_url":"https://github.com/KevinCorcoran","followers_url":"https://api.github.com/users/KevinCorcoran/followers","following_url":"https://api.github.com/users/KevinCorcoran/following{/other_user}","gists_url":"https://api.github.com/users/KevinCorcoran/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinCorcoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinCorcoran/subscriptions","organizations_url":"https://api.github.com/users/KevinCorcoran/orgs","repos_url":"https://api.github.com/users/KevinCorcoran/repos","events_url":"https://api.github.com/users/KevinCorcoran/events{/privacy}","received_events_url":"https://api.github.com/users/KevinCorcoran/received_events","type":"User","site_admin":false},"body":"Initial implementation of concatenation and substitution.  Ported the first test case\r\nin ConcatenationTest and as much of the production code as it took to get it to pass.\r\n\r\nPutting this up for early for review so @cprice404 and @jpinsonault can work on top of it.","created_at":"2015-03-19T21:16:02Z","updated_at":"2015-03-19T22:11:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73d626cfc83ad52bcf44b7eebbec1abab39c5e47","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/28/comments","statuses_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/bc71ba0f3abeab9e4e7336971ce9ee8aaf38be97","head":{"label":"KevinCorcoran:concatenation","ref":"concatenation","sha":"bc71ba0f3abeab9e4e7336971ce9ee8aaf38be97","user":{"login":"KevinCorcoran","id":2945462,"avatar_url":"https://avatars.githubusercontent.com/u/2945462?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinCorcoran","html_url":"https://github.com/KevinCorcoran","followers_url":"https://api.github.com/users/KevinCorcoran/followers","following_url":"https://api.github.com/users/KevinCorcoran/following{/other_user}","gists_url":"https://api.github.com/users/KevinCorcoran/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinCorcoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinCorcoran/subscriptions","organizations_url":"https://api.github.com/users/KevinCorcoran/orgs","repos_url":"https://api.github.com/users/KevinCorcoran/repos","events_url":"https://api.github.com/users/KevinCorcoran/events{/privacy}","received_events_url":"https://api.github.com/users/KevinCorcoran/received_events","type":"User","site_admin":false},"repo":{"id":32046926,"name":"ruby-hocon","full_name":"KevinCorcoran/ruby-hocon","owner":{"login":"KevinCorcoran","id":2945462,"avatar_url":"https://avatars.githubusercontent.com/u/2945462?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinCorcoran","html_url":"https://github.com/KevinCorcoran","followers_url":"https://api.github.com/users/KevinCorcoran/followers","following_url":"https://api.github.com/users/KevinCorcoran/following{/other_user}","gists_url":"https://api.github.com/users/KevinCorcoran/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinCorcoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinCorcoran/subscriptions","organizations_url":"https://api.github.com/users/KevinCorcoran/orgs","repos_url":"https://api.github.com/users/KevinCorcoran/repos","events_url":"https://api.github.com/users/KevinCorcoran/events{/privacy}","received_events_url":"https://api.github.com/users/KevinCorcoran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KevinCorcoran/ruby-hocon","description":"","fork":true,"url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon","forks_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/forks","keys_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/teams","hooks_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/hooks","issue_events_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/issues/events{/number}","events_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/events","assignees_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/assignees{/user}","branches_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/branches{/branch}","tags_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/tags","blobs_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/git/refs{/sha}","trees_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/statuses/{sha}","languages_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/languages","stargazers_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/stargazers","contributors_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/contributors","subscribers_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/subscribers","subscription_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/subscription","commits_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/commits{/sha}","git_commits_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/git/commits{/sha}","comments_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/comments{/number}","issue_comment_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/issues/comments{/number}","contents_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/contents/{+path}","compare_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/merges","archive_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/downloads","issues_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/issues{/number}","pulls_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/pulls{/number}","milestones_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/milestones{/number}","notifications_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/labels{/name}","releases_url":"https://api.github.com/repos/KevinCorcoran/ruby-hocon/releases{/id}","created_at":"2015-03-11T23:36:57Z","updated_at":"2015-03-11T23:36:57Z","pushed_at":"2015-03-19T21:14:31Z","git_url":"git://github.com/KevinCorcoran/ruby-hocon.git","ssh_url":"git@github.com:KevinCorcoran/ruby-hocon.git","clone_url":"https://github.com/KevinCorcoran/ruby-hocon.git","svn_url":"https://github.com/KevinCorcoran/ruby-hocon","homepage":null,"size":244,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"65e3ab85edc4e29f3188d2e07a57ff013d39e2bb","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":17326988,"name":"ruby-hocon","full_name":"puppetlabs/ruby-hocon","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/ruby-hocon","description":"","fork":false,"url":"https://api.github.com/repos/puppetlabs/ruby-hocon","forks_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/forks","keys_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/teams","hooks_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/events","assignees_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/tags","blobs_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/subscription","commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/merges","archive_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/downloads","issues_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/releases{/id}","created_at":"2014-03-01T23:44:17Z","updated_at":"2015-03-18T17:24:23Z","pushed_at":"2015-03-19T21:16:02Z","git_url":"git://github.com/puppetlabs/ruby-hocon.git","ssh_url":"git@github.com:puppetlabs/ruby-hocon.git","clone_url":"https://github.com/puppetlabs/ruby-hocon.git","svn_url":"https://github.com/puppetlabs/ruby-hocon","homepage":null,"size":666,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28"},"html":{"href":"https://github.com/puppetlabs/ruby-hocon/pull/28"},"issue":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/28"},"comments":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/bc71ba0f3abeab9e4e7336971ce9ee8aaf38be97"}}}}