faster_support 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ycm_extra_conf.py +9 -3
- data/Rakefile +6 -0
- data/compile_commands.json +5 -0
- data/ext/faster_support/core_ext/object/blank/extconf.rb +1 -1
- data/ext/faster_support/core_ext/string/extconf.rb +6 -0
- data/ext/faster_support/core_ext/string/string.c +38 -0
- data/ext/faster_support/core_ext/string/string.h +10 -0
- data/faster_support.gemspec +2 -1
- data/lib/faster_support/core_ext.rb +1 -0
- data/lib/faster_support/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29a746b834d3774c9c7694b3c6fce2812565aa8
|
4
|
+
data.tar.gz: f9e79c98b7384b0bcf0f1f1c1f51aa98e5ec545a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f301dcd7261d65b8a9663faaeaf95cd28508ca060720768218735a6e183112b6dab4da1bd1c81495a5cdbe8aa632bfe6ce9a965770fd8fa8070fd137bc6452e
|
7
|
+
data.tar.gz: e70a5c789ed85a4e8cd5edb054bebfaa89480bd9415a10782dea47fc2b252486268f8c1a00b71e4aad0f1ddb0a217e980ba281a835aef89e16367a45871a98c9
|
data/.ycm_extra_conf.py
CHANGED
@@ -41,9 +41,15 @@ flags = [
|
|
41
41
|
'-I/Users/morgan/projects/coach/faster_support/ext/faster_support/.',
|
42
42
|
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/stage/lib/faster_support/.',
|
43
43
|
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/2.4.0/.',
|
44
|
-
|
45
|
-
'-I/Users/morgan/projects/coach/faster_support/
|
46
|
-
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/
|
44
|
+
|
45
|
+
'-I/Users/morgan/projects/coach/faster_support/ext/faster_support/core_ext/object/blank/.',
|
46
|
+
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/stage/lib/faster_support/core_ext/object/.'
|
47
|
+
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/core_ext/object/blank/2.4.0/.',
|
48
|
+
|
49
|
+
'-I/Users/morgan/projects/coach/faster_support/ext/faster_support/core_ext/string/.',
|
50
|
+
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/stage/lib/faster_support/core_ext/.',
|
51
|
+
'-I/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/core_ext/string/2.4.0/.',
|
52
|
+
|
47
53
|
'-I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/.',
|
48
54
|
'-I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-darwin16/.',
|
49
55
|
'-Wall',
|
data/Rakefile
CHANGED
@@ -27,6 +27,12 @@ Rake::ExtensionTask.new('faster_support/core_ext/object/blank') do |ext|
|
|
27
27
|
Tooling.add_task(ext: ext)
|
28
28
|
end
|
29
29
|
|
30
|
+
Rake::ExtensionTask.new('faster_support/core_ext/string') do |ext|
|
31
|
+
ext.lib_dir = 'lib'
|
32
|
+
ext.source_pattern = '*.{c,cpp,m,mm}'
|
33
|
+
Tooling.add_task(ext: ext)
|
34
|
+
end
|
35
|
+
|
30
36
|
Tooling.define(:tooling)
|
31
37
|
|
32
38
|
task default: [:clobber, :compile, :tooling, :spec]
|
data/compile_commands.json
CHANGED
@@ -13,5 +13,10 @@
|
|
13
13
|
"command": "cc -c -I. -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-darwin16 -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../../../../ext/faster_support/core_ext/object/blank -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/morgan/projects/coach/faster_support/ext/faster_support -fno-common -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -o string_blank.o ../../../../../../../ext/faster_support/core_ext/object/blank/string_blank.c",
|
14
14
|
"directory": "/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/core_ext/object/blank/2.4.0",
|
15
15
|
"file": "/Users/morgan/projects/coach/faster_support/ext/faster_support/core_ext/object/blank/string_blank.c"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"command": "cc -c -I. -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-darwin16 -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/Users/morgan/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../../../ext/faster_support/core_ext/string -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Users/morgan/projects/coach/faster_support/ext/faster_support -fno-common -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -o string.o ../../../../../../ext/faster_support/core_ext/string/string.c",
|
19
|
+
"directory": "/Users/morgan/projects/coach/faster_support/tmp/x86_64-darwin16/faster_support/core_ext/string/2.4.0",
|
20
|
+
"file": "/Users/morgan/projects/coach/faster_support/ext/faster_support/core_ext/string/string.c"
|
16
21
|
}
|
17
22
|
]
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/* String core extensions */
|
2
|
+
|
3
|
+
#include "string.h"
|
4
|
+
|
5
|
+
static rb_encoding *ascii_8bit_enc;
|
6
|
+
|
7
|
+
static VALUE rb_str_to_ascii8bit(VALUE str)
|
8
|
+
{
|
9
|
+
rb_encoding *enc;
|
10
|
+
VALUE new_str;
|
11
|
+
|
12
|
+
enc = STR_ENC_GET(str);
|
13
|
+
|
14
|
+
if (enc == ascii_8bit_enc) {
|
15
|
+
return str;
|
16
|
+
}
|
17
|
+
|
18
|
+
if (OBJ_FROZEN(str)) {
|
19
|
+
new_str = rb_obj_dup(str);
|
20
|
+
}
|
21
|
+
else {
|
22
|
+
new_str = str;
|
23
|
+
}
|
24
|
+
|
25
|
+
rb_check_frozen(new_str);
|
26
|
+
rb_enc_associate(new_str, ascii_8bit_enc);
|
27
|
+
ENC_CODERANGE_CLEAR(new_str);
|
28
|
+
|
29
|
+
return new_str;
|
30
|
+
}
|
31
|
+
|
32
|
+
void Init_string(void)
|
33
|
+
{
|
34
|
+
ascii_8bit_enc = rb_ascii8bit_encoding();
|
35
|
+
rb_define_method(rb_cString, "ascii_8bit", rb_str_to_ascii8bit, 0);
|
36
|
+
rb_define_alias(rb_cString, "as_ascii_8bit", "ascii_8bit");
|
37
|
+
rb_define_alias(rb_cString, "as_8bit_ascii", "ascii_8bit");
|
38
|
+
}
|
data/faster_support.gemspec
CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
spec.extensions = ['ext/faster_support/extconf.rb',
|
25
|
-
'ext/faster_support/core_ext/object/blank/extconf.rb'
|
25
|
+
'ext/faster_support/core_ext/object/blank/extconf.rb',
|
26
|
+
'ext/faster_support/core_ext/string/extconf.rb']
|
26
27
|
|
27
28
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
28
29
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faster_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J. Morgan Lieberthal
|
@@ -73,6 +73,7 @@ executables: []
|
|
73
73
|
extensions:
|
74
74
|
- ext/faster_support/extconf.rb
|
75
75
|
- ext/faster_support/core_ext/object/blank/extconf.rb
|
76
|
+
- ext/faster_support/core_ext/string/extconf.rb
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
78
79
|
- ".clang-format"
|
@@ -96,6 +97,9 @@ files:
|
|
96
97
|
- ext/faster_support/core_ext/object/blank/extconf.rb
|
97
98
|
- ext/faster_support/core_ext/object/blank/object_blank.c
|
98
99
|
- ext/faster_support/core_ext/object/blank/string_blank.c
|
100
|
+
- ext/faster_support/core_ext/string/extconf.rb
|
101
|
+
- ext/faster_support/core_ext/string/string.c
|
102
|
+
- ext/faster_support/core_ext/string/string.h
|
99
103
|
- ext/faster_support/extconf.rb
|
100
104
|
- ext/faster_support/faster_support.c
|
101
105
|
- ext/faster_support/faster_support.h
|