defmastership 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3085b336c6d1b3854964192456e63b586bb0841ca62be7a4e33b7a3f7e2b5e9
4
- data.tar.gz: 190eb91c0e040f064044a9b720eeb737cf3a0064eb88c718f1f2f387d0edf47f
3
+ metadata.gz: 1a98ba2cd70decfd584d57f914d05bc31356cd53846fa13b01f3406ff41dc087
4
+ data.tar.gz: 999f28e56b654a6dd35d9da30a8701abd1121f62db4df730fcf903a255b34eff
5
5
  SHA512:
6
- metadata.gz: f8c55be957d580ad9ab71f15f58be76a43fc3e2b169d7b8397383a1a6a128c93aac5c33eab85cdf3da584d005eb92699730f2ae3560947ad25f13e478f5bff1d
7
- data.tar.gz: 8d7b95ad1db59a90e96f0caacc8040307366ae7be67baab172fe57f64c9101a065fef8718d8c2f123d03c808b1669aa406c05712872c05424b6de22150db6acf
6
+ metadata.gz: 44bd90676d2ebd37cf47c0e6d9160340d1861497eb4a110e47e5b35c26cd23a28a1ddd24c93e489238520f916997fb2f45801ec1c74b84a7c44f16798b3c0eaf
7
+ data.tar.gz: 60d4904b54cbb6708ff1633ad0d01d9e43a97d0e4cb90c51126487de2eae477e81e670db38fc151784bde3bb59f1f473abf804f08f0968f06d99dbd58a32c3fa
data/.rubocop.yml CHANGED
@@ -62,3 +62,7 @@ RSpec/FilePath :
62
62
 
63
63
  RSpec/NestedGroups:
64
64
  Max: 4
65
+
66
+ Layout/RedundantLineBreak:
67
+ Enabled: false
68
+
@@ -73,7 +73,9 @@ Feature: The rename_included_files command
73
73
  :any: one
74
74
  :path: two
75
75
  [define, requirement, TOTO-WHATEVER-123]
76
+ --
76
77
  include::{any}_{path}/one_file.png[]
78
+ --
77
79
  """
78
80
  And a directory named "one_two"
79
81
  And an empty file named "one_two/one_file.png"
@@ -85,7 +87,9 @@ Feature: The rename_included_files command
85
87
  :any: one
86
88
  :path: two
87
89
  [define, requirement, TOTO-WHATEVER-123]
90
+ --
88
91
  include::{any}_{path}/TOTO-WHATEVER-123_one_file.png[]
92
+ --
89
93
  """
90
94
  And the file "one_two/one_file.png" should not exist
91
95
  And the file "one_two/TOTO-WHATEVER-123_one_file.png" should exist
@@ -31,7 +31,7 @@ module DefMastership
31
31
  end
32
32
 
33
33
  def sha256
34
- "~#{Digest::SHA2.new(256).hexdigest(value).split(//).last(8).join}"
34
+ "~#{Digest::SHA2.new(256).hexdigest(value).chars.last(8).join}"
35
35
  end
36
36
 
37
37
  def wrong_explicit_checksum
@@ -96,7 +96,7 @@ module DefMastership
96
96
 
97
97
  filename.gsub!("{#{varname}}", @variables[varname.to_sym])
98
98
  end
99
- filename
99
+ filename.chomp
100
100
  end
101
101
 
102
102
  def complete_regexp_from(from)
@@ -2,6 +2,6 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module DefMastership
5
- VERSION = '1.0.11'
5
+ VERSION = '1.0.12'
6
6
  public_constant :VERSION
7
7
  end
@@ -110,32 +110,32 @@ RSpec.describe(DefMastership::RenameIncludedFilesLineModifier) do
110
110
  end
111
111
 
112
112
  it do
113
- expect(includeschanger.replace('include::orig[]'))
114
- .to(eq('include::dest[]'))
113
+ expect(includeschanger.replace("include::orig[]\n"))
114
+ .to(eq("include::dest[]\n"))
115
115
  end
116
116
 
117
117
  it do
118
- includeschanger.replace('include::orig[]')
118
+ includeschanger.replace("include::orig[]\n")
119
119
  expect(File).to(have_received(:rename).with('orig', 'dest'))
120
120
  end
121
121
 
122
122
  it do
123
- includeschanger.replace('include::orig[]')
123
+ includeschanger.replace("include::orig[]\n")
124
124
  expect(includeschanger).to(have_attributes(changes: [%w[orig dest]]))
125
125
  end
126
126
 
127
127
  it do
128
- expect(includeschanger.replace('include::toto/orig[]'))
129
- .to(eq('include::toto/dest[]'))
128
+ expect(includeschanger.replace("include::toto/orig[]\n"))
129
+ .to(eq("include::toto/dest[]\n"))
130
130
  end
131
131
 
132
132
  it do
133
- includeschanger.replace('include::toto/orig[]')
133
+ includeschanger.replace("include::toto/orig[]\n")
134
134
  expect(File).to(have_received(:rename).with('toto/orig', 'toto/dest'))
135
135
  end
136
136
 
137
137
  it do
138
- includeschanger.replace('include::toto/orig[]')
138
+ includeschanger.replace("include::toto/orig[]\n")
139
139
  expect(includeschanger).to(have_attributes(changes: [%w[toto/orig toto/dest]]))
140
140
  end
141
141
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defmastership
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jérôme Arbez-Gindre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-01 00:00:00.000000000 Z
11
+ date: 2021-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba