Skip to content

Commit

Permalink
Make dependencies more liberal for opal
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Jan 8, 2014
1 parent 0314b1a commit 1f24442
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -2,4 +2,5 @@ source 'https://rubygems.org'

gemspec

gem 'opal', '~> 0.5.0'
gem 'opal', :github => 'opal/opal'
gem 'opal-rspec', '0.3.0.beta2'
2 changes: 1 addition & 1 deletion opal-activesupport.gemspec
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ['lib']

gem.add_dependency 'opal'
gem.add_dependency 'opal', ['>= 0.5.0', '< 1.0.0']
gem.add_development_dependency 'rake'
gem.add_development_dependency 'opal-rspec'
end
13 changes: 6 additions & 7 deletions opal/active_support/core_ext/string.rb
Expand Up @@ -4,9 +4,9 @@ def parameterize
end

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

Expand All @@ -23,9 +23,9 @@ def demodulize
end

def underscore
`#{self}.replace(/[-\\s]+/g, '_')
.replace(/([A-Z\\d]+)([A-Z][a-z])/g, '$1_$2')
.replace(/([a-z\\d])([A-Z])/g, '$1_$2')
`#{self}.replace(/[-\s]+/g, '_')
.replace(/([A-Z\d]+)([A-Z][a-z])/g, '$1_$2')
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
.replace(/-/g, '_')
.toLowerCase()`
end
Expand All @@ -37,5 +37,4 @@ def camelize(first_letter = :upper)
})`
end
alias_method :camelcase, :camelize

end

0 comments on commit 1f24442

Please sign in to comment.