opal-activesupport 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/opal/activesupport/version.rb +1 -1
- data/opal-activesupport.gemspec +5 -2
- data/opal/active_support/core_ext/string.rb +4 -0
- data/spec/core_ext/string_spec.rb +10 -1
- data/spec/inflector_test_cases.rb +13 -0
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05503ae39c125be204b6e7a30921e5670b75df73
|
4
|
+
data.tar.gz: 878e851f134727580575071d0a687fbdec13fe7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eac98e9d6353d62a92f0c4e7f05afc7170fffda43f5143ecdece7d2ba3eaa7dcc0ca0b1d81ec5f80976c4434501bce969046b098408fc7e90b508a206a2c3f51
|
7
|
+
data.tar.gz: 3e232e993bf00cc56a3f0154a7a604eb0886cd86cdc88b40dc65155c59892f48239773a1a9b2a8723440ece606ba7f3ae278d034a5f3dfe96d1602ce8a5ebd91
|
data/opal-activesupport.gemspec
CHANGED
@@ -11,12 +11,15 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = %q{The port of the glorious ActiveSupport for Opal}
|
12
12
|
gem.summary = %q{The port of the glorious ActiveSupport for Opal}
|
13
13
|
gem.homepage = 'http://opalrb.org'
|
14
|
+
gem.rdoc_options << '--main' << 'README' <<
|
15
|
+
'--line-numbers' <<
|
16
|
+
'--include' << 'opal'
|
14
17
|
|
15
18
|
gem.files = `git ls-files`.split($/)
|
16
19
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
21
|
gem.require_paths = ['lib']
|
19
22
|
|
20
|
-
gem.add_dependency 'opal', '~> 0.
|
21
|
-
gem.add_development_dependency 'opal-spec', '~> 0.2.
|
23
|
+
gem.add_dependency 'opal', '~> 0.4.2'
|
24
|
+
gem.add_development_dependency 'opal-spec', '~> 0.2.17'
|
22
25
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'active_support/core_ext/string'
|
3
|
+
require 'inflector_test_cases'
|
3
4
|
|
4
5
|
describe 'String' do
|
5
|
-
|
6
6
|
describe "#demodulize" do
|
7
7
|
it "removes any preceding module name from the string" do
|
8
8
|
"Foo::Bar".demodulize.should == "Bar"
|
@@ -15,6 +15,15 @@ describe 'String' do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '#underscore' do
|
18
|
+
it "camel to underscore" do
|
19
|
+
CamelToUnderscore.each do |camel, underscore|
|
20
|
+
camel.underscore.should eq(underscore)
|
21
|
+
end
|
22
|
+
|
23
|
+
"HTMLTidy".underscore.should eq("html_tidy")
|
24
|
+
"HTMLTidyGenerator".underscore.should eq("html_tidy_generator")
|
25
|
+
end
|
26
|
+
|
18
27
|
it "replaces '-' in dasherized strings with underscores" do
|
19
28
|
"well-hello-there".underscore.should == "well_hello_there"
|
20
29
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
CamelToUnderscore = {
|
2
|
+
"Product" => "product",
|
3
|
+
"SpecialGuest" => "special_guest",
|
4
|
+
"ApplicationController" => "application_controller",
|
5
|
+
"Area51Controller" => "area51_controller"
|
6
|
+
}
|
7
|
+
|
8
|
+
UnderscoreToLowerCamel = {
|
9
|
+
"product" => "product",
|
10
|
+
"special_guest" => "specialGuest",
|
11
|
+
"application_controller" => "applicationController",
|
12
|
+
"area51_controller" => "area51Controller"
|
13
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia Schito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.4.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.4.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: opal-spec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.
|
33
|
+
version: 0.2.17
|
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: 0.2.
|
40
|
+
version: 0.2.17
|
41
41
|
description: The port of the glorious ActiveSupport for Opal
|
42
42
|
email:
|
43
43
|
- elia@schito.me
|
@@ -63,12 +63,18 @@ files:
|
|
63
63
|
- spec/core_ext/object/blank_spec.rb
|
64
64
|
- spec/core_ext/string_spec.rb
|
65
65
|
- spec/empty_bool.rb
|
66
|
+
- spec/inflector_test_cases.rb
|
66
67
|
- spec/spec_helper.rb
|
67
68
|
homepage: http://opalrb.org
|
68
69
|
licenses: []
|
69
70
|
metadata: {}
|
70
71
|
post_install_message:
|
71
|
-
rdoc_options:
|
72
|
+
rdoc_options:
|
73
|
+
- --main
|
74
|
+
- README
|
75
|
+
- --line-numbers
|
76
|
+
- --include
|
77
|
+
- opal
|
72
78
|
require_paths:
|
73
79
|
- lib
|
74
80
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -91,4 +97,5 @@ test_files:
|
|
91
97
|
- spec/core_ext/object/blank_spec.rb
|
92
98
|
- spec/core_ext/string_spec.rb
|
93
99
|
- spec/empty_bool.rb
|
100
|
+
- spec/inflector_test_cases.rb
|
94
101
|
- spec/spec_helper.rb
|