firespring_dev_commands 2.1.14 → 2.5.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83bb511b8d20db07b3d3f001d82464c9c3edf81a7a719206f4840878d1301ecd
|
4
|
+
data.tar.gz: 07545c8d8388f32658b09b1b4137f57d766456b1bc1e66696493b1e943330ae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67e6bf9497c126a6c00fb008d0341a7f1d8a1a792974fa7196d1c0a2eccf2e8beeb19485c9b4441f3c4e7eccd2a073fc82131ccccb900e77b3b1c8cba0faff0d
|
7
|
+
data.tar.gz: 45769e10d0434c05e2c87a0fcb545bb6d225839a7fbd9e951be26b6ffa6c6769e052118b30b6cef93d170ef2a74002f8ae80ed1300a944756030846e25d705f8
|
@@ -58,12 +58,9 @@ module Dev
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Build the command to fix any security vulnerabilities that were found
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
# audit_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
65
|
-
# audit_fix
|
66
|
-
# end
|
61
|
+
def audit_fix_command
|
62
|
+
raise 'not implemented'
|
63
|
+
end
|
67
64
|
|
68
65
|
# Build the php install command
|
69
66
|
def install_command
|
@@ -76,7 +73,7 @@ module Dev
|
|
76
73
|
# Build the php lint command
|
77
74
|
def lint_command
|
78
75
|
lint = base_command
|
79
|
-
lint << 'lint'
|
76
|
+
lint << 'run' << 'lint'
|
80
77
|
lint.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
81
78
|
lint
|
82
79
|
end
|
@@ -84,7 +81,7 @@ module Dev
|
|
84
81
|
# Build the php lint fix command
|
85
82
|
def lint_fix_command
|
86
83
|
lint_fix = base_command
|
87
|
-
lint_fix << 'lint-fix'
|
84
|
+
lint_fix << 'run' << 'lint-fix'
|
88
85
|
lint_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
89
86
|
lint_fix
|
90
87
|
end
|
@@ -92,18 +89,14 @@ module Dev
|
|
92
89
|
# Build the php test command
|
93
90
|
def test_command
|
94
91
|
test = []
|
95
|
-
test << '
|
92
|
+
test << 'run' << 'test'
|
96
93
|
test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
97
94
|
test
|
98
95
|
end
|
99
96
|
|
100
|
-
# Build the php
|
101
|
-
def
|
102
|
-
|
103
|
-
test << './vendor/bin/paratest'
|
104
|
-
test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
105
|
-
test << "-p#{processes}" << '--runner=WrapperRunner'
|
106
|
-
test
|
97
|
+
# Build the php test (with coverage) command
|
98
|
+
def test_coverage_command
|
99
|
+
raise 'not implemented'
|
107
100
|
end
|
108
101
|
end
|
109
102
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative '../../base_interface'
|
2
|
+
require 'securerandom'
|
2
3
|
|
3
4
|
module Dev
|
4
5
|
module Template
|
@@ -7,11 +8,15 @@ module Dev
|
|
7
8
|
module Php
|
8
9
|
# Class for default rake tasks associated with a php project
|
9
10
|
class Application < Dev::Template::ApplicationInterface
|
10
|
-
attr_reader :php
|
11
|
+
attr_reader :php, :siloed_tests
|
11
12
|
|
12
13
|
# Allow for custom container path for the application
|
13
|
-
def initialize(application, container_path: nil, local_path: nil, exclude: [])
|
14
|
+
def initialize(application, container_path: nil, local_path: nil, siloed_tests: nil, exclude: [])
|
14
15
|
@php = Dev::Php.new(container_path:, local_path:)
|
16
|
+
# TODO: Better name
|
17
|
+
# TODO: Should this apply to all or just tests?
|
18
|
+
@siloed_tests = siloed_tests
|
19
|
+
|
15
20
|
super(application, exclude:)
|
16
21
|
end
|
17
22
|
|
@@ -102,6 +107,7 @@ module Dev
|
|
102
107
|
def create_test_task!
|
103
108
|
application = @name
|
104
109
|
php = @php
|
110
|
+
siloed_tests = @siloed_tests
|
105
111
|
exclude = @exclude
|
106
112
|
return if exclude.include?(:test)
|
107
113
|
|
@@ -117,9 +123,13 @@ module Dev
|
|
117
123
|
task test: %w(init_docker up) do
|
118
124
|
LOG.debug("Running all php tests in the #{application} codebase")
|
119
125
|
|
126
|
+
project_name = nil
|
127
|
+
project_name = SecureRandom.hex if siloed_tests
|
128
|
+
|
120
129
|
options = []
|
121
130
|
options << '-T' if Dev::Common.new.running_codebuild?
|
122
|
-
Dev::Docker::Compose.new(services: application, options:).exec(*php.test_command)
|
131
|
+
Dev::Docker::Compose.new(project_name:, services: application, options:).exec(*php.test_command)
|
132
|
+
# TODO: Add clean if we are siloed
|
123
133
|
end
|
124
134
|
end
|
125
135
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0.pre.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -399,9 +399,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
399
399
|
version: '3.1'
|
400
400
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
401
401
|
requirements:
|
402
|
-
- - "
|
402
|
+
- - ">"
|
403
403
|
- !ruby/object:Gem::Version
|
404
|
-
version:
|
404
|
+
version: 1.3.1
|
405
405
|
requirements: []
|
406
406
|
rubygems_version: 3.4.10
|
407
407
|
signing_key:
|