Skip to content

Commit 1f24442

Browse files
committedJan 8, 2014
Make dependencies more liberal for opal
1 parent 0314b1a commit 1f24442

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎Gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
gem 'opal', '~> 0.5.0'
5+
gem 'opal', :github => 'opal/opal'
6+
gem 'opal-rspec', '0.3.0.beta2'

‎opal-activesupport.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
2020
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
2121
gem.require_paths = ['lib']
2222

23-
gem.add_dependency 'opal'
23+
gem.add_dependency 'opal', ['>= 0.5.0', '< 1.0.0']
2424
gem.add_development_dependency 'rake'
2525
gem.add_development_dependency 'opal-rspec'
2626
end

‎opal/active_support/core_ext/string.rb

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ def parameterize
44
end
55

66
def dasherize
7-
`#{self}.replace(/[-_\\s]+/g, '-')
8-
.replace(/([A-Z\\d]+)([A-Z][a-z])/g, '$1-$2')
9-
.replace(/([a-z\\d])([A-Z])/g, '$1-$2')
7+
`#{self}.replace(/[-_\s]+/g, '-')
8+
.replace(/([A-Z\d]+)([A-Z][a-z])/g, '$1-$2')
9+
.replace(/([a-z\d])([A-Z])/g, '$1-$2')
1010
.toLowerCase()`
1111
end
1212

@@ -23,9 +23,9 @@ def demodulize
2323
end
2424

2525
def underscore
26-
`#{self}.replace(/[-\\s]+/g, '_')
27-
.replace(/([A-Z\\d]+)([A-Z][a-z])/g, '$1_$2')
28-
.replace(/([a-z\\d])([A-Z])/g, '$1_$2')
26+
`#{self}.replace(/[-\s]+/g, '_')
27+
.replace(/([A-Z\d]+)([A-Z][a-z])/g, '$1_$2')
28+
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
2929
.replace(/-/g, '_')
3030
.toLowerCase()`
3131
end
@@ -37,5 +37,4 @@ def camelize(first_letter = :upper)
3737
})`
3838
end
3939
alias_method :camelcase, :camelize
40-
4140
end

0 commit comments

Comments
 (0)
Please sign in to comment.