neetob 0.4.16 → 0.4.19

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7414fac8281e783b4489c5bc5a947b8a1582a08f4ffafe9e2882ef319fceb9a3
4
- data.tar.gz: c71fadc32dac38b371fb9e0d14e45f26048ee69086bbf3b2303281aa766bb906
3
+ metadata.gz: a686396058b38413205dc3e15d5f991f80facb9cb07bb1054a620efc524e6264
4
+ data.tar.gz: b783015458e9441ba5b074cc8d5d11a81bddc75a7bfda3465b8bc844115e4378
5
5
  SHA512:
6
- metadata.gz: 32c0600faba419a7dc10064602e647bd5a87e2f19e156011a5bcf1965ec8ca4a036a6f8335160b1d5e7f3cb45a4086b69221d86bab6997b3294a5fd3e00d514a
7
- data.tar.gz: c569c9729f1651d55dcf1d1d36f8bc3236fc37ca32bfb1b03d96efba94c0cb621520ff7b37eb6e85cf956449428acb6f038ebc68b1a19a501900caf28bb480ed
6
+ metadata.gz: 716df0a02fd3063916d020787d93d432b07f679fa8b30e699295fe6bfae1143dab587114f3104a8776b78f63b28f01ebee21bdcac4252ebb098b4cdbb5eb178a
7
+ data.tar.gz: b7789ae6654b8935877501fb7e231d0bfc63264c8c260b0e41e900b148e6db5455a032f85a675f8dd6065901b2f0ca68d1fb7c6017db2831e988807bb1ed90a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetob (0.4.16)
4
+ neetob (0.4.19)
5
5
  brakeman (~> 5.0)
6
6
  chronic
7
7
  dotenv (~> 2.8.1)
@@ -35,9 +35,9 @@ GEM
35
35
  sidekiq-cron
36
36
  sidekiq-failures
37
37
  webmock
38
- neeto-compliance (1.1.8)
38
+ neeto-compliance (1.1.71)
39
39
  colorize
40
- deep_merge
40
+ hash-deep-merge
41
41
  hashdiff
42
42
  json (~> 2.6.2)
43
43
 
@@ -136,7 +136,6 @@ GEM
136
136
  activerecord (>= 5.a)
137
137
  database_cleaner-core (~> 2.0.0)
138
138
  database_cleaner-core (2.0.1)
139
- deep_merge (1.2.2)
140
139
  docile (1.4.0)
141
140
  dotenv (2.8.1)
142
141
  erubi (1.11.0)
@@ -156,7 +155,8 @@ GEM
156
155
  fury (0.0.1)
157
156
  globalid (1.0.1)
158
157
  activesupport (>= 5.0)
159
- hashdiff (1.0.1)
158
+ hash-deep-merge (0.1.1)
159
+ hashdiff (1.1.0)
160
160
  hashie (5.0.0)
161
161
  honeybadger (5.2.1)
162
162
  htmlentities (4.3.4)
data/README.md CHANGED
@@ -537,3 +537,4 @@ neetob local ls --dir public --apps "neeto-*-web"
537
537
  # List files in a nested directory
538
538
  neetob local ls --dir app/controllers --apps "neeto-*-web"
539
539
  ```
540
+
data/bookmarks.md CHANGED
@@ -6,31 +6,116 @@
6
6
 
7
7
  [Issues across repos in bigbinary excluding client repos](https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Abigbinary+archived%3Afalse+-repo%3Abigbinary%2Fjacky-winter-web+-repo%3Abigbinary%2Faceinvoice-web+-repo%3Abigbinary%2Ftrtle-rn+-repo%3Abigbinary%2Ftrtle-web+sort%3Acreated-asc+)
8
8
 
9
+ ## Project boards for Dec 18 deadline:
10
+ - [Unni's Board](https://github.com/orgs/bigbinary/projects/66) - [neetoAuth](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-auth-web%22),
11
+ [neetoDeploy](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-deploy-web%22),
12
+ [neetoCI](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-ci-web%22),
13
+ [neetoRecord](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-record-web%22%2C%22bigbinary%2Fneeto-record-chrome-extension%22+),
14
+ [neetoInvoice](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-invoice-web%22),
15
+ [Compliance & commons backend](https://github.com/orgs/bigbinary/projects/66/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-commons-backend%22+),
16
+ - [Sandip's Board](https://github.com/orgs/bigbinary/projects/56): [neeto-desk-web](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-desk-web%22),
17
+ [neeto-kb-web](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-kb-web%22),
18
+ [neeto-kb-eui](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-kb-eui%22),
19
+ [neeto-projects-nano](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-projects-nano%22),
20
+ [neeto-activities-nano](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-activities-nano%22),
21
+ [neeto-payments-nano](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-payments-nano%22),
22
+ [neeto-approvals-nano](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-approvals-nano%22),
23
+ [neeto-invite-links-engine](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-invite-links-engine%22),
24
+ [neeto-mail-interceptor](https://github.com/orgs/bigbinary/projects/56/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-mail-interceptor%22)
25
+ - [Akash's Board](https://github.com/orgs/bigbinary/projects/57/views/2):
26
+ [neeto-course-web](https://github.com/orgs/bigbinary/projects/57/views/2?filterQuery=repo%3A%22bigbinary%2Fneeto-course-web%22%2C%22bigbinary%2Fneeto-course-site%22%2C%22bigbinary%2Fneeto-course-page%22),
27
+ [neeto-quiz-web](https://github.com/orgs/bigbinary/projects/57/views/2?filterQuery=repo%3A%22bigbinary%2Fneeto-quiz-web%22),
28
+ [neeto-code-web](https://github.com/orgs/bigbinary/projects/57/views/2?filterQuery=repo%3A%22bigbinary%2Fneeto-code-web%22),
29
+ [neeto-email-notifications-nano](https://github.com/orgs/bigbinary/projects/57/views/2?filterQuery=repo%3A%22bigbinary%2Femail-notifications-nano%22),
30
+ [neeto-code-blocks](https://github.com/orgs/bigbinary/projects/57/views/2?filterQuery=repo%3A%22bigbinary%2Fneeto-code-blocks%22)
31
+ - [Subin's Board](https://github.com/orgs/bigbinary/projects/67/views/1):
32
+ [neeto-cal-web](https://github.com/orgs/bigbinary/projects/67/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-cal-web%22),
33
+ [neeto-webhooks-nano](https://github.com/orgs/bigbinary/projects/67/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-webhooks-nano%22),
34
+ - [Abhay's Board](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=):
35
+ [neeto-changelog-web](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-changelog-web%22),
36
+ [neeto-site-web](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-site-web%22%2C%22bigbinary%2Fneeto-site-blocks%22%2C%22bigbinary%2Fneeto-site-eui%22),
37
+ [neeto-engineering-web](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-engineering-web%22),
38
+ [neeto-wheel-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-wheel-nano%22),
39
+ [neeto-image-uploader-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-image-uploader%22),
40
+ [neeto-api-keys-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-api-keys%22),
41
+ [neeto-templates-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-templates-nano%22),
42
+ [neeto-filters-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-filters-nano%22),
43
+ [neeto-rules-nano](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-rules-nano%22),
44
+ [neeto-area51-engine](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-area51-engine%22),
45
+ [neeto-editor-engine](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-editor-engine%22),
46
+ [neeto-editor](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-editor%22),
47
+ [neetob](https://github.com/orgs/bigbinary/projects/64/views/1?filterQuery=repo%3A%22bigbinary%2Fneetob%22),
9
48
 
10
- ## Products checlist
49
+ - [Chirag's Board](https://github.com/orgs/bigbinary/projects/52/views/3):
50
+ [RN work](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-chat-rn%22%2C%22bigbinary%2Fneeto-invoice-rn%22%2C%22bigbinary%2Fneeto-desk-rn%22%2C%22bigbinary%2Fneeto-planner-rn%22%2C%22bigbinary%2Fneeto-form-rn%22%2C%22bigbinary%2Fneeto-cal-rn%22%2C%22bigbinary%2Fneeto-quiz-rn%22%2C%22bigbinary%2Fneeto-wheel-rn%22%2C%22bigbinary%2Fneeto-ui-rn%22%2C%22bigbinary%2Fneeto-commons-rn%22%2C%22bigbinary%2Fneeto-engineering-rn%22),
51
+ [neeto-form-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-form-web%22),
52
+ [neeto-crm-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-crm-web%22),
53
+ [neeto-engineering-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-engineering-web%22),
54
+ [neeto-testify-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-testify-web%22),
55
+ [neeto-chatify-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-chatify-web%22),
56
+ [neeto-tower-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-tower-web%22),
57
+ [neeto-notifications-web](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-notifications-web%22),
58
+ [neeto-message-templates-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-message-templates%22),
59
+ [neeto-fields-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-fields-nano%22),
60
+ [neeto-tags-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-tags-nano%22),
61
+ [neeto-team-members-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-team-members%22),
62
+ [neeto-form-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-form-nano%22),
63
+ [neeto-slack-nano](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-slack-nano%22),
64
+ [neeto-notifications-engine](https://github.com/orgs/bigbinary/projects/52/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-notifications-engine%22)
65
+
66
+ - [Amaljith's Board](https://github.com/orgs/bigbinary/projects/63/views/1):
67
+ [neeto-engineering-web](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-engineering-web%22),
68
+ [neeto-replay-web](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-replay-web%22),
69
+ [neeto-invisible-web](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-invisible-web%22),
70
+ [neeto-commons-frontend](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-commons-frontend%22),
71
+ [eslint-plugin-neeto](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Feslint-plugin-neeto%22),
72
+ [babel-preset-neeto](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fbabel-preset-neeto%22),
73
+ [neeto-replay-widget](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-replay-widget%22),
74
+ [neeto-invisible-chrome-extension](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-invisible-chrome%22),
75
+ [neeto-replay-lambda](https://github.com/orgs/bigbinary/projects/63/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-replay-lambda%22)
76
+ [neeto-base-widget](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-base-widget%22),
77
+
78
+ - [Yedhin's Board](https://github.com/orgs/bigbinary/projects/68/views/1):
79
+ [neeto-planner-web](https://github.com/orgs/bigbinary/projects/68/views/1?filterQuery=repo%3A%22bigbinary%2Fneeto-planner-web%22),
80
+
81
+ - [Ajmal's Board](https://github.com/orgs/bigbinary/projects/53/views/3):
82
+ [neeto-commons-frontend](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-commons-frontend%22),
83
+ [eslint-plugin-neeto](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Feslint-plugin-neeto%22),
84
+ [neeto-message-templates-nano](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-message-templates-nano%22),
85
+ [neeto-ui](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-ui%22),
86
+ [neeto-molecules](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-molecules%22),
87
+ [neeto-changelog-widget](https://github.com/orgs/bigbinary/projects/53/views/3?filterQuery=repo%3A%22bigbinary%2Fneeto-changelog-widget%22),
88
+
89
+ - [Praveen's Board](https://github.com/orgs/bigbinary/projects/65/views/1)
90
+
91
+ - [Varun's Board](https://github.com/orgs/bigbinary/projects/73/views/1)
92
+
93
+ ## Products checklist
11
94
 
12
95
  - [ ] neeto-auth-web
96
+ - [ ] neeto-form-web
97
+ - [ ] neeto-cal-web
13
98
  - [ ] neeto-chat-web
14
99
  - [ ] neeto-desk-web
15
100
  - [ ] neeto-kb-web
101
+ - [ ] neeto-replay-web
16
102
  - [ ] neeto-invoice-web
17
- - [ ] neeto-form-web
18
- - [ ] neeto-cal-web
19
103
  - [ ] neeto-planner-web
20
104
  - [ ] neeto-course-web
21
105
  - [ ] neeto-runner-web
22
- - [ ] neeto-social-web
23
106
  - [ ] neeto-wireframe-web
24
107
  - [ ] neeto-changelog-web
25
108
  - [ ] neeto-quiz-web
26
109
  - [ ] neeto-site-web
27
110
  - [ ] neeto-crm-web
28
- - [ ] neeto-replay-web
29
111
  - [ ] neeto-invisible-web
30
112
  - [ ] neeto-testify-web
31
113
  - [ ] neeto-deploy-web
32
- - [ ] neeto-bugtrap-web
33
- - [ ] neeto-sign-web
34
114
  - [ ] neeto-monitor-web
35
115
  - [ ] neeto-ci-web
36
116
  - [ ] neeto-git-web
117
+ - [ ] neeto-central-web
118
+ - [ ] neeto-record-web
119
+ - [ ] neeto-chatify-web
120
+ - [ ] neeto-tower-web
121
+ - [ ] neeto-trail-web
@@ -99,6 +99,51 @@
99
99
  "description": "Cypress tests have caught the bug.",
100
100
  "color": "FEF2C0"
101
101
  },
102
+ {
103
+ "name": "playwright-completed",
104
+ "description": "Playwright tests have finished running.",
105
+ "color": "c2d6d6"
106
+ },
107
+ {
108
+ "name": "playwright-flaky-test",
109
+ "description": "Fix Playwright flaky tests.",
110
+ "color": "c2d6d6"
111
+ },
112
+ {
113
+ "name": "playwright-happy-path-completed",
114
+ "description": "Playwright happy path tests have finished running.",
115
+ "color": "c2d6d6"
116
+ },
117
+ {
118
+ "name": "playwright-happy-path-run",
119
+ "description": "Run the Playwright tests with the tag happy-path.",
120
+ "color": "c2d6d6"
121
+ },
122
+ {
123
+ "name": "playwright-happy-path-triggered",
124
+ "description": "Playwright happy path tests have been triggered.",
125
+ "color": "c2d6d6"
126
+ },
127
+ {
128
+ "name": "playwright-needed",
129
+ "description": "Playwright tests need to be written.",
130
+ "color": "c2d6d6"
131
+ },
132
+ {
133
+ "name": "playwright-run",
134
+ "description": "Run the Playwright tests.",
135
+ "color": "c2d6d6"
136
+ },
137
+ {
138
+ "name": "playwright-triggered",
139
+ "description": "Playwright tests have been triggered.",
140
+ "color": "c2d6d6"
141
+ },
142
+ {
143
+ "name": "caught-by-playwright",
144
+ "description": "Playwright tests have caught the bug.",
145
+ "color": "c2d6d6"
146
+ },
102
147
  {
103
148
  "name": "documentation",
104
149
  "description": "Improvements or additions to documentation.",
@@ -108,7 +108,8 @@ module Neetob
108
108
  NeetoCompliance::NeetoRepos::electron_apps +
109
109
  NeetoCompliance::NeetoRepos::executables +
110
110
  NeetoCompliance::NeetoRepos::mobile_apps +
111
- NeetoCompliance::NeetoRepos::other_repos
111
+ NeetoCompliance::NeetoRepos::other_repos +
112
+ NeetoCompliance::NeetoRepos::nanos_mono_repos
112
113
  end
113
114
 
114
115
  def find_all_matching_gems(gems = ["*"])
@@ -21,7 +21,7 @@ module Neetob
21
21
  begin
22
22
  ui.info("\nWorking on repo #{repo}")
23
23
  clone_repo_in_tmp_dir(repo)
24
- bundle_install(repo)
24
+ bundle_install!(repo)
25
25
  report = run_brakeman(repo)
26
26
  ui.success("Successfully executed brakeman for #{repo}")
27
27
  warnings = report.split("\n\n== Warnings ==\n\n").last&.split("\n\n")
@@ -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!("bigbinary/#{gem}")
27
27
  build_gem(gem)
28
28
  release_gem(gem)
29
29
  if $?.success?
@@ -19,8 +19,8 @@ module Neetob
19
19
 
20
20
  private
21
21
 
22
- def bundle_install(repo, local_repo)
23
- `#{cd_to_repo(repo, local_repo)} && bundle install`
22
+ def bundle_install!(repo, local_repo)
23
+ execute_command!("#{cd_to_repo(repo, local_repo)} && bundle install")
24
24
  end
25
25
 
26
26
  def delete_and_create_temp_neetob_dir
@@ -32,17 +32,27 @@ module Neetob
32
32
  repo.split("/").last
33
33
  end
34
34
 
35
- def shallow_clone_repo_in_tmp_dir(repo)
36
- `git clone --quiet --depth 1 git@github.com:#{repo}.git /tmp/neetob/#{repo_name_without_org_suffix(repo)}`
35
+ def shallow_clone_repo_in_tmp_dir!(repo)
36
+ execute_command!(
37
+ "git clone --quiet --depth 1 git@github.com:#{repo}.git /tmp/neetob/#{repo_name_without_org_suffix(repo)}"
38
+ )
37
39
  end
38
40
 
39
41
  def clone_repo_in_tmp_dir(repo)
40
42
  `git clone --quiet git@github.com:#{repo}.git /tmp/neetob/#{repo_name_without_org_suffix(repo)}`
41
43
  end
42
44
 
43
- def add_commmit_and_push_changes(repo, local_repo = false)
44
- `#{cd_to_repo(repo, local_repo)} && git add . && \\
45
- git commit -m "#{pr_title}" && git push -u origin #{branch_name} --force`
45
+ def add_commmit_and_push_changes!(repo, local_repo = false)
46
+ create_commit!(repo, local_repo)
47
+ push_changes!(repo, local_repo)
48
+ end
49
+
50
+ def create_commit!(repo, local_repo)
51
+ execute_command!("#{cd_to_repo(repo, local_repo)} && git add . && git commit -m \"#{pr_title}\"")
52
+ end
53
+
54
+ def push_changes!(repo, local_repo)
55
+ execute_command!("#{cd_to_repo(repo, local_repo)} && git push -u origin #{branch_name} --force")
46
56
  end
47
57
 
48
58
  def delete_local_feature_branch(repo, local_repo = false)
@@ -94,6 +104,11 @@ module Neetob
94
104
  def warn_about_local_repos
95
105
  ui.say("The above mentioned command will be using the local repos. Local changes will be lost!\n")
96
106
  end
107
+
108
+ def execute_command!(command)
109
+ `#{command}`
110
+ raise Neetob::CommandExecutionError.new(command, $?.exitstatus) unless $?.success?
111
+ end
97
112
  end
98
113
  end
99
114
  end
@@ -37,11 +37,15 @@ module Neetob
37
37
  end
38
38
  stash_local_changes(repo, local)
39
39
  end
40
- shallow_clone_repo_in_tmp_dir(repo) if !local
40
+
41
+ shallow_clone_repo_in_tmp_dir!(repo) if !local
42
+
41
43
  check_and_delete_remote_branch(repo, local)
42
- bundle_install(repo, local)
44
+ bundle_install!(repo, local)
45
+
43
46
  fix_neeto_audit(repo, local)
44
- ui.info(add_commmit_and_push_changes(repo, local))
47
+ ui.info(add_commmit_and_push_changes!(repo, local))
48
+
45
49
  delete_local_feature_branch(repo, local)
46
50
  pull_request = client.create_pull_request(repo, "main", BRANCH_NAME, PR_TITLE)
47
51
  ui.success("PR created in \"#{repo}\" project successfully.")
@@ -41,11 +41,11 @@ module Neetob
41
41
  end
42
42
  stash_local_changes(repo, local)
43
43
  end
44
- shallow_clone_repo_in_tmp_dir(repo) if !local
44
+ shallow_clone_repo_in_tmp_dir!(repo) if !local
45
45
  check_and_delete_remote_branch(repo, local)
46
46
  update_script_file_permissions
47
47
  execute_script(repo, local)
48
- ui.info(add_commmit_and_push_changes(repo, local))
48
+ ui.info(add_commmit_and_push_changes!(repo, local))
49
49
  delete_local_feature_branch(repo, local)
50
50
  pull_request = client.create_pull_request(repo, "main", branch_name, pr_title, pr_description)
51
51
  ui.success("PR created in \"#{repo}\" project successfully.")
@@ -32,7 +32,7 @@ module Neetob
32
32
  find_and_replace_keyword(repo)
33
33
  ui.say("No changes were made to #{repo}, check if keyword exists.") and next if !are_changes_made?(repo)
34
34
 
35
- ui.info(add_commmit_and_push_changes(repo))
35
+ ui.info(add_commmit_and_push_changes!(repo))
36
36
  delete_local_feature_branch(repo)
37
37
  pull_request = client.create_pull_request(repo, "main", branch_name, pr_title)
38
38
  ui.success("Successfully replaced \"#{key_to_search}\" with \"#{replacement_term}\" in #{repo}")
@@ -20,19 +20,19 @@ module Neetob
20
20
 
21
21
  desc "list", "List all the users of the Heroku apps"
22
22
  def list
23
- List.new(options[:apps], options[:sandbox]).run
23
+ List.new(options[:apps], options[:sandbox]).process
24
24
  end
25
25
 
26
26
  desc "add", "Add new users to the Heroku apps"
27
27
  option :users, type: :array, required: true, desc: "Users' emails that need to be added to Heroku apps"
28
28
  def add
29
- Add.new(options[:apps], options[:users], options[:sandbox]).run
29
+ Add.new(options[:apps], options[:users], options[:sandbox]).process
30
30
  end
31
31
 
32
32
  desc "remove", "Remove the users from the Heroku apps"
33
33
  option :users, type: :array, required: true, desc: "Users' emails that need to be removed from the Heroku apps"
34
34
  def remove
35
- Remove.new(options[:apps], options[:users], options[:sandbox]).run
35
+ Remove.new(options[:apps], options[:users], options[:sandbox]).process
36
36
  end
37
37
  end
38
38
  end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../base"
4
+
5
+ module Neetob
6
+ class CLI
7
+ module Heroku
8
+ class Base < CLI::Base
9
+ NEETO_DEPLOY_DOCS = "https://github.com/bigbinary/neetob/#working-with-neetodeploy"
10
+
11
+ def initialize
12
+ super()
13
+
14
+ @staging_apps = []
15
+ end
16
+
17
+ def process(*args)
18
+ run(*args)
19
+
20
+ show_matching_staging_apps if @staging_apps.present?
21
+ end
22
+
23
+ private
24
+
25
+ def find_all_matching_apps_or_repos(*args)
26
+ apps_list = super(*args)
27
+
28
+ @staging_apps, production_apps = apps_list.partition { |app| app.include?("-web-staging") }
29
+
30
+ production_apps
31
+ end
32
+
33
+ def show_matching_staging_apps
34
+ ui.info(
35
+ "\n\nWe have migrated all the staging apps to neetoDeploy. \
36
+ \nGiven apps param matches the following app(s) which no longer exist in Heroku:\n\n")
37
+
38
+ @staging_apps.map do |app|
39
+ ui.info(" - #{app}")
40
+ end
41
+
42
+ ui.info("\nPlease find the corresponding command for neetodeploy: #{NEETO_DEPLOY_DOCS}")
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -14,7 +14,7 @@ module Neetob
14
14
  option :rails, type: :boolean, aliases: "-r", default: false, desc: "Use this flag to run the given command in the Rails console"
15
15
  option :apps, type: :array, aliases: "-a", required: true, desc: "Heroku app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
16
16
  def execute
17
- Execute.new(options[:apps], options[:command], options[:rails], options[:sandbox]).run
17
+ Execute.new(options[:apps], options[:command], options[:rails], options[:sandbox]).process
18
18
  end
19
19
 
20
20
  desc "config_vars", "Interact with the config(env) variables on Heroku apps"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../../base"
3
+ require_relative "../base"
4
4
 
5
5
  module Neetob
6
6
  class CLI
7
7
  module Heroku
8
8
  module ConfigVars
9
- class Base < CLI::Base
9
+ class Base < CLI::Heroku::Base
10
10
  attr_accessor :client
11
11
 
12
12
  def initialize
@@ -18,14 +18,14 @@ module Neetob
18
18
  option :keys, type: :array, desc: "Array of config vars that needs to be listed."
19
19
  option :path, type: :string, desc: "The JSON file path which has config vars that needs to be listed"
20
20
  def list
21
- List.new(options[:apps], options[:keys], options[:path], options[:sandbox]).run
21
+ List.new(options[:apps], options[:keys], options[:path], options[:sandbox]).process
22
22
  end
23
23
 
24
24
  desc "audit", "Verify whether config vars set in Heroku apps matches against the conditions specified in JSON file."
25
25
  option :apps, type: :array, aliases: :a, required: true, desc: "Heroku app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
26
26
  option :path, type: :string, desc: "The JSON file path from which config vars will be compared"
27
27
  def audit
28
- Audit.new(options[:apps], options[:path], options[:sandbox]).run
28
+ Audit.new(options[:apps], options[:path], options[:sandbox]).process
29
29
  end
30
30
 
31
31
  desc "upsert", "Update and insert the config vars in Heroku apps"
@@ -33,14 +33,14 @@ module Neetob
33
33
  option :path, type: :string, aliases: :p, desc: "The JSON file path from which config vars will be upserted"
34
34
  option :path_with_project_keys, type: :string, desc: "The JSON file path with the project names as the key containing required config vars for each project."
35
35
  def upsert
36
- Upsert.new(options[:apps], options[:path], options[:path_with_project_keys], options[:sandbox]).run
36
+ Upsert.new(options[:apps], options[:path], options[:path_with_project_keys], options[:sandbox]).process
37
37
  end
38
38
 
39
39
  desc "remove", "Remove the config vars from Heroku apps"
40
40
  option :apps, type: :array, aliases: :a, required: true, desc: "Heroku app names. Can be matched using the '*' wildcard. Example: \"neeto*\" \"neeto-cal-web-staging\""
41
41
  option :keys, type: :array, required: true, desc: "Array of config vars to be removed."
42
42
  def remove
43
- Remove.new(options[:apps], options[:keys], options[:sandbox]).run
43
+ Remove.new(options[:apps], options[:keys], options[:sandbox]).process
44
44
  end
45
45
  end
46
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neetob
4
- VERSION = "0.4.16"
4
+ VERSION = "0.4.19"
5
5
  end
data/lib/neetob.rb CHANGED
@@ -6,5 +6,10 @@ require_relative "neetob/exception_handler"
6
6
 
7
7
  module Neetob
8
8
  class Error < StandardError; end
9
- # Your code goes here...
9
+
10
+ class CommandExecutionError < Neetob::Error
11
+ def initialize(command, status_code)
12
+ super("Failed to execute: #{command} \nProcess terminated with status code: #{status_code}")
13
+ end
14
+ end
10
15
  end
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.4.16
4
+ version: 0.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Udai Gupta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-18 00:00:00.000000000 Z
11
+ date: 2023-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -187,6 +187,7 @@ files:
187
187
  - lib/neetob/cli/heroku/access/commands.rb
188
188
  - lib/neetob/cli/heroku/access/list.rb
189
189
  - lib/neetob/cli/heroku/access/remove.rb
190
+ - lib/neetob/cli/heroku/base.rb
190
191
  - lib/neetob/cli/heroku/commands.rb
191
192
  - lib/neetob/cli/heroku/config_vars/audit.rb
192
193
  - lib/neetob/cli/heroku/config_vars/base.rb