metadata-json-lint 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +24 -0
  5. data/.rubocop_todo.yml +18 -0
  6. data/.travis.yml +24 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE +13 -0
  9. data/README.md +63 -0
  10. data/Rakefile +15 -0
  11. data/lib/metadata-json-lint/version_requirement.rb +35 -0
  12. data/metadata-json-lint.gemspec +25 -0
  13. data/spec/spec_helper.rb +36 -0
  14. data/spec/version_requirement_spec.rb +28 -0
  15. data/tests/bad_license/Rakefile +2 -0
  16. data/tests/bad_license/expected +1 -0
  17. data/tests/bad_license/metadata.json +83 -0
  18. data/tests/broken/Rakefile +2 -0
  19. data/tests/broken/expected +1 -0
  20. data/tests/broken/metadata.json +87 -0
  21. data/tests/duplicate-dep/Rakefile +2 -0
  22. data/tests/duplicate-dep/expected +1 -0
  23. data/tests/duplicate-dep/metadata.json +91 -0
  24. data/tests/json_format/Rakefile +2 -0
  25. data/tests/json_format/expected +1 -0
  26. data/tests/json_format/metadata.json +83 -0
  27. data/tests/long_summary/Rakefile +2 -0
  28. data/tests/long_summary/expected +1 -0
  29. data/tests/long_summary/metadata.json +24 -0
  30. data/tests/missing_version_requirement/Rakefile +2 -0
  31. data/tests/missing_version_requirement/expected +1 -0
  32. data/tests/missing_version_requirement/metadata.json +27 -0
  33. data/tests/mixed_version_syntax/Rakefile +2 -0
  34. data/tests/mixed_version_syntax/expected +1 -0
  35. data/tests/mixed_version_syntax/metadata.json +30 -0
  36. data/tests/multiple_problems/Rakefile +2 -0
  37. data/tests/multiple_problems/expected +3 -0
  38. data/tests/multiple_problems/metadata.json +86 -0
  39. data/tests/no_dependencies/Rakefile +2 -0
  40. data/tests/no_dependencies/metadata.json +66 -0
  41. data/tests/no_files/.gitkeep +0 -0
  42. data/tests/no_files/expected +1 -0
  43. data/tests/no_pe/Rakefile +2 -0
  44. data/tests/no_pe/metadata.json +31 -0
  45. data/tests/no_version_range/Rakefile +2 -0
  46. data/tests/no_version_range/metadata.json +34 -0
  47. data/tests/noname/Rakefile +2 -0
  48. data/tests/noname/expected +1 -0
  49. data/tests/noname/metadata.json +86 -0
  50. data/tests/open_ended_dependency/Rakefile +2 -0
  51. data/tests/open_ended_dependency/expected +1 -0
  52. data/tests/open_ended_dependency/metadata.json +30 -0
  53. data/tests/perfect/Rakefile +2 -0
  54. data/tests/perfect/metadata.json +91 -0
  55. data/tests/proprietary/Rakefile +2 -0
  56. data/tests/proprietary/metadata.json +79 -0
  57. data/tests/rake_global_options/Rakefile +4 -0
  58. data/tests/rake_global_options/expected +1 -0
  59. data/tests/rake_global_options/metadata.json +79 -0
  60. data/tests/rake_multiple_json_options/Rakefile +14 -0
  61. data/tests/rake_multiple_json_options/metadata_license.json +79 -0
  62. data/tests/rake_multiple_json_options/metadata_ok.json +79 -0
  63. data/tests/tags_no_array/Rakefile +2 -0
  64. data/tests/tags_no_array/expected +1 -0
  65. data/tests/tags_no_array/metadata.json +96 -0
  66. data/tests/tags_with_array/Rakefile +2 -0
  67. data/tests/tags_with_array/metadata.json +92 -0
  68. data/tests/test.sh +157 -0
  69. data/tests/types/Rakefile +2 -0
  70. data/tests/types/expected +1 -0
  71. data/tests/types/metadata.json +88 -0
  72. metadata +131 -2
File without changes
@@ -0,0 +1 @@
1
+ Error: Unable to read metadata file: No such file or directory
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "Apache-2.0",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "7"
15
+ ]
16
+ }
17
+ ],
18
+ "requirements": [
19
+ {
20
+ "name": "pe",
21
+ "version_requirement": ">= 3.2.0 < 3.4.0"
22
+ },
23
+ {
24
+ "name": "puppet",
25
+ "version_requirement": "3.x"
26
+ }
27
+ ],
28
+ "dependencies": [
29
+ { "name": "puppetlabs/stdlib" }
30
+ ]
31
+ }
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "Apache-2.0",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "7"
15
+ ]
16
+ }
17
+ ],
18
+ "requirements": [
19
+ {
20
+ "name": "pe",
21
+ "version_requirement": ">= 3.2.0 < 3.4.0"
22
+ },
23
+ {
24
+ "name": "puppet",
25
+ "version_requirement": "3.x"
26
+ }
27
+ ],
28
+ "dependencies": [
29
+ {
30
+ "name": "puppetlabs/stdlib",
31
+ "version_range": ">= 1.0.0"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1 @@
1
+ Required field 'name' not found in metadata.json.
@@ -0,0 +1,86 @@
1
+ {
2
+ "version": "3.4.1",
3
+ "author": "Inkling/Puppet Labs",
4
+ "summary": "PostgreSQL defined resource types",
5
+ "license": "Apache-2.0",
6
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
7
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
8
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
9
+ "operatingsystem_support": [
10
+ {
11
+ "operatingsystem": "RedHat",
12
+ "operatingsystemrelease": [
13
+ "5",
14
+ "6",
15
+ "7"
16
+ ]
17
+ },
18
+ {
19
+ "operatingsystem": "CentOS",
20
+ "operatingsystemrelease": [
21
+ "5",
22
+ "6",
23
+ "7"
24
+ ]
25
+ },
26
+ {
27
+ "operatingsystem": "OracleLinux",
28
+ "operatingsystemrelease": [
29
+ "5",
30
+ "6",
31
+ "7"
32
+ ]
33
+ },
34
+ {
35
+ "operatingsystem": "Scientific",
36
+ "operatingsystemrelease": [
37
+ "5",
38
+ "6",
39
+ "7"
40
+ ]
41
+ },
42
+ {
43
+ "operatingsystem": "Debian",
44
+ "operatingsystemrelease": [
45
+ "6",
46
+ "7"
47
+ ]
48
+ },
49
+ {
50
+ "operatingsystem": "Ubuntu",
51
+ "operatingsystemrelease": [
52
+ "10.04",
53
+ "12.04",
54
+ "14.04"
55
+ ]
56
+ }
57
+ ],
58
+ "requirements": [
59
+ {
60
+ "name": "pe",
61
+ "version_requirement": ">= 3.2.0 < 3.4.0"
62
+ },
63
+ {
64
+ "name": "puppet",
65
+ "version_requirement": "3.x"
66
+ }
67
+ ],
68
+ "dependencies": [
69
+ {
70
+ "name": "puppetlabs/stdlib",
71
+ "version_requirement": "4.x"
72
+ },
73
+ {
74
+ "name": "puppetlabs/firewall",
75
+ "version_requirement": ">= 0.0.4"
76
+ },
77
+ {
78
+ "name": "puppetlabs/apt",
79
+ "version_requirement": ">=1.1.0 <2.0.0"
80
+ },
81
+ {
82
+ "name": "puppetlabs/concat",
83
+ "version_requirement": ">= 1.1.0 <2.0.0"
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1 @@
1
+ Dependency puppetlabs/stdlib has an open ended dependency version requirement >= 3.2.0
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "Apache-2.0",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "7"
15
+ ]
16
+ }
17
+ ],
18
+ "requirements": [
19
+ {
20
+ "name": "puppet",
21
+ "version_requirement": "3.x"
22
+ }
23
+ ],
24
+ "dependencies": [
25
+ {
26
+ "name": "puppetlabs/stdlib",
27
+ "version_requirement": ">= 3.2.0"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "Apache-2.0",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "5",
15
+ "6",
16
+ "7"
17
+ ]
18
+ },
19
+ {
20
+ "operatingsystem": "CentOS",
21
+ "operatingsystemrelease": [
22
+ "5",
23
+ "6",
24
+ "7"
25
+ ]
26
+ },
27
+ {
28
+ "operatingsystem": "OracleLinux",
29
+ "operatingsystemrelease": [
30
+ "5",
31
+ "6",
32
+ "7"
33
+ ]
34
+ },
35
+ {
36
+ "operatingsystem": "Scientific",
37
+ "operatingsystemrelease": [
38
+ "5",
39
+ "6",
40
+ "7"
41
+ ]
42
+ },
43
+ {
44
+ "operatingsystem": "Debian",
45
+ "operatingsystemrelease": [
46
+ "6",
47
+ "7"
48
+ ]
49
+ },
50
+ {
51
+ "operatingsystem": "Ubuntu",
52
+ "operatingsystemrelease": [
53
+ "10.04",
54
+ "12.04",
55
+ "14.04"
56
+ ]
57
+ }
58
+ ],
59
+ "requirements": [
60
+ {
61
+ "name": "puppet",
62
+ "version_requirement": "3.x"
63
+ }
64
+ ],
65
+ "dependencies": [
66
+ {
67
+ "name": "puppetlabs/stdlib",
68
+ "version_requirement": "1.2.3"
69
+ },
70
+ {
71
+ "name": "puppetlabs/apt",
72
+ "version_requirement": "< 1.2.3"
73
+ },
74
+ {
75
+ "name": "puppetlabs/puppetdb",
76
+ "version_requirement": "<= 1.2.3"
77
+ },
78
+ {
79
+ "name": "puppetlabs/vcsrepo",
80
+ "version_requirement": ">= 1.0.0 < 2.0.0"
81
+ },
82
+ {
83
+ "name": "puppetlabs/rabbitmq",
84
+ "version_requirement": "1.x"
85
+ },
86
+ {
87
+ "name": "puppetlabs/motd",
88
+ "version_requirement": "1.2.x"
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "proprietary",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "5",
15
+ "6",
16
+ "7"
17
+ ]
18
+ },
19
+ {
20
+ "operatingsystem": "CentOS",
21
+ "operatingsystemrelease": [
22
+ "5",
23
+ "6",
24
+ "7"
25
+ ]
26
+ },
27
+ {
28
+ "operatingsystem": "OracleLinux",
29
+ "operatingsystemrelease": [
30
+ "5",
31
+ "6",
32
+ "7"
33
+ ]
34
+ },
35
+ {
36
+ "operatingsystem": "Scientific",
37
+ "operatingsystemrelease": [
38
+ "5",
39
+ "6",
40
+ "7"
41
+ ]
42
+ },
43
+ {
44
+ "operatingsystem": "Debian",
45
+ "operatingsystemrelease": [
46
+ "6",
47
+ "7"
48
+ ]
49
+ },
50
+ {
51
+ "operatingsystem": "Ubuntu",
52
+ "operatingsystemrelease": [
53
+ "10.04",
54
+ "12.04",
55
+ "14.04"
56
+ ]
57
+ }
58
+ ],
59
+ "requirements": [
60
+ {
61
+ "name": "puppet",
62
+ "version_requirement": "3.x"
63
+ }
64
+ ],
65
+ "dependencies": [
66
+ {
67
+ "name": "puppetlabs/stdlib",
68
+ "version_requirement": "4.x"
69
+ },
70
+ {
71
+ "name": "puppetlabs/apt",
72
+ "version_requirement": ">=1.1.0 <2.0.0"
73
+ },
74
+ {
75
+ "name": "puppetlabs/concat",
76
+ "version_requirement": ">= 1.1.0 <2.0.0"
77
+ }
78
+ ]
79
+ }
@@ -0,0 +1,4 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
2
+ require 'metadata-json-lint/rake_task'
3
+ MetadataJsonLint.options.strict_license = false
4
+ MetadataJsonLint.options.fail_on_warnings = false
@@ -0,0 +1 @@
1
+ License identifier invalid_license is not in the SPDX list: http://spdx.org/licenses/
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "puppetlabs-postgresql",
3
+ "version": "3.4.1",
4
+ "author": "Inkling/Puppet Labs",
5
+ "summary": "PostgreSQL defined resource types",
6
+ "license": "invalid_license",
7
+ "source": "git://github.com/puppetlabs/puppet-postgresql.git",
8
+ "project_page": "https://github.com/puppetlabs/puppet-postgresql",
9
+ "issues_url": "https://github.com/puppetlabs/puppet-postgresql/issues",
10
+ "operatingsystem_support": [
11
+ {
12
+ "operatingsystem": "RedHat",
13
+ "operatingsystemrelease": [
14
+ "5",
15
+ "6",
16
+ "7"
17
+ ]
18
+ },
19
+ {
20
+ "operatingsystem": "CentOS",
21
+ "operatingsystemrelease": [
22
+ "5",
23
+ "6",
24
+ "7"
25
+ ]
26
+ },
27
+ {
28
+ "operatingsystem": "OracleLinux",
29
+ "operatingsystemrelease": [
30
+ "5",
31
+ "6",
32
+ "7"
33
+ ]
34
+ },
35
+ {
36
+ "operatingsystem": "Scientific",
37
+ "operatingsystemrelease": [
38
+ "5",
39
+ "6",
40
+ "7"
41
+ ]
42
+ },
43
+ {
44
+ "operatingsystem": "Debian",
45
+ "operatingsystemrelease": [
46
+ "6",
47
+ "7"
48
+ ]
49
+ },
50
+ {
51
+ "operatingsystem": "Ubuntu",
52
+ "operatingsystemrelease": [
53
+ "10.04",
54
+ "12.04",
55
+ "14.04"
56
+ ]
57
+ }
58
+ ],
59
+ "requirements": [
60
+ {
61
+ "name": "puppet",
62
+ "version_requirement": "3.x"
63
+ }
64
+ ],
65
+ "dependencies": [
66
+ {
67
+ "name": "puppetlabs/stdlib",
68
+ "version_requirement": "4.x"
69
+ },
70
+ {
71
+ "name": "puppetlabs/apt",
72
+ "version_requirement": ">=1.1.0 <2.0.0"
73
+ },
74
+ {
75
+ "name": "puppetlabs/concat",
76
+ "version_requirement": ">= 1.1.0 <2.0.0"
77
+ }
78
+ ]
79
+ }