raygatherer 0.1.0 → 0.3.0
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 +4 -4
- data/README.md +71 -18
- data/lib/raygatherer/api_client.rb +101 -27
- data/lib/raygatherer/cli.rb +39 -17
- data/lib/raygatherer/commands/alerts.rb +7 -12
- data/lib/raygatherer/commands/analysis/report.rb +77 -0
- data/lib/raygatherer/commands/analysis/run.rb +10 -7
- data/lib/raygatherer/commands/analysis/status.rb +1 -9
- data/lib/raygatherer/commands/base.rb +20 -1
- data/lib/raygatherer/commands/config/set.rb +1 -4
- data/lib/raygatherer/commands/config/show.rb +1 -9
- data/lib/raygatherer/commands/config/test_notification.rb +1 -4
- data/lib/raygatherer/commands/debug/display_state.rb +95 -0
- data/lib/raygatherer/commands/gps/set.rb +69 -0
- data/lib/raygatherer/commands/gps/show.rb +54 -0
- data/lib/raygatherer/commands/log.rb +38 -0
- data/lib/raygatherer/commands/recording/delete.rb +55 -11
- data/lib/raygatherer/commands/recording/download.rb +6 -9
- data/lib/raygatherer/commands/recording/list.rb +1 -9
- data/lib/raygatherer/commands/recording/start.rb +2 -5
- data/lib/raygatherer/commands/recording/stop.rb +2 -5
- data/lib/raygatherer/commands/stats.rb +4 -9
- data/lib/raygatherer/commands/time/show.rb +52 -0
- data/lib/raygatherer/commands/time/sync.rb +53 -0
- data/lib/raygatherer/commands/update/status.rb +62 -0
- data/lib/raygatherer/commands/wifi/scan.rb +54 -0
- data/lib/raygatherer/commands/wifi/show.rb +55 -0
- data/lib/raygatherer/formatters/{human.rb → alerts_human.rb} +1 -1
- data/lib/raygatherer/formatters/{json.rb → alerts_json.rb} +2 -2
- data/lib/raygatherer/formatters/analysis_report_human.rb +88 -0
- data/lib/raygatherer/formatters/analysis_report_json.rb +13 -0
- data/lib/raygatherer/formatters/config_human.rb +39 -2
- data/lib/raygatherer/formatters/gps_human.rb +13 -0
- data/lib/raygatherer/formatters/gps_json.rb +13 -0
- data/lib/raygatherer/formatters/recording_list_human.rb +6 -1
- data/lib/raygatherer/formatters/time_human.rb +15 -0
- data/lib/raygatherer/formatters/time_json.rb +13 -0
- data/lib/raygatherer/formatters/update_status_human.rb +25 -0
- data/lib/raygatherer/formatters/update_status_json.rb +13 -0
- data/lib/raygatherer/formatters/wifi_scan_human.rb +17 -0
- data/lib/raygatherer/formatters/wifi_scan_json.rb +13 -0
- data/lib/raygatherer/formatters/wifi_status_human.rb +19 -0
- data/lib/raygatherer/formatters/wifi_status_json.rb +13 -0
- data/lib/raygatherer/version.rb +6 -1
- data/lib/raygatherer.rb +24 -2
- metadata +41 -6
- data/CLAUDE.md +0 -102
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: raygatherer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Stallard
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '1.0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: bundler-audit
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0.9'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0.9'
|
|
40
54
|
description: 'Ruby CLI tool for interacting with Rayhunter, a cell tower analysis
|
|
41
55
|
device for detecting IMSI catchers and other cellular network anomalies. '
|
|
42
56
|
email:
|
|
@@ -47,7 +61,6 @@ extensions: []
|
|
|
47
61
|
extra_rdoc_files: []
|
|
48
62
|
files:
|
|
49
63
|
- ".rspec"
|
|
50
|
-
- CLAUDE.md
|
|
51
64
|
- CODE_OF_CONDUCT.md
|
|
52
65
|
- LICENSE.txt
|
|
53
66
|
- Makefile
|
|
@@ -58,30 +71,52 @@ files:
|
|
|
58
71
|
- lib/raygatherer/api_client.rb
|
|
59
72
|
- lib/raygatherer/cli.rb
|
|
60
73
|
- lib/raygatherer/commands/alerts.rb
|
|
74
|
+
- lib/raygatherer/commands/analysis/report.rb
|
|
61
75
|
- lib/raygatherer/commands/analysis/run.rb
|
|
62
76
|
- lib/raygatherer/commands/analysis/status.rb
|
|
63
77
|
- lib/raygatherer/commands/base.rb
|
|
64
78
|
- lib/raygatherer/commands/config/set.rb
|
|
65
79
|
- lib/raygatherer/commands/config/show.rb
|
|
66
80
|
- lib/raygatherer/commands/config/test_notification.rb
|
|
81
|
+
- lib/raygatherer/commands/debug/display_state.rb
|
|
82
|
+
- lib/raygatherer/commands/gps/set.rb
|
|
83
|
+
- lib/raygatherer/commands/gps/show.rb
|
|
84
|
+
- lib/raygatherer/commands/log.rb
|
|
67
85
|
- lib/raygatherer/commands/recording/delete.rb
|
|
68
86
|
- lib/raygatherer/commands/recording/download.rb
|
|
69
87
|
- lib/raygatherer/commands/recording/list.rb
|
|
70
88
|
- lib/raygatherer/commands/recording/start.rb
|
|
71
89
|
- lib/raygatherer/commands/recording/stop.rb
|
|
72
90
|
- lib/raygatherer/commands/stats.rb
|
|
91
|
+
- lib/raygatherer/commands/time/show.rb
|
|
92
|
+
- lib/raygatherer/commands/time/sync.rb
|
|
93
|
+
- lib/raygatherer/commands/update/status.rb
|
|
94
|
+
- lib/raygatherer/commands/wifi/scan.rb
|
|
95
|
+
- lib/raygatherer/commands/wifi/show.rb
|
|
73
96
|
- lib/raygatherer/config.rb
|
|
74
97
|
- lib/raygatherer/format_helpers.rb
|
|
98
|
+
- lib/raygatherer/formatters/alerts_human.rb
|
|
99
|
+
- lib/raygatherer/formatters/alerts_json.rb
|
|
100
|
+
- lib/raygatherer/formatters/analysis_report_human.rb
|
|
101
|
+
- lib/raygatherer/formatters/analysis_report_json.rb
|
|
75
102
|
- lib/raygatherer/formatters/analysis_status_human.rb
|
|
76
103
|
- lib/raygatherer/formatters/analysis_status_json.rb
|
|
77
104
|
- lib/raygatherer/formatters/config_human.rb
|
|
78
105
|
- lib/raygatherer/formatters/config_json.rb
|
|
79
|
-
- lib/raygatherer/formatters/
|
|
80
|
-
- lib/raygatherer/formatters/
|
|
106
|
+
- lib/raygatherer/formatters/gps_human.rb
|
|
107
|
+
- lib/raygatherer/formatters/gps_json.rb
|
|
81
108
|
- lib/raygatherer/formatters/recording_list_human.rb
|
|
82
109
|
- lib/raygatherer/formatters/recording_list_json.rb
|
|
83
110
|
- lib/raygatherer/formatters/stats_human.rb
|
|
84
111
|
- lib/raygatherer/formatters/stats_json.rb
|
|
112
|
+
- lib/raygatherer/formatters/time_human.rb
|
|
113
|
+
- lib/raygatherer/formatters/time_json.rb
|
|
114
|
+
- lib/raygatherer/formatters/update_status_human.rb
|
|
115
|
+
- lib/raygatherer/formatters/update_status_json.rb
|
|
116
|
+
- lib/raygatherer/formatters/wifi_scan_human.rb
|
|
117
|
+
- lib/raygatherer/formatters/wifi_scan_json.rb
|
|
118
|
+
- lib/raygatherer/formatters/wifi_status_human.rb
|
|
119
|
+
- lib/raygatherer/formatters/wifi_status_json.rb
|
|
85
120
|
- lib/raygatherer/spinner.rb
|
|
86
121
|
- lib/raygatherer/version.rb
|
|
87
122
|
homepage: https://github.com/mjstallard/raygatherer
|
|
@@ -98,14 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
98
133
|
requirements:
|
|
99
134
|
- - ">="
|
|
100
135
|
- !ruby/object:Gem::Version
|
|
101
|
-
version: 3.
|
|
136
|
+
version: 3.2.0
|
|
102
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
138
|
requirements:
|
|
104
139
|
- - ">="
|
|
105
140
|
- !ruby/object:Gem::Version
|
|
106
141
|
version: '0'
|
|
107
142
|
requirements: []
|
|
108
|
-
rubygems_version:
|
|
143
|
+
rubygems_version: 4.0.9
|
|
109
144
|
specification_version: 4
|
|
110
145
|
summary: CLI for fetching and displaying alerts from Rayhunter
|
|
111
146
|
test_files: []
|
data/CLAUDE.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# PROJECT OVERVIEW
|
|
2
|
-
|
|
3
|
-
Raygatherer: Ruby CLI for fetching and displaying alerts from Rayhunter (cell tower / IMSI catcher analysis device). Ruby >= 3.1.0.
|
|
4
|
-
|
|
5
|
-
# QUICK REFERENCE
|
|
6
|
-
|
|
7
|
-
- Run tests: `bundle exec rspec`
|
|
8
|
-
- Run CLI: `bundle exec ./exe/raygatherer`
|
|
9
|
-
- CI: GitHub Actions on push to master and all PRs
|
|
10
|
-
- `rayhunter` itself is checked out at `/Users/mike/workspace/rayhunter/`
|
|
11
|
-
|
|
12
|
-
# ARCHITECTURE
|
|
13
|
-
|
|
14
|
-
- Entry point: `exe/raygatherer` → `Raygatherer::CLI.run`
|
|
15
|
-
- CLI routing: `lib/raygatherer/cli.rb`
|
|
16
|
-
- Commands: `lib/raygatherer/commands/` (one class per subcommand)
|
|
17
|
-
- API client: `lib/raygatherer/api_client.rb` (HTTP + NDJSON parsing)
|
|
18
|
-
- Formatters: `lib/raygatherer/formatters/` (human and JSON, both accept arrays)
|
|
19
|
-
- Tests mirror `lib/` structure under `spec/`, plus `spec/integration/` for CLI end-to-end tests
|
|
20
|
-
|
|
21
|
-
# KEY CONVENTIONS
|
|
22
|
-
|
|
23
|
-
- Formatters always receive and return arrays (even when empty)
|
|
24
|
-
- JSON output is always a JSON array
|
|
25
|
-
- Exit codes encode alert severity for scripting use (see `show_help` in status.rb)
|
|
26
|
-
- Linter: `bundle exec standardrb` (Ruby Standard Style). Write new code in standardrb style to avoid rework.
|
|
27
|
-
|
|
28
|
-
# ROLE AND EXPERTISE
|
|
29
|
-
|
|
30
|
-
You are a senior software engineer who follows Kent Beck's Test-Driven Development (TDD) and Tidy First principles. Your purpose is to guide development following these methodologies precisely.
|
|
31
|
-
|
|
32
|
-
# CORE DEVELOPMENT PRINCIPLES
|
|
33
|
-
|
|
34
|
-
- Always follow the TDD cycle: Red → Green → Refactor
|
|
35
|
-
- Write the simplest failing test first
|
|
36
|
-
- Implement the minimum code needed to make tests pass
|
|
37
|
-
- Refactor only after tests are passing
|
|
38
|
-
- Follow Beck's "Tidy First" approach by separating structural changes from behavioral changes
|
|
39
|
-
- Maintain high code quality throughout development
|
|
40
|
-
|
|
41
|
-
# TDD METHODOLOGY GUIDANCE
|
|
42
|
-
|
|
43
|
-
- Start by writing a failing test that defines a small increment of functionality
|
|
44
|
-
- Use meaningful test names that describe behavior (e.g., "should sum two positive integers")
|
|
45
|
-
- Make test failures clear and informative
|
|
46
|
-
- Write just enough code to make the test pass - no more
|
|
47
|
-
- Once tests pass, consider if refactoring is needed
|
|
48
|
-
- Repeat the cycle for new functionality
|
|
49
|
-
- When fixing a defect, first write an API-level failing test then write the smallest possible test that replicates the problem then get both tests to pass.
|
|
50
|
-
|
|
51
|
-
# TIDY FIRST APPROACH
|
|
52
|
-
|
|
53
|
-
- Separate all changes into two distinct types:
|
|
54
|
-
1. STRUCTURAL CHANGES: Rearranging code without changing behavior (renaming, extracting methods, moving code)
|
|
55
|
-
2. BEHAVIORAL CHANGES: Adding or modifying actual functionality
|
|
56
|
-
- Never mix structural and behavioral changes in the same commit
|
|
57
|
-
- Always make structural changes first when both are needed
|
|
58
|
-
- Validate structural changes do not alter behavior by running tests before and after
|
|
59
|
-
|
|
60
|
-
# COMMIT DISCIPLINE
|
|
61
|
-
|
|
62
|
-
- Only commit when:
|
|
63
|
-
1. ALL tests are passing (`bundle exec rspec`)
|
|
64
|
-
2. ALL standardrb issues are resolved (`bundle exec standardrb`); fix any issues before committing
|
|
65
|
-
3. The change represents a single logical unit of work
|
|
66
|
-
4. Commit messages clearly state whether the commit contains structural or behavioral changes
|
|
67
|
-
- Use small, frequent commits rather than large, infrequent ones
|
|
68
|
-
|
|
69
|
-
# CODE QUALITY STANDARDS
|
|
70
|
-
|
|
71
|
-
- Eliminate duplication ruthlessly
|
|
72
|
-
- Express intent clearly through naming and structure
|
|
73
|
-
- Make dependencies explicit
|
|
74
|
-
- Keep methods small and focused on a single responsibility
|
|
75
|
-
- Minimize state and side effects
|
|
76
|
-
- Use the simplest solution that could possibly work
|
|
77
|
-
|
|
78
|
-
# REFACTORING GUIDELINES
|
|
79
|
-
|
|
80
|
-
- Refactor only when tests are passing (in the "Green" phase)
|
|
81
|
-
- Use established refactoring patterns with their proper names
|
|
82
|
-
- Make one refactoring change at a time
|
|
83
|
-
- Run tests after each refactoring step
|
|
84
|
-
- Prioritize refactorings that remove duplication or improve clarity
|
|
85
|
-
|
|
86
|
-
# EXAMPLE WORKFLOW
|
|
87
|
-
|
|
88
|
-
When approaching a new feature:
|
|
89
|
-
|
|
90
|
-
1. Write a simple failing test for a small part of the feature
|
|
91
|
-
2. Implement the bare minimum to make it pass
|
|
92
|
-
3. Run tests to confirm they pass (Green)
|
|
93
|
-
4. Run `bundle exec standardrb` and fix any issues
|
|
94
|
-
5. Make any necessary structural changes (Tidy First), running tests after each change
|
|
95
|
-
6. Commit structural changes separately
|
|
96
|
-
7. Add another test for the next small increment of functionality
|
|
97
|
-
8. Repeat until the feature is complete, committing behavioral changes separately from structural ones
|
|
98
|
-
|
|
99
|
-
Follow this process precisely, always prioritizing clean, well-tested code over quick implementation.
|
|
100
|
-
|
|
101
|
-
Always write one test at a time, make it run, then improve structure. Always run all the tests (except long-running tests) each time.
|
|
102
|
-
|