midwire_common 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +4 -0
- data/README.md +1 -1
- data/lib/midwire_common/string.rb +3 -3
- data/lib/midwire_common/version.rb +1 -1
- data/spec/lib/midwire_common/string_spec.rb +10 -1
- metadata +25 -49
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 871c89e143b28415feefe826dae34869ead09e78
|
4
|
+
data.tar.gz: b234e30af65a32a4317f3c0c35ede5babb866197
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0961001c8b0339de2e44cae4a184dcdbd5022db8a238c3ab3759d9882f4d217a4fd6b999900b51000dc23c030bdd61a111c5335f703dd8b49c1365f8c97640d6
|
7
|
+
data.tar.gz: f7af2c6d9da7b77e206288d5b2a4bfeda7e0f6eac27f70295f298bf27a2fee1407021f6f33d369de966f7e7e0a1d0c7409f6a5ec9f93a28557ac28c922d54ea4
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -43,14 +43,14 @@ class String
|
|
43
43
|
self.left_trim!.right_trim! || ''
|
44
44
|
end
|
45
45
|
|
46
|
-
# html = <<-stop.here_with_pipe
|
46
|
+
# html = <<-stop.here_with_pipe(delimeter="\n")
|
47
47
|
# |<!-- Begin: comment -->
|
48
48
|
# |<script type="text/javascript">
|
49
49
|
# stop
|
50
|
-
def here_with_pipe(
|
50
|
+
def here_with_pipe(delimeter = ' ')
|
51
51
|
lines = self.split("\n")
|
52
52
|
lines.map! {|c| c.sub!(/\s*\|/, '')}
|
53
|
-
new_string = lines.join(
|
53
|
+
new_string = lines.join(delimeter)
|
54
54
|
self.replace(new_string)
|
55
55
|
end
|
56
56
|
|
@@ -65,7 +65,7 @@ describe String do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it "here_with_pipe - with linefeeds" do
|
68
|
-
html = <<-STOP.here_with_pipe(
|
68
|
+
html = <<-STOP.here_with_pipe("\n")
|
69
69
|
|<!-- Begin: comment -->
|
70
70
|
|<script type="text/javascript">
|
71
71
|
|</script>
|
@@ -73,6 +73,15 @@ describe String do
|
|
73
73
|
html.should == "<!-- Begin: comment -->\n<script type=\"text/javascript\">\n</script>"
|
74
74
|
end
|
75
75
|
|
76
|
+
it "here_with_pipe - with no space delimeter" do
|
77
|
+
html = <<-STOP.here_with_pipe("")
|
78
|
+
|<!-- Begin: comment -->
|
79
|
+
|<script type="text/javascript">
|
80
|
+
|</script>
|
81
|
+
STOP
|
82
|
+
html.should == "<!-- Begin: comment --><script type=\"text/javascript\"></script>"
|
83
|
+
end
|
84
|
+
|
76
85
|
it "format_phone returns a formatted phone number string" do
|
77
86
|
"9132329999".format_phone.should == "(913)232-9999"
|
78
87
|
"913.232.9999".format_phone.should == "(913)232-9999"
|
metadata
CHANGED
@@ -1,142 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midwire_common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.8
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Chris Blackburn
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: simplecov
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: guard
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: guard-bundler
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: guard-rspec
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: pry
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rake
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: ruby-prof
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
description: A useful Ruby library for the Midwire development team
|
@@ -146,8 +129,8 @@ executables: []
|
|
146
129
|
extensions: []
|
147
130
|
extra_rdoc_files: []
|
148
131
|
files:
|
149
|
-
- .gitignore
|
150
|
-
- .rspec
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rspec"
|
151
134
|
- CHANGELOG
|
152
135
|
- Gemfile
|
153
136
|
- Guardfile
|
@@ -185,33 +168,26 @@ files:
|
|
185
168
|
- spec/spec_helper.rb
|
186
169
|
homepage: https://github.com/midwire/midwire_common
|
187
170
|
licenses: []
|
171
|
+
metadata: {}
|
188
172
|
post_install_message:
|
189
173
|
rdoc_options: []
|
190
174
|
require_paths:
|
191
175
|
- lib
|
192
176
|
required_ruby_version: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
177
|
requirements:
|
195
|
-
- -
|
178
|
+
- - ">="
|
196
179
|
- !ruby/object:Gem::Version
|
197
180
|
version: '0'
|
198
|
-
segments:
|
199
|
-
- 0
|
200
|
-
hash: -1122474148263051726
|
201
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
182
|
requirements:
|
204
|
-
- -
|
183
|
+
- - ">="
|
205
184
|
- !ruby/object:Gem::Version
|
206
185
|
version: '0'
|
207
|
-
segments:
|
208
|
-
- 0
|
209
|
-
hash: -1122474148263051726
|
210
186
|
requirements: []
|
211
187
|
rubyforge_project:
|
212
|
-
rubygems_version:
|
188
|
+
rubygems_version: 2.2.2
|
213
189
|
signing_key:
|
214
|
-
specification_version:
|
190
|
+
specification_version: 4
|
215
191
|
summary: Midwire Ruby Library
|
216
192
|
test_files:
|
217
193
|
- spec/lib/midwire_common/array_spec.rb
|