pub_grub 0.1.0 → 0.2.0

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: 4199b218840d39743919d5befd111f71335aecd06d0f4f09dcc9ae168fc5f04d
4
- data.tar.gz: 619cca849d88ab3173f2e71f37ff6acdd3be212d7d099c329de0685a102e85fd
3
+ metadata.gz: 468d7bf24cf059751c1de78456163c371a4b28427f5c91c1185ff50a2e991a04
4
+ data.tar.gz: 46a60ee9a399e4a6736cb729d5acbd6f03a23f392c7aad19070856277f191a9a
5
5
  SHA512:
6
- metadata.gz: d17dc7b3fb90bf613053c5eeb92893468af588a46009c3c847aab45f629eb21871cbca9a3f2a7e525cc77ab14896ad0aec8d0faee786e71cb4b9f81202b759b3
7
- data.tar.gz: b76ac52d2b0b8fcdce473c4233f2873c7bd88d6ada06a70b9c610500ec338ebef2f3eea8d3b2185203282ef3acff637c2ad81fd62dee6127a32fa800d545c68b
6
+ metadata.gz: 74ad2d2ea59a0f5fff3cf1121221d5c092f7056acb41eab9f2c3ac83399e7da3f7b3e0f3333486da68a381d707d9eb85e885621a87c68998220292a7701e43b5
7
+ data.tar.gz: a081e3c55d491310631d992360c1e63ca5c5afd66e7db954a86962b805ded63fa2c918c6fb6bcd37ffd36efb5fe6d8d4495e257e4ef82e692bdc44c1e4725043
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pub_grub (0.1.0)
4
+ pub_grub (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -25,6 +25,7 @@ module PubGrub
25
25
 
26
26
  lead = number ? "(#{number}) " : ""
27
27
  lead = lead.ljust(padding)
28
+ message = message.gsub("\n", "\n" + " " * (padding + 2))
28
29
  "#{lead}#{message}"
29
30
  end.join("\n")
30
31
  end
@@ -55,7 +56,7 @@ module PubGrub
55
56
  if conflict_line && other_line
56
57
  write_line(
57
58
  incompatibility,
58
- "Because #{cause.conflict} (#{conflict_line}) and #{cause.other} (#{other_line}), #{incompatibility}.",
59
+ "Because #{cause.conflict} (#{conflict_line})\nand #{cause.other} (#{other_line}),\n#{incompatibility}.",
59
60
  numbered: numbered
60
61
  )
61
62
  elsif conflict_line || other_line
@@ -66,7 +67,7 @@ module PubGrub
66
67
  visit(without_line);
67
68
  write_line(
68
69
  incompatibility,
69
- "#{conjunction} because #{with_line} (#{line}), #{incompatibility}.",
70
+ "#{conjunction} because #{with_line} (#{line}),\n#{incompatibility}.",
70
71
  numbered: numbered
71
72
  )
72
73
  else
@@ -90,7 +91,7 @@ module PubGrub
90
91
 
91
92
  write_line(
92
93
  incompatibility,
93
- "#{conjunction} because #{cause.conflict} (#{@line_numbers[cause.conflict]}), #{incompatibility}.",
94
+ "#{conjunction} because #{cause.conflict} (#{@line_numbers[cause.conflict]}),\n#{incompatibility}.",
94
95
  numbered: numbered
95
96
  )
96
97
  end
@@ -103,7 +104,7 @@ module PubGrub
103
104
  if derived_line
104
105
  write_line(
105
106
  incompatibility,
106
- "Because #{ext} and #{derived} (#{derived_line}), #{incompatibility}.",
107
+ "Because #{ext}\nand #{derived} (#{derived_line}),\n#{incompatibility}.",
107
108
  numbered: numbered
108
109
  )
109
110
  elsif collapsible?(derived)
@@ -120,21 +121,21 @@ module PubGrub
120
121
 
121
122
  write_line(
122
123
  incompatibility,
123
- "#{conjunction} because #{collapsed_ext} and #{ext}, #{incompatibility}.",
124
+ "#{conjunction} because #{collapsed_ext}\nand #{ext},\n#{incompatibility}.",
124
125
  numbered: numbered
125
126
  )
126
127
  else
127
128
  visit(derived)
128
129
  write_line(
129
130
  incompatibility,
130
- "#{conjunction} because #{ext}, #{incompatibility}.",
131
+ "#{conjunction} because #{ext},\n#{incompatibility}.",
131
132
  numbered: numbered
132
133
  )
133
134
  end
134
135
  else
135
136
  write_line(
136
137
  incompatibility,
137
- "Because #{cause.conflict} and #{cause.other}, #{incompatibility}.",
138
+ "Because #{cause.conflict}\nand #{cause.other},\n#{incompatibility}.",
138
139
  numbered: numbered
139
140
  )
140
141
  end
@@ -7,7 +7,11 @@ module PubGrub
7
7
  end
8
8
 
9
9
  def to_s
10
- "\n" + FailureWriter.new(@incompatibility).write
10
+ "Could not find compatible versions\n\n#{explanation}"
11
+ end
12
+
13
+ def explanation
14
+ @explanation ||= FailureWriter.new(@incompatibility).write
11
15
  end
12
16
  end
13
17
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "pub_grub"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.2.0"
8
8
  spec.authors = ["John Hawthorn"]
9
9
  spec.email = ["john@hawthorn.email"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pub_grub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn