{"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/35326949","id":35326949,"diff_hunk":"@@ -329,7 +329,7 @@ def denied_auth_source.allow_password_changes?; false; end\n     end\n \n     it { expect(@u.valid?).to be_falsey }\n-    it { expect(@u.errors[:password]).to include I18n.t('activerecord.errors.messages.too_short', count: Setting.password_min_length.to_i) }\n+    it { expect(@u.errors[:password]).to include I18n.t('activerecord.errors.messages.too_short', count: Setting.password_min_length) }","path":"spec/models/user_spec.rb","position":5,"original_position":5,"commit_id":"769f25662511db32c24a6b32f1e024b34b607250","original_commit_id":"769f25662511db32c24a6b32f1e024b34b607250","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [135/100]","created_at":"2015-07-23T14:30:48Z","updated_at":"2015-07-23T14:30:48Z","html_url":"https://github.com/opf/openproject/pull/3270#discussion_r35326949","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/3270","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/35326949"},"html":{"href":"https://github.com/opf/openproject/pull/3270#discussion_r35326949"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/3270"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/3270","id":40655492,"html_url":"https://github.com/opf/openproject/pull/3270","diff_url":"https://github.com/opf/openproject/pull/3270.diff","patch_url":"https://github.com/opf/openproject/pull/3270.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/3270","number":3270,"state":"open","locked":false,"title":"Typed Settings","user":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"body":"## Work Package\r\n\r\nI see this PR as part of general housekeeping tasks around OpenProject: https://community.openproject.org/work_packages/18714\r\n\r\n## Description\r\n\r\nCalling `Setting.foo_setting` currently most of the times returns a string in many cases where you actually expect other types to be returned (such as numbers and booleans).\r\n\r\nThis PR proposes to use the already existing and sporadically used `format` option of the settings to correctly type the return value of `Setting` calls.\r\n\r\nI can see this breaking in many places, because currently code is written like this:\r\n\r\n````\r\nif Setting.foo_setting == '1'\r\n  call_me Setting.bar_setting.to_i\r\nend\r\n````\r\n\r\nBut I think I should be worth it long-term-ish. Just want to gather some feedback before adding format information to the whole `settings.yml`.\r\n\r\n## Considerations\r\n\r\n* stuff will break\r\n* you need to clear the rails cache for changes in return values to become visible","created_at":"2015-07-23T10:03:49Z","updated_at":"2015-07-23T14:30:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a645d1b82fd1dc5b040e6172feb87aadc11d504c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opf/openproject/pulls/3270/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/3270/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/3270/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/769f25662511db32c24a6b32f1e024b34b607250","head":{"label":"NobodysNightmare:feature/typed_settings","ref":"feature/typed_settings","sha":"769f25662511db32c24a6b32f1e024b34b607250","user":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"repo":{"id":31598524,"name":"openproject","full_name":"NobodysNightmare/openproject","owner":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NobodysNightmare/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/NobodysNightmare/openproject","forks_url":"https://api.github.com/repos/NobodysNightmare/openproject/forks","keys_url":"https://api.github.com/repos/NobodysNightmare/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NobodysNightmare/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NobodysNightmare/openproject/teams","hooks_url":"https://api.github.com/repos/NobodysNightmare/openproject/hooks","issue_events_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/NobodysNightmare/openproject/events","assignees_url":"https://api.github.com/repos/NobodysNightmare/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/NobodysNightmare/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/NobodysNightmare/openproject/tags","blobs_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NobodysNightmare/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/NobodysNightmare/openproject/languages","stargazers_url":"https://api.github.com/repos/NobodysNightmare/openproject/stargazers","contributors_url":"https://api.github.com/repos/NobodysNightmare/openproject/contributors","subscribers_url":"https://api.github.com/repos/NobodysNightmare/openproject/subscribers","subscription_url":"https://api.github.com/repos/NobodysNightmare/openproject/subscription","commits_url":"https://api.github.com/repos/NobodysNightmare/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/NobodysNightmare/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/NobodysNightmare/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/NobodysNightmare/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NobodysNightmare/openproject/merges","archive_url":"https://api.github.com/repos/NobodysNightmare/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NobodysNightmare/openproject/downloads","issues_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/NobodysNightmare/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/NobodysNightmare/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/NobodysNightmare/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NobodysNightmare/openproject/labels{/name}","releases_url":"https://api.github.com/repos/NobodysNightmare/openproject/releases{/id}","created_at":"2015-03-03T13:00:18Z","updated_at":"2015-04-01T12:02:52Z","pushed_at":"2015-07-23T14:30:30Z","git_url":"git://github.com/NobodysNightmare/openproject.git","ssh_url":"git@github.com:NobodysNightmare/openproject.git","clone_url":"https://github.com/NobodysNightmare/openproject.git","svn_url":"https://github.com/NobodysNightmare/openproject","homepage":"https://www.openproject.org","size":65447,"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":"dev"}},"base":{"label":"opf:release/4.3","ref":"release/4.3","sha":"d6f778d805f7696d1ced6e0a036fb442341bcfff","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2015-07-23T13:56:12Z","pushed_at":"2015-07-23T14:30:31Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":204486,"stargazers_count":685,"watchers_count":685,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":291,"mirror_url":null,"open_issues_count":32,"forks":291,"open_issues":32,"watchers":685,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/3270"},"html":{"href":"https://github.com/opf/openproject/pull/3270"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/3270"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/3270/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/3270/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/3270/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/769f25662511db32c24a6b32f1e024b34b607250"}}}}