GitHub PullRequestReviewCommentEvent at 2014-06-06 20:41:55
Repository: sprig
Actor: Fosome
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/13509334","id":13509334,"diff_hunk":"@@ -167,19 +167,81 @@ application.  The seed files will be placed in a folder in `db/seeds` named afte\n If any of the models in your application are using STI, Sprig will create a single seed file named\n after the STI base model.  STI sub-type records will all be written to that file.\n \n-### Additional Configuration\n+### Additional Configuration via Arguments\n \n Don't like the defaults when reaping Sprig records? You may specify the environment (`db/seeds`\n-target folder) or models (`ActiveRecord::Base.subclasses`-only) you want seed files for.\n+target folder), models (`ActiveRecord::Base.subclasses`-only), maximum number of records per model\n+(limit), and any ignored attributes.\n \n-Example (rake task):\n+Rake Task:\n ```\n-rake db:seed:reap ENV=integration MODELS=User, Post\n+rake db:seed:reap ENV=integration MODELS=User, Post LIMIT=10 IGNORED_ATTRS=created_at, updated_at","path":"README.md","position":16,"original_position":16,"commit_id":"1990fa99b53467a360f454626ee15cbb5d7f064e","original_commit_id":"1990fa99b53467a360f454626ee15cbb5d7f064e","user":{"login":"Fosome","id":842652,"avatar_url":"https://avatars.githubusercontent.com/u/842652?","gravatar_id":"841d0faf7b2fa9968dd52993e4dac6fc","url":"https://api.github.com/users/Fosome","html_url":"https://github.com/Fosome","followers_url":"https://api.github.com/users/Fosome/followers","following_url":"https://api.github.com/users/Fosome/following{/other_user}","gists_url":"https://api.github.com/users/Fosome/gists{/gist_id}","starred_url":"https://api.github.com/users/Fosome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fosome/subscriptions","organizations_url":"https://api.github.com/users/Fosome/orgs","repos_url":"https://api.github.com/users/Fosome/repos","events_url":"https://api.github.com/users/Fosome/events{/privacy}","received_events_url":"https://api.github.com/users/Fosome/received_events","type":"User","site_admin":false},"body":"Can you put spaces in an environment variable like that?","created_at":"2014-06-06T20:41:55Z","updated_at":"2014-06-06T20:41:55Z","html_url":"https://github.com/vigetlabs/sprig/pull/35#discussion_r13509334","pull_request_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/13509334"},"html":{"href":"https://github.com/vigetlabs/sprig/pull/35#discussion_r13509334"},"pull_request":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/vigetlabs/sprig/pulls/35","id":16836474,"html_url":"https://github.com/vigetlabs/sprig/pull/35","diff_url":"https://github.com/vigetlabs/sprig/pull/35.diff","patch_url":"https://github.com/vigetlabs/sprig/pull/35.patch","issue_url":"https://api.github.com/repos/vigetlabs/sprig/issues/35","number":35,"state":"open","title":"Allow additional configuration options and enhanced control when using `reap`","user":{"login":"h0tl33t","id":1749474,"avatar_url":"https://avatars.githubusercontent.com/u/1749474?","gravatar_id":"eb793edbd8e36a4997464bec671c5372","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":"#### Additional Options (`:limit` and `:ignored_attrs`)\r\n```\r\n# rake\r\nrake db:seed:reap ENV=integration MODELS=User, Post LIMIT=10 IGNORED_ATTRS=created_at, updated_at\r\n\r\n# console\r\nSprig::Harvest.reap(\r\n  :env           => 'integration',\r\n  :models        => [User, Post],\r\n  :limit         => 10,\r\n  :ignored_attrs => [:created_at, :updated_at]\r\n)\r\n```\r\n#### File-Based Config (allows for model-by-model configuration)\r\n```\r\n# db/seeds/reap_config.rb\r\n\r\nSprig::Harvest.configure do |config|\r\n  config.env           = 'dreamland'\r\n  config.limit         = 30\r\n  config.ignored_attrs = [:created_at, :updated_at]\r\n\r\n  config.models = [\r\n    {\r\n      :class         => User,\r\n      :collection    => User.active.where(:admin => false),\r\n      :limit         => 10,\r\n      :ignored_attrs => :password\r\n    },\r\n\r\n    {\r\n      :class      => Post,\r\n      :collection => Post.published,\r\n      :limit      => 20\r\n    },\r\n\r\n    Comment\r\n  ]\r\nend\r\n```\r\nTo use this reap config file, invoke `reap` via:\r\n```\r\n# rake\r\nrake db:seed:reap FILE=\"./db/seeds/reap_config.rb\"\r\n\r\n# console\r\nSprig::Harvest.reap(:file => './db/seeds/reap_config.rb')\r\n```","created_at":"2014-06-06T18:52:32Z","updated_at":"2014-06-06T20:41:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f660807d7c9573ff78cfd5412da6de3ff3e7102","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/35/commits","review_comments_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/35/comments","review_comment_url":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/{number}","comments_url":"https://api.github.com/repos/vigetlabs/sprig/issues/35/comments","statuses_url":"https://api.github.com/repos/vigetlabs/sprig/statuses/1990fa99b53467a360f454626ee15cbb5d7f064e","head":{"label":"vigetlabs:reap-config","ref":"reap-config","sha":"1990fa99b53467a360f454626ee15cbb5d7f064e","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?","gravatar_id":"c3c2b5d691ac7014fce45062639ae956","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?","gravatar_id":"c3c2b5d691ac7014fce45062639ae956","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":"2014-06-06T18:59:09Z","pushed_at":"2014-06-06T18:59:08Z","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":1432,"stargazers_count":103,"watchers_count":103,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":103,"default_branch":"master"}},"base":{"label":"vigetlabs:master","ref":"master","sha":"d06d9b74d174113ee31062554eaba89123c8aeb5","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?","gravatar_id":"c3c2b5d691ac7014fce45062639ae956","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?","gravatar_id":"c3c2b5d691ac7014fce45062639ae956","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":"2014-06-06T18:59:09Z","pushed_at":"2014-06-06T18:59:08Z","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":1432,"stargazers_count":103,"watchers_count":103,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":103,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/35"},"html":{"href":"https://github.com/vigetlabs/sprig/pull/35"},"issue":{"href":"https://api.github.com/repos/vigetlabs/sprig/issues/35"},"comments":{"href":"https://api.github.com/repos/vigetlabs/sprig/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/vigetlabs/sprig/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/vigetlabs/sprig/statuses/1990fa99b53467a360f454626ee15cbb5d7f064e"}}}}