active_object 1.3.0 → 1.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68ffe211f664a7cd4a2fe3463d03625e1f0e5b61
4
- data.tar.gz: 8c0eed8e763427704f8f48e13f8f546eccf123d1
3
+ metadata.gz: b908cec473063ce9371f42ad24f3e2160449288d
4
+ data.tar.gz: 372517125c14abffe2e4608b087197b7720ae913
5
5
  SHA512:
6
- metadata.gz: 64f1721c2b934fb00cc8d0df125946db44ed9cba4ff6e09f6daf32a109b296a3fa3ad648a1d6bd3c6df25eba6c95096c9c3fc444a1475786cc658f58c2986785
7
- data.tar.gz: 825ab8ed4749a483ed9a2e981578a8e0b73767ddeb0ce1b1c721e5c9a0b1f6330f025d6b96a146694670b9926634c9ee17f9a8e3ae017b8ae1e0ae701de81748
6
+ metadata.gz: 58811199b70a9c498ebb85894461c9ce61b1ff2b414018a3373459908ff5d061d7cd465d9f0825d7b91a8028d361cb1673b85f307e5f44db749e97e32e77708d
7
+ data.tar.gz: a335da3d616ac49e2fb1da3655db8fa436287fd6ad470b9a916c1618b41867b510322f6174cdb2e83f0e32d5f3198add747e95c18c78dbc8ae03714c2e35fe62
data/Rakefile CHANGED
@@ -1 +1,3 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
2
+
3
+ task default: :spec
@@ -285,15 +285,15 @@ class String
285
285
 
286
286
  unless defined?(Rails)
287
287
  def truncate(truncate_at, options={})
288
- return(dup) unless length > truncate_at
288
+ return(dup) unless size > truncate_at
289
289
 
290
290
  omission = options.fetch(:omission, "...")
291
- length_with_room_for_omission = truncate_at - omission.length
291
+ size_with_room_for_omission = truncate_at - omission.size
292
292
 
293
293
  stop = if options.fetch(:separator, false)
294
- rindex(options.fetch(:separator, ''), length_with_room_for_omission) || length_with_room_for_omission
294
+ rindex(options.fetch(:separator, ''), size_with_room_for_omission) || size_with_room_for_omission
295
295
  else
296
- length_with_room_for_omission
296
+ size_with_room_for_omission
297
297
  end
298
298
 
299
299
  "#{self[0, stop]}#{omission}"
@@ -1,3 +1,3 @@
1
1
  module ActiveObject
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler