lotus-utils 0.5.1 → 0.5.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: 2600dc963210544a03cf272dae3f8a0d09060e11
4
- data.tar.gz: d6e942d537d27f6df9a4c0d25e088881445063eb
3
+ metadata.gz: 75c83ed0bc5b3b7e00e70735e023117f38ef9d67
4
+ data.tar.gz: 17cd9f71360e17c3adddadf260c38fc8b27622b1
5
5
  SHA512:
6
- metadata.gz: cf2cf0ed6a076309a9133b4a208f3c4bd82e9b167530462b29fa5ee996595525a292535a790f2375631695823270ead6d9c3f6cb302f50a85968e1c8863322e0
7
- data.tar.gz: 971e3448df916e80834c71b2937db27040d653e6f2451e68f1023a8e547724d22a866cc8020ae0db75dda6b1729605975013a7247cc0010c0d8b129b2bca8141
6
+ metadata.gz: 1d25381aa757c98d2549d8619a8ba7525f50d9a752b6473d8e329d8eabb7ada701ceecefae9b301136bdb71b2d836f1a6ee4ba8a0cdeaf71edb66ca127f127e9
7
+ data.tar.gz: cd21b6ea4701af1949fedad3f91b3d11579de79abef45bc6b4a7c66e8814ecaec88ab765bb0afce36b5804279e9d595124cc5998fdeeb0a47ab62ae3e0849846
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Lotus::Utils
2
2
  Ruby core extentions and class utilities for Lotus
3
3
 
4
+ ## v0.5.2 - 2015-09-30
5
+ ### Added
6
+ - [Luca Guidi] Added `Lotus::Utils::String#capitalize`
7
+ - [Trung Lê] Official support for JRuby 9k+
8
+
4
9
  ## v0.5.1 - 2015-07-10
5
10
  ### Fixed
6
11
  - [Thiago Felippe] Ensure `Lotus::Utils::PathPrefix#join` won't remote duplicate entries (eg `/admin/dashboard/admin`)
data/README.md CHANGED
@@ -22,7 +22,7 @@ Ruby core extentions and class utilities for [Lotus](http://lotusrb.org)
22
22
 
23
23
  ## Rubies
24
24
 
25
- __Lotus::Utils__ supports Ruby (MRI) 2+, JRuby 1.7+ (with 2.0 mode) and Rubinius 2.3.0+.
25
+ __Lotus::Utils__ supports Ruby (MRI) 2+, JRuby 9k+ & Rubinius 2.3+
26
26
 
27
27
  ## Installation
28
28
 
@@ -0,0 +1 @@
1
+ require 'lotus/utils'
@@ -48,6 +48,12 @@ module Lotus
48
48
  # @api private
49
49
  TITLEIZE_SEPARATOR = ' '.freeze
50
50
 
51
+ # Separator for #capitalize
52
+ #
53
+ # @since 0.5.2
54
+ # @api private
55
+ CAPITALIZE_SEPARATOR = ' '.freeze
56
+
51
57
  # Separator for #dasherize
52
58
  #
53
59
  # @since 0.4.0
@@ -86,6 +92,37 @@ module Lotus
86
92
  self.class.new underscore.split(CLASSIFY_SEPARATOR).map(&:capitalize).join(TITLEIZE_SEPARATOR)
87
93
  end
88
94
 
95
+ # Return a capitalized version of the string
96
+ #
97
+ # @return [Lotus::Utils::String] the transformed string
98
+ #
99
+ # @since 0.5.2
100
+ #
101
+ # @example
102
+ # require 'lotus/utils/string'
103
+ #
104
+ # string = Lotus::Utils::String.new 'lotus'
105
+ # string.capitalize # => "Lotus"
106
+ #
107
+ # string = Lotus::Utils::String.new 'lotus utils'
108
+ # string.capitalize # => "Lotus utils"
109
+ #
110
+ # string = Lotus::Utils::String.new 'Lotus Utils'
111
+ # string.capitalize # => "Lotus utils"
112
+ #
113
+ # string = Lotus::Utils::String.new 'lotus_utils'
114
+ # string.capitalize # => "Lotus utils"
115
+ #
116
+ # string = Lotus::Utils::String.new 'lotus-utils'
117
+ # string.capitalize # => "Lotus utils"
118
+ def capitalize
119
+ head, *tail = underscore.split(CLASSIFY_SEPARATOR)
120
+
121
+ self.class.new(
122
+ tail.unshift(head.capitalize).join(CAPITALIZE_SEPARATOR)
123
+ )
124
+ end
125
+
89
126
  # Return a CamelCase version of the string
90
127
  #
91
128
  # @return [String] the transformed string
@@ -3,6 +3,6 @@ module Lotus
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '0.5.1'.freeze
6
+ VERSION = '0.5.2'.freeze
7
7
  end
8
8
  end
data/lotus-utils.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'lotus/utils/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'lotus-utils'
8
8
  spec.version = Lotus::Utils::VERSION
9
- spec.authors = ['Luca Guidi', 'Trung Lê', 'Alfonso Uceda Pompa']
9
+ spec.authors = ['Luca Guidi', 'Trung Lê', 'Alfonso Uceda']
10
10
  spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com', 'uceda73@gmail.com']
11
11
  spec.description = %q{Lotus utilities}
12
12
  spec.summary = %q{Ruby core extentions and Louts utilities}
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  - Trung Lê
9
- - Alfonso Uceda Pompa
9
+ - Alfonso Uceda
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-07-10 00:00:00.000000000 Z
13
+ date: 2015-09-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -66,6 +66,7 @@ files:
66
66
  - CHANGELOG.md
67
67
  - LICENSE.md
68
68
  - README.md
69
+ - lib/lotus-utils.rb
69
70
  - lib/lotus/interactor.rb
70
71
  - lib/lotus/logger.rb
71
72
  - lib/lotus/utils.rb
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
106
  version: '0'
106
107
  requirements: []
107
108
  rubyforge_project:
108
- rubygems_version: 2.4.8
109
+ rubygems_version: 2.4.5.1
109
110
  signing_key:
110
111
  specification_version: 4
111
112
  summary: Ruby core extentions and Louts utilities