sanscript 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -5
- data/README.md +1 -1
- data/Rakefile +8 -0
- data/lib/sanscript.rb +4 -1
- data/lib/sanscript/benchmark.rb +2 -2
- data/lib/sanscript/detect.rb +15 -62
- data/lib/sanscript/detect/constants.rb +52 -0
- data/lib/sanscript/detect/rust.rb +1 -1
- data/lib/sanscript/exceptions.rb +0 -1
- data/lib/sanscript/rust.rb +0 -4
- data/lib/sanscript/transliterate/schemes.rb +0 -1
- data/lib/sanscript/version.rb +1 -1
- data/sanscript.gemspec +2 -2
- data/src/detect/ruby.rs +18 -19
- data/src/lib.rs +1 -2
- data/src/rb.rs +25 -21
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c50d574983e399ea044b60c2d8ece2a624d561ca
|
4
|
+
data.tar.gz: 7b8b068883034401079c3671f6ca60b9f777d5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39a77f3cc096bb673ad499539f7e8bae0e6300c5401c091391b3dd1e3305f8d7ec278d5dd16b19cf8a9ac1e4144bd3f606ff07e5d1028f198b499585bab893e9
|
7
|
+
data.tar.gz: 8b9a1fbe21223ca924c62e83c487cd3ea2be68735cee2207b66970644f6a3a8c307173b8287c916286bcddc1e989867abd775b4a43e4a31b14c36bf2882b29d8
|
data/.travis.yml
CHANGED
@@ -1,15 +1,24 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
+
- 2.4.0
|
4
5
|
- 2.3.3
|
5
|
-
- 2.2
|
6
|
-
-
|
6
|
+
- 2.2.6
|
7
|
+
- ruby-head
|
8
|
+
env:
|
9
|
+
- RUST=yes
|
10
|
+
- RUST=no
|
11
|
+
|
7
12
|
matrix:
|
8
13
|
allow_failures:
|
9
|
-
- rvm:
|
14
|
+
- rvm: ruby-head
|
15
|
+
|
16
|
+
before_install:
|
17
|
+
- if [[ "$RUST" == "yes" ]]; then curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable; export PATH="$HOME/.cargo/bin:$PATH"; fi
|
18
|
+
|
19
|
+
script:
|
20
|
+
- if [[ "$RUST" == "yes" ]]; then bundle exec rake SPEC_OPTS="--format p"; else bundle exec rake spec SPEC_OPTS="--format p"; fi
|
10
21
|
|
11
|
-
before_install: gem install bundler -v 1.13.6
|
12
|
-
script: bundle exec rake spec SPEC_OPTS="--format p"
|
13
22
|
addons:
|
14
23
|
code_climate:
|
15
24
|
repo_token: b4319eb676f021fb9473aa342324abd74f58d146e174f3cdf57f103bab052f25
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/sanscript.svg)](https://badge.fury.io/rb/sanscript)
|
4
4
|
[![Dependency Status](https://gemnasium.com/badges/github.com/ubcsanskrit/sanscript.rb.svg)](https://gemnasium.com/github.com/ubcsanskrit/sanscript.rb)
|
5
5
|
[![Build Status](https://travis-ci.org/ubcsanskrit/sanscript.rb.svg?branch=master)](https://travis-ci.org/ubcsanskrit/sanscript.rb)
|
6
|
-
[![
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/github/ubcsanskrit/sanscript.rb/badge.svg?branch=master)](https://coveralls.io/github/ubcsanskrit/sanscript.rb?branch=master)
|
7
7
|
[![Code Climate](https://codeclimate.com/github/ubcsanskrit/sanscript.rb/badges/gpa.svg)](https://codeclimate.com/github/ubcsanskrit/sanscript.rb)
|
8
8
|
[![Inline docs](http://inch-ci.org/github/ubcsanskrit/sanscript.rb.svg?branch=master)](http://inch-ci.org/github/ubcsanskrit/sanscript.rb)
|
9
9
|
|
data/Rakefile
CHANGED
data/lib/sanscript.rb
CHANGED
@@ -25,9 +25,11 @@ module Sanscript
|
|
25
25
|
Detect.detect_scheme(text)
|
26
26
|
end
|
27
27
|
|
28
|
-
# Transliterates a string
|
28
|
+
# Transliterates a string from one scheme to another.
|
29
|
+
# Proxy for {Transliterate.transliterate}
|
29
30
|
#
|
30
31
|
# @overload transliterate(text, from, to, **opts)
|
32
|
+
# Transliterates a string from one scheme to another.
|
31
33
|
# @param text [String] the String to transliterate
|
32
34
|
# @param from [Symbol, nil] the name of the scheme to transliterate from, or Nil to detect
|
33
35
|
# @param to [Symbol] the name of the scheme to transliterate to
|
@@ -40,6 +42,7 @@ module Sanscript
|
|
40
42
|
# @raise [SchemeNotSupportedError] if a provided transliteration scheme is not supported
|
41
43
|
#
|
42
44
|
# @overload transliterate(text, to, **opts)
|
45
|
+
# Transliterates a string, detecting its source-scheme first.
|
43
46
|
# @param text [String] the String to transliterate
|
44
47
|
# @param to [Symbol] the name of the scheme to transliterate to
|
45
48
|
# @option opts [Symbol] :default_scheme a default scheme to fall-back to if detection fails
|
data/lib/sanscript/benchmark.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Sanscript
|
4
|
-
# :nocov:
|
5
4
|
begin
|
6
5
|
require "benchmark/ips"
|
7
6
|
rescue LoadError
|
7
|
+
#:nocov:
|
8
8
|
module ::Benchmark
|
9
9
|
def self.ips(*)
|
10
10
|
raise NotImplementedError, "You must install the `benchmark-ips` gem first."
|
11
11
|
end
|
12
12
|
end
|
13
|
+
#:nocov:
|
13
14
|
end
|
14
|
-
# :nocov:
|
15
15
|
|
16
16
|
# Benchmark/testing module.
|
17
17
|
module Benchmark
|
data/lib/sanscript/detect.rb
CHANGED
@@ -1,67 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require "sanscript/detect/constants"
|
2
3
|
|
3
4
|
module Sanscript
|
4
5
|
# Transliteration scheme detection module.
|
5
6
|
# Developed from code available @ https://github.com/sanskrit/detect.js
|
6
7
|
module Detect
|
7
|
-
# Match any character in the block of Brahmic scripts
|
8
|
-
# between Devanagari and Malayalam.
|
9
|
-
RE_BRAHMIC_RANGE = /[\u0900-\u0d7f]/
|
10
|
-
|
11
|
-
# Match each individual Brahmic script.
|
12
|
-
RE_BRAHMIC_SCRIPTS = {
|
13
|
-
devanagari: /\p{Devanagari}/,
|
14
|
-
bengali: /\p{Bengali}/,
|
15
|
-
gurmukhi: /\p{Gurmukhi}/,
|
16
|
-
gujarati: /\p{Gujarati}/,
|
17
|
-
oriya: /\p{Oriya}/,
|
18
|
-
tamil: /\p{Tamil}/,
|
19
|
-
telugu: /\p{Telugu}/,
|
20
|
-
kannada: /\p{Kannada}/,
|
21
|
-
malayalam: /\p{Malayalam}/,
|
22
|
-
}.freeze
|
23
|
-
|
24
|
-
# Match on special Roman characters
|
25
|
-
RE_IAST_OR_KOLKATA_ONLY = /[āīūṛṝḷḹēōṃḥṅñṭḍṇśṣḻ]/i
|
26
|
-
|
27
|
-
# Match on Kolkata-specific Roman characters
|
28
|
-
RE_KOLKATA_ONLY = /[ēō]/i
|
29
|
-
|
30
|
-
# Match on ITRANS-only
|
31
|
-
RE_ITRANS_ONLY = /ee|oo|\^[iI]|RR[iI]|L[iI]|~N|N\^|Ch|chh|JN|sh|Sh|\.a/
|
32
|
-
|
33
|
-
# Match on SLP1-only characters and bigrams
|
34
|
-
RE_SLP1_ONLY = /[fFxXEOCYwWqQPB]|kz|N[kg]|tT|dD|S[cn]|[aAiIuUeo]R|G[yr]/
|
35
|
-
|
36
|
-
# Match on Velthuis-only characters
|
37
|
-
RE_VELTHUIS_ONLY = /\.[mhnrlntds]|"n|~s/
|
38
|
-
|
39
|
-
# Match on chars shared by ITRANS and Velthuis
|
40
|
-
RE_ITRANS_OR_VELTHUIS_ONLY = /aa|ii|uu|~n/
|
41
|
-
|
42
|
-
# Match on characters available in Harvard-Kyoto
|
43
|
-
RE_HARVARD_KYOTO = /[aAiIuUeoRMHkgGcjJTDNtdnpbmyrlvzSsh]/
|
44
|
-
|
45
|
-
# Match ##...## or {#...#} control blocks.
|
46
|
-
RE_CONTROL_BLOCK = /(?<!\\)##.*?(?<!\\)##|(?<!\\)\{#.*?(?<!\\)#\}/
|
47
|
-
|
48
|
-
private_constant :RE_BRAHMIC_RANGE, :RE_BRAHMIC_SCRIPTS, :RE_IAST_OR_KOLKATA_ONLY,
|
49
|
-
:RE_KOLKATA_ONLY, :RE_ITRANS_ONLY, :RE_SLP1_ONLY, :RE_VELTHUIS_ONLY,
|
50
|
-
:RE_ITRANS_OR_VELTHUIS_ONLY, :RE_HARVARD_KYOTO, :RE_CONTROL_BLOCK
|
51
|
-
|
52
|
-
# @!method detect_scheme(text)
|
53
|
-
# Attempts to detect the encoding scheme of the provided string.
|
54
|
-
#
|
55
|
-
# Uses the most efficient implementation for your ruby version
|
56
|
-
# (either {Ruby2x#ruby_detect_scheme} or {Ruby24#ruby_detect_scheme})
|
57
|
-
# at first, which may be then overriden by the Rust native extension
|
58
|
-
# (see {Sanscript#rust_enable!} and {Sanscript#rust_disable!}})
|
59
|
-
#
|
60
|
-
# @param text [String] a string of Sanskrit text
|
61
|
-
# @return [Symbol, nil] the Symbol of the scheme, or nil if no match
|
62
|
-
|
63
|
-
# @!visibility private
|
64
|
-
# :nocov:
|
65
8
|
if Regexp.method_defined?(:match?)
|
66
9
|
require "sanscript/detect/ruby24"
|
67
10
|
extend Ruby24
|
@@ -69,9 +12,19 @@ module Sanscript
|
|
69
12
|
require "sanscript/detect/ruby2x"
|
70
13
|
extend Ruby2x
|
71
14
|
end
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
15
|
+
|
16
|
+
# @!method detect_scheme(text)
|
17
|
+
# Attempts to detect the encoding scheme of the provided string.
|
18
|
+
#
|
19
|
+
# Uses the most efficient implementation for your ruby version
|
20
|
+
# (either {Ruby2x#ruby_detect_scheme} or {Ruby24#ruby_detect_scheme})
|
21
|
+
# at first, which may be then overriden by the Rust native extension
|
22
|
+
# (see {Sanscript.rust_enable!} and {Sanscript.rust_disable!})
|
23
|
+
#
|
24
|
+
# @param text [String] a string of Sanskrit text
|
25
|
+
# @return [Symbol, nil] the Symbol of the scheme, or nil if no match
|
26
|
+
# @!scope module
|
27
|
+
# @!visibility public
|
28
|
+
singleton_class.send(:alias_method, :detect_scheme, :ruby_detect_scheme)
|
76
29
|
end
|
77
30
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sanscript
|
4
|
+
module Detect
|
5
|
+
# Constants for scheme detection
|
6
|
+
|
7
|
+
# Match any character in the block of Brahmic scripts
|
8
|
+
# between Devanagari and Malayalam.
|
9
|
+
RE_BRAHMIC_RANGE = /[\u0900-\u0d7f]/
|
10
|
+
|
11
|
+
# Match each individual Brahmic script.
|
12
|
+
RE_BRAHMIC_SCRIPTS = {
|
13
|
+
devanagari: /\p{Devanagari}/,
|
14
|
+
bengali: /\p{Bengali}/,
|
15
|
+
gurmukhi: /\p{Gurmukhi}/,
|
16
|
+
gujarati: /\p{Gujarati}/,
|
17
|
+
oriya: /\p{Oriya}/,
|
18
|
+
tamil: /\p{Tamil}/,
|
19
|
+
telugu: /\p{Telugu}/,
|
20
|
+
kannada: /\p{Kannada}/,
|
21
|
+
malayalam: /\p{Malayalam}/,
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
# Match on special Roman characters
|
25
|
+
RE_IAST_OR_KOLKATA_ONLY = /[āīūṛṝḷḹēōṃḥṅñṭḍṇśṣḻ]/i
|
26
|
+
|
27
|
+
# Match on Kolkata-specific Roman characters
|
28
|
+
RE_KOLKATA_ONLY = /[ēō]/i
|
29
|
+
|
30
|
+
# Match on ITRANS-only
|
31
|
+
RE_ITRANS_ONLY = /ee|oo|\^[iI]|RR[iI]|L[iI]|~N|N\^|Ch|chh|JN|sh|Sh|\.a/
|
32
|
+
|
33
|
+
# Match on SLP1-only characters and bigrams
|
34
|
+
RE_SLP1_ONLY = /[fFxXEOCYwWqQPB]|kz|N[kg]|tT|dD|S[cn]|[aAiIuUeo]R|G[yr]/
|
35
|
+
|
36
|
+
# Match on Velthuis-only characters
|
37
|
+
RE_VELTHUIS_ONLY = /\.[mhnrlntds]|"n|~s/
|
38
|
+
|
39
|
+
# Match on chars shared by ITRANS and Velthuis
|
40
|
+
RE_ITRANS_OR_VELTHUIS_ONLY = /aa|ii|uu|~n/
|
41
|
+
|
42
|
+
# Match on characters available in Harvard-Kyoto
|
43
|
+
RE_HARVARD_KYOTO = /[aAiIuUeoRMHkgGcjJTDNtdnpbmyrlvzSsh]/
|
44
|
+
|
45
|
+
# Match ##...## or {#...#} control blocks.
|
46
|
+
RE_CONTROL_BLOCK = /(?<!\\)##.*?(?<!\\)##|(?<!\\)\{#.*?(?<!\\)#\}/
|
47
|
+
|
48
|
+
private_constant :RE_BRAHMIC_RANGE, :RE_BRAHMIC_SCRIPTS, :RE_IAST_OR_KOLKATA_ONLY,
|
49
|
+
:RE_KOLKATA_ONLY, :RE_ITRANS_ONLY, :RE_SLP1_ONLY, :RE_VELTHUIS_ONLY,
|
50
|
+
:RE_ITRANS_OR_VELTHUIS_ONLY, :RE_HARVARD_KYOTO, :RE_CONTROL_BLOCK
|
51
|
+
end
|
52
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Sanscript
|
4
4
|
module Detect
|
5
5
|
# Module stub for implementing `detect_scheme` method using Rust native extension.
|
6
|
-
# (Note: This module will only exist if the native extension is available and {Sanscript.
|
6
|
+
# (Note: This module will only exist if the native extension is available and {Sanscript.rust_load!} has been run.)
|
7
7
|
module Rust
|
8
8
|
# @!method rust_detect_scheme(text)
|
9
9
|
# Attempts to detect the encoding scheme of the provided string.
|
data/lib/sanscript/exceptions.rb
CHANGED
data/lib/sanscript/rust.rb
CHANGED
@@ -10,11 +10,9 @@ module Sanscript
|
|
10
10
|
Thermite::Fiddle.load_module("init_rusty_sanscript",
|
11
11
|
cargo_project_path: GEM_ROOT,
|
12
12
|
ruby_project_path: GEM_ROOT)
|
13
|
-
#:nocov:#
|
14
13
|
defined?(Sanscript::Rust) ? true : false
|
15
14
|
rescue Fiddle::DLError
|
16
15
|
false
|
17
|
-
#:nocov:#
|
18
16
|
end
|
19
17
|
|
20
18
|
# @return [bool] the enabled status of the Rust extension
|
@@ -26,12 +24,10 @@ module Sanscript
|
|
26
24
|
# @return [bool] the enabled status of the Rust extension
|
27
25
|
def rust_enable!
|
28
26
|
return false unless RUST_AVAILABLE
|
29
|
-
# :nocov:
|
30
27
|
Detect.singleton_class.class_eval do
|
31
28
|
alias_method :detect_scheme, :rust_detect_scheme
|
32
29
|
end
|
33
30
|
@rust_enabled = true
|
34
|
-
# :nocov:
|
35
31
|
end
|
36
32
|
|
37
33
|
# Turns off Rust native extension.
|
data/lib/sanscript/version.rb
CHANGED
data/sanscript.gemspec
CHANGED
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.required_ruby_version = "~> 2.2"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.13"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
26
|
+
spec.add_development_dependency "rake", "~> 12"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.5"
|
28
|
-
spec.add_development_dependency "
|
28
|
+
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
29
|
spec.add_development_dependency "rubocop", "~> 0.43"
|
30
30
|
spec.add_development_dependency "rubocop-rspec", "~> 1.7"
|
31
31
|
spec.add_development_dependency "pry", "~> 0.10"
|
data/src/detect/ruby.rs
CHANGED
@@ -1,34 +1,33 @@
|
|
1
1
|
use detect;
|
2
2
|
|
3
3
|
use rb;
|
4
|
-
use rb::{CallbackPtr, Value};
|
4
|
+
use rb::{CallbackPtr, Value, RB_NIL};
|
5
5
|
|
6
6
|
// Initialize all of the Ruby-specific static variables.
|
7
7
|
lazy_static! {
|
8
8
|
// Lookup table for Ruby Results
|
9
9
|
static ref RUBY_RESULTS: [Value; 16] = [
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
RB_NIL, // 0
|
11
|
+
str2sym!("devanagari"), // 1
|
12
|
+
str2sym!("bengali") , // 2
|
13
|
+
str2sym!("gurmukhi"), // 3
|
14
|
+
str2sym!("gujarati"), // 4
|
15
|
+
str2sym!("oriya"), // 5
|
16
|
+
str2sym!("tamil"), // 6
|
17
|
+
str2sym!("telugu"), // 7
|
18
|
+
str2sym!("kannada"), // 8
|
19
|
+
str2sym!("malayalam"), // 9
|
20
|
+
str2sym!("iast"), // 10
|
21
|
+
str2sym!("kolkata"), // 11
|
22
|
+
str2sym!("itrans"), // 12
|
23
|
+
str2sym!("slp1"), // 13
|
24
|
+
str2sym!("velthuis"), // 14
|
25
|
+
str2sym!("hk") // 15
|
26
26
|
];
|
27
27
|
}
|
28
28
|
|
29
29
|
fn rbstr_detect_scheme(_rself: Value, s: Value) -> Value {
|
30
|
-
let
|
31
|
-
let result = detect::detect_scheme(r_str);
|
30
|
+
let result = detect::detect_scheme(&rbstr2str!(&s));
|
32
31
|
return RUBY_RESULTS[result];
|
33
32
|
}
|
34
33
|
|
data/src/lib.rs
CHANGED
data/src/rb.rs
CHANGED
@@ -1,47 +1,51 @@
|
|
1
|
-
use
|
2
|
-
|
3
|
-
use ruby_sys::{class, string, symbol, util};
|
1
|
+
use ruby_sys::class;
|
4
2
|
use ruby_sys::value::RubySpecialConsts::Nil;
|
5
3
|
|
6
4
|
pub use ruby_sys::types::{CallbackPtr, Value};
|
7
5
|
pub const RB_NIL: Value = Value { value: Nil as usize };
|
8
6
|
|
9
7
|
//
|
10
|
-
// Helper functions for dealing with Ruby and CStrings
|
8
|
+
// Helper functions/macros for dealing with Ruby and CStrings
|
11
9
|
//
|
12
10
|
|
13
|
-
|
14
|
-
CString::new(s).unwrap()
|
11
|
+
macro_rules! str2cstr {
|
12
|
+
($s:expr) => { ::std::ffi::CString::new($s).unwrap() }
|
13
|
+
}
|
14
|
+
|
15
|
+
macro_rules! str2cstrp {
|
16
|
+
($s:expr) => { str2cstr!($s).as_ptr() }
|
15
17
|
}
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
macro_rules! rbstr2cstrp {
|
20
|
+
($s:expr) => { ::ruby_sys::string::rb_string_value_cstr($s) }
|
21
|
+
}
|
22
|
+
|
23
|
+
macro_rules! rbstr2str {
|
24
|
+
($s:expr) => {
|
25
|
+
unsafe { ::std::ffi::CStr::from_ptr(rbstr2cstrp!($s)).to_str().unwrap() }
|
21
26
|
}
|
22
27
|
}
|
23
28
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
+
macro_rules! str2rbid {
|
30
|
+
($s:expr) => { ::ruby_sys::util::rb_intern(str2cstrp!($s)) }
|
31
|
+
}
|
32
|
+
|
33
|
+
macro_rules! str2sym {
|
34
|
+
($s:expr) => {
|
35
|
+
unsafe { ::ruby_sys::symbol::rb_id2sym(str2rbid!($s)) }
|
29
36
|
}
|
30
37
|
}
|
31
38
|
|
32
39
|
pub fn define_module(name: &str) -> Value {
|
33
|
-
|
34
|
-
unsafe { class::rb_define_module(c_str.as_ptr()) }
|
40
|
+
unsafe { class::rb_define_module(str2cstrp!(name)) }
|
35
41
|
}
|
36
42
|
|
37
43
|
pub fn define_module_under(parent: &Value, name: &str) -> Value {
|
38
|
-
|
39
|
-
unsafe { class::rb_define_module_under(*parent, c_str.as_ptr()) }
|
44
|
+
unsafe { class::rb_define_module_under(*parent, str2cstrp!(name)) }
|
40
45
|
}
|
41
46
|
|
42
47
|
pub fn define_method(module: &Value, name: &str, method: CallbackPtr, argc: i32) {
|
43
|
-
|
44
|
-
unsafe { class::rb_define_method(*module, c_str.as_ptr(), method, argc) }
|
48
|
+
unsafe { class::rb_define_method(*module, str2cstrp!(name), method, argc) }
|
45
49
|
}
|
46
50
|
|
47
51
|
pub fn extend_object(object: &Value, module: &Value) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Bellefleur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,6 +188,7 @@ files:
|
|
188
188
|
- lib/sanscript.rb
|
189
189
|
- lib/sanscript/benchmark.rb
|
190
190
|
- lib/sanscript/detect.rb
|
191
|
+
- lib/sanscript/detect/constants.rb
|
191
192
|
- lib/sanscript/detect/ruby24.rb
|
192
193
|
- lib/sanscript/detect/ruby2x.rb
|
193
194
|
- lib/sanscript/detect/rust.rb
|