neetob 0.5.82 → 0.5.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of neetob might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1996f37f780eb41553d5920740bf180c0269c21b7f6582f78415712864e4e1bc
4
- data.tar.gz: 4284df33c8ae11ddb116f667cc0707abb25116fd6737c206929855a80f623378
3
+ metadata.gz: ce053bd591808eadf6b3645581888319f9149a31bfcc2e43cc249aa4913365ef
4
+ data.tar.gz: fb18a3ad6e08a637fa1beccbdefcb4135205006920e823c6b95939389721f69d
5
5
  SHA512:
6
- metadata.gz: cdb5e2356151b20bd811d52813ab83a203db5ca512921415aefcf7161140fda6bf22e263b7c598ac4098997023e1cdfe534eafeea2f4342f1ff010661462304d
7
- data.tar.gz: 51252dc49b3580e1e1d682d4edc35a55789fa9162fb8533aad705be5e21de844ce82bf1c14e8742e18dd36601231023ee9445503ddc880a81c0f33420c9c575b
6
+ metadata.gz: b5733c6f99ff936e6c47633ea6572735ce96f56f20ddd23bc18282c546d37cb9f8fa0bf49d375e31f857687c3ca46f14b38b1517988e3b5601d9eb5c1e72aa35
7
+ data.tar.gz: e7b8e7395acd121bb676388c818f8b831dc791c13c50423154e4a3ab0254546ddc3316a1e2c17e30308a50221dd98b23bbd8c92b7a22d92fdad967144a9815b1
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetob (0.5.82)
4
+ neetob (0.5.84)
5
5
  actionview
6
6
  activesupport
7
7
  brakeman (~> 5.0)
8
8
  chronic
9
+ csv
9
10
  dotenv (~> 2.8.1)
10
11
  launchy (~> 2.5.0)
11
12
  neeto-compliance
@@ -172,6 +173,7 @@ GEM
172
173
  unicode (>= 0.4.4.5)
173
174
  css_parser (1.21.0)
174
175
  addressable
176
+ csv (3.3.5)
175
177
  database_cleaner (2.1.0)
176
178
  database_cleaner-active_record (>= 2, < 3)
177
179
  database_cleaner-active_record (2.2.0)
data/README.md CHANGED
@@ -87,7 +87,7 @@ The commands within `neetob` should be used with caution, as improper usage may
87
87
 
88
88
  ## Source of truth
89
89
 
90
- This [list of repos](https://github.com/bigbinary/neeto-compliance/blob/main/data/neeto_repos.json) is used as the "source of truth".
90
+ This [list of repos](https://github.com/neetozone/neeto-compliance/blob/main/data/neeto_repos.json) is used as the "source of truth".
91
91
 
92
92
  ## Passing list of heroku apps as option
93
93
 
@@ -241,7 +241,7 @@ neetob github protect_branch --branch main --path ~/Desktop/branch-protection-ru
241
241
 
242
242
  We can also pass the value `all` to the option `--repos` with the above mentioned command so that the
243
243
  branch protection rules can be updated for
244
- all [neeto repos](https://github.com/bigbinary/neeto-compliance/blob/main/data/neeto_repos.json).
244
+ all [neeto repos](https://github.com/neetozone/neeto-compliance/blob/main/data/neeto_repos.json).
245
245
 
246
246
  ```sh
247
247
  neetob github protect_branch --branch main --path ~/Desktop/branch-protection-rules.json \
data/docs/development.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Clone the repository onto your system using the following command:
4
4
 
5
5
  ```sh
6
- git clone https://github.com/bigbinary/neetob.git
6
+ git clone https://github.com/neetozone/neetob.git
7
7
  ```
8
8
 
9
9
  Navigate to the root of the application directory.
data/docs/testing.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Testing instructions
2
2
 
3
- For testing `github` commands use - [neeto-dummy](https://github.com/bigbinary/neeto-dummy) repo.
3
+ For testing `github` commands use - [neeto-dummy](https://github.com/neetozone/neeto-dummy) repo.
4
4
 
5
5
  For testing `heroku` commands use - [neeto-dummy](https://dashboard.heroku.com/apps/neeto-dummy) app.
6
6
 
@@ -9,7 +9,7 @@ module Neetob
9
9
  class CLI::Base
10
10
  include Utils
11
11
 
12
- NEETO_APPS_LIST_LINK = "https://github.com/bigbinary/neeto-compliance/blob/main/data/neeto_repos.json#L2"
12
+ NEETO_APPS_LIST_LINK = "https://github.com/neetozone/neeto-compliance/blob/main/data/neeto_repos.json#L2"
13
13
 
14
14
  attr_reader :ui
15
15
 
@@ -142,7 +142,7 @@ module Neetob
142
142
  end
143
143
 
144
144
  def testing_apps(platform_name)
145
- [:heroku, :neetodeploy].include?(platform_name) ? ["neeto-dummy"] : ["bigbinary/neeto-dummy"]
145
+ [:heroku, :neetodeploy].include?(platform_name) ? ["neeto-dummy"] : ["neetozone/neeto-dummy"]
146
146
  end
147
147
 
148
148
  def inform_about_current_working_mode(sandbox_mode, quiet = false)
@@ -6,7 +6,7 @@ module Neetob
6
6
  class CLI
7
7
  module Cloudflare
8
8
  class Base < CLI::Base
9
- NEETO_DEPLOY_DOCS = "https://github.com/bigbinary/neetob/#working-with-neetodeploy"
9
+ NEETO_DEPLOY_DOCS = "https://github.com/neetozone/neetob/#working-with-neetodeploy"
10
10
 
11
11
  ZONE_IDS = {
12
12
  "neetoauth.com": "81ade5aa3e075489533f903dc03b1e88",
@@ -41,7 +41,7 @@ module Neetob
41
41
  end
42
42
 
43
43
  def clone_repo(repo_name)
44
- `git clone git@github.com:bigbinary/#{repo_name}.git`
44
+ `git clone git@github.com:neetozone/#{repo_name}.git`
45
45
  if $?.success?
46
46
  puts "------Done cloning #{repo_name}------"
47
47
  else
@@ -23,7 +23,7 @@ module Neetob
23
23
  matching_gems.each do |gem|
24
24
  ui.info("\nWorking on #{gem}\n")
25
25
  begin
26
- shallow_clone_repo_in_tmp_dir!("bigbinary/#{gem}")
26
+ shallow_clone_repo_in_tmp_dir!("neetozone/#{gem}")
27
27
  build_gem(gem)
28
28
  release_gem(gem)
29
29
  if $?.success?
@@ -7,7 +7,7 @@ module Neetob
7
7
  module Github
8
8
  module Issues
9
9
  class CreateProductSubIssues < Base
10
- SOURCE_REPO = "bigbinary/neeto-engineering-web"
10
+ SOURCE_REPO = "neetozone/neeto-engineering-web"
11
11
 
12
12
  def initialize(issue_number, sandbox = false)
13
13
  super()
@@ -10,7 +10,7 @@ module Neetob
10
10
  BRANCH_NAME = "neeto_compliance"
11
11
  PR_TITLE = "Neeto Compliance"
12
12
  REPO_SPECIFIC_COMMANDS_BEFORE_BUNDLE_INSTALL = {
13
- "bigbinary/neeto-deploy-web" => "sed -i '' '/gem \"karafka\"/d' Gemfile"
13
+ "neetozone/neeto-deploy-web" => "sed -i '' '/gem \"karafka\"/d' Gemfile"
14
14
  }
15
15
 
16
16
  attr_accessor :branch_name, :pr_title
@@ -49,7 +49,7 @@ module Neetob
49
49
  all_repos.map! do |repo_config|
50
50
  repo_config.is_a?(Hash) ? repo_config.to_a.map { |values| { values[0] => values[1] } } : repo_config
51
51
  end
52
- all_repos.flatten.map { |repo| (repo.is_a?(Hash) && repo.values[0].dig("semaphore")) ? "bigbinary/#{repo.keys[0]}" : nil }
52
+ all_repos.flatten.map { |repo| (repo.is_a?(Hash) && repo.values[0].dig("semaphore")) ? "neetozone/#{repo.keys[0]}" : nil }
53
53
  end
54
54
  end
55
55
  end
@@ -6,7 +6,7 @@ module Neetob
6
6
  class CLI
7
7
  module Heroku
8
8
  class Base < CLI::Base
9
- NEETO_DEPLOY_DOCS = "https://github.com/bigbinary/neetob/#working-with-neetodeploy"
9
+ NEETO_DEPLOY_DOCS = "https://github.com/neetozone/neetob/#working-with-neetodeploy"
10
10
 
11
11
  def initialize
12
12
  super()
@@ -10,7 +10,7 @@ class GithubIssueCreation < Neetob::CLI::Github::Base
10
10
  @helpers = Neetob::CLI::Github::Issues::Helpers.new
11
11
  end
12
12
 
13
- def create_issue(repo:, title:, description:, labels: "")
13
+ def create_issue(repo:, title:, description:, labels: "", assignee: nil)
14
14
  return if Thread.current[:skip_issue]
15
15
  return if repo.include?("bigbinary-website")
16
16
 
@@ -24,7 +24,7 @@ class GithubIssueCreation < Neetob::CLI::Github::Base
24
24
  # Close any existing issues of the same type
25
25
  close_existing_issues_of_same_type(repo_path, title)
26
26
 
27
- create_new_issue(repo_path, full_title, description, labels)
27
+ create_new_issue(repo_path, full_title, description, labels, assignee)
28
28
  end
29
29
 
30
30
  private
@@ -48,10 +48,10 @@ class GithubIssueCreation < Neetob::CLI::Github::Base
48
48
  end
49
49
  end
50
50
 
51
- def create_new_issue(repo_path, full_title, description, labels)
51
+ def create_new_issue(repo_path, full_title, description, labels, assignee_override = nil)
52
52
  issue_body = build_issue_body(full_title, description)
53
53
  repo_name = repo_path.split("/").last
54
- assignee = Neetob::CLI::Github::Repositories::TeamLeads.team_lead_for(repo_name)
54
+ assignee = assignee_override.presence || Neetob::CLI::Github::Repositories::TeamLeads.team_lead_for(repo_name)
55
55
 
56
56
  issue_options = { labels: }
57
57
  issue_options[:assignee] = assignee if assignee && assignee != "NO TL FOUND"
@@ -4,6 +4,7 @@ require_relative "neeto_deploy_or_heroku/main"
4
4
  require_relative "cloudflare/main"
5
5
  require_relative "cronitor/main"
6
6
  require_relative "honeybadger/main"
7
+ require_relative "neeto_status/main"
7
8
 
8
9
  module Neetob
9
10
  class CLI
@@ -32,6 +33,10 @@ module Neetob
32
33
  ui.success("## 3.3. Checking Honeybadger related configurations")
33
34
  ui.info "\n"
34
35
  Honeybadger::Main.new.run
36
+ ui.info "\n"
37
+ ui.success("## 3.4. Checking NeetoStatus")
38
+ ui.info "\n"
39
+ NeetoStatus::Main.new.run
35
40
  end
36
41
  end
37
42
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Neetob
4
+ class CLI
5
+ module MonthlyAudit
6
+ module InstancesAndAddons
7
+ module NeetoStatus
8
+ module Constants
9
+ ISSUE_REPO = "neeto-engineering-web"
10
+ ISSUE_ASSIGNEE = "VarunSriram99"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "up_and_has_neetocal_text"
4
+
5
+ module Neetob
6
+ class CLI
7
+ module MonthlyAudit
8
+ module InstancesAndAddons
9
+ module NeetoStatus
10
+ class Main < CLI::Base
11
+ def initialize
12
+ super()
13
+ end
14
+
15
+ def run
16
+ UpAndHasNeetocalText.new.run
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "net/http"
4
+ require "uri"
5
+ require_relative "../../github_issue_creation"
6
+ require_relative "constants"
7
+
8
+ module Neetob
9
+ class CLI
10
+ module MonthlyAudit
11
+ module InstancesAndAddons
12
+ module NeetoStatus
13
+ class UpAndHasNeetocalText < CLI::Base
14
+ NEETOSTATUS_URLS = [
15
+ "https://www.neetostatus.com",
16
+ "https://neetostatus.com"
17
+ ].freeze
18
+
19
+ REQUIRED_TEXT = "NeetoCal"
20
+
21
+ def initialize
22
+ super()
23
+ end
24
+
25
+ def run
26
+ ui.success "### 3.4.1. Checking whether NeetoStatus is up and shows #{REQUIRED_TEXT}"
27
+
28
+ table_data = [["URL", "Status", "Audit Passed"]]
29
+ failures = []
30
+ ui.info("\n", print_to_audit_log: false)
31
+
32
+ NEETOSTATUS_URLS.each do |url|
33
+ ui.info("Checking NeetoStatus for #{url}", print_to_audit_log: false)
34
+ status, audit_passed = check_url(url)
35
+ failures << { url:, status: } if audit_passed == "No"
36
+ table_data << [url, status, audit_passed]
37
+ end
38
+
39
+ if failures.any?
40
+ issue_url = create_failure_issue(failures)
41
+ table_data.each_with_index do |row, idx|
42
+ next if idx == 0
43
+
44
+ table_data[idx][2] = "#{row[2]} #{issue_url}" if row[2] == "No" && issue_url
45
+ end
46
+ end
47
+
48
+ ui.print_table(table_data)
49
+ end
50
+
51
+ private
52
+
53
+ def check_url(url)
54
+ response = fetch_with_redirect(url)
55
+ if response.is_a?(Net::HTTPSuccess)
56
+ if response.body.include?(REQUIRED_TEXT)
57
+ ["OK", "Yes"]
58
+ else
59
+ ["Missing #{REQUIRED_TEXT}", "No"]
60
+ end
61
+ else
62
+ status = response.is_a?(Net::HTTPResponse) ? "HTTP #{response.code}" : "Not up"
63
+ [status, "No"]
64
+ end
65
+ rescue StandardError => e
66
+ ["Error: #{e.message}", "No"]
67
+ end
68
+
69
+ def fetch_with_redirect(url_str, limit = 2)
70
+ raise ArgumentError, "redirect limit exceeded" if limit <= 0
71
+
72
+ uri = URI.parse(url_str)
73
+ response = Net::HTTP.get_response(uri)
74
+ if response.is_a?(Net::HTTPRedirection) && response["location"]
75
+ location = response["location"]
76
+ location = URI.join(uri, location).to_s
77
+ return fetch_with_redirect(location, limit - 1)
78
+ end
79
+ response
80
+ end
81
+
82
+ def create_failure_issue(failures)
83
+ description = failures.map do |f|
84
+ "#{f[:url]}: #{f[:status]}"
85
+ end.join("\n\n")
86
+ GithubIssueCreation.new.create_issue(
87
+ repo: Constants::ISSUE_REPO,
88
+ title: "NeetoStatus is down or does not show #{REQUIRED_TEXT}",
89
+ description:,
90
+ assignee: Constants::ISSUE_ASSIGNEE
91
+ )
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -60,7 +60,7 @@ module Neetob
60
60
  end
61
61
 
62
62
  def check_envs_neetodeploy(app)
63
- # TODO: Optimize once github.com/bigbinary/neeto-deploy-web/issues/3745 is done
63
+ # TODO: Optimize once github.com/neetozone/neeto-deploy-web/issues/3745 is done
64
64
  begin
65
65
  env_table = `bundle exec neetodeploy env list -a #{app}`
66
66
  json_parse_result = JSON.parse(env_table) rescue nil
@@ -105,7 +105,7 @@ module Neetob
105
105
  end
106
106
 
107
107
  def clean_repo_name(repo)
108
- repo.gsub("bigbinary/", "")
108
+ repo.gsub("neetozone/", "")
109
109
  end
110
110
 
111
111
  def invalid_email?(email)
@@ -67,7 +67,7 @@ module Neetob
67
67
  def html_table_row(app, commit_id, email, time, date, title)
68
68
  starting_7_characters_of_commit = commit_id[0..6]
69
69
  "<tr>
70
- <td class='commit'><a href='https://github.com/bigbinary/#{app}/commit/#{commit_id}'
70
+ <td class='commit'><a href='https://github.com/neetozone/#{app}/commit/#{commit_id}'
71
71
  target='_blank'>#{starting_7_characters_of_commit}</a></td>
72
72
  <td class='project'>#{app}</td>
73
73
  <td class='time'>#{time}</td>
@@ -36,7 +36,7 @@ module Neetob
36
36
  " Use \"neetob github login\" command to update or set the token.")
37
37
  when Octokit::Forbidden
38
38
  ui.error(
39
- "You don't have enough permissions to access 'bigbinary' organization."\
39
+ "You don't have enough permissions to access 'neetozone' organization."\
40
40
  " Please grant access to this org while authorizing via the browser.")
41
41
  when Errno::ENOENT
42
42
  ui.error(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neetob
4
- VERSION = "0.5.82"
4
+ VERSION = "0.5.84"
5
5
  end
data/neetob.gemspec CHANGED
@@ -10,13 +10,13 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "Provides a set of helper scripts for Github and Heroku."
12
12
  spec.description = "This gem gives different commands for interacting with Github and Heroku instances of existing neeto repos."
13
- spec.homepage = "https://github.com/bigbinary/neetob"
13
+ spec.homepage = "https://github.com/neetozone/neetob"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 3.1.3"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.com/bigbinary/neetob"
19
- spec.metadata["changelog_uri"] = "https://github.com/bigbinary/neetob/blob/main/CHANGELOG.md"
18
+ spec.metadata["source_code_uri"] = "https://github.com/neetozone/neetob"
19
+ spec.metadata["changelog_uri"] = "https://github.com/neetozone/neetob/blob/main/CHANGELOG.md"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
42
42
  spec.add_dependency "actionview" # for helpers
43
43
  spec.add_dependency "activesupport" # for helpers
44
44
  spec.add_dependency "pry" # for debugging
45
+ spec.add_dependency "csv" # required by httparty; extracted from stdlib in Ruby 3.4+
45
46
 
46
47
  # To add the files from submodules
47
48
  `git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neetob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.82
4
+ version: 0.5.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Udai Gupta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-09 00:00:00.000000000 Z
11
+ date: 2026-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: csv
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  description: This gem gives different commands for interacting with Github and Heroku
182
196
  instances of existing neeto repos.
183
197
  email:
@@ -312,6 +326,9 @@ files:
312
326
  - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy_or_heroku/main.rb
313
327
  - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy_or_heroku/scheduled_exports_enabled.rb
314
328
  - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_deploy_or_heroku/ssl_certificates_over_thirty_days_from_expiry.rb
329
+ - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_status/constants.rb
330
+ - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_status/main.rb
331
+ - lib/neetob/cli/monthly_audit/instances_and_addons/neeto_status/up_and_has_neetocal_text.rb
315
332
  - lib/neetob/cli/monthly_audit/misc/main.rb
316
333
  - lib/neetob/cli/monthly_audit/misc/redirections_working_correctly.rb
317
334
  - lib/neetob/cli/monthly_audit/misc/sparkpost_sub_account_used_for_all_apps.rb
@@ -375,13 +392,13 @@ files:
375
392
  - scripts/workflows/sparkpost.ts
376
393
  - tsconfig.json
377
394
  - yarn.lock
378
- homepage: https://github.com/bigbinary/neetob
395
+ homepage: https://github.com/neetozone/neetob
379
396
  licenses:
380
397
  - MIT
381
398
  metadata:
382
- homepage_uri: https://github.com/bigbinary/neetob
383
- source_code_uri: https://github.com/bigbinary/neetob
384
- changelog_uri: https://github.com/bigbinary/neetob/blob/main/CHANGELOG.md
399
+ homepage_uri: https://github.com/neetozone/neetob
400
+ source_code_uri: https://github.com/neetozone/neetob
401
+ changelog_uri: https://github.com/neetozone/neetob/blob/main/CHANGELOG.md
385
402
  post_install_message:
386
403
  rdoc_options: []
387
404
  require_paths: