firespring_dev_commands 2.2.8.pre.alpha.1 → 2.5.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/firespring_dev_commands/audit/report.rb +2 -9
- data/lib/firespring_dev_commands/aws/account.rb +1 -1
- data/lib/firespring_dev_commands/aws/cloudformation.rb +3 -10
- data/lib/firespring_dev_commands/aws/login.rb +1 -1
- data/lib/firespring_dev_commands/common.rb +2 -22
- data/lib/firespring_dev_commands/docker/status.rb +0 -20
- data/lib/firespring_dev_commands/docker.rb +16 -86
- data/lib/firespring_dev_commands/eol/aws.rb +2 -10
- data/lib/firespring_dev_commands/eol.rb +2 -22
- data/lib/firespring_dev_commands/git.rb +24 -37
- data/lib/firespring_dev_commands/jira/issue.rb +1 -3
- data/lib/firespring_dev_commands/node.rb +1 -1
- data/lib/firespring_dev_commands/php/audit.rb +0 -4
- data/lib/firespring_dev_commands/php.rb +12 -28
- data/lib/firespring_dev_commands/platform.rb +31 -38
- data/lib/firespring_dev_commands/ruby.rb +3 -6
- data/lib/firespring_dev_commands/target_process/query.rb +4 -30
- data/lib/firespring_dev_commands/target_process/release.rb +1 -1
- data/lib/firespring_dev_commands/target_process/team_assignment.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user.rb +1 -13
- data/lib/firespring_dev_commands/target_process/user_story.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user_story_history.rb +1 -1
- data/lib/firespring_dev_commands/target_process.rb +7 -24
- data/lib/firespring_dev_commands/templates/aws.rb +6 -33
- data/lib/firespring_dev_commands/templates/base_interface.rb +2 -2
- data/lib/firespring_dev_commands/templates/ci.rb +11 -16
- data/lib/firespring_dev_commands/templates/docker/application.rb +2 -2
- data/lib/firespring_dev_commands/templates/docker/node/application.rb +5 -55
- data/lib/firespring_dev_commands/templates/docker/php/application.rb +16 -58
- data/lib/firespring_dev_commands/templates/docker/ruby/application.rb +5 -54
- data/lib/firespring_dev_commands/templates/eol.rb +2 -9
- data/lib/firespring_dev_commands/templates/git.rb +0 -165
- data/lib/firespring_dev_commands/version.rb +1 -1
- data/lib/firespring_dev_commands.rb +1 -1
- metadata +35 -125
- data/lib/firespring_dev_commands/aws/route53.rb +0 -177
- data/lib/firespring_dev_commands/bloom_growth/rock.rb +0 -34
- data/lib/firespring_dev_commands/bloom_growth/seat.rb +0 -16
- data/lib/firespring_dev_commands/bloom_growth/user.rb +0 -43
- data/lib/firespring_dev_commands/bloom_growth.rb +0 -132
- data/lib/firespring_dev_commands/certificate.rb +0 -59
- data/lib/firespring_dev_commands/coverage/base.rb +0 -16
- data/lib/firespring_dev_commands/coverage/cobertura.rb +0 -86
- data/lib/firespring_dev_commands/coverage/none.rb +0 -21
- data/lib/firespring_dev_commands/dns/resource.rb +0 -93
- data/lib/firespring_dev_commands/docker/desktop.rb +0 -61
- data/lib/firespring_dev_commands/eol/node.rb +0 -42
- data/lib/firespring_dev_commands/eol/php.rb +0 -50
- data/lib/firespring_dev_commands/eol/ruby.rb +0 -42
- data/lib/firespring_dev_commands/jira/parent.rb +0 -19
- data/lib/firespring_dev_commands/os.rb +0 -35
- data/lib/firespring_dev_commands/port.rb +0 -24
- data/lib/firespring_dev_commands/target_process/time.rb +0 -32
- data/lib/firespring_dev_commands/templates/aws/services/route53.rb +0 -130
- data/lib/firespring_dev_commands/templates/certificate.rb +0 -41
@@ -1,24 +0,0 @@
|
|
1
|
-
module Dev
|
2
|
-
# Class containing methods for actions to be taken on ports
|
3
|
-
class Port
|
4
|
-
attr_accessor :ip_address, :port
|
5
|
-
|
6
|
-
def initialize(ip_address, port)
|
7
|
-
@ip_address = ip_address
|
8
|
-
@port = port
|
9
|
-
end
|
10
|
-
|
11
|
-
# Returns true if the port is open
|
12
|
-
# Returns false otherwise
|
13
|
-
def open?(timeout = 1)
|
14
|
-
Timeout.timeout(timeout) do
|
15
|
-
TCPSocket.new(ip_address, port).close
|
16
|
-
return true
|
17
|
-
end
|
18
|
-
|
19
|
-
false
|
20
|
-
rescue Timeout::Error, Errno::ECONNREFUSED, Errno::EHOSTUNREACH
|
21
|
-
false
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module Dev
|
2
|
-
class TargetProcess
|
3
|
-
# The class to query time information from Target Process
|
4
|
-
class Time
|
5
|
-
# The resource type for the api endpoint
|
6
|
-
RESOURCE_TYPE = 'Time'.freeze
|
7
|
-
|
8
|
-
# The api path for time requests
|
9
|
-
PATH = '/Time'.freeze
|
10
|
-
|
11
|
-
attr_accessor :data, :id, :type, :description, :hours, :date, :story, :user
|
12
|
-
|
13
|
-
def initialize(data)
|
14
|
-
@data = data
|
15
|
-
@id = data['Id']
|
16
|
-
@type = data['ResourceType']
|
17
|
-
@description = data['Description']
|
18
|
-
@hours = data['Spent']
|
19
|
-
@date = parse_time(data['Date'])
|
20
|
-
@story = UserStory.new(data['Assignable']) if data['Assignable']
|
21
|
-
@user = User.new(data['User']) if data['User']
|
22
|
-
end
|
23
|
-
|
24
|
-
# Parse the dot net time representation into something that ruby can use
|
25
|
-
def parse_time(string)
|
26
|
-
return nil unless string && !string.empty?
|
27
|
-
|
28
|
-
::Time.at(string.slice(6, 10).to_i)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,130 +0,0 @@
|
|
1
|
-
require_relative '../../base_interface'
|
2
|
-
|
3
|
-
module Dev
|
4
|
-
module Template
|
5
|
-
class Aws
|
6
|
-
module Services
|
7
|
-
# Class contains rake templates for managing your AWS settings and logging in
|
8
|
-
class Route53 < Dev::Template::BaseInterface
|
9
|
-
def create_pretty_list_zone_details_task!
|
10
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
11
|
-
exclude = @exclude
|
12
|
-
|
13
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
14
|
-
return if exclude.include?(:list_details)
|
15
|
-
|
16
|
-
namespace :aws do
|
17
|
-
namespace :hosted_zone do
|
18
|
-
desc 'print details for all hosted zones'
|
19
|
-
task list_details: %w(ensure_aws_credentials) do
|
20
|
-
route53 = Dev::Aws::Route53.new(ENV['DOMAINS'].to_s.strip.split(','))
|
21
|
-
route53.command_line_details
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def create_json_list_zone_details_task!
|
29
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
30
|
-
exclude = @exclude
|
31
|
-
|
32
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
33
|
-
return if exclude.include?(:json_details)
|
34
|
-
|
35
|
-
namespace :aws do
|
36
|
-
namespace :hosted_zone do
|
37
|
-
desc 'print details for all hosted zones'
|
38
|
-
task json_details: %w(ensure_aws_credentials) do
|
39
|
-
route53 = Dev::Aws::Route53.new(ENV['DOMAINS'].to_s.strip.split(','))
|
40
|
-
route53.json_details
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
# Create the rake task for the hosted zone method
|
48
|
-
def create_dns_logging_activate_task!
|
49
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
50
|
-
exclude = @exclude
|
51
|
-
|
52
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
53
|
-
return if exclude.include?(:dns_logging_activate)
|
54
|
-
|
55
|
-
namespace :aws do
|
56
|
-
namespace :hosted_zone do
|
57
|
-
namespace :dns_logging do
|
58
|
-
desc 'Activates query logging for all hosted zones by default.' \
|
59
|
-
'This command should be run from the account the hosted zone(s) reside.' \
|
60
|
-
"\n\t(Required) Specify LOG_GROUP_ARN='arn:aws:logs:REGION:ACCOUNT_ID:' to specify the ARN of the target log group." \
|
61
|
-
"\n\toptionally specify DOMAINS='foo.com,foobar.com' to specify the hosted zones to activate." \
|
62
|
-
"\n\t\tComma delimited list."
|
63
|
-
task activate: %w(ensure_aws_credentials) do
|
64
|
-
route53 = Dev::Aws::Route53.new(ENV['DOMAINS'].to_s.strip.split(','))
|
65
|
-
# Use user defined log group.
|
66
|
-
log_group = ENV.fetch('LOG_GROUP_ARN', nil)
|
67
|
-
raise 'The Hosted Zone Log Group ARN, LOG_GROUP_ARN, is required' unless log_group
|
68
|
-
|
69
|
-
route53.activate_query_logging(log_group)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
# Create the rake task for the hosted zone method
|
78
|
-
def create_dns_logging_deactivate_task!
|
79
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
80
|
-
exclude = @exclude
|
81
|
-
|
82
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
83
|
-
return if exclude.include?(:dns_logging_deactivate)
|
84
|
-
|
85
|
-
namespace :aws do
|
86
|
-
namespace :hosted_zone do
|
87
|
-
namespace :dns_logging do
|
88
|
-
desc 'Deactivates query logging for all hosted zones by default. ' \
|
89
|
-
'This command should be run from the account the hosted zone(s) reside.' \
|
90
|
-
"\n\toptionally specify DOMAINS='foo.com,foobar.com' to specify the hosted zones to activate." \
|
91
|
-
"\n\t\tComma delimited list."
|
92
|
-
task deactivate: %w(ensure_aws_credentials) do
|
93
|
-
route53 = Dev::Aws::Route53.new(ENV['DOMAINS'].to_s.strip.split(','))
|
94
|
-
route53.deactivate_query_logging
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
# Create the rake task for the hosted zone method
|
103
|
-
def create_list_query_config_task!
|
104
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
105
|
-
exclude = @exclude
|
106
|
-
|
107
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
108
|
-
return if exclude.include?(:dns_logging_config)
|
109
|
-
|
110
|
-
namespace :aws do
|
111
|
-
namespace :hosted_zone do
|
112
|
-
namespace :dns_logging do
|
113
|
-
desc 'Lists the current config for domain(s). ' \
|
114
|
-
'This command should be run from the account the hosted zone(s) reside.' \
|
115
|
-
"\n\toptionally specify DOMAINS='foo.com,foobar.com' to specify the hosted zones to activate." \
|
116
|
-
"\n\t\tComma delimited list."
|
117
|
-
task list_query_configs: %w(ensure_aws_credentials) do
|
118
|
-
route53 = Dev::Aws::Route53.new(ENV['DOMAINS'].to_s.strip.split(','))
|
119
|
-
route53.list_query_configs
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require_relative 'base_interface'
|
2
|
-
|
3
|
-
module Dev
|
4
|
-
module Template
|
5
|
-
# Class contains rake templates for managing configured certificates
|
6
|
-
class Certificate < Dev::Template::BaseInterface
|
7
|
-
attr_reader :domains, :email, :paths
|
8
|
-
|
9
|
-
def initialize(domains, email:, paths:, exclude: [])
|
10
|
-
@domains = domains
|
11
|
-
@email = email
|
12
|
-
@paths = Array(paths)
|
13
|
-
|
14
|
-
super(exclude:)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Create the rake task for the generate method
|
18
|
-
def create_generate_task!
|
19
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
20
|
-
domains = @domains
|
21
|
-
email = @email
|
22
|
-
paths = @paths
|
23
|
-
exclude = @exclude
|
24
|
-
|
25
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
26
|
-
return if exclude.include?(:generate)
|
27
|
-
|
28
|
-
namespace :certificate do
|
29
|
-
desc 'Requests a new certificate for the configured domain using the route53 validation and deposits it in the configured paths'
|
30
|
-
task generate: %w(init_docker ensure_aws_credentials) do
|
31
|
-
Dev::Docker.new.pull_image('certbot/dns-route53', 'latest')
|
32
|
-
c = Dev::Certificate.new(domains, email)
|
33
|
-
c.request
|
34
|
-
paths.each { |path| c.save(path) }
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|