bogo 0.1.30 → 0.1.32

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: e2bc7e71e08bfe678b9ebe7ffd966ffca3092e43
4
- data.tar.gz: ffd41d8ceee8a00c968342b87d32101fa1d58caf
3
+ metadata.gz: c723372a3fc41efa07cb3ead74ac63b8896ba5f2
4
+ data.tar.gz: 47bec2d36c83d99d32e35ae17918953bffa32a69
5
5
  SHA512:
6
- metadata.gz: db23673068170fd07463703a5709bdae78a9b0185d68cc52d77001c9791415a27a939a3dbf34b4a7893e631918e6797ae85d6c1aace3b5698a17deacad4896a2
7
- data.tar.gz: a4ac702da3acf7702440a8625fc5366834108acee91820a162bd491d0ae74d8e49fdf56a589c5d02e51d8946bf3847ad15e711b835609185a6ed2557cc472e71
6
+ metadata.gz: f7f3ba240e14e71cb8caf33075a86873b4878effe34d9f48411e0fd5a266e47cd7251cac6b07a09554161c9c7fb998fb698b7c0f619ab56ce38ab9a57eb59d3f
7
+ data.tar.gz: 0ad8976216fa033e8fdb416558916c9127ba9f2a97914f003b069b5ac053e17b24afc5e9781462e65c8921626f97f0268472fade5ab2b37cd73ec093f540027c
@@ -1,3 +1,6 @@
1
+ ## v0.1.32
2
+ * [AnimalStrings] Add support for leading and non-leading upcase
3
+
1
4
  ## v0.1.30
2
5
  * [Lazy] Inspect data prior to checksum to prevent circular issues
3
6
  * [Retry] Support custom block to determine retry
@@ -5,10 +5,16 @@ module Bogo
5
5
  module AnimalStrings
6
6
 
7
7
  # Camel case string
8
+ #
8
9
  # @param string [String]
10
+ # @param leading_upcase [TrueClass, FalseClass] camel case first letter
9
11
  # @return [String]
10
- def camel(string)
11
- string.to_s.split('_').map{|k| "#{k.slice(0,1).upcase}#{k.slice(1,k.length)}"}.join
12
+ def camel(string, leading_upcase=true)
13
+ head, tail = leading_upcase ? [nil, string] : string.split('_', 2)
14
+ tail = tail.to_s.split('_').map do |k|
15
+ "#{k.slice(0,1).upcase}#{k.slice(1,k.length)}"
16
+ end.join
17
+ [head, tail.empty? ? nil : tail].compact.join
12
18
  end
13
19
 
14
20
  # Snake case (underscore) string
@@ -1,4 +1,4 @@
1
1
  module Bogo
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.1.30')
3
+ VERSION = Gem::Version.new('0.1.32')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bogo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-01 00:00:00.000000000 Z
11
+ date: 2015-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.2.2
112
+ rubygems_version: 2.4.8
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Helper libraries