guard-yaml 0.0.1 → 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 250a62ac9b3e081dae2b6df22bea19f44ffc9fc1783719c726522533304bc7f4
4
+ data.tar.gz: 6b488ad05b053b5b8ba6b14888249deaefbad018739a4cebbba8afa97908f191
5
+ SHA512:
6
+ metadata.gz: 7843f9cfc69401580fe7b0851db9a0b3511e544e4ad40f3bd8ef4242dd61abe555fa7775e3c38f378ced2b2807dbf9bc2bbaec2a37e15cdebc0e11867b902ad9
7
+ data.tar.gz: dd40b2f3d1ebcfd590470ff8099d6c3e81af9f72c8165f2192c26833b0cfdea7f006fe44604acb87097c6a78f02300e7af75d399281631de47ff52b59d1f16f6
data/AGENTS.md ADDED
@@ -0,0 +1,6 @@
1
+ # AGENTS.md
2
+
3
+ - Run `bundle install` after changing dependencies.
4
+ - Run `bundle exec standardrb` and `bundle exec rake build` before submitting changes.
5
+ - Maintain compatibility with Ruby 3.1+ and Guard 2.x.
6
+ - Do not commit generated gems or `Gemfile.lock`.
data/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ <!-- CHANGELOG.md -->
2
+
3
+ # Changelog
4
+
5
+ All notable changes to guard-yaml will be documented in this file.
6
+
7
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
+
10
+ ## [Unreleased]
11
+
12
+ ## [0.1.0] - 2026-09-12
13
+
14
+ ### Added
15
+
16
+ - Added GitHub Actions CI for supported Ruby versions.
17
+ - Added automated version tagging and RubyGems releases using trusted publishing.
18
+ - Added a Minitest test suite.
19
+ - Added StandardRB formatting and linting.
20
+
21
+ ### Changed
22
+
23
+ - Modernized RubyGem packaging metadata and dependency declarations.
24
+
25
+ ### Fixed
26
+
27
+ - Updated the plugin to use the Guard 2 plugin API.
28
+
29
+ ## [0.0.1] - 2012-07-19
30
+
31
+ ### Added
32
+
33
+ - Initial Guard plugin for checking YAML syntax.
34
+
35
+ [Unreleased]: https://github.com/philtr/guard-yaml/compare/v0.1.0...HEAD
36
+ [0.1.0]: https://github.com/philtr/guard-yaml/compare/v0.0.1...v0.1.0
37
+ [0.0.1]: https://github.com/philtr/guard-yaml/tree/v0.0.1
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in guard-yaml.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -4,7 +4,7 @@ Checks your YAML syntax. That's all.
4
4
 
5
5
  ## Requirements
6
6
 
7
- * [Guard](https://github.com/guard/guard) >= 1.1
7
+ * [Guard](https://github.com/guard/guard) >= 2.18 and < 3
8
8
 
9
9
  ## Installation
10
10
 
@@ -24,3 +24,17 @@ And then execute:
24
24
  3. Commit your changes (`git commit -am 'Add some feature'`)
25
25
  4. Push to the branch (`git push origin my-new-feature`)
26
26
  5. Create new Pull Request
27
+
28
+ Run the test suite with:
29
+
30
+ bundle exec rake
31
+
32
+ ## Releasing
33
+
34
+ After CI passes on `master`, GitHub Actions checks the version in
35
+ `lib/guard/yaml/version.rb`. If its version tag does not exist, the workflow
36
+ creates the tag and publishes the gem to RubyGems.org.
37
+
38
+ No RubyGems API key is required. See the
39
+ [RubyGems trusted publishing guide](https://guides.rubygems.org/trusted-publishing/)
40
+ for setup details.
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new do |task|
5
+ task.libs << "lib" << "test"
6
+ task.pattern = "test/**/*_test.rb"
7
+ end
8
+
9
+ task default: :test
data/guard-yaml.gemspec CHANGED
@@ -1,22 +1,35 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'guard/yaml/version'
1
+ # guard-yaml.gemspec
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "lib/guard/yaml/version"
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "guard-yaml"
8
- gem.version = Guard::YamlVersion::VERSION
9
- gem.authors = ["Phillip Ridlen"]
10
- gem.email = ["phillip@ovenbits.com"]
11
- gem.description = %q{Checks your YAML syntax. That's all.}
12
- gem.summary = %q{You pass it a list of files to watch, it tries to parse them as YAML, and returns any errors that occurred while doing that.}
13
- gem.homepage = "https://github.com/philtr/guard-yaml"
7
+ gem.name = "guard-yaml"
8
+ gem.version = Guard::YamlVersion::VERSION
9
+ gem.authors = ["Phillip Ridlen", "Stan Carver II"]
10
+ gem.email = ["p@rdln.net", "howdy@stancarver.com"]
11
+ gem.summary = "Checks YAML syntax when watched files change"
12
+ gem.description = "A focused Guard plugin that parses watched YAML files and reports syntax errors."
13
+ gem.homepage = "https://github.com/philtr/guard-yaml#readme"
14
+ gem.license = "MIT"
15
+ gem.required_ruby_version = ">= 3.1"
14
16
 
15
- gem.add_dependency "guard", ">= 1.1"
16
- gem.add_development_dependency "bundler", "~> 1.1"
17
+ gem.metadata = {
18
+ "bug_tracker_uri" => "https://github.com/philtr/guard-yaml/issues",
19
+ "changelog_uri" => "https://github.com/philtr/guard-yaml/blob/master/CHANGELOG.md",
20
+ "homepage_uri" => gem.homepage,
21
+ "rubygems_mfa_required" => "true",
22
+ "source_code_uri" => "https://github.com/philtr/guard-yaml"
23
+ }
17
24
 
18
- gem.files = `git ls-files`.split($/)
19
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
25
+ gem.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject { |file| file.start_with?(".", "spec/", "test/") }
27
+ end
21
28
  gem.require_paths = ["lib"]
29
+
30
+ gem.add_dependency "guard", ">= 2.18", "< 3"
31
+
32
+ gem.add_development_dependency "rake", "~> 13.2"
33
+ gem.add_development_dependency "minitest", "~> 5.25"
34
+ gem.add_development_dependency "standard", "~> 1.0"
22
35
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module YamlVersion
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/guard/yaml.rb CHANGED
@@ -1,16 +1,14 @@
1
- require 'guard'
2
- require 'guard/guard'
1
+ require "guard/plugin"
3
2
  require "guard/yaml/version"
3
+ require "yaml"
4
4
 
5
5
  module Guard
6
- class Yaml < Guard
6
+ class Yaml < Plugin
7
7
  def run_on_changes(paths)
8
8
  paths.each do |path|
9
- begin
10
- YAML.load(File.open(path))
11
- rescue Psych::SyntaxError => e
12
- puts "#{e.class}: #{e.message}"
13
- end
9
+ YAML.load(File.open(path))
10
+ rescue Psych::SyntaxError => e
11
+ puts "#{e.class}: #{e.message}"
14
12
  end
15
13
  end
16
14
  end
metadata CHANGED
@@ -1,56 +1,88 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Phillip Ridlen
9
- autorequire:
8
+ - Stan Carver II
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-01 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: guard
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: '1.1'
19
+ version: '2.18'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3'
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '2.18'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '13.2'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
28
45
  - !ruby/object:Gem::Version
29
- version: '1.1'
46
+ version: '13.2'
30
47
  - !ruby/object:Gem::Dependency
31
- name: bundler
48
+ name: minitest
32
49
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
50
  requirements:
35
- - - ~>
51
+ - - "~>"
36
52
  - !ruby/object:Gem::Version
37
- version: '1.1'
53
+ version: '5.25'
38
54
  type: :development
39
55
  prerelease: false
40
56
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
57
  requirements:
43
- - - ~>
58
+ - - "~>"
44
59
  - !ruby/object:Gem::Version
45
- version: '1.1'
46
- description: Checks your YAML syntax. That's all.
60
+ version: '5.25'
61
+ - !ruby/object:Gem::Dependency
62
+ name: standard
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.0'
75
+ description: A focused Guard plugin that parses watched YAML files and reports syntax
76
+ errors.
47
77
  email:
48
- - phillip@ovenbits.com
78
+ - p@rdln.net
79
+ - howdy@stancarver.com
49
80
  executables: []
50
81
  extensions: []
51
82
  extra_rdoc_files: []
52
83
  files:
53
- - .gitignore
84
+ - AGENTS.md
85
+ - CHANGELOG.md
54
86
  - Gemfile
55
87
  - LICENSE.txt
56
88
  - README.md
@@ -59,30 +91,30 @@ files:
59
91
  - lib/guard/yaml.rb
60
92
  - lib/guard/yaml/templates/Guardfile
61
93
  - lib/guard/yaml/version.rb
62
- homepage: https://github.com/philtr/guard-yaml
63
- licenses: []
64
- post_install_message:
94
+ homepage: https://github.com/philtr/guard-yaml#readme
95
+ licenses:
96
+ - MIT
97
+ metadata:
98
+ bug_tracker_uri: https://github.com/philtr/guard-yaml/issues
99
+ changelog_uri: https://github.com/philtr/guard-yaml/blob/master/CHANGELOG.md
100
+ homepage_uri: https://github.com/philtr/guard-yaml#readme
101
+ rubygems_mfa_required: 'true'
102
+ source_code_uri: https://github.com/philtr/guard-yaml
65
103
  rdoc_options: []
66
104
  require_paths:
67
105
  - lib
68
106
  required_ruby_version: !ruby/object:Gem::Requirement
69
- none: false
70
107
  requirements:
71
- - - ! '>='
108
+ - - ">="
72
109
  - !ruby/object:Gem::Version
73
- version: '0'
110
+ version: '3.1'
74
111
  required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
112
  requirements:
77
- - - ! '>='
113
+ - - ">="
78
114
  - !ruby/object:Gem::Version
79
115
  version: '0'
80
116
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 1.8.24
83
- signing_key:
84
- specification_version: 3
85
- summary: You pass it a list of files to watch, it tries to parse them as YAML, and
86
- returns any errors that occurred while doing that.
117
+ rubygems_version: 4.0.16
118
+ specification_version: 4
119
+ summary: Checks YAML syntax when watched files change
87
120
  test_files: []
88
- has_rdoc:
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp