diff --git a/app/components/code-climate-popup.js b/app/components/code-climate-popup.js deleted file mode 100644 index c7d31f4c..00000000 --- a/app/components/code-climate-popup.js +++ /dev/null @@ -1,10 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - actions: { - close() { - $('.popup').removeClass('display'); - return false; - } - } -}); diff --git a/app/components/repo-actions.js b/app/components/repo-actions.js index 58400fac..9063460d 100644 --- a/app/components/repo-actions.js +++ b/app/components/repo-actions.js @@ -1,15 +1,7 @@ import Ember from 'ember'; export default Ember.Component.extend({ - displayCodeClimate: function() { - return this.get('repo.githubLanguage') === 'Ruby'; - }.property('repo.githubLanguage'), - actions: { - codeClimatePopup() { - $('.popup').removeClass('display'); - $('#code-climate').addClass('display'); - return false; - } - } + classNames: ['repo-main-tools'] + }); diff --git a/app/styles/app/modules/buttons.sass b/app/styles/app/modules/buttons.sass index c71199fe..5879a363 100644 --- a/app/styles/app/modules/buttons.sass +++ b/app/styles/app/modules/buttons.sass @@ -144,16 +144,6 @@ $button-border-color: #d4d4d4 margin-right: 0 margin-bottom: .5em -.button-circle-codeclimate - @extend %circle-button - @extend %icon-line-codeclimate - background: - repeat: no-repeat - size: auto 9px - position: 4px 8px - &:hover - @extend %icon-line-codeclimate-teal - .button-circle-cancel @extend %circle-button @extend %icon-line-cross @@ -231,4 +221,3 @@ $button-border-color: #d4d4d4 cursor: pointer @extend .button--grey @extend %icon-line-eye - diff --git a/app/styles/app/modules/icons.sass b/app/styles/app/modules/icons.sass index 73322aee..36eb296c 100644 --- a/app/styles/app/modules/icons.sass +++ b/app/styles/app/modules/icons.sass @@ -186,11 +186,6 @@ %icon-line-dropdown-teal background-image: inline-image('line-icons/icon-arrow-dropdown-teal.svg') -%icon-line-codeclimate - background-image: inline-image('line-icons/icon-codeclimate.svg') -%icon-line-codeclimate-teal - background-image: inline-image('line-icons/icon-codeclimate-teal.svg') - %icon-line-cross background-image: inline-image('line-icons/icon-failed.svg') %icon-line-cross-white diff --git a/app/styles/app/popup.sass b/app/styles/app/popup.sass index d00a8ff8..f176a3ec 100644 --- a/app/styles/app/popup.sass +++ b/app/styles/app/popup.sass @@ -94,10 +94,3 @@ width: 505px padding: 4px border-radius: 3px - -#code-climate - width: 100% - ol - padding-left: 1.2em - @media #{$medium-up} - width: 550px diff --git a/app/templates/components/code-climate-popup.hbs b/app/templates/components/code-climate-popup.hbs deleted file mode 100644 index a8ed8a2e..00000000 --- a/app/templates/components/code-climate-popup.hbs +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/app/templates/components/repo-actions.hbs b/app/templates/components/repo-actions.hbs index c0df0fad..f05be9f0 100644 --- a/app/templates/components/repo-actions.hbs +++ b/app/templates/components/repo-actions.hbs @@ -1,20 +1,7 @@ -
- - {{! TODO: when `component` helper is available we could just use - with a component name based on type that is passed here }} - {{#if job}} - {{job-repo-actions job=job user=user repo=repo}} - {{else}} - {{build-repo-actions build=build user=user repo=repo}} - {{/if}} - - {{#if displayCodeClimate}} - Code Climate - - {{/if}} - -
- -{{code-climate-popup}} +{{! TODO: when `component` helper is available we could just use +with a component name based on type that is passed here }} +{{#if job}} + {{job-repo-actions job=job user=user repo=repo}} +{{else}} + {{build-repo-actions build=build user=user repo=repo}} +{{/if}} diff --git a/public/images/line-icons/icon-codeclimate-teal.svg b/public/images/line-icons/icon-codeclimate-teal.svg deleted file mode 100644 index 7d441948..00000000 --- a/public/images/line-icons/icon-codeclimate-teal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/line-icons/icon-codeclimate.svg b/public/images/line-icons/icon-codeclimate.svg deleted file mode 100644 index c09e926a..00000000 --- a/public/images/line-icons/icon-codeclimate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/ui/code-climate-logo.svg b/public/images/ui/code-climate-logo.svg deleted file mode 100644 index 21097f6f..00000000 --- a/public/images/ui/code-climate-logo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tests/unit/components/repo-actions-test.js b/tests/unit/components/repo-actions-test.js index c9eb770f..dbc7ab80 100644 --- a/tests/unit/components/repo-actions-test.js +++ b/tests/unit/components/repo-actions-test.js @@ -5,28 +5,11 @@ moduleForComponent('repo-actions', 'RepoActionsComponent', { needs: ['component:build-repo-actions', 'component:job-repo-actions'] }); -test('it displays code climate if the repo language is ruby', function() { - var component, repo; - repo = Ember.Object.create({ - githubLanguage: 'Ruby' - }); - component = this.subject({ - repo: repo - }); - this.append(); - ok(component.get('displayCodeClimate'), 'component should try to display code climate'); - return ok(component.$('a[name=code-climate]').length, 'component should render a code climate button'); -}); +test('it renders', function() { -test('it doesn\'t display code climate for other languages', function() { - var component, repo; - repo = Ember.Object.create({ - githubLanguage: 'Go' - }); - component = this.subject({ - repo: repo - }); + var component; + component = this.subject({}); this.append(); - ok(!component.get('displayCodeClimate'), 'component should not try to display code climate'); - return ok(!component.$('a[name=code-climate]').length, 'component should not render a code climate button'); + return ok(component.$().hasClass('repo-main-tools'), 'component has class'); + });