padrino-support 0.12.3 → 0.12.4

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: da28b7b14ee2135aabfded9f739d00afb0eb1885
4
- data.tar.gz: 53ee8bafb3710f0017e5a2a2d865320984eff2f1
3
+ metadata.gz: 54dad0e7c8bd0ee9c7d1cdbde268ccfca7622fb4
4
+ data.tar.gz: 5710f5dcc0227b7f5ee98b77e0a07134f2f51603
5
5
  SHA512:
6
- metadata.gz: c7cc28d866124ef2535f5bb2cc22e76af49aa9412ecfdd089ce25eb1a4f2b6fb0c5d481fefe84a36996e6d4d481211f9c14ae5d904c2132c3fe3e1e6fb0c78f6
7
- data.tar.gz: d52c0c2fb61f2f45d2f12cba407bfaa9ae33fd3727827ed921655c806830a734c794e5cc81bf1a7522abf0037014e8d89a3fcada69c6f4ed12cb1fad626ba9b1
6
+ metadata.gz: c44c05e62163e51674f619ed1cfcd6f2976e3d5b30e6a25e107e20f0ef0e0e8bcab1a58cb58de1b8d34f9fc169dafea9b1f1932c2971e540ce2397ef8ad6490c
7
+ data.tar.gz: 3106ace68d46c953285d339ac13632d5cc828bebb2edf5fce3a7b19b9ada21a62f09b18ddfc235b2b4cfaf5c506a26ad84b083bd6d6548ce33119b50b817ec55
@@ -11,12 +11,12 @@ module ObjectSpace
11
11
  # end
12
12
  # end
13
13
  #
14
- def classes(&block)
14
+ def classes
15
15
  rs = Set.new
16
16
 
17
17
  ObjectSpace.each_object(Class).each do |klass|
18
- if block
19
- if r = block.call(klass)
18
+ if block_given?
19
+ if r = yield(klass)
20
20
  # add the returned value if the block returns something
21
21
  rs << r
22
22
  end
@@ -1,4 +1,13 @@
1
- require 'win32console' if RUBY_PLATFORM =~ /(win|m)32/ # ruby color support for win
1
+ # Ruby color support for Windows
2
+ # If you want colorize on Windows with Ruby 1.9, please use ansicon:
3
+ # https://github.com/adoxa/ansicon
4
+ # Other ways, add `gem 'win32console'` to your Gemfile.
5
+ if RUBY_PLATFORM =~ /mswin|mingw/ && RUBY_VERSION < '2.0' && ENV['ANSICON'].nil?
6
+ begin
7
+ require 'win32console'
8
+ rescue LoadError
9
+ end
10
+ end
2
11
 
3
12
  ##
4
13
  # Add colors
@@ -8,10 +8,10 @@ module FileSet
8
8
  # Returns the list of files matching the glob pattern
9
9
  # FileSet.glob('padrino-core/application/*.rb', __FILE__) { |file| load file }
10
10
  #
11
- def glob(glob_pattern, file_path=nil, &block)
11
+ def glob(glob_pattern, file_path=nil)
12
12
  glob_pattern = File.join(File.dirname(file_path), glob_pattern) if file_path
13
13
  file_list = Dir.glob(glob_pattern).sort
14
- file_list.each { |file| block.call(file) }
14
+ file_list.each{ |file| yield(file) }
15
15
  file_list
16
16
  end
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-08-13 00:00:00.000000000 Z
15
+ date: 2014-10-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport