as-duration 0.1.0 → 0.1.1

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: 0f6bacd1545efa2a36143899ac06d0aac39e0b88
4
- data.tar.gz: f1df67155ed5e3a1214f8b21809bd4b72d2964b4
3
+ metadata.gz: 19b4b28b075bf91a625f2e5d690347a6153ab9e8
4
+ data.tar.gz: 1f77a60a4b59d7ef4400cbaaa77a99e1c936fb8d
5
5
  SHA512:
6
- metadata.gz: d899e350fd9c36bb7487d9a403a240cba3a7acacc3db2cf9706bad718c0f164225f7c14aa59ce6ae49b538b4cb5427fbfaad061a52d10eef621dac2f4e50210d
7
- data.tar.gz: 583fef2d66ea1db4c79eb7d57f57ae7ca75fe36c0a586b5ded2d147a05a545b2859eb5fad2ba00f2e366e07621e7c943ae4eb2b53cd7e318b598e7bd731092cb
6
+ metadata.gz: 9657883fc583a900210ef41a56fd41171b092aa2da3d5cba2f5320df95c04b9ca0ba0ef8e49310c5f8b89602b79d52e936170f4ded9cd3ac2138ce98baded93e
7
+ data.tar.gz: 4e10496d1c77b883a483547f19c24f8ae1eadd4fa43ec0b9adec1caf52612e1edd32dd179cc64be0d61535bc7d3196628f237bb9ee9ca6c27a903a61bc629cb3
@@ -0,0 +1,19 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "as-duration"
3
+ spec.version = "0.1.1"
4
+ spec.authors = ["Janko Marohnić"]
5
+ spec.email = ["janko.marohnic@gmail.com"]
6
+
7
+ spec.required_ruby_version = ">= 2.0.0"
8
+
9
+ spec.summary = "Extraction of ActiveSupport::Duration and the related core extensions."
10
+ spec.description = spec.summary
11
+ spec.homepage = "https://github.com/janko-m/as-duration"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = Dir["README.md", "LICENSE.txt", "lib/**/*", "*.gemspec"]
15
+ spec.require_path = "lib"
16
+
17
+ spec.add_development_dependency "minitest", "5.6.0"
18
+ spec.add_development_dependency "rake"
19
+ end
@@ -14,6 +14,12 @@ module AS
14
14
  def to_i
15
15
  @value
16
16
  end
17
+
18
+ # reference: Rails-->activesupport/lib/active_support/duration.rb
19
+ # Add this method FOR something like 5.minutes.to_f, which is used in ActiveSupport::Cache::Entry#initialize.
20
+ def to_f
21
+ @value.to_f
22
+ end
17
23
 
18
24
  def <=>(other)
19
25
  return nil if not Duration === other
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: as-duration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -47,6 +47,7 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - LICENSE.txt
49
49
  - README.md
50
+ - as-duration.gemspec
50
51
  - lib/as-duration.rb
51
52
  - lib/as/duration.rb
52
53
  - lib/as/duration/core_ext.rb
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
76
  version: '0'
76
77
  requirements: []
77
78
  rubyforge_project:
78
- rubygems_version: 2.4.5
79
+ rubygems_version: 2.5.1
79
80
  signing_key:
80
81
  specification_version: 4
81
82
  summary: Extraction of ActiveSupport::Duration and the related core extensions.