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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/this_is_ruby/attributes_file.rb +4 -11
- data/lib/this_is_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bff23b66de82379dceeca467cd82002a835bb61bd1baa375f9ffa9e4ac3b4472
|
|
4
|
+
data.tar.gz: c4da4c93d536106e2f1219b9f64745e66d7f1ea3e131d9f63e33528e553d3158
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
|
data/lib/this_is_ruby/version.rb
CHANGED