sixarm_ruby_week 1.1.6 → 1.1.7

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8dec5e39582357dfbf6d7472430a0eed49753fe5
4
+ data.tar.gz: 56a4eb5324a009dd60e5d111738da350ccb4ebb0
5
+ SHA512:
6
+ metadata.gz: 4b24edfb3248bdb394b169f04393d6f80597363c2b3bb1152fd7d3705fc13eb6be7fe56c9c23e778fc13c807650c8490cbcfd83611c00ee260c7bdc0eedae8e2
7
+ data.tar.gz: 09c857e3cde0c8bbc846b9fc6823f3547182dd5a0c31427a2d3ca7c269f00e4b84b3619ab57d0d0948a397c81eda617910b54a142c0f059c1ec9db4587d77571
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -1,8 +1,15 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rake'
3
- require 'rake/testtask'
2
+ require "rake"
3
+ require "rake/testtask"
4
4
 
5
5
  Rake::TestTask.new(:test) do |t|
6
6
  t.libs << 'lib' << 'test'
7
7
  t.pattern = 'test/*.rb'
8
8
  end
9
+
10
+ task :default => [:test]
11
+ task :default => [:test]
12
+ task :default => [:test]
13
+ task :default => [:test]
14
+ task :default => [:test]
15
+ task :default => [:test]
@@ -3,7 +3,7 @@
3
3
  Please see README
4
4
  =end
5
5
 
6
- require 'date'
6
+ require "date"
7
7
 
8
8
 
9
9
  class Week
@@ -1,8 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- require 'simplecov'
2
+ require "minitest/autorun"
3
+ require "simplecov"
4
4
  SimpleCov.start
5
- require 'sixarm_ruby_week'
5
+
6
+ require "sixarm_ruby_week"
6
7
 
7
8
  describe Week do
8
9
 
@@ -30,13 +31,13 @@ describe Week do
30
31
  WEEK.date.must_be_kind_of Date
31
32
  end
32
33
 
33
- it "=> the date that initiazed the week" do
34
+ it "=> the date that initiazed the week" do
34
35
  WEEK.date.must_equal DATE
35
36
  end
36
37
 
37
38
  end
38
39
 
39
- describe "#to_s" do
40
+ describe "#to_s" do
40
41
 
41
42
  it "=> String" do
42
43
  WEEK.to_s.must_be_kind_of String
@@ -86,11 +87,11 @@ describe Week do
86
87
  end
87
88
 
88
89
  describe "#eql?" do
89
-
90
+
90
91
  it "weeks created from the same date => true" do
91
92
  assert(WEEK.eql? Week.new(DATE))
92
93
  end
93
-
94
+
94
95
  it "weeks created from different dates => false" do
95
96
  refute(WEEK.eql? Week.new(DATE+1))
96
97
  end
@@ -119,7 +120,7 @@ describe Week do
119
120
  (WEEK <=> WEEK).must_equal 0
120
121
  end
121
122
 
122
- it "x>y => 1" do
123
+ it "x>y => 1" do
123
124
  (WEEK <=> WEEK_PREV).must_equal 1
124
125
  end
125
126
 
@@ -158,7 +159,7 @@ describe Week do
158
159
  end
159
160
 
160
161
  describe ">" do
161
-
162
+
162
163
  it "x<y => false" do
163
164
  refute(WEEK > WEEK_NEXT)
164
165
  end
@@ -188,7 +189,7 @@ describe Week do
188
189
  end
189
190
 
190
191
  end
191
-
192
+
192
193
  describe "+" do
193
194
 
194
195
  describe "with Numeric type" do
@@ -223,11 +224,11 @@ describe Week do
223
224
  it "TypeError" do
224
225
  proc { WEEK + "foo" }.must_raise TypeError
225
226
  end
226
-
227
+
227
228
  end
228
229
 
229
230
  end
230
-
231
+
231
232
  describe "-" do
232
233
 
233
234
  describe "with Numeric type" do
@@ -258,13 +259,13 @@ describe Week do
258
259
  end
259
260
 
260
261
  describe "with Week type" do
261
-
262
+
262
263
  it "=> Integer" do
263
264
  (WEEK - WEEK).must_be_kind_of Integer
264
265
  end
265
266
 
266
267
  it "this week - previous week => 1" do
267
- (WEEK - WEEK_PREV).must_equal 1
268
+ (WEEK - WEEK_PREV).must_equal 1
268
269
  end
269
270
 
270
271
  it "this week - this week => 0" do
@@ -274,13 +275,13 @@ describe Week do
274
275
  it "this week - next week => -1" do
275
276
  (WEEK - WEEK_NEXT).must_equal -1
276
277
  end
277
-
278
+
278
279
  end
279
280
 
280
281
  describe "with bad type" do
281
282
 
282
283
  it "TypeError" do
283
- proc { WEEK - "foo" }.must_raise TypeError
284
+ proc { WEEK - "foo" }.must_raise TypeError
284
285
  end
285
286
 
286
287
  end
@@ -320,7 +321,7 @@ describe Week do
320
321
  it "=> the initialzation date" do
321
322
  WEEK.start_date.must_equal DATE
322
323
  end
323
-
324
+
324
325
  end
325
326
 
326
327
  describe "#end_date" do
metadata CHANGED
@@ -1,78 +1,168 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_week
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
5
- prerelease:
4
+ version: 1.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - SixArm
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQW0yZ0F3SUJB
14
- Z0lKQUtQd0VFVFU1YkhvTUEwR0NTcUdTSWIzRFFFQkJRVUFNR0F4Q3pBSkJn
15
- TlYKQkFZVEFsVlRNUk13RVFZRFZRUUlFd3BEWVd4cFptOXlibWxoTVJZd0ZB
16
- WURWUVFIRXcxVFlXNGdSbkpoYm1OcApjMk52TVE4d0RRWURWUVFLRXdaVGFY
17
- aEJjbTB4RXpBUkJnTlZCQU1UQ25OcGVHRnliUzVqYjIwd0hoY05NVEF4Ck1q
18
- RXpNak15TnpFeldoY05NVE13T1RBNE1qTXlOekV6V2pCZ01Rc3dDUVlEVlFR
19
- R0V3SlZVekVUTUJFR0ExVUUKQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFV
20
- RUJ4TU5VMkZ1SUVaeVlXNWphWE5qYnpFUE1BMEdBMVVFQ2hNRwpVMmw0UVhK
21
- dE1STXdFUVlEVlFRREV3cHphWGhoY20wdVkyOXRNSUdmTUEwR0NTcUdTSWIz
22
- RFFFQkFRVUFBNEdOCkFEQ0JpUUtCZ1FDOTRtRDlKRHdCc3Vuc09JMFZSM0NY
23
- WGJPV2c5Y1dhV2Npd0Z5Sk5GaU03QTlJOEtQTGZYVXcKUUM0Y3pVZTVadUc0
24
- V0h2aW5yV2hrckNLKzFkV0Jxb0VDbHhkRi9Gb0tPNWErdG9uR0Nqam1meTgx
25
- Sm1Gamp5eAplVHNqc0h5dncrUWlrOWtwZjlhajYrcG5rTnJWc3dnTkhWZWEy
26
- bzl5YWJiRWlTNlZTZUpXb1FJREFRQUJvNEhGCk1JSENNQjBHQTFVZERnUVdC
27
- QlF6UEp0cW1TZ2M1M2VETjdhU3pEUXdyOVRBTERDQmtnWURWUjBqQklHS01J
28
- R0gKZ0JRelBKdHFtU2djNTNlRE43YVN6RFF3cjlUQUxLRmtwR0l3WURFTE1B
29
- a0dBMVVFQmhNQ1ZWTXhFekFSQmdOVgpCQWdUQ2tOaGJHbG1iM0p1YVdFeEZq
30
- QVVCZ05WQkFjVERWTmhiaUJHY21GdVkybHpZMjh4RHpBTkJnTlZCQW9UCkJs
31
- TnBlRUZ5YlRFVE1CRUdBMVVFQXhNS2MybDRZWEp0TG1OdmJZSUpBS1B3RUVU
32
- VTViSG9NQXdHQTFVZEV3UUYKTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVGQlFB
33
- RGdZRUFvb0VleFAvb1BhbTFUUDcxU3l1aHhNYit1VHJaYlNRZQpqVkIrRXhS
34
- d1dhZEd3YU5QVUE1NmQzOXF3YXZ3UCtpdSszSnBlb25OTVZ2YldYRjVuYUNY
35
- L2RORkllUkVIekVSClpEUlFZTXFydTlURU1uYTZIRDl6cGNzdEY3dndUaEdv
36
- dmxPUSszWTZwbFE0bk16aXBYY1o5VEhxczY1UElMMHEKZWFid3BDYkFvcG89
37
- Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
38
- date: 2012-03-16 00:00:00.000000000 Z
39
- dependencies: []
40
- description:
11
+ - |
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hnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
44
+ 2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
+ n+ES/gQPOnvmVkLDGw==
46
+ -----END CERTIFICATE-----
47
+ date: 2015-07-10 00:00:00.000000000 Z
48
+ dependencies:
49
+ - !ruby/object:Gem::Dependency
50
+ name: minitest
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 5.7.0
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: '6'
59
+ type: :development
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 5.7.0
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: '6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">"
74
+ - !ruby/object:Gem::Version
75
+ version: 10.4.2
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '11'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">"
84
+ - !ruby/object:Gem::Version
85
+ version: 10.4.2
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '11'
89
+ - !ruby/object:Gem::Dependency
90
+ name: simplecov
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 0.10.0
96
+ - - "<"
97
+ - !ruby/object:Gem::Version
98
+ version: '2'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 0.10.0
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: '2'
109
+ - !ruby/object:Gem::Dependency
110
+ name: coveralls
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 0.8.2
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: '2'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 0.8.2
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: '2'
129
+ description: Week model, based on Ruby Date
41
130
  email: sixarm@sixarm.com
42
131
  executables: []
43
132
  extensions: []
44
133
  extra_rdoc_files: []
45
134
  files:
46
- - .gemtest
47
135
  - Rakefile
48
- - README.md
49
- - VERSION
50
136
  - lib/sixarm_ruby_week.rb
51
137
  - test/sixarm_ruby_week_test.rb
52
138
  homepage: http://sixarm.com/
53
- licenses: []
139
+ licenses:
140
+ - BSD
141
+ - GPL
142
+ - MIT
143
+ - PAL
144
+ - Various
145
+ metadata: {}
54
146
  post_install_message:
55
147
  rdoc_options: []
56
148
  require_paths:
57
149
  - lib
58
150
  required_ruby_version: !ruby/object:Gem::Requirement
59
- none: false
60
151
  requirements:
61
- - - ! '>='
152
+ - - ">="
62
153
  - !ruby/object:Gem::Version
63
154
  version: '0'
64
155
  required_rubygems_version: !ruby/object:Gem::Requirement
65
- none: false
66
156
  requirements:
67
- - - ! '>='
157
+ - - ">="
68
158
  - !ruby/object:Gem::Version
69
159
  version: '0'
70
160
  requirements: []
71
161
  rubyforge_project:
72
- rubygems_version: 1.8.11
162
+ rubygems_version: 2.4.8
73
163
  signing_key:
74
- specification_version: 3
75
- summary: SixArm.com » Ruby » Week model based on Ruby Date
164
+ specification_version: 4
165
+ summary: SixArm.com » Ruby » Week
76
166
  test_files:
77
167
  - test/sixarm_ruby_week_test.rb
78
168
  has_rdoc: true
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes
data/README.md DELETED
@@ -1,120 +0,0 @@
1
- # SixArm.com » Ruby » <br> Week model based on Ruby Date
2
-
3
- * Docs: <http://sixarm.com/sixarm_ruby_week/doc>
4
- * Repo: <http://github.com/sixarm/sixarm_ruby_week>
5
- * Email: Joel Parker Henderson, <joel@sixarm.com>
6
-
7
-
8
- ## Introduction
9
-
10
- This gem models a week, based on the built-in Ruby Date class.
11
-
12
- For docs go to <http://sixarm.com/sixarm_ruby_week/doc>
13
-
14
- Want to help? We're happy to get pull requests.
15
-
16
-
17
- ## Quickstart
18
-
19
- Install:
20
-
21
- gem install sixarm_ruby_week
22
-
23
- Bundler:
24
-
25
- gem "sixarm_ruby_week", "=1.1.4"
26
-
27
- Require:
28
-
29
- require "sixarm_ruby_week"
30
-
31
-
32
- ## High Security (Optional)
33
-
34
- To enable high security for all our gems:
35
-
36
- wget http://sixarm.com/sixarm.pem
37
- gem cert --add sixarm.pem
38
- gem sources --add http://sixarm.com
39
-
40
- To install with high security:
41
-
42
- gem install sixarm_ruby_week --test --trust-policy HighSecurity
43
-
44
-
45
- ## Examples
46
-
47
- Create:
48
-
49
- date = Date.parse('2012-01-02')
50
- week = Week.new(date)
51
- week.to_s => '2012-01-02'
52
-
53
- Parse:
54
-
55
- week = Week.parse('2012-01-02')
56
- week => 2012-01-02
57
-
58
- Enumerable:
59
-
60
- week.previous => 2011-12-26
61
- week.next => 2012-01-16
62
-
63
- Math:
64
-
65
- week - 3 => 2011-12-12
66
- week + 3 => 2012-01-24
67
-
68
- Start & End Dates:
69
-
70
- week.start_date => 2012-01-02
71
- week.end_date => 2012-01-08
72
-
73
- Range:
74
-
75
- week.date_range => Range(2012-01-02..2012-01-08)
76
-
77
- Collection:
78
-
79
- date = Date.parse('2012-01-02')
80
- week.include?(date) => true
81
- week.include?(date+7) => false
82
-
83
-
84
- ## Changes
85
-
86
- * 2012-03-16 1.1.6 Upgrade for Ruby 1.9.3, minitest/spec, and improved docs.
87
- * 2012-03-12 1.1.4 Improve tests from test/unit style toward minitest/spec style
88
- * 2012-03-11 1.1.2 Add #date_range method to return start_date..end_date
89
- * 2012-03-10 1.1.1 Rename #includes? to #include? because it matches Ruby's Array include? method
90
- * 2012-02-24 1.1.0 Add methods .now, #includes?, #previous, #next, #start_date, #end_date, and improve examples
91
- * 2012-02-23 1.0.0 Updates for gem publishing
92
-
93
-
94
- ## License
95
-
96
- You may choose any of these open source licenses:
97
-
98
- * Apache License
99
- * BSD License
100
- * CreativeCommons License, Non-commercial Share Alike
101
- * GNU General Public License Version 2 (GPL 2)
102
- * GNU Lesser General Public License (LGPL)
103
- * MIT License
104
- * Perl Artistic License
105
- * Ruby License
106
-
107
- The software is provided "as is", without warranty of any kind,
108
- express or implied, including but not limited to the warranties of
109
- merchantability, fitness for a particular purpose and noninfringement.
110
-
111
- In no event shall the authors or copyright holders be liable for any
112
- claim, damages or other liability, whether in an action of contract,
113
- tort or otherwise, arising from, out of or in connection with the
114
- software or the use or other dealings in the software.
115
-
116
- This license is for the included software that is created by SixArm;
117
- some of the included software may have its own licenses, copyrights,
118
- authors, etc. and these do take precedence over the SixArm license.
119
-
120
- Copyright (c) 2013 Joel Parker Henderson
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.1.4