extensible 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 77a0368abe54f48d7dce5ffbbea97d6b932578d3
4
- data.tar.gz: f297fa02fd05537287e1473f5758f25041df0c85
3
+ metadata.gz: 11e889c3f8a16282c1c649689923862a79b5a049
4
+ data.tar.gz: fbb2b8205fe0c9ea40bb6bab6cfd1f9ec5946a92
5
5
  SHA512:
6
- metadata.gz: cc7f44628796c89d5ce517d0606542189681d6213232d1be546832da17b7c9a1cb869f48e1d948e40372442fa14c80a65ef9952a30a57b53d76efe2511d79b7a
7
- data.tar.gz: d165a474bc6fa83f98a0b5691e028504b31bf764a498d5814359e39b8c500fc3863834ea959b0b34b6dfce7abb30600f36a6439e29c19bf21475c249b7237e51
6
+ metadata.gz: c8f44fd379d9f808fbbdecda8f0c19ba878cdc0a5a71bd68a6c2d2cc02effec54dd4ea5d045e38462a783e7e0fc39eff040a560867652680112708499c189bde
7
+ data.tar.gz: d2029bff28b773b95165d66365fce188704f570ced823f2a943220840a92ae94df509222314ae6f357329ed566d7bd3064b6c4fc8aa6893f88e05333c8582cb8
data/extensible.gemspec CHANGED
@@ -4,19 +4,16 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require "extensible/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
+ spec.required_ruby_version = ">= 1.9"
7
8
  spec.name = "extensible"
8
9
  spec.version = Extensible::VERSION
9
10
  spec.authors = ["Gabriel de Oliveira"]
10
11
  spec.email = ["deoliveira.gab@gmail.com"]
11
12
  spec.summary = "Ruby extensions made easy."
12
- spec.description = "Use Extensible on your custom extensions in order to get the following set of advantages over" \
13
- "traditional extensions that override the `Module#extended` method directly:\n\n" \
14
- "- Calls to `super` are handled internally to ensure all your _extensible_ extensions are" \
15
- "properly initialized.\n" \
16
- "- Your _extensible_ extensions will be automatically able to become the base of other, more" \
17
- "specific extensions while proper initialization is maintained by simply including them.\n" \
18
- "- Bundle several _extensible_ extensions in a single module by including them and they will all" \
19
- "be correctly initialized when extending the bundler module."
13
+ spec.description = <<-EOS
14
+ Use Extensible on your custom extensions in order to get a set of advantages over traditional extensions that override
15
+ the Module#extended method directly.
16
+ EOS
20
17
  spec.homepage = "https://github.com/gdeoliveira/extensible"
21
18
  spec.license = "MIT"
22
19
  spec.files = `git ls-files -z`.split("\x0")
@@ -35,5 +35,5 @@
35
35
  module Extensible
36
36
  ##
37
37
  # Current version of Extensible.
38
- VERSION = "0.0.1".freeze
38
+ VERSION = "0.0.2".freeze
39
39
  end
data/lib/extensible.rb CHANGED
@@ -9,21 +9,21 @@ module Extensible # rubocop:disable Style/Documentation
9
9
 
10
10
  ##
11
11
  # call-seq:
12
- # when_extended() {|module| ... } => self
12
+ # when_extended() {|extended_module| ... } => module
13
13
  #
14
14
  # The +when_extended+ method accepts a code block that will be executed every time this module is extended in a
15
- # manner similar to <tt>Module#extended</tt>. The code block will be passed a +module+ parameter containing the module
16
- # that is being extended. There is no need to make explicit calls to +super+ as those will be made internally by
17
- # Extensible.
15
+ # manner similar to <tt>Module#extended</tt>. The code block will be passed an +extended_module+ parameter containing
16
+ # the module that is being extended. There is no need to make explicit calls to +super+ as those will be made
17
+ # internally by Extensible.
18
18
  #
19
- # Returns self object.
20
- def when_extended(&b)
19
+ # Returns self (this module).
20
+ def when_extended(&block)
21
21
  fail(ArgumentError, Error::BLOCK_NOT_GIVEN) unless block_given?
22
22
 
23
23
  self::ExtensionKernel.module_eval do
24
24
  define_method :extended do |submodule|
25
25
  super submodule
26
- b.call submodule
26
+ block.call submodule
27
27
  self
28
28
  end
29
29
 
metadata CHANGED
@@ -1,21 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extensible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel de Oliveira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |-
14
- Use Extensible on your custom extensions in order to get the following set of advantages overtraditional extensions that override the `Module#extended` method directly:
15
-
16
- - Calls to `super` are handled internally to ensure all your _extensible_ extensions areproperly initialized.
17
- - Your _extensible_ extensions will be automatically able to become the base of other, morespecific extensions while proper initialization is maintained by simply including them.
18
- - Bundle several _extensible_ extensions in a single module by including them and they will allbe correctly initialized when extending the bundler module.
13
+ description: |
14
+ Use Extensible on your custom extensions in order to get a set of advantages over traditional extensions that override
15
+ the Module#extended method directly.
19
16
  email:
20
17
  - deoliveira.gab@gmail.com
21
18
  executables: []
@@ -57,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
54
  requirements:
58
55
  - - ">="
59
56
  - !ruby/object:Gem::Version
60
- version: '0'
57
+ version: '1.9'
61
58
  required_rubygems_version: !ruby/object:Gem::Requirement
62
59
  requirements:
63
60
  - - ">="