webs 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('webs', '0.1.20') do |p|
6
+ Echoe.new('webs', '0.1.21') do |p|
7
7
  p.description = "Reusable webs stuff."
8
8
  p.url = "https://colczak@github.com/websdev/websgem.git"
9
9
  p.author = "Chuck Olczak"
@@ -43,6 +43,12 @@ module Webs
43
43
  self.instance_variable_set("@#{k.to_s}".to_sym, val)
44
44
  end
45
45
  end
46
+
47
+ def breaking_wrap( s, max_width=5 )
48
+ return s if s.blank? || s.length < max_width
49
+ r = Regexp.new( ".{1,#{max_width}}" )
50
+ s.scan(r).join("<wbr>")
51
+ end
46
52
  end
47
53
  end
48
54
  end
data/lib/webs.rb CHANGED
@@ -7,35 +7,8 @@ require dir + 'helper/params'
7
7
  require dir + 'helper/tags'
8
8
 
9
9
  module Webs
10
- VERSION = '0.1.20'.freeze
10
+ VERSION = '0.1.21'.freeze
11
11
 
12
- # def self.load_constants
13
- # s = File.read("#{Pathname(__FILE__).dirname.expand_path}/config/webs_constants.yml")
14
- # Rails.logger.debug ERB.new( File.read("#{Pathname(__FILE__).dirname.expand_path}/config/webs_constants.yml") ).result
15
- # config = YAML.load( ERB.new( File.read("#{Pathname(__FILE__).dirname.expand_path}/config/webs_constants.yml") ).result )
16
- #
17
- # # CREATE CONSTANTS FOR EACH KEY
18
- # config.each_key do |k|
19
- # v = config[k]
20
- # # convert strings to symbols
21
- # # TODO: might need to do children
22
- # if v.is_a?(Hash)
23
- # h = {}
24
- # v.each_key { |vk| vk.is_a?(String) ? h[vk.to_sym] = v[vk] : h[vk] = v[vk] }
25
- # v = h
26
- # end
27
- # self.const_set(k.to_s.upcase, v)
28
- # end
29
- # map_permission_levels
30
- # end
31
-
32
- # def self.map_permission_levels
33
- # h = {}
34
- # PERMISSION_LEVEL.each_value{ |v| h[v['value']] = v }
35
- # self.const_set('PERMISSION_LEVELS_BY_VALUE', h)
36
- # self.const_set('PERMISSION_LEVELS', PERMISSION_LEVEL.keys)
37
- # end
38
-
39
12
  def self.app_title
40
13
  APP_NAME.titleize
41
14
  end
data/webs.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{webs}
5
- s.version = "0.1.20"
5
+ s.version = "0.1.21"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chuck Olczak"]
9
- s.date = %q{2011-03-17}
9
+ s.date = %q{2011-03-23}
10
10
  s.description = %q{Reusable webs stuff.}
11
11
  s.email = %q{chuck@webs.com}
12
12
  gemfiles = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 20
10
- version: 0.1.20
9
+ - 21
10
+ version: 0.1.21
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chuck Olczak
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-17 00:00:00 -04:00
18
+ date: 2011-03-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21