foreman_templates 9.2.0 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/foreman_templates/engine.rb +1 -1
  3. data/lib/foreman_templates/version.rb +1 -1
  4. data/package.json +10 -36
  5. data/webpack/__mocks__/foremanReact/common/I18n.js +1 -0
  6. data/webpack/__tests__/helpers.test.js +1 -1
  7. data/webpack/components/NewTemplateSync/NewTemplateSync.js +2 -1
  8. data/webpack/components/NewTemplateSync/__tests__/NewTemplateSync.test.js +1 -1
  9. data/webpack/components/NewTemplateSync/__tests__/NewTemplateSyncReducer.test.js +1 -1
  10. data/webpack/components/NewTemplateSync/__tests__/NewTemplateSyncSelectors.test.js +1 -1
  11. data/webpack/components/NewTemplateSync/components/ButtonTooltip.js +8 -14
  12. data/webpack/components/NewTemplateSync/components/NewTemplateSyncForm/__tests__/NewTemplateSyncFormSelectors.test.js +1 -1
  13. data/webpack/components/NewTemplateSync/components/__tests__/SyncSettingField.test.js +1 -1
  14. data/webpack/components/NewTemplateSync/components/__tests__/SyncSettingFields.test.js +1 -1
  15. data/webpack/components/NewTemplateSync/components/__tests__/SyncTypeRadios.test.js +1 -1
  16. data/webpack/components/NewTemplateSync/components/__tests__/TextButtonField.test.js +1 -1
  17. data/webpack/components/PageNotFound.js +1 -0
  18. data/webpack/components/PermissionDenied.js +1 -0
  19. data/webpack/components/TemplateSyncResult/__tests__/TemplateSyncResult.test.js +1 -1
  20. data/webpack/components/TemplateSyncResult/__tests__/TemplateSyncResultReducer.test.js +1 -1
  21. data/webpack/components/TemplateSyncResult/components/FinishedSyncResult.js +3 -2
  22. data/webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js +4 -8
  23. data/webpack/components/TemplateSyncResult/components/SyncedTemplate/StringInfoItem.js +1 -0
  24. data/webpack/components/TemplateSyncResult/components/SyncedTemplate/helpers.test.js +1 -1
  25. data/webpack/components/TemplateSyncResult/components/__tests__/SyncResultList.test.js +1 -1
  26. data/webpack/components/TemplateSyncResult/components/__tests__/SyncedTemplate.test.js +1 -1
  27. data/webpack/testSetup.js +1 -1
  28. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bda8e472a4ae76b0f1480738e9059423a249c4156842deebc385baa2f3c2a5ca
4
- data.tar.gz: bb04b38ce6791e62f90fcea5a177d38ca62402e6c3037e7f3ed85c416f91696c
3
+ metadata.gz: a528443c31169fe8bdf3631f0ba104c529f96d65e4b68fada26806ed7d1126b3
4
+ data.tar.gz: 0e0a5123832218f392d3b7bb6a7d52d0e06e0301c3861039ca6a6e48159141fe
5
5
  SHA512:
6
- metadata.gz: 3c35d3ca52df290a50a3e1788ea654a0588067ab02278a5b77829bfaec46d8c855ae36f554a608eaf8e9c5797b650d5be1a95ed4e7f8486c905e601068180fc5
7
- data.tar.gz: b58a200b8374f22481e1397949cc4126315234b6238ce08895acedb628c826515ce9ab514b85942b8388350f0e8939b0d088ccc6641fc4b3b84a1fc65ef16961
6
+ metadata.gz: 208c6cbdfb4cc6f368c0efb9a37356f9779423e82d037ceaaf2d79d09d04f98b2171304ba28d462f6619e28f70d6d08d5168c26d6a4b155248ed8a9b94247904
7
+ data.tar.gz: e461eacbd51608bf69fc56fd113cae87bbb26d402311585de7738c1afaaf1f8fc9e254e62210f60e05799f3eacb0c4aa961ad4bce0c65eca5e3094c40cfb3d68
@@ -24,7 +24,7 @@ module ForemanTemplates
24
24
 
25
25
  initializer 'foreman_templates.register_plugin', :before => :finisher_hook do
26
26
  Foreman::Plugin.register :foreman_templates do
27
- requires_foreman '>= 3.2'
27
+ requires_foreman '>= 3.3'
28
28
 
29
29
  apipie_documented_controllers ["#{ForemanTemplates::Engine.root}/app/controllers/api/v2/*.rb"]
30
30
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTemplates
2
- VERSION = '9.2.0'.freeze
2
+ VERSION = '9.3.0'.freeze
3
3
  end
data/package.json CHANGED
@@ -7,8 +7,8 @@
7
7
  "test": "test"
8
8
  },
9
9
  "scripts": {
10
- "test": "node node_modules/.bin/jest webpack",
11
- "lint": "./node_modules/.bin/eslint -c .eslintrc webpack/"
10
+ "test": "tfm-test --plugin",
11
+ "lint": "tfm-lint --plugin -d /webpack"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -21,45 +21,19 @@
21
21
  },
22
22
  "homepage": "https://github.com/theforeman/foreman_templates",
23
23
  "peerDependencies": {
24
- "@theforeman/vendor": ">= 3.3.2"
24
+ "@theforeman/vendor": "^10.1.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@babel/core": "^7.7.0",
28
- "@theforeman/env": "^3.3.2",
29
- "@theforeman/builder": "^4.0.2",
30
- "@theforeman/vendor-dev": "^3.3.2",
28
+ "@theforeman/builder": "^10.1.0",
29
+ "@theforeman/eslint-plugin-foreman": "^10.1.0",
30
+ "@theforeman/vendor-dev": "^10.1.0",
31
+ "@theforeman/test": "^10.1.0",
32
+ "@theforeman/stories": "^10.1.0",
31
33
  "babel-eslint": "^10.0.0",
32
- "babel-jest": "^24.9.0",
33
- "enzyme": "^3.7.0",
34
- "enzyme-adapter-react-16": "^1.7.0",
35
- "enzyme-to-json": "^3.3.5",
36
34
  "eslint": "^6.8.0",
37
- "eslint-plugin-patternfly-react": "^0.3.0",
35
+ "eslint-plugin-patternfly-react": "0.2.0",
38
36
  "identity-obj-proxy": "^3.0.0",
39
- "jest": "^24.9.0",
40
- "prettier": "^1.19.1",
41
- "react-redux-test-utils": "^0.1.1"
42
- },
43
- "jest": {
44
- "verbose": true,
45
- "moduleDirectories": [
46
- "node_modules/@theforeman/vendor-core/node_modules",
47
- "node_modules",
48
- "webpack"
49
- ],
50
- "transform": {
51
- "^.+\\.js$": "babel-jest"
52
- },
53
- "setupFiles": [
54
- "raf/polyfill",
55
- "./webpack/testSetup.js"
56
- ],
57
- "testPathIgnorePatterns": [
58
- "/node_modules/",
59
- "<rootDir>/foreman/"
60
- ],
61
- "moduleNameMapper": {
62
- "^.+\\.(css|scss)$": "identity-obj-proxy"
63
- }
37
+ "prettier": "^1.19.1"
64
38
  }
65
39
  }
@@ -0,0 +1 @@
1
+ export const translate = s => s;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
2
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
3
3
  import withProtectedView from '../withProtectedView';
4
4
 
5
5
  const ProtectedComponent = () => <div>Protected component</div>;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { LoadingState } from 'patternfly-react';
3
- import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
4
3
  import PropTypes from 'prop-types';
4
+ import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
5
+ import { translate as __ } from 'foremanReact/common/I18n';
5
6
 
6
7
  import NewTemplateSyncForm from './components/NewTemplateSyncForm';
7
8
  import './NewTemplateSync.scss';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import NewTemplateSync from '../NewTemplateSync';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import reducer, { initialState } from '../NewTemplateSyncReducer';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  importSettings,
@@ -1,20 +1,14 @@
1
1
  import React from 'react';
2
- import { Tooltip, Icon, OverlayTrigger } from 'patternfly-react';
2
+ import { Tooltip } from '@patternfly/react-core';
3
+ import { RedoIcon } from '@patternfly/react-icons';
3
4
  import PropTypes from 'prop-types';
5
+ import { translate as __ } from 'foremanReact/common/I18n';
4
6
 
5
- const ButtonTooltip = props => {
6
- const tooltip = (
7
- <Tooltip id={`${props.tooltipId}-tooltip-id`}>
8
- <span>Use default value from settings</span>
9
- </Tooltip>
10
- );
11
-
12
- return (
13
- <OverlayTrigger overlay={tooltip} trigger={['hover', 'focus']}>
14
- <Icon type="fa" name="refresh" />
15
- </OverlayTrigger>
16
- );
17
- };
7
+ const ButtonTooltip = ({ tooltipId }) => (
8
+ <Tooltip id={tooltipId} content={__('Use default value from settings')}>
9
+ <RedoIcon />
10
+ </Tooltip>
11
+ );
18
12
 
19
13
  ButtonTooltip.propTypes = {
20
14
  tooltipId: PropTypes.string.isRequired,
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  stateFactory,
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import SyncSettingField from '../SyncSettingField';
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 SyncSettingFields from '../SyncSettingFields';
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 SyncTypeRadios from '../SyncTypeRadios';
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 TextButtonField from '../TextButtonField';
4
4
 
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EmptyStatePattern as EmptyState } from 'foremanReact/components/common/EmptyState';
3
+ import { translate as __ } from 'foremanReact/common/I18n';
3
4
 
4
5
  const PageNotFound = props => (
5
6
  <EmptyState
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
+ import { translate as __ } from 'foremanReact/common/I18n';
4
5
  import { EmptyStatePattern as EmptyState } from 'foremanReact/components/common/EmptyState';
5
6
 
6
7
  const PermissionDenied = props => {
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  importTemplates,
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import reducer, { initialState } from '../TemplateSyncResultReducer';
4
4
  import { importTemplates } from '../__fixtures__/templateSyncResult.fixtures';
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { capitalize } from 'lodash';
4
+ import { LinkContainer } from 'react-router-bootstrap';
5
+ import { Button } from 'patternfly-react';
4
6
 
7
+ import { translate as __ } from 'foremanReact/common/I18n';
5
8
  import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
6
- import { LinkContainer } from 'react-router-bootstrap';
7
9
 
8
- import { Button } from 'patternfly-react';
9
10
  import SyncResultList from './SyncResultList';
10
11
 
11
12
  const titleString = (type, repo, branch, gitUser, fileRepoStartWith) => {
@@ -1,17 +1,13 @@
1
1
  import React from 'react';
2
- import { ListView, OverlayTrigger, Tooltip } from 'patternfly-react';
2
+ import { ListView } from 'patternfly-react';
3
+ import { Tooltip } from '@patternfly/react-core';
3
4
  import PropTypes from 'prop-types';
4
5
 
5
6
  const InfoItem = ({ itemId, children, tooltipText }) => {
6
7
  const overlay = (
7
- <OverlayTrigger
8
- overlay={tooltipText ? <Tooltip id={itemId}>{tooltipText}</Tooltip> : ''}
9
- placement="top"
10
- trigger={['hover', 'focus']}
11
- rootClose={false}
12
- >
8
+ <Tooltip content={tooltipText || ''} id={itemId}>
13
9
  {children}
14
- </OverlayTrigger>
10
+ </Tooltip>
15
11
  );
16
12
  return (
17
13
  <ListView.InfoItem key={itemId} className="additional-info-wide">
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import EllipsisWithTooltip from 'react-ellipsis-with-tooltip';
3
3
  import PropTypes from 'prop-types';
4
+ import { translate as __ } from 'foremanReact/common/I18n';
4
5
 
5
6
  import InfoItem from './InfoItem';
6
7
  import { itemIteratorId } from './helpers';
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import { expandableContent } from './helpers';
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 SyncResultList from '../SyncResultList';
4
4
  import { importTemplates } from '../../__fixtures__/templateSyncResult.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
  import SyncedTemplate from '../SyncedTemplate';
3
3
  import {
4
4
  noName,
data/webpack/testSetup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'core-js/shim';
2
2
  import 'regenerator-runtime/runtime';
3
3
 
4
- import { configure } from 'enzyme';
4
+ import { configure } from '@theforeman/test';
5
5
  import Adapter from 'enzyme-adapter-react-16';
6
6
 
7
7
  configure({ adapter: new Adapter() });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.2.0
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -97,6 +97,7 @@ files:
97
97
  - webpack/ForemanTemplates.js
98
98
  - webpack/Routes.js
99
99
  - webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
100
+ - webpack/__mocks__/foremanReact/common/I18n.js
100
101
  - webpack/__mocks__/foremanReact/common/helpers.js
101
102
  - webpack/__mocks__/foremanReact/components/Layout/LayoutSelectors.js
102
103
  - webpack/__mocks__/foremanReact/components/Pagination/index.js