inch 0.4.3.rc2 → 0.4.3

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
  SHA1:
3
- metadata.gz: 51a684b0122ca78cb12bfe784278c7f1e2aced3b
4
- data.tar.gz: 047e6d479de69c949e4adf3c79f72ea63f5db753
3
+ metadata.gz: dab543a34157a4fe5467c6dbb51a94c112f29a83
4
+ data.tar.gz: 674f4bd46b9f9b23b10bb5b8264f31019fb6d686
5
5
  SHA512:
6
- metadata.gz: 9d6ef7ac83572913777a95e3408b54c1451d3d9c3a96772b30f106f0bf452b5fe28c0bf687b3e3caad58ec94342916b27bf62ddb6b3e86405bc738e1283d3782
7
- data.tar.gz: c7fcf1abab329c2c18b84b11a1419b4aa5be23c852f4ea4403d82c1d09247d0fef3560fc3f799589d7e72bbdbcdae3c5300f8f8ad48d673403b4f26e97c0c2cc
6
+ metadata.gz: 6dc8d3ee59dceb8c04145f470820a28a6aff12d2c3462f893bdafc7b274b243bf6f1b12057606c91b2b0573dc0696334b46c993843d2048acc145a12765d8257
7
+ data.tar.gz: 1270332e354f079ae12c9548d7f40f96b0c94c1debef1974c710ad80e7e03891bce603ef0fd4c6d89db8c19724b53d204d4e2f5f2c00f7a091453f6718ffdbbb
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## 0.4.3
5
+
6
+ - Fixed a bug where the 'show' command did not properly recognize overloaded
7
+ method signatures
8
+
9
+
4
10
  ## 0.4.2
5
11
 
6
12
  - The 'inspect' command now shows the original docstring provided by the
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = "0.4.3.rc2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -224,6 +224,25 @@ module Overloading
224
224
  # @option user_options [Number] :xid an alias to transaction_id.
225
225
  def params_only_in_overloads(user_options = {})
226
226
  end
227
+
228
+ # Tests that the default signature can be present as an overload tag.
229
+ #
230
+ # @overload params_only_in_overloads()
231
+ # @example
232
+ # Hello.new
233
+ #
234
+ # @overload params_only_in_overloads(transaction_id)
235
+ # @example
236
+ # Hello.new(123)
237
+ #
238
+ # @example
239
+ # Hello.new(transaction_id: 123)
240
+ # Hello.new(xid: 123)
241
+ # @param [Hash] user_options the options to create a message with.
242
+ # @option user_options [Number] :transaction_id
243
+ # @option user_options [Number] :xid an alias to transaction_id.
244
+ def one_param_missing_in_overload(user_options = {})
245
+ end
227
246
  end
228
247
 
229
248
  module YardError
@@ -7,6 +7,16 @@ require 'bundler'
7
7
  Bundler.require
8
8
  require 'inch'
9
9
 
10
+ def assert_roles(object, expected, unexpected)
11
+ roles = object.roles.map(&:class)
12
+ unexpected.each do |role|
13
+ refute roles.include?(role), "Should not assign #{role}"
14
+ end
15
+ expected.each do |role|
16
+ assert roles.include?(role), "Should assign #{role}"
17
+ end
18
+ end
19
+
10
20
  def fixture_path(name)
11
21
  File.join(File.dirname(__FILE__), "fixtures", name.to_s)
12
22
  end
@@ -295,14 +295,23 @@ describe ::Inch::CodeObject::Proxy::MethodObject do
295
295
 
296
296
  def test_overloading_with_bad_doc
297
297
  m = @objects.find("Overloading#params_only_in_overloads")
298
- roles = m.roles.map(&:class)
299
- bad_roles = [
298
+ unexpected_roles = [
300
299
  Inch::Evaluation::Role::Object::WithoutCodeExample,
301
300
  Inch::Evaluation::Role::MethodParameter::WithoutMention,
302
301
  Inch::Evaluation::Role::MethodParameter::WithoutType,
303
302
  ]
304
- bad_roles.each do |role|
305
- refute roles.include?(role), "Should not assign #{role}"
306
- end
303
+ assert_roles m, [], unexpected_roles
304
+ end
305
+
306
+ def test_overloading_with_half_bad_doc
307
+ m = @objects.find("Overloading#one_param_missing_in_overload")
308
+ unexpected_roles = [
309
+ Inch::Evaluation::Role::Object::WithoutCodeExample,
310
+ ]
311
+ expected_roles = [
312
+ Inch::Evaluation::Role::MethodParameter::WithoutMention,
313
+ Inch::Evaluation::Role::MethodParameter::WithoutType,
314
+ ]
315
+ assert_roles m, expected_roles, unexpected_roles
307
316
  end
308
317
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.rc2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-26 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -315,9 +315,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
315
  version: '0'
316
316
  required_rubygems_version: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - ">"
318
+ - - ">="
319
319
  - !ruby/object:Gem::Version
320
- version: 1.3.1
320
+ version: '0'
321
321
  requirements: []
322
322
  rubyforge_project:
323
323
  rubygems_version: 2.2.2