midwire_common 1.1.0 → 1.1.1

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: 3e7d213c8109f31ef945f647152122b7f8520363
4
- data.tar.gz: 71c130a18c5ca6ab637572a5c48bbb9f0598b54b
3
+ metadata.gz: 4677c1584c5c35e20addcfa6e40dc60919b1813b
4
+ data.tar.gz: 6f16246a5e91000ba332144220458ce99e19c3a2
5
5
  SHA512:
6
- metadata.gz: ed228a57311853ac1af82e122cd25b5d77f95280d9108355ab8164f6a6a1a8e6e42241578d58799ce1d1282f7269ab0112a2eddac2b7a4093b187760428f1c94
7
- data.tar.gz: 5650ead282aa147f27e5830ef02022b25d297395a0df6e20346def21b8fc8474e483329a180da5a411e62d100eb4aeceee2039363d1a247bf89aca3d3485ea32
6
+ metadata.gz: f8a4e99cb0a6f1d9619ea07f17c55f11ee33f09d5c275258454575d6dd6e38817463fd0e74702b523e33d968cbb7e63b5b18d3684de520714a84ba15ec012757
7
+ data.tar.gz: c4c0cd3bd83b2663901853a409251315f1e72420598ff2b4fbf5a0aae3bb7bab04e672594d33f56e9cbd9b1bebf3d21f65c4d578c40325a57b9b6252c1ef7e49
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ *1.1.1* (March 15, 2016)
2
+
3
+ * Rename string slicing methods left and right to left_substr and right_substr respectively to avoid any likely conflicts.
4
+
1
5
  *1.1.0* (March 10, 2016)
2
6
 
3
7
  * Fix many code smells
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/midwire_common.png)](https://badge.fury.io/rb/midwire_common)
4
4
 
5
- **Version: 1.1.0**
5
+ **Version: 1.1.1**
6
6
 
7
7
  A handy, light-weight Ruby library for Midwire development
8
8
 
@@ -7,11 +7,11 @@ class String
7
7
  end
8
8
  end
9
9
 
10
- def left(count)
10
+ def left_substr(count)
11
11
  slice(0, count)
12
12
  end
13
13
 
14
- def right(count)
14
+ def right_substr(count)
15
15
  slice(-count, count)
16
16
  end
17
17
 
@@ -115,10 +115,10 @@ class String
115
115
 
116
116
  def snakerize
117
117
  gsub(/::/, '/')
118
- .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
119
- .gsub(/([a-z\d])([A-Z])/, '\1_\2')
120
- .tr('-', '_')
121
- .downcase
118
+ .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
119
+ .gsub(/([a-z\d])([A-Z])/, '\1_\2')
120
+ .tr('-', '_')
121
+ .downcase
122
122
  end
123
123
 
124
124
  # rubocop:disable Style/PerlBackrefs
@@ -1,6 +1,6 @@
1
1
  original_verbosity = $VERBOSE
2
2
  $VERBOSE = nil
3
3
  module MidwireCommon
4
- VERSION = '1.1.0'.freeze
4
+ VERSION = '1.1.1'.freeze
5
5
  end
6
6
  $VERBOSE = original_verbosity
@@ -14,11 +14,11 @@ RSpec.describe String do
14
14
 
15
15
  context 'slicing methods' do
16
16
  it "'left' returns the leftmost 'n' characters" do
17
- 'My Bogus String'.left(2).should == 'My'
17
+ 'My Bogus String'.left_substr(2).should == 'My'
18
18
  end
19
19
 
20
20
  it "'right' returns the rightmost 'n' characters " do
21
- 'My Bogus String'.right(2).should == 'ng'
21
+ 'My Bogus String'.right_substr(2).should == 'ng'
22
22
  end
23
23
  end
24
24
 
@@ -124,7 +124,7 @@ RSpec.describe String do
124
124
 
125
125
  it 'escapes double quotes' do
126
126
  expect('this is a "test"'.escape_double_quotes)
127
- .to eq('this is a \\\\"test\\\\"')
127
+ .to eq('this is a \\\\"test\\\\"')
128
128
  end
129
129
  end
130
130
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midwire_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Blackburn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec