From cc341d57b74767ea7ce1f63af10ad0755243c6af Mon Sep 17 00:00:00 2001 From: Ross Buddie Date: Wed, 14 Jan 2026 22:40:30 +0000 Subject: [PATCH] [DD-1] update readme, remove references to grafantastic --- Makefile | 10 +++++----- README.md | 2 +- lib/diffdash.rb | 4 ++-- lib/diffdash/config.rb | 2 +- spec/diffdash/config_spec.rb | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 014a8ce..a763b83 100644 --- a/Makefile +++ b/Makefile @@ -2,15 +2,15 @@ # Generate dashboard JSON and print to stdout dashboard: - @bundle exec grafantastic + @bundle exec diffdash # Generate dashboard with verbose output dashboard-verbose: - @bundle exec grafantastic --verbose + @bundle exec diffdash --verbose # Dry run - generate JSON only, never upload dashboard-dry: - @bundle exec grafantastic --dry-run + @bundle exec diffdash --dry-run # Install dependencies install: @@ -30,8 +30,8 @@ clean: # Build the gem build: - @gem build grafantastic.gemspec + @gem build diffdash.gemspec # Install the gem locally install-gem: build - @gem install grafantastic-*.gem + @gem install diffdash-*.gem diff --git a/README.md b/README.md index f64429c..a2edab7 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Set these in a `.env` file in your project root: | `GRAFANA_URL` | Yes | Grafana instance URL (e.g., `https://myorg.grafana.net`) | | `GRAFANA_TOKEN` | Yes | Grafana API token (Service Account token with Editor role) | | `GRAFANA_FOLDER_ID` | No | Target folder ID for dashboards | -| `GRAFANTASTIC_DRY_RUN` | No | Set to `true` to force dry-run mode | +| `DIFFDASH_DRY_RUN` | No | Set to `true` to force dry-run mode | ## Output diff --git a/lib/diffdash.rb b/lib/diffdash.rb index 9795949..db40706 100644 --- a/lib/diffdash.rb +++ b/lib/diffdash.rb @@ -42,7 +42,7 @@ def self.run(args) def initialize(args) @args = args @config = Config.new - @dry_run = ENV["GRAFANTASTIC_DRY_RUN"] == "true" || args.include?("--dry-run") + @dry_run = ENV["DIFFDASH_DRY_RUN"] == "true" || args.include?("--dry-run") @help = args.include?("--help") || args.include?("-h") @verbose = args.include?("--verbose") || args.include?("-v") @subcommand = extract_subcommand(args) @@ -278,7 +278,7 @@ def print_help GRAFANA_URL Grafana instance URL (required) GRAFANA_TOKEN Grafana API token (required) GRAFANA_FOLDER_ID Target folder ID (optional) - GRAFANTASTIC_DRY_RUN Set to 'true' to force dry-run mode + DIFFDASH_DRY_RUN Set to 'true' to force dry-run mode Output: Prints valid Grafana dashboard JSON to STDOUT. diff --git a/lib/diffdash/config.rb b/lib/diffdash/config.rb index 64e3682..363c0c0 100644 --- a/lib/diffdash/config.rb +++ b/lib/diffdash/config.rb @@ -30,7 +30,7 @@ def grafana_folder_id end def dry_run? - ENV["GRAFANTASTIC_DRY_RUN"] == "true" + ENV["DIFFDASH_DRY_RUN"] == "true" end end end diff --git a/spec/diffdash/config_spec.rb b/spec/diffdash/config_spec.rb index 03c8b6b..544cfd5 100644 --- a/spec/diffdash/config_spec.rb +++ b/spec/diffdash/config_spec.rb @@ -48,18 +48,18 @@ end describe "#dry_run?" do - it "returns true when GRAFANTASTIC_DRY_RUN is 'true'" do - allow(ENV).to receive(:[]).with("GRAFANTASTIC_DRY_RUN").and_return("true") + it "returns true when DIFFDASH_DRY_RUN is 'true'" do + allow(ENV).to receive(:[]).with("DIFFDASH_DRY_RUN").and_return("true") expect(config.dry_run?).to be true end - it "returns false when GRAFANTASTIC_DRY_RUN is not 'true'" do - allow(ENV).to receive(:[]).with("GRAFANTASTIC_DRY_RUN").and_return("false") + it "returns false when DIFFDASH_DRY_RUN is not 'true'" do + allow(ENV).to receive(:[]).with("DIFFDASH_DRY_RUN").and_return("false") expect(config.dry_run?).to be false end - it "returns false when GRAFANTASTIC_DRY_RUN is not set" do - allow(ENV).to receive(:[]).with("GRAFANTASTIC_DRY_RUN").and_return(nil) + it "returns false when DIFFDASH_DRY_RUN is not set" do + allow(ENV).to receive(:[]).with("DIFFDASH_DRY_RUN").and_return(nil) expect(config.dry_run?).to be false end end