bootstripe 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/bootstripe.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Bootstripe::VERSION
8
8
  s.authors = ["Mike Laurence"]
9
9
  s.email = ["mike@bytebin.com"]
10
- s.homepage = "http://bytebin.com"
10
+ s.homepage = "http://github.com/bytebin/bootstripe"
11
11
  s.summary = %q{A handful of useful additions for Ruby}
12
12
  s.description = %q{A handful of useful additions for Ruby}
13
13
 
@@ -37,10 +37,4 @@ class Numeric
37
37
  "#{minutes}:#{seconds}"
38
38
  end
39
39
 
40
- end
41
-
42
- class BigDecimal
43
- def as_json(options = {})
44
- to_f
45
- end
46
40
  end
@@ -1,10 +1,6 @@
1
1
  class String
2
- def decapitalize!
3
- replace (self.reverse.chop + self.reverse.last.downcase).reverse
4
- end
5
-
6
2
  def decapitalize
7
- dup.decapitalize!
3
+ self[0, 1].downcase + self[1..-1]
8
4
  end
9
5
 
10
6
  def to_class
@@ -1,3 +1,3 @@
1
1
  module Bootstripe
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -2,15 +2,16 @@ require 'spec_helper'
2
2
 
3
3
  describe Numeric do
4
4
 
5
- it 'should report 00:00' do
5
+ it 'should report formatted time accurately' do
6
6
  0.to_formatted_time.should eq '00:00'
7
- end
8
-
9
- it 'should report 01:01' do
10
7
  (60.75).to_formatted_time.should eq '01:01'
8
+ (673.2).to_formatted_time.should eq '11:13'
11
9
  end
12
10
 
13
- it 'should report 11:13' do
14
- (673.2).to_formatted_time.should eq '11:13'
11
+ it 'should periods accurately' do
12
+ 3600.to_period.should eq '1h'
13
+ 7260.to_period.should eq '2h 1m'
14
+ (86400 + 10).to_period.should eq '1d 10s'
15
15
  end
16
+
16
17
  end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe String do
4
+
5
+ it 'should decapitalize' do
6
+ 'Sweet String'.decapitalize.should eq 'sweet String'
7
+ end
8
+
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-10 00:00:00.000000000Z
12
+ date: 2011-12-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70273530058540 !ruby/object:Gem::Requirement
16
+ requirement: &70096044310980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70273530058540
24
+ version_requirements: *70096044310980
25
25
  description: A handful of useful additions for Ruby
26
26
  email:
27
27
  - mike@bytebin.com
@@ -43,7 +43,8 @@ files:
43
43
  - spec/array_additions_spec.rb
44
44
  - spec/number_additions_spec.rb
45
45
  - spec/spec_helper.rb
46
- homepage: http://bytebin.com
46
+ - spec/string_additions_spec.rb
47
+ homepage: http://github.com/bytebin/bootstripe
47
48
  licenses: []
48
49
  post_install_message:
49
50
  rdoc_options: []
@@ -71,3 +72,4 @@ test_files:
71
72
  - spec/array_additions_spec.rb
72
73
  - spec/number_additions_spec.rb
73
74
  - spec/spec_helper.rb
75
+ - spec/string_additions_spec.rb