foreman_rh_cloud 0.9.4 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +10 -5
  3. data/lib/foreman_inventory_upload/async/upload_report_job.rb +1 -5
  4. data/lib/foreman_inventory_upload/scripts/uploader.sh.erb +1 -0
  5. data/lib/foreman_rh_cloud/engine.rb +1 -1
  6. data/lib/foreman_rh_cloud/version.rb +1 -1
  7. data/package.json +20 -100
  8. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js +5 -14
  9. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -1
  10. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +1 -1
  11. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +1 -1
  12. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +1 -1
  13. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -1
  14. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +1 -1
  15. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
  16. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +1 -1
  17. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +1 -1
  18. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js +13 -9
  19. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.stories.js +5 -15
  20. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +1 -2
  21. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +15 -2
  22. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +1 -1
  23. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +1 -1
  24. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +1 -1
  25. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +1 -1
  26. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +1 -1
  27. data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +5 -2
  28. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +1 -2
  29. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/__snapshots__/NavContainer.test.js.snap +1 -1
  30. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +1 -1
  31. data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +1 -1
  32. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +1 -1
  33. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +1 -1
  34. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +1 -1
  35. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +1 -1
  36. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +1 -1
  37. data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +1 -1
  38. data/webpack/ForemanInventoryUpload/Components/Terminal/Terminal.js +1 -1
  39. data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +1 -2
  40. data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js +1 -1
  41. metadata +33 -12
  42. data/webpack/stories/ForemanInventoryUploadReducers.js +0 -3
  43. data/webpack/stories/configureStore.js +0 -15
  44. data/webpack/stories/decorators/index.js +0 -1
  45. data/webpack/stories/decorators/withCardsDecorator.js +0 -14
  46. data/webpack/stories/index.js +0 -10
  47. data/webpack/stories/index.scss +0 -7
  48. data/webpack/test_setup.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13b1a7c45d91a3bbc94868e8851fb6f186186492c57a201df474d4b2c20f9edb
4
- data.tar.gz: 6746f4844a2ad615b6e19e24eae7c91f7f584759f790bb54309bfcbdfcdd7180
3
+ metadata.gz: 1f6361a25739c19a67518378257d51f67fc443839d76d7d07f5bd597f09ef15d
4
+ data.tar.gz: b558ad39920b634ee4c9be77ec20f65235eb3193de374879dc85bc284a15bfa5
5
5
  SHA512:
6
- metadata.gz: a7d5c284c21b75c268a49859b398d83b829a9db883d9491b499a47a17c19f53cc7196363270e87de34d14e51cf16baeedc86731f74d673e39790d79f95a1d642
7
- data.tar.gz: 76a52baceb8ca3c3fb7cb2dd5ca988a6365251f98f3346bbe86dd8736f4b28e7feb6774882e718225d711552cbc9ef07e1e96866f02981868376efcc31aaaa56
6
+ metadata.gz: 83b2169b736d8c57d544b8ce53bda7e91e4741efdd384953fd32a22ac96e531282e97ef740112a7be5310ef44fc0569fe8995972304844302d0b2eb3db6215f8
7
+ data.tar.gz: 3b7bbd7d76a68b5b41874472961eabd2360de0ad871705430d7549d8c44b48e5811ba9d566d74a3c0a8774b7c3b4c0c5a0f75ae57f2f38519ef528e12239c4f3
@@ -30,11 +30,16 @@ module ForemanInventoryUpload
30
30
  def ensure_output_script
31
31
  return if File.exist?(script_file)
32
32
 
33
- script_source_file = File.join(ForemanRhCloud::Engine.root, 'lib/foreman_inventory_upload/scripts/uploader.sh.erb')
34
-
35
- script_source = File.read(script_source_file)
36
- script_source.gsub!('<%= @upload_url %>', ForemanInventoryUpload.upload_url)
37
-
33
+ script_source = File.join(ForemanRhCloud::Engine.root, 'lib/foreman_inventory_upload/scripts/uploader.sh.erb')
34
+
35
+ template_src = Foreman::Renderer::Source::String.new(content: File.read(script_source))
36
+ scope = Foreman::Renderer::Scope::Base.new(
37
+ source: template_src,
38
+ variables: {
39
+ upload_url: ForemanInventoryUpload.upload_url,
40
+ }
41
+ )
42
+ script_source = Foreman::Renderer.render(template_src, scope)
38
43
  File.write(script_file, script_source)
39
44
  FileUtils.chmod('+x', script_file)
40
45
  end
@@ -37,11 +37,7 @@ module ForemanInventoryUpload
37
37
  end
38
38
 
39
39
  def http_proxy_string
40
- @http_proxy_string ||= begin
41
- if Setting[:content_default_http_proxy]
42
- HttpProxy.unscoped.find_by(name: Setting[:content_default_http_proxy])&.full_url
43
- end
44
- end
40
+ @http_proxy_string ||= HttpProxy.default_global_content_proxy&.full_url
45
41
  end
46
42
 
47
43
  def rh_credentials
@@ -1,6 +1,7 @@
1
1
  #! /bin/sh
2
2
 
3
3
  DEST=<%= @upload_url %>
4
+ RH_USERNAME=<%= @rh_username %>
4
5
 
5
6
  if [ -z "$FILES" ]
6
7
  then
@@ -22,7 +22,7 @@ module ForemanRhCloud
22
22
 
23
23
  initializer 'foreman_rh_cloud.register_plugin', :before => :finisher_hook do |_app|
24
24
  Foreman::Plugin.register :foreman_rh_cloud do
25
- requires_foreman '>= 1.20'
25
+ requires_foreman '> 1.24'
26
26
 
27
27
  # Add permissions
28
28
  security_block :foreman_rh_cloud do
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '0.9.4'.freeze
2
+ VERSION = '2.0.4'.freeze
3
3
  end
@@ -4,14 +4,14 @@
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "lint": "./node_modules/.bin/eslint -c .eslintrc webpack/",
8
- "test": "node node_modules/.bin/jest --no-cache",
9
- "test:watch": "node node_modules/.bin/jest --watchAll",
10
- "test:current": "node node_modules/.bin/jest --watch",
11
- "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
12
- "storybook": "start-storybook -p 6006",
13
- "storybook:build": "node --max_old_space_size=2048 ./node_modules/.bin/build-storybook --config-dir .storybook --output-dir .storybook-dist",
14
- "storybook:deploy": "surge --project .storybook-dist"
7
+ "lint": "tfm-lint --plugin -d /webpack",
8
+ "test": "tfm-test --plugin",
9
+ "test:watch": "tfm-test --plugin --watchAll",
10
+ "test:current": "tfm-test --plugin --watch",
11
+ "publish-coverage": "tfm-publish-coverage",
12
+ "stories": "tfm-stories --plugin",
13
+ "stories:build": "tfm-build-stories --plugin",
14
+ "stories:deploy": "surge --project .storybook-dist"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -20,106 +20,26 @@
20
20
  "bugs": {
21
21
  "url": "http://projects.theforeman.org/projects/foreman_rh_cloud/issues"
22
22
  },
23
- "optionalDependencies": {
24
- "babel-plugin-module-resolver": "^3.2.0"
23
+ "peerDependencies": {
24
+ "@theforeman/vendor": ">= 4.0.2"
25
25
  },
26
26
  "devDependencies": {
27
- "@storybook/addon-actions": "^5.0.1",
28
- "@storybook/addon-knobs": "^5.0.1",
29
- "@storybook/react": "^5.0.1",
30
- "babel-cli": "^6.10.1",
31
- "babel-core": "^6.26.3",
32
- "babel-eslint": "^8.2.3",
33
- "babel-jest": "^23.6.0",
34
- "babel-loader": "^7.1.1",
35
- "babel-plugin-dynamic-import-node": "^2.0.0",
36
- "babel-plugin-lodash": "^3.3.4",
37
- "babel-plugin-syntax-dynamic-import": "^6.18.0",
38
- "babel-plugin-transform-class-properties": "^6.24.1",
39
- "babel-plugin-transform-object-assign": "^6.8.0",
40
- "babel-plugin-transform-object-rest-spread": "^6.8.0",
41
- "babel-preset-env": "^1.7.0",
42
- "babel-preset-react": "^6.5.0",
43
- "coveralls": "^3.0.0",
44
- "enzyme": "^3.4.0",
45
- "enzyme-adapter-react-16": "^1.4.0",
46
- "enzyme-to-json": "^3.2.1",
47
- "eslint": "^4.10.0",
48
- "eslint-import-resolver-babel-module": "^4.0.0",
49
- "eslint-plugin-patternfly-react": "0.2.0",
50
- "identity-obj-proxy": "^3.0.0",
51
- "jed": "^1.1.1",
52
- "jest-cli": "^23.6.0",
53
- "jest-prop-type-error": "^1.1.0",
54
- "node-sass": "^4.5.0",
55
- "patternfly": "^3.58.0",
27
+ "@babel/core": "^7.7.0",
28
+ "@theforeman/builder": "^4.0.2",
29
+ "@theforeman/stories": "^4.0.2",
30
+ "@theforeman/test": "^4.0.2",
31
+ "@theforeman/vendor-dev": "^4.0.2",
32
+ "@theforeman/eslint-plugin-foreman": "^4.0.2",
33
+ "babel-eslint": "^10.0.0",
34
+ "eslint": "^6.7.2",
56
35
  "prettier": "^1.13.5",
57
36
  "raf": "^3.4.0",
58
- "react-redux-test-utils": "^0.1.1",
59
- "react-remarkable": "^1.1.3",
60
- "sass-loader": "^6.0.7",
61
37
  "stylelint": "^9.3.0",
62
38
  "stylelint-config-standard": "^18.0.0",
63
39
  "surge": "^0.20.3"
64
40
  },
65
41
  "dependencies": {
66
- "babel-polyfill": "^6.26.0",
67
- "classnames": "^2.2.5",
68
- "lodash": "^4.17.10",
69
- "patternfly-react": "^2.19.1",
70
- "prop-types": "^15.6.0",
71
- "react": "^16.4.0",
72
- "react-dom": "^16.4.0",
73
- "react-intl": "^2.8.0",
74
- "react-redux": "^5.0.6",
75
- "redux": "^3.6.0",
76
- "redux-thunk": "^2.2.0",
77
- "reselect": "^3.0.1",
78
- "seamless-immutable": "^7.1.2",
79
- "urijs": "^1.18.10",
80
- "uuid": "^3.0.1"
81
- },
82
- "jest": {
83
- "automock": true,
84
- "verbose": true,
85
- "testMatch": [
86
- "**/*.test.js"
87
- ],
88
- "testURL": "http://localhost/",
89
- "collectCoverage": true,
90
- "collectCoverageFrom": [
91
- "webpack/**/*.js",
92
- "!webpack/index.js",
93
- "!webpack/test_setup.js",
94
- "!webpack/**/bundle*",
95
- "!webpack/stories/**",
96
- "!webpack/**/*stories.js"
97
- ],
98
- "coverageReporters": [
99
- "lcov"
100
- ],
101
- "unmockedModulePathPatterns": [
102
- "webpack/",
103
- "react",
104
- "node_modules/"
105
- ],
106
- "moduleNameMapper": {
107
- "^.+\\.(png|gif|css|scss)$": "identity-obj-proxy"
108
- },
109
- "globals": {
110
- "__testing__": true
111
- },
112
- "transform": {
113
- "^.+\\.js$": "babel-jest"
114
- },
115
- "moduleDirectories": [
116
- "node_modules",
117
- "webpack"
118
- ],
119
- "setupFiles": [
120
- "raf/polyfill",
121
- "jest-prop-type-error",
122
- "./webpack/test_setup.js"
123
- ]
42
+ "jed": "^1.1.1",
43
+ "react-intl": "^2.8.0"
124
44
  }
125
45
  }
@@ -1,18 +1,9 @@
1
1
  import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withKnobs } from '@storybook/addon-knobs';
4
- import { Provider } from 'react-redux';
5
- import configureStore from '../../../stories/configureStore';
6
2
  import AccountList from './AccountList';
7
3
 
8
- const store = configureStore();
4
+ export default {
5
+ title: 'AccountList',
6
+ component: AccountList,
7
+ };
9
8
 
10
- storiesOf('Account list', module)
11
- .addDecorator(withKnobs)
12
- .add('Account list', () => (
13
- <div style={{ margin: '20px' }}>
14
- <Provider store={store}>
15
- <AccountList />
16
- </Provider>
17
- </div>
18
- ));
9
+ export const Basic = () => <AccountList />;
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import EmptyState from '../EmptyState';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ErrorState from '../ErrorState';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ListItem from '../ListItem';
4
4
  import { props } from '../ListItem.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ListItemStatus from '../ListItemStatus';
4
4
  import { props } from '../ListItemStatus.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AccountList from '../AccountList';
4
4
  import { props } from '../AccountList.fixtures';
@@ -1,4 +1,4 @@
1
- import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testActionSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  fetchAccountsStatus,
4
4
  startAccountStatusPolling,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntegrationTestHelper } from 'react-redux-test-utils';
2
+ import { IntegrationTestHelper } from '@theforeman/test';
3
3
 
4
4
  import AccountList from '../index';
5
5
  import reducers from '../../../ForemanInventoryUploadReducers';
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  INVENTORY_ACCOUNT_STATUS_POLLING,
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  selectAccountsList,
4
4
  selectAccounts,
@@ -8,16 +8,20 @@ export const completed = 25;
8
8
 
9
9
  export const error = 'some-error';
10
10
 
11
+ export const generating = {
12
+ logs,
13
+ completed,
14
+ };
15
+
16
+ export const uploading = {
17
+ logs,
18
+ completed,
19
+ files,
20
+ };
21
+
11
22
  export const inventory = {
12
- generating: {
13
- logs,
14
- completed,
15
- },
16
- uploading: {
17
- logs,
18
- completed,
19
- files,
20
- },
23
+ generating,
24
+ uploading,
21
25
  };
22
26
 
23
27
  export const accountID = 'some-account-ID';
@@ -1,19 +1,9 @@
1
1
  import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withKnobs } from '@storybook/addon-knobs';
4
- import { Provider } from 'react-redux';
5
- import configureStore from '../../../stories/configureStore';
6
2
  import Dashboard from './index';
7
- import { generating, uploading } from './Dashboard.fixtures';
8
3
 
9
- const store = configureStore();
4
+ export default {
5
+ title: 'Dashboard',
6
+ component: Dashboard,
7
+ };
10
8
 
11
- storiesOf('Dashboard', module)
12
- .addDecorator(withKnobs)
13
- .add('Dashboard', () => (
14
- <div style={{ margin: '20px' }}>
15
- <Provider store={store}>
16
- <Dashboard generating={generating} uploading={uploading} />
17
- </Provider>
18
- </div>
19
- ));
9
+ export const Basic = () => <Dashboard />;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
2
+ import { shallow, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import Dashboard from '../Dashboard';
5
4
  import { props } from '../Dashboard.fixtures';
6
5
 
@@ -1,4 +1,4 @@
1
- import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testActionSnapshotWithFixtures } from '@theforeman/test';
2
2
  import API from 'foremanReact/API';
3
3
  import {
4
4
  startPolling,
@@ -36,4 +36,17 @@ const fixtures = {
36
36
  runWithGetState({ activeTab: 'reports' }, toggleFullScreen, accountID),
37
37
  };
38
38
 
39
- describe('Dashboard actions', () => testActionSnapshotWithFixtures(fixtures));
39
+ describe('Dashboard actions', () => {
40
+ const { location } = window;
41
+
42
+ beforeAll(() => {
43
+ delete window.location;
44
+ window.location = { href: jest.fn() };
45
+ });
46
+
47
+ afterAll(() => {
48
+ window.location = location;
49
+ });
50
+
51
+ return testActionSnapshotWithFixtures(fixtures);
52
+ });
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntegrationTestHelper } from 'react-redux-test-utils';
2
+ import { IntegrationTestHelper } from '@theforeman/test';
3
3
 
4
4
  import Dashboard, { reducers } from '../index';
5
5
  import { accountID } from '../Dashboard.fixtures';
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  INVENTORY_POLLING_START,
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  selectDashboard,
4
4
  selectPollingProcessID,
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import FileDownload from '../FileDownload';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import FullScreenModal from '../FullScreenModal';
4
4
 
@@ -1,10 +1,13 @@
1
+ import React from 'react';
2
+ import { noop } from 'patternfly-react';
3
+
1
4
  export const props = {
2
5
  items: [
3
6
  {
4
7
  icon: 'some-icon',
5
8
  name: 'some-name',
6
- component: jest.fn,
7
- onClick: jest.fn,
9
+ component: () => <p>test</p>,
10
+ onClick: noop,
8
11
  },
9
12
  ],
10
13
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { mount } from 'enzyme';
3
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
2
+ import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import NavContainer from '../NavContainer';
5
4
  import { props } from '../NavContainer.fixtures';
6
5
 
@@ -45,7 +45,7 @@ exports[`NavContainer rendering render with Props 1`] = `
45
45
  eventKey={0}
46
46
  key="0"
47
47
  >
48
- <bound fn />
48
+ <component />
49
49
  </TabPane>
50
50
  </TabContent>
51
51
  <FullScreenModal
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ReportGenerate from '../ReportGenerate';
4
4
  import { props } from '../ReportGenerate.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ReportUpload from '../ReportUpload';
4
4
  import { props } from '../ReportUpload.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ScheduledRun from '../ScheduledRun';
4
4
  import { props } from '../ScheduledRun.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import StatusChart from '../StatusChart';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabBody from '../TabBody';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabContainer from '../TabContainer';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabFooter from '../TabFooter';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabHeader from '../TabHeader';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Grid, Spinner } from 'patternfly-react';
4
- import isEqual from 'lodash/isEqual';
4
+ import { isEqual } from 'lodash';
5
5
  import './terminal.scss';
6
6
  import { isTerminalScrolledDown } from './TerminalHelper';
7
7
 
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
3
- import { mount } from 'enzyme';
2
+ import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import Terminal from '../Terminal';
5
4
  import { props, logs } from '../Terminal.fixtures';
6
5
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ForemanInventoryUpload from './ForemanInventoryUpload';
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
@@ -56,16 +56,44 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-performance
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
60
81
  - !ruby/object:Gem::Version
61
- version: 0.54.0
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - "~>"
94
+ - - ">="
67
95
  - !ruby/object:Gem::Version
68
- version: 0.54.0
96
+ version: '0'
69
97
  description: Foreman plugin that process & upload data to Red Hat Cloud
70
98
  email:
71
99
  - rlavi@redhat.com, sshtein@redhat.com
@@ -276,13 +304,6 @@ files:
276
304
  - webpack/__mocks__/foremanReact/common/I18n.js
277
305
  - webpack/__mocks__/foremanReact/common/helpers.js
278
306
  - webpack/index.js
279
- - webpack/stories/ForemanInventoryUploadReducers.js
280
- - webpack/stories/configureStore.js
281
- - webpack/stories/decorators/index.js
282
- - webpack/stories/decorators/withCardsDecorator.js
283
- - webpack/stories/index.js
284
- - webpack/stories/index.scss
285
- - webpack/test_setup.js
286
307
  homepage: https://github.com/theforeman/foreman_rh_cloud
287
308
  licenses:
288
309
  - GPL-3.0
@@ -1,3 +0,0 @@
1
- import reducers from '../ForemanInventoryUpload/ForemanInventoryUploadReducers';
2
-
3
- export default reducers.ForemanInventoryUpload;
@@ -1,15 +0,0 @@
1
- import { applyMiddleware, compose, createStore } from 'redux';
2
- import thunkMiddleware from 'redux-thunk';
3
- import rootReducer from './ForemanInventoryUploadReducers';
4
-
5
- export default function configureStore(preloadedState) {
6
- const middlewares = [thunkMiddleware];
7
- const middlewareEnhancer = applyMiddleware(...middlewares);
8
-
9
- const enhancers = [middlewareEnhancer];
10
- const composedEnhancers = compose(...enhancers);
11
-
12
- const store = createStore(rootReducer, preloadedState, composedEnhancers);
13
-
14
- return store;
15
- }
@@ -1 +0,0 @@
1
- export * from './withCardsDecorator';
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
-
3
- export const withCardsDecorator = storyFn => (
4
- <div
5
- style={{
6
- width: '100%',
7
- height: '100vh',
8
- backgroundColor: '#F5F5F5',
9
- padding: '50px',
10
- }}
11
- >
12
- <div style={{ width: '300px', margin: 'auto' }}>{storyFn()}</div>
13
- </div>
14
- );
@@ -1,10 +0,0 @@
1
- import { configure } from '@storybook/react';
2
- import './index.scss';
3
-
4
- const req = require.context('../', true, /.stories.js$/);
5
-
6
- function loadStories() {
7
- req.keys().forEach(filename => req(filename));
8
- }
9
-
10
- configure(loadStories, module);
@@ -1,7 +0,0 @@
1
- $img-path: '~patternfly/dist/img/';
2
- $font-path: '~patternfly/dist/fonts/';
3
- $icon-font-path: '~patternfly/dist/fonts/';
4
-
5
- @import '~patternfly/dist/sass/patternfly';
6
- @import '~patternfly-react/dist/sass/patternfly-react';
7
- @import '~font-awesome-sass/assets/stylesheets/_font-awesome';
@@ -1,6 +0,0 @@
1
- import 'babel-polyfill';
2
-
3
- import { configure } from 'enzyme';
4
- import Adapter from 'enzyme-adapter-react-16';
5
-
6
- configure({ adapter: new Adapter() });