tbpgr_utils 0.0.92 → 0.0.93
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -128,6 +128,7 @@ Or install it yourself as:
|
|
128
128
|
|[TbpgrUtils String#to_space2_heading](#stringto_space2_heading) |create space2-format heading string with Emmet-like grammar |
|
129
129
|
|[TbpgrUtils String#to_space4_heading](#stringto_space4_heading) |create space4-format heading string with Emmet-like grammar |
|
130
130
|
|[TbpgrUtils String#to_tab_heading](#stringto_tab_heading) |create tab-format heading string with Emmet-like grammar |
|
131
|
+
|[TbpgrUtils String#unescape_double_quote](#stringunescape_double_quote) |unescape double quote |
|
131
132
|
|[TbpgrUtils Symbol#is_meta_variable?](#symbolis_meta_variable) |is meta variable. |
|
132
133
|
|[Templatable module](#templatable) |get result from template + placeholder |
|
133
134
|
|[TemplateMethodable module](#templatemethodable) |for Template Method Pattern |
|
@@ -1501,7 +1502,7 @@ end
|
|
1501
1502
|
[back to list](#list)
|
1502
1503
|
|
1503
1504
|
### Kernel#aa_ancestors
|
1504
|
-
Ascii
|
1505
|
+
Ascii Art Ancestors
|
1505
1506
|
|
1506
1507
|
~~~ruby
|
1507
1508
|
class BaseHogeForAncestors;end
|
@@ -2857,7 +2858,6 @@ require 'tbpgr_utils'
|
|
2857
2858
|
'hoge>hige^hege'.to_hatena_heading # => '*hoge\n**hige\n*hege'
|
2858
2859
|
~~~
|
2859
2860
|
|
2860
|
-
|
2861
2861
|
[back to list](#list)
|
2862
2862
|
|
2863
2863
|
### String#to_markdown_heading
|
@@ -2946,6 +2946,14 @@ require 'tbpgr_utils'
|
|
2946
2946
|
|
2947
2947
|
[back to list](#list)
|
2948
2948
|
|
2949
|
+
### String#unescape_double_quote
|
2950
|
+
~~~ruby
|
2951
|
+
require 'tbpgr_utils'
|
2952
|
+
'hoge""hige'.unescape_double_quote # => 'hoge"hige'
|
2953
|
+
~~~
|
2954
|
+
|
2955
|
+
[back to list](#list)
|
2956
|
+
|
2949
2957
|
### Symbol#is_meta_variable?
|
2950
2958
|
~~~ruby
|
2951
2959
|
:foo.is_meta_variable? # => true
|
@@ -3056,6 +3064,7 @@ if you are Sublime Text2 user, you can use snippet for TbpgrUtils.
|
|
3056
3064
|
https://github.com/tbpgr/tbpgr_utils_snippets
|
3057
3065
|
|
3058
3066
|
## History
|
3067
|
+
* version 0.0.93 : add String#unescape_double_quote
|
3059
3068
|
* version 0.0.92 : add Fixnum.to_fixnum_html_table
|
3060
3069
|
* version 0.0.91 : add Array#to_html_table
|
3061
3070
|
* version 0.0.90 : add Kernel#hash_to_attributes
|
data/lib/open_classes/string.rb
CHANGED
data/lib/tbpgr_utils/version.rb
CHANGED
@@ -11,7 +11,7 @@ describe Familyable::Family do
|
|
11
11
|
persons: [
|
12
12
|
a = Familyable::Person.new(id: 1, parent_ids: [2, 3]),
|
13
13
|
b = Familyable::Person.new(id: 2, parent_ids: []),
|
14
|
-
c = Familyable::Person.new(id: 3, parent_ids: [4],),
|
14
|
+
c = Familyable::Person.new(id: 3, parent_ids: [4], ),
|
15
15
|
d = Familyable::Person.new(id: 4, parent_ids: []),
|
16
16
|
e = Familyable::Person.new(id: 5, parent_ids: [2]),
|
17
17
|
],
|
@@ -59,7 +59,7 @@ describe Familyable::Family do
|
|
59
59
|
persons: [
|
60
60
|
a = Familyable::Person.new(id: 1, parent_ids: [2, 3]),
|
61
61
|
b = Familyable::Person.new(id: 2, parent_ids: []),
|
62
|
-
c = Familyable::Person.new(id: 3, parent_ids: [4],),
|
62
|
+
c = Familyable::Person.new(id: 3, parent_ids: [4], ),
|
63
63
|
d = Familyable::Person.new(id: 4, parent_ids: []),
|
64
64
|
e = Familyable::Person.new(id: 5, parent_ids: [2]),
|
65
65
|
],
|
@@ -107,7 +107,7 @@ describe Familyable::Family do
|
|
107
107
|
persons: [
|
108
108
|
a = Familyable::Person.new(id: 1, parent_ids: [2, 3]),
|
109
109
|
b = Familyable::Person.new(id: 2, parent_ids: []),
|
110
|
-
c = Familyable::Person.new(id: 3, parent_ids: [4],),
|
110
|
+
c = Familyable::Person.new(id: 3, parent_ids: [4], ),
|
111
111
|
d = Familyable::Person.new(id: 4, parent_ids: [3]),
|
112
112
|
e = Familyable::Person.new(id: 5, parent_ids: [2]),
|
113
113
|
],
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'open_classes/string/unescape_double_quote'
|
4
|
+
|
5
|
+
describe String do
|
6
|
+
context :unescape_double_quote do
|
7
|
+
cases = [
|
8
|
+
{
|
9
|
+
case_no: 1,
|
10
|
+
case_title: 'exist double quote case',
|
11
|
+
input: 'hoge""h""ige',
|
12
|
+
expected: 'hoge"h"ige',
|
13
|
+
},
|
14
|
+
{
|
15
|
+
case_no: 2,
|
16
|
+
case_title: 'not exist double quote case',
|
17
|
+
input: 'hogehige',
|
18
|
+
expected: 'hogehige',
|
19
|
+
},
|
20
|
+
]
|
21
|
+
|
22
|
+
cases.each do |c|
|
23
|
+
it "|case_no=#{c[:case_no]}|case_title=#{c[:case_title]}" do
|
24
|
+
begin
|
25
|
+
case_before c
|
26
|
+
|
27
|
+
# -- given --
|
28
|
+
# nothing
|
29
|
+
|
30
|
+
# -- when --
|
31
|
+
actual = c[:input].unescape_double_quote
|
32
|
+
|
33
|
+
# -- then --
|
34
|
+
expect(actual).to eq(c[:expected])
|
35
|
+
ensure
|
36
|
+
case_after c
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def case_before(c)
|
41
|
+
# implement each case before
|
42
|
+
end
|
43
|
+
|
44
|
+
def case_after(c)
|
45
|
+
# implement each case after
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tbpgr_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.93
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &27335292 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 4.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *27335292
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &27335004 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.3'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *27335004
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &27334776 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *27334776
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &27334452 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.14.1
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *27334452
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
|
-
requirement: &
|
60
|
+
requirement: &27334152 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 0.8.2
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *27334152
|
69
69
|
description: Utilities
|
70
70
|
email:
|
71
71
|
- tbpgr@tbpgr.jp
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/open_classes/string/to_space2_heading.rb
|
190
190
|
- lib/open_classes/string/to_space4_heading.rb
|
191
191
|
- lib/open_classes/string/to_tab_heading.rb
|
192
|
+
- lib/open_classes/string/unescape_double_quote.rb
|
192
193
|
- lib/open_classes/symbol.rb
|
193
194
|
- lib/open_classes/symbol/is_meta_variable.rb
|
194
195
|
- lib/simple_tournament.rb
|
@@ -292,6 +293,7 @@ files:
|
|
292
293
|
- spec/open_classes/string/to_space2_heading_spec.rb
|
293
294
|
- spec/open_classes/string/to_space4_heading_spec.rb
|
294
295
|
- spec/open_classes/string/to_tab_heading_spec.rb
|
296
|
+
- spec/open_classes/string/unescape_double_quote_spec.rb
|
295
297
|
- spec/open_classes/symbol/is_meta_variable_spec.rb
|
296
298
|
- spec/set_variables_code_spec.rb
|
297
299
|
- spec/simple_tournament_spec.rb
|
@@ -419,6 +421,7 @@ test_files:
|
|
419
421
|
- spec/open_classes/string/to_space2_heading_spec.rb
|
420
422
|
- spec/open_classes/string/to_space4_heading_spec.rb
|
421
423
|
- spec/open_classes/string/to_tab_heading_spec.rb
|
424
|
+
- spec/open_classes/string/unescape_double_quote_spec.rb
|
422
425
|
- spec/open_classes/symbol/is_meta_variable_spec.rb
|
423
426
|
- spec/set_variables_code_spec.rb
|
424
427
|
- spec/simple_tournament_spec.rb
|