ronin-core 0.1.0.beta1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -0
  3. data/.yardopts +1 -1
  4. data/README.md +2 -1
  5. data/gemspec.yml +1 -1
  6. data/lib/ronin/core/class_registry.rb +3 -3
  7. data/lib/ronin/core/cli/command.rb +1 -1
  8. data/lib/ronin/core/cli/command_shell/command.rb +1 -1
  9. data/lib/ronin/core/cli/command_shell.rb +2 -2
  10. data/lib/ronin/core/cli/generator/options/author.rb +1 -1
  11. data/lib/ronin/core/cli/generator/options/description.rb +1 -1
  12. data/lib/ronin/core/cli/generator/options/reference.rb +1 -1
  13. data/lib/ronin/core/cli/generator/options/summary.rb +1 -1
  14. data/lib/ronin/core/cli/generator.rb +1 -1
  15. data/lib/ronin/core/cli/logging.rb +1 -1
  16. data/lib/ronin/core/cli/options/param.rb +1 -1
  17. data/lib/ronin/core/cli/options/values/arches.rb +1 -1
  18. data/lib/ronin/core/cli/options/values/oses.rb +1 -1
  19. data/lib/ronin/core/cli/printing/arch.rb +1 -1
  20. data/lib/ronin/core/cli/printing/metadata.rb +2 -2
  21. data/lib/ronin/core/cli/printing/os.rb +1 -1
  22. data/lib/ronin/core/cli/printing/params.rb +1 -1
  23. data/lib/ronin/core/cli/ruby_shell.rb +1 -1
  24. data/lib/ronin/core/cli/shell.rb +2 -2
  25. data/lib/ronin/core/git.rb +1 -1
  26. data/lib/ronin/core/home.rb +1 -1
  27. data/lib/ronin/core/metadata/authors/author.rb +1 -1
  28. data/lib/ronin/core/metadata/authors.rb +1 -1
  29. data/lib/ronin/core/metadata/description.rb +1 -1
  30. data/lib/ronin/core/metadata/id.rb +1 -1
  31. data/lib/ronin/core/metadata/references.rb +1 -1
  32. data/lib/ronin/core/metadata/summary.rb +1 -1
  33. data/lib/ronin/core/metadata/version.rb +1 -1
  34. data/lib/ronin/core/params/exceptions.rb +1 -1
  35. data/lib/ronin/core/params/mixin.rb +2 -2
  36. data/lib/ronin/core/params/param.rb +2 -2
  37. data/lib/ronin/core/params/types/boolean.rb +1 -1
  38. data/lib/ronin/core/params/types/enum.rb +1 -1
  39. data/lib/ronin/core/params/types/float.rb +1 -1
  40. data/lib/ronin/core/params/types/integer.rb +1 -1
  41. data/lib/ronin/core/params/types/numeric.rb +1 -1
  42. data/lib/ronin/core/params/types/regexp.rb +1 -1
  43. data/lib/ronin/core/params/types/string.rb +1 -1
  44. data/lib/ronin/core/params/types/type.rb +1 -1
  45. data/lib/ronin/core/params/types/uri.rb +1 -1
  46. data/lib/ronin/core/params/types.rb +1 -1
  47. data/lib/ronin/core/params.rb +1 -1
  48. data/lib/ronin/core/version.rb +2 -2
  49. data/ronin-core.gemspec +2 -1
  50. metadata +4 -90
  51. data/spec/class_registry_spec.rb +0 -224
  52. data/spec/cli/command_shell/command_spec.rb +0 -113
  53. data/spec/cli/command_shell_spec.rb +0 -1114
  54. data/spec/cli/command_spec.rb +0 -16
  55. data/spec/cli/fixtures/irb_command +0 -8
  56. data/spec/cli/fixtures/template/dir/file1.txt +0 -1
  57. data/spec/cli/fixtures/template/dir/file2.txt +0 -1
  58. data/spec/cli/fixtures/template/file.erb +0 -1
  59. data/spec/cli/fixtures/template/file.txt +0 -1
  60. data/spec/cli/generator/options/author_spec.rb +0 -121
  61. data/spec/cli/generator/options/description_spec.rb +0 -45
  62. data/spec/cli/generator/options/reference_spec.rb +0 -53
  63. data/spec/cli/generator/options/summary_spec.rb +0 -45
  64. data/spec/cli/generator_spec.rb +0 -244
  65. data/spec/cli/logging_spec.rb +0 -95
  66. data/spec/cli/options/param_spec.rb +0 -67
  67. data/spec/cli/options/values/arches_spec.rb +0 -62
  68. data/spec/cli/printing/arch_spec.rb +0 -130
  69. data/spec/cli/printing/metadata_spec.rb +0 -211
  70. data/spec/cli/printing/os_spec.rb +0 -64
  71. data/spec/cli/printing/params_spec.rb +0 -63
  72. data/spec/cli/ruby_shell.rb +0 -99
  73. data/spec/cli/shell_spec.rb +0 -211
  74. data/spec/fixtures/example_class_registry/base_class.rb +0 -9
  75. data/spec/fixtures/example_class_registry/classes/loaded_class.rb +0 -9
  76. data/spec/fixtures/example_class_registry/classes/name_mismatch.rb +0 -9
  77. data/spec/fixtures/example_class_registry/classes/no_module.rb +0 -4
  78. data/spec/fixtures/example_class_registry.rb +0 -8
  79. data/spec/git_spec.rb +0 -58
  80. data/spec/home_spec.rb +0 -64
  81. data/spec/metadata/authors/author_spec.rb +0 -335
  82. data/spec/metadata/authors_spec.rb +0 -126
  83. data/spec/metadata/description_spec.rb +0 -74
  84. data/spec/metadata/id_spec.rb +0 -92
  85. data/spec/metadata/references_spec.rb +0 -100
  86. data/spec/metadata/summary_spec.rb +0 -74
  87. data/spec/metadata/version_spec.rb +0 -72
  88. data/spec/params/mixin_spec.rb +0 -484
  89. data/spec/params/param_spec.rb +0 -164
  90. data/spec/params/types/boolean_spec.rb +0 -56
  91. data/spec/params/types/enum_spec.rb +0 -94
  92. data/spec/params/types/float_spec.rb +0 -107
  93. data/spec/params/types/integer_spec.rb +0 -155
  94. data/spec/params/types/numeric_spec.rb +0 -138
  95. data/spec/params/types/regexp_spec.rb +0 -64
  96. data/spec/params/types/string_spec.rb +0 -174
  97. data/spec/params/types/type_spec.rb +0 -14
  98. data/spec/params/types/uri_spec.rb +0 -62
  99. data/spec/spec_helper.rb +0 -11
@@ -1,100 +0,0 @@
1
- require 'spec_helper'
2
- require 'ronin/core/metadata/references'
3
-
4
- describe Ronin::Core::Metadata::References do
5
- describe ".references" do
6
- subject { test_class }
7
-
8
- context "and when references is not set in the class" do
9
- module TestMetadataReferences
10
- class WithNoReferencesSet
11
- include Ronin::Core::Metadata::References
12
- end
13
- end
14
-
15
- let(:test_class) { TestMetadataReferences::WithNoReferencesSet }
16
-
17
- it "must default to []" do
18
- expect(subject.references).to eq([])
19
- end
20
- end
21
-
22
- context "and when references is set in the class" do
23
- module TestMetadataReferences
24
- class WithReferencesSet
25
- include Ronin::Core::Metadata::References
26
-
27
- references [
28
- 'https://example.com/link1',
29
- 'https://example.com/link2'
30
- ]
31
- end
32
- end
33
-
34
- let(:test_class) { TestMetadataReferences::WithReferencesSet }
35
-
36
- it "must return the set references" do
37
- expect(subject.references).to eq(
38
- [
39
- 'https://example.com/link1',
40
- 'https://example.com/link2'
41
- ]
42
- )
43
- end
44
- end
45
-
46
- context "but when the references was set in the superclass" do
47
- module TestMetadataReferences
48
- class InheritsItsReferences < WithReferencesSet
49
- include Ronin::Core::Metadata::References
50
- end
51
- end
52
-
53
- let(:test_class) { TestMetadataReferences::InheritsItsReferences }
54
-
55
- it "must return the references set in the superclass" do
56
- expect(subject.references).to eq(
57
- [
58
- 'https://example.com/link1',
59
- 'https://example.com/link2'
60
- ]
61
- )
62
- end
63
-
64
- context "but the references is overridden in the sub-class" do
65
- module TestMetadataReferences
66
- class OverridesItsInheritedReferences < WithReferencesSet
67
- include Ronin::Core::Metadata::References
68
-
69
- references [
70
- 'https://example.com/link3'
71
- ]
72
- end
73
- end
74
-
75
- let(:test_class) do
76
- TestMetadataReferences::OverridesItsInheritedReferences
77
- end
78
-
79
- it "must return the references in the sub-class and the superclass" do
80
- expect(subject.references).to eq(
81
- [
82
- 'https://example.com/link1',
83
- 'https://example.com/link2',
84
- 'https://example.com/link3'
85
- ]
86
- )
87
- end
88
-
89
- it "must not modify the superclass'es references" do
90
- expect(subject.superclass.references).to eq(
91
- [
92
- 'https://example.com/link1',
93
- 'https://example.com/link2'
94
- ]
95
- )
96
- end
97
- end
98
- end
99
- end
100
- end
@@ -1,74 +0,0 @@
1
- require 'spec_helper'
2
- require 'ronin/core/metadata/summary'
3
-
4
- describe Ronin::Core::Metadata::Summary do
5
- describe ".summary" do
6
- subject { test_class }
7
-
8
- context "and when summary is not set in the class" do
9
- module TestMetadataSummary
10
- class WithNoSummarySet
11
- include Ronin::Core::Metadata::Summary
12
- end
13
- end
14
-
15
- let(:test_class) { TestMetadataSummary::WithNoSummarySet }
16
-
17
- it "must default to nil" do
18
- expect(subject.summary).to be(nil)
19
- end
20
- end
21
-
22
- context "and when summary is set in the class" do
23
- module TestMetadataSummary
24
- class WithSummarySet
25
- include Ronin::Core::Metadata::Summary
26
-
27
- summary 'test'
28
- end
29
- end
30
-
31
- let(:test_class) { TestMetadataSummary::WithSummarySet }
32
-
33
- it "must return the set summary" do
34
- expect(subject.summary).to eq("test")
35
- end
36
- end
37
-
38
- context "but when the summary was set in the superclass" do
39
- module TestMetadataSummary
40
- class InheritsItsSummary < WithSummarySet
41
- include Ronin::Core::Metadata::Summary
42
- end
43
- end
44
-
45
- let(:test_class) { TestMetadataSummary::InheritsItsSummary }
46
-
47
- it "must return the summary set in the superclass" do
48
- expect(subject.summary).to eq("test")
49
- end
50
-
51
- context "but the summary is overridden in the sub-class" do
52
- module TestMetadataSummary
53
- class OverridesItsInheritedSummary < WithSummarySet
54
- include Ronin::Core::Metadata::Summary
55
-
56
- summary "test2"
57
- end
58
- end
59
-
60
- let(:test_class) do
61
- TestMetadataSummary::OverridesItsInheritedSummary
62
- end
63
-
64
- it "must return the summary set in the sub-class" do
65
- expect(subject.summary).to eq("test2")
66
- end
67
-
68
- it "must not modify the superclass'es summary" do
69
- expect(subject.superclass.summary).to eq('test')
70
- end
71
- end
72
- end
73
- end
74
- end
@@ -1,72 +0,0 @@
1
- require 'spec_helper'
2
- require 'ronin/core/metadata/version'
3
-
4
- describe Ronin::Core::Metadata::Version do
5
- module TestMetadataVersion
6
- class WithNoVersionSet
7
- include Ronin::Core::Metadata::Version
8
- end
9
-
10
- class WithVersionSet
11
- include Ronin::Core::Metadata::Version
12
-
13
- version '0.1'
14
- end
15
- end
16
-
17
- describe ".version" do
18
- subject { test_class }
19
-
20
- context "and when version is not set in the class" do
21
- let(:test_class) { TestMetadataVersion::WithNoVersionSet }
22
-
23
- it "must default to nil" do
24
- expect(subject.version).to be(nil)
25
- end
26
- end
27
-
28
- context "and when version is set in the class" do
29
- let(:test_class) { TestMetadataVersion::WithVersionSet }
30
-
31
- it "must return the set version" do
32
- expect(subject.version).to eq("0.1")
33
- end
34
- end
35
-
36
- context "but when the version was set in the superclass" do
37
- module TestMetadataVersion
38
- class InheritsItsVersion < WithVersionSet
39
- include Ronin::Core::Metadata::Version
40
- end
41
- end
42
-
43
- let(:test_class) { TestMetadataVersion::InheritsItsVersion }
44
-
45
- it "must return nil" do
46
- expect(subject.version).to be(nil)
47
- end
48
-
49
- context "but the version is overrversionden in the sub-class" do
50
- module TestMetadataVersion
51
- class OverrversionesItsInheritedVersion < WithVersionSet
52
- include Ronin::Core::Metadata::Version
53
-
54
- version '0.2'
55
- end
56
- end
57
-
58
- let(:test_class) do
59
- TestMetadataVersion::OverrversionesItsInheritedVersion
60
- end
61
-
62
- it "must return the version set in the sub-class" do
63
- expect(subject.version).to eq("0.2")
64
- end
65
-
66
- it "must not modify the superclass'es version" do
67
- expect(subject.superclass.version).to eq('0.1')
68
- end
69
- end
70
- end
71
- end
72
- end