this_is_ruby 0.2.0 → 0.2.1

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: 70cb32fbaddf28dbdae4e21b4b8e009fbda116b02c967ddf08b9618db5df4a0c
4
- data.tar.gz: fe332fb48d5d355a59cb13b7ff1efe4aa403f2ed031aaa5e7f66924bd179bb62
3
+ metadata.gz: bff23b66de82379dceeca467cd82002a835bb61bd1baa375f9ffa9e4ac3b4472
4
+ data.tar.gz: c4da4c93d536106e2f1219b9f64745e66d7f1ea3e131d9f63e33528e553d3158
5
5
  SHA512:
6
- metadata.gz: 71f21c362ac2d542b6329f3082dd6de70b6f6b37d2c78c00a0a334ba371d20b76093673f23cb18bd5d9b86838c6c1647d4cf0527fc29f474794dbfc04d783a48
7
- data.tar.gz: 28d66d7abd69c80304bc01ee5c848cbc35b918854c014dd81b38ed859a4e9dc985c00834a954b3a171b3a4ee88ded33794862c1a860350efc522fd3d9ff916e6
6
+ metadata.gz: 76512697bf98d76e819adf43b873c7c9a94d3b74aad80776d1fde073b88306b973546fa05ee7150dac80d797b7ddb675fa3203e9e5ea448729a6825c83c27c28
7
+ data.tar.gz: bfe3b0b9c49b7231e344fdcc4a1854855ba52dfd0b18ce7f042dc74e1a308e4c0ec3c86eeba84940036592e146a1c399c7cc134bc8c992d19029fed81827c7a8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ - The managed block is now just the patterns between its two markers, down from
6
+ 16 lines to 8. The preamble was the block explaining itself on top of a marker
7
+ that already names the gem, and the per-group comments repeated what the
8
+ report says at more length. `check` reports the file as out of date once after
9
+ upgrading; re-running writes the shorter block.
10
+
3
11
  ## 0.2.0
4
12
 
5
13
  - Frontend sources are vendored by default. Telling GitHub a project is Ruby is
@@ -11,12 +11,6 @@ module ThisIsRuby
11
11
  END_MARKER = "# --- this_is_ruby: end ---"
12
12
  BLOCK = /^#{Regexp.escape(BEGIN_MARKER)}\n.*?^#{Regexp.escape(END_MARKER)}\n?/m
13
13
 
14
- PREAMBLE = [
15
- "# Managed by this_is_ruby. Re-run it when your build setup changes.",
16
- "# Every path below is excluded from this repository's language stats.",
17
- "# Edit above or below this block, never inside it."
18
- ].freeze
19
-
20
14
  attr_reader :path
21
15
 
22
16
  def initialize(path)
@@ -65,13 +59,12 @@ module ThisIsRuby
65
59
  match ? [match.pre_match, match.post_match] : [current, ""]
66
60
  end
67
61
 
62
+ # Just the patterns, between two markers that name the gem. What each rule
63
+ # is for belongs in the report and the README, where there is room to say
64
+ # it properly, rather than as a comment in someone else's file.
68
65
  def block(emissions)
69
66
  body = "#{BEGIN_MARKER}\n"
70
- PREAMBLE.each { |line| body << line << "\n" }
71
- emissions.chunk_while { |a, b| a.rule == b.rule }.each do |group|
72
- body << "\n# #{group.first.rule.summary}\n"
73
- group.each { |emission| body << emission.line << "\n" }
74
- end
67
+ emissions.each { |emission| body << emission.line << "\n" }
75
68
  body << END_MARKER << "\n"
76
69
  end
77
70
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ThisIsRuby
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: this_is_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Irina Nazarova