{"action":"created","comment":{"url":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/44431849","id":44431849,"diff_hunk":"@@ -54,7 +54,7 @@ def computed_value?(value)\n       end\n \n       def computed_value_regex\n-        /<%[=]?(.*)%>/\n+        /(<%[=]?(.*?)%>)/","path":"lib/sprig/seed/attribute.rb","position":5,"original_position":5,"commit_id":"e536eb5c9304d83e840dcba0836e77b001c1f2b8","original_commit_id":"e536eb5c9304d83e840dcba0836e77b001c1f2b8","user":{"login":"h0tl33t","id":1749474,"avatar_url":"https://avatars.githubusercontent.com/u/1749474?v=3","gravatar_id":"","url":"https://api.github.com/users/h0tl33t","html_url":"https://github.com/h0tl33t","followers_url":"https://api.github.com/users/h0tl33t/followers","following_url":"https://api.github.com/users/h0tl33t/following{/other_user}","gists_url":"https://api.github.com/users/h0tl33t/gists{/gist_id}","starred_url":"https://api.github.com/users/h0tl33t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h0tl33t/subscriptions","organizations_url":"https://api.github.com/users/h0tl33t/orgs","repos_url":"https://api.github.com/users/h0tl33t/repos","events_url":"https://api.github.com/users/h0tl33t/events{/privacy}","received_events_url":"https://api.github.com/users/h0tl33t/received_events","type":"User","site_admin":false},"body":"Ahhh, gotcha.","created_at":"2015-11-10T16:52:54Z","updated_at":"2015-11-10T16:52:54Z","html_url":"https://github.com/vigetlabs/sprig/pull/74#discussion_r44431849","pull_request_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/44431849"},"html":{"href":"https://github.com/vigetlabs/sprig/pull/74#discussion_r44431849"},"pull_request":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/vigetlabs/sprig/pulls/74","id":50201638,"html_url":"https://github.com/vigetlabs/sprig/pull/74","diff_url":"https://github.com/vigetlabs/sprig/pull/74.diff","patch_url":"https://github.com/vigetlabs/sprig/pull/74.patch","issue_url":"https://api.github.com/repos/vigetlabs/sprig/issues/74","number":74,"state":"open","locked":false,"title":"Fixes partially dynamic attribute return values","user":{"login":"ltk","id":869491,"avatar_url":"https://avatars.githubusercontent.com/u/869491?v=3","gravatar_id":"","url":"https://api.github.com/users/ltk","html_url":"https://github.com/ltk","followers_url":"https://api.github.com/users/ltk/followers","following_url":"https://api.github.com/users/ltk/following{/other_user}","gists_url":"https://api.github.com/users/ltk/gists{/gist_id}","starred_url":"https://api.github.com/users/ltk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ltk/subscriptions","organizations_url":"https://api.github.com/users/ltk/orgs","repos_url":"https://api.github.com/users/ltk/repos","events_url":"https://api.github.com/users/ltk/events{/privacy}","received_events_url":"https://api.github.com/users/ltk/received_events","type":"User","site_admin":false},"body":"cc @averyvery & @h0tl33t :point_down: this fixes the bug that prevented us from using Sprig to nicely manage CK JSON.\r\n\r\nPreviously, if a value contained a dynamic aspect, the attribute value\r\nreturned by Sprig was just the dynamic component of the entire value.\r\n\r\nThis commit fixes this bug, allowing dynamic components to be returned\r\nwithin larger strings. At the same time, we still allow the return of\r\nnon-string data structures from values that are entirely dynamic.\r\n\r\n## Example\r\n\r\nThis would previously return `2` for the value of the title:\r\n```yaml\r\nrecords:\r\n   - sprig_id: 1\r\n     title: 'Title <%= 2 %>'\r\n```\r\n\r\nNow it returns `\"Title 2\"` like everyone expects that it should.\r\n\r\nBut if you want, you can still return an integer by doing:\r\n\r\n```yaml\r\nrecords:\r\n   - sprig_id: 1\r\n     upvote_count: '<%= 2 %>'\r\n```\r\n","created_at":"2015-11-10T01:08:16Z","updated_at":"2015-11-10T16:52:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e4c1f0dc51bad3ffdad99fe9a258a17dc9212e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/74/commits","review_comments_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/74/comments","review_comment_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vigetlabs/sprig/issues/74/comments","statuses_url":"https://api.github.com/repos/vigetlabs/sprig/statuses/e536eb5c9304d83e840dcba0836e77b001c1f2b8","head":{"label":"vigetlabs:ltk-partially-dynamic-value-bugfix","ref":"ltk-partially-dynamic-value-bugfix","sha":"e536eb5c9304d83e840dcba0836e77b001c1f2b8","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14025780,"name":"sprig","full_name":"vigetlabs/sprig","owner":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vigetlabs/sprig","description":"Relational seeding for Rails apps","fork":false,"url":"https://api.github.com/repos/vigetlabs/sprig","forks_url":"https://api.github.com/repos/vigetlabs/sprig/forks","keys_url":"https://api.github.com/repos/vigetlabs/sprig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vigetlabs/sprig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vigetlabs/sprig/teams","hooks_url":"https://api.github.com/repos/vigetlabs/sprig/hooks","issue_events_url":"https://api.github.com/repos/vigetlabs/sprig/issues/events{/number}","events_url":"https://api.github.com/repos/vigetlabs/sprig/events","assignees_url":"https://api.github.com/repos/vigetlabs/sprig/assignees{/user}","branches_url":"https://api.github.com/repos/vigetlabs/sprig/branches{/branch}","tags_url":"https://api.github.com/repos/vigetlabs/sprig/tags","blobs_url":"https://api.github.com/repos/vigetlabs/sprig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vigetlabs/sprig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vigetlabs/sprig/git/refs{/sha}","trees_url":"https://api.github.com/repos/vigetlabs/sprig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vigetlabs/sprig/statuses/{sha}","languages_url":"https://api.github.com/repos/vigetlabs/sprig/languages","stargazers_url":"https://api.github.com/repos/vigetlabs/sprig/stargazers","contributors_url":"https://api.github.com/repos/vigetlabs/sprig/contributors","subscribers_url":"https://api.github.com/repos/vigetlabs/sprig/subscribers","subscription_url":"https://api.github.com/repos/vigetlabs/sprig/subscription","commits_url":"https://api.github.com/repos/vigetlabs/sprig/commits{/sha}","git_commits_url":"https://api.github.com/repos/vigetlabs/sprig/git/commits{/sha}","comments_url":"https://api.github.com/repos/vigetlabs/sprig/comments{/number}","issue_comment_url":"https://api.github.com/repos/vigetlabs/sprig/issues/comments{/number}","contents_url":"https://api.github.com/repos/vigetlabs/sprig/contents/{+path}","compare_url":"https://api.github.com/repos/vigetlabs/sprig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vigetlabs/sprig/merges","archive_url":"https://api.github.com/repos/vigetlabs/sprig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vigetlabs/sprig/downloads","issues_url":"https://api.github.com/repos/vigetlabs/sprig/issues{/number}","pulls_url":"https://api.github.com/repos/vigetlabs/sprig/pulls{/number}","milestones_url":"https://api.github.com/repos/vigetlabs/sprig/milestones{/number}","notifications_url":"https://api.github.com/repos/vigetlabs/sprig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vigetlabs/sprig/labels{/name}","releases_url":"https://api.github.com/repos/vigetlabs/sprig/releases{/id}","created_at":"2013-10-31T18:59:00Z","updated_at":"2015-11-05T05:36:28Z","pushed_at":"2015-11-10T01:08:16Z","git_url":"git://github.com/vigetlabs/sprig.git","ssh_url":"git@github.com:vigetlabs/sprig.git","clone_url":"https://github.com/vigetlabs/sprig.git","svn_url":"https://github.com/vigetlabs/sprig","homepage":"","size":972,"stargazers_count":152,"watchers_count":152,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":20,"forks":17,"open_issues":20,"watchers":152,"default_branch":"master"}},"base":{"label":"vigetlabs:master","ref":"master","sha":"9340263444276e7d2c8846277373dbd8f3429c90","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14025780,"name":"sprig","full_name":"vigetlabs/sprig","owner":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vigetlabs/sprig","description":"Relational seeding for Rails apps","fork":false,"url":"https://api.github.com/repos/vigetlabs/sprig","forks_url":"https://api.github.com/repos/vigetlabs/sprig/forks","keys_url":"https://api.github.com/repos/vigetlabs/sprig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vigetlabs/sprig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vigetlabs/sprig/teams","hooks_url":"https://api.github.com/repos/vigetlabs/sprig/hooks","issue_events_url":"https://api.github.com/repos/vigetlabs/sprig/issues/events{/number}","events_url":"https://api.github.com/repos/vigetlabs/sprig/events","assignees_url":"https://api.github.com/repos/vigetlabs/sprig/assignees{/user}","branches_url":"https://api.github.com/repos/vigetlabs/sprig/branches{/branch}","tags_url":"https://api.github.com/repos/vigetlabs/sprig/tags","blobs_url":"https://api.github.com/repos/vigetlabs/sprig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vigetlabs/sprig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vigetlabs/sprig/git/refs{/sha}","trees_url":"https://api.github.com/repos/vigetlabs/sprig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vigetlabs/sprig/statuses/{sha}","languages_url":"https://api.github.com/repos/vigetlabs/sprig/languages","stargazers_url":"https://api.github.com/repos/vigetlabs/sprig/stargazers","contributors_url":"https://api.github.com/repos/vigetlabs/sprig/contributors","subscribers_url":"https://api.github.com/repos/vigetlabs/sprig/subscribers","subscription_url":"https://api.github.com/repos/vigetlabs/sprig/subscription","commits_url":"https://api.github.com/repos/vigetlabs/sprig/commits{/sha}","git_commits_url":"https://api.github.com/repos/vigetlabs/sprig/git/commits{/sha}","comments_url":"https://api.github.com/repos/vigetlabs/sprig/comments{/number}","issue_comment_url":"https://api.github.com/repos/vigetlabs/sprig/issues/comments{/number}","contents_url":"https://api.github.com/repos/vigetlabs/sprig/contents/{+path}","compare_url":"https://api.github.com/repos/vigetlabs/sprig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vigetlabs/sprig/merges","archive_url":"https://api.github.com/repos/vigetlabs/sprig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vigetlabs/sprig/downloads","issues_url":"https://api.github.com/repos/vigetlabs/sprig/issues{/number}","pulls_url":"https://api.github.com/repos/vigetlabs/sprig/pulls{/number}","milestones_url":"https://api.github.com/repos/vigetlabs/sprig/milestones{/number}","notifications_url":"https://api.github.com/repos/vigetlabs/sprig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vigetlabs/sprig/labels{/name}","releases_url":"https://api.github.com/repos/vigetlabs/sprig/releases{/id}","created_at":"2013-10-31T18:59:00Z","updated_at":"2015-11-05T05:36:28Z","pushed_at":"2015-11-10T01:08:16Z","git_url":"git://github.com/vigetlabs/sprig.git","ssh_url":"git@github.com:vigetlabs/sprig.git","clone_url":"https://github.com/vigetlabs/sprig.git","svn_url":"https://github.com/vigetlabs/sprig","homepage":"","size":972,"stargazers_count":152,"watchers_count":152,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":20,"forks":17,"open_issues":20,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/74"},"html":{"href":"https://github.com/vigetlabs/sprig/pull/74"},"issue":{"href":"https://api.github.com/repos/vigetlabs/sprig/issues/74"},"comments":{"href":"https://api.github.com/repos/vigetlabs/sprig/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/vigetlabs/sprig/statuses/e536eb5c9304d83e840dcba0836e77b001c1f2b8"}}}}