weekling 1.0.0 → 1.0.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.
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/HISTORY.md +9 -0
- data/README.md +49 -20
- data/Rakefile +3 -2
- data/lib/aef/weekling.rb +3 -4
- data/lib/aef/weekling/version.rb +30 -0
- data/lib/weekling.rb +4 -4
- data/weekling.gemspec +8 -7
- metadata +20 -30
- metadata.gz.sig +0 -0
- data/Gemfile.lock +0 -54
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -4,11 +4,11 @@ Weekling
|
|
4
4
|
[](
|
5
5
|
https://secure.travis-ci.org/aef/weekling)
|
6
6
|
|
7
|
-
* [Documentation][
|
8
|
-
* [Project][
|
7
|
+
* [Documentation][docs]
|
8
|
+
* [Project][project]
|
9
9
|
|
10
|
-
[
|
11
|
-
[
|
10
|
+
[docs]: http://rdoc.info/projects/aef/weekling/
|
11
|
+
[project]: https://github.com/aef/weekling/
|
12
12
|
|
13
13
|
Description
|
14
14
|
-----------
|
@@ -20,28 +20,30 @@ week-days are interpreted as in ISO 8601.
|
|
20
20
|
Features / Problems
|
21
21
|
-------------------
|
22
22
|
|
23
|
-
This
|
23
|
+
This project tries to conform to:
|
24
24
|
|
25
|
-
* [Semantic Versioning (2.0.0-rc.1)][
|
26
|
-
* [Ruby Packaging Standard (0.5-draft)][
|
27
|
-
* [Ruby Style Guide][
|
28
|
-
* [Gem Packaging: Best Practices][
|
25
|
+
* [Semantic Versioning (2.0.0-rc.1)][semver]
|
26
|
+
* [Ruby Packaging Standard (0.5-draft)][rps]
|
27
|
+
* [Ruby Style Guide][style]
|
28
|
+
* [Gem Packaging: Best Practices][gem]
|
29
29
|
|
30
|
-
[
|
31
|
-
[
|
32
|
-
[
|
33
|
-
[
|
30
|
+
[semver]: http://semver.org/
|
31
|
+
[rps]: http://chneukirchen.github.com/rps/
|
32
|
+
[style]: https://github.com/bbatsov/ruby-style-guide
|
33
|
+
[gem]: http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices
|
34
34
|
|
35
35
|
Additional facts:
|
36
36
|
|
37
37
|
* Written purely in Ruby.
|
38
|
+
* Documented with YARD.
|
38
39
|
* Intended to be used with Ruby 1.9.2 or compatible.
|
39
40
|
* Extends core classes. This can be disabled through bare mode.
|
41
|
+
* Cryptographically signed gem and git tags.
|
40
42
|
|
41
43
|
Synopsis
|
42
44
|
--------
|
43
45
|
|
44
|
-
This documentation defines the public interface of the
|
46
|
+
This documentation defines the public interface of the software. Don't rely
|
45
47
|
on elements marked as private. Those should be hidden in the documentation
|
46
48
|
by default.
|
47
49
|
|
@@ -314,7 +316,7 @@ week_day.thursday?
|
|
314
316
|
Requirements
|
315
317
|
------------
|
316
318
|
|
317
|
-
|
319
|
+
* Ruby 1.9.2 or compatible
|
318
320
|
|
319
321
|
Installation
|
320
322
|
------------
|
@@ -326,9 +328,8 @@ privileges.
|
|
326
328
|
|
327
329
|
There is a high security installation option available through rubygems. It is
|
328
330
|
highly recommended over the normal installation, although it may be a bit less
|
329
|
-
comfortable. To use the installation method, you will need my
|
330
|
-
I use for cryptographic signatures on all my gems.
|
331
|
-
here: http://aef.name/crypto/aef-gem.pem
|
331
|
+
comfortable. To use the installation method, you will need my [gem signing
|
332
|
+
public key][gemkey], which I use for cryptographic signatures on all my gems.
|
332
333
|
|
333
334
|
Add the key to your rubygems' trusted certificates by the following command:
|
334
335
|
|
@@ -340,7 +341,9 @@ following command:
|
|
340
341
|
gem install weekling -P HighSecurity
|
341
342
|
|
342
343
|
Please notice that you may need other keys for dependent libraries, so you may
|
343
|
-
have to install dependencies manually.
|
344
|
+
have to install dependencies manually.
|
345
|
+
|
346
|
+
[gemkey]: http://aef.name/crypto/aef-gem.pem
|
344
347
|
|
345
348
|
### Normal
|
346
349
|
|
@@ -362,15 +365,41 @@ If something goes wrong you should be noticed through failing examples.
|
|
362
365
|
Development
|
363
366
|
-----------
|
364
367
|
|
368
|
+
### Bugs Reports and Feature Requests
|
369
|
+
|
370
|
+
Please use the [issue tracker][issues] on github.com to let me know about errors
|
371
|
+
or ideas for improvement of this software.
|
372
|
+
|
373
|
+
[issues]: https://github.com/aef/weekling/issues/
|
374
|
+
|
375
|
+
### Source code
|
376
|
+
|
365
377
|
This software is developed in the source code management system git hosted
|
366
378
|
at github.com. You can download the most recent sourcecode through the
|
367
379
|
following command:
|
368
380
|
|
369
381
|
git clone https://github.com/aef/weekling.git
|
370
382
|
|
383
|
+
The final commit before each released gem version will be marked by a tag
|
384
|
+
named like the version with a prefixed lower-case "v", as required by Semantic
|
385
|
+
Versioning. Every tag will be signed by my [OpenPGP public key][openpgp] which
|
386
|
+
enables you to verify your copy of the code cryptographically.
|
387
|
+
|
388
|
+
[openpgp]: http://aef.name/crypto/aef-openpgp.asc
|
389
|
+
|
390
|
+
Add the key to your GnuPG keyring by the following command:
|
391
|
+
|
392
|
+
gpg --import aef-openpgp.asc
|
393
|
+
|
394
|
+
This command will tell you if your code is of integrity and authentic:
|
395
|
+
|
396
|
+
git tag -v [TAG NAME]
|
397
|
+
|
398
|
+
### Contribution
|
399
|
+
|
371
400
|
Help on making this software better is always very appreciated. If you want
|
372
401
|
your changes to be included in the official release, please clone my project
|
373
|
-
on github.com, create a named branch to commit and push your changes
|
402
|
+
on github.com, create a named branch to commit and push your changes into and
|
374
403
|
send me a pull request afterwards.
|
375
404
|
|
376
405
|
Please make sure to write tests for your changes so that I won't break them
|
data/Rakefile
CHANGED
@@ -17,9 +17,9 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
17
|
PERFORMANCE OF THIS SOFTWARE.
|
18
18
|
=end
|
19
19
|
|
20
|
+
require 'bundler/gem_tasks'
|
20
21
|
require 'rake'
|
21
22
|
require 'pathname'
|
22
|
-
require 'bundler/gem_tasks'
|
23
23
|
require 'yard'
|
24
24
|
require 'rspec/core/rake_task'
|
25
25
|
|
@@ -29,7 +29,7 @@ YARD::Rake::YardocTask.new('doc')
|
|
29
29
|
|
30
30
|
desc "Removes temporary project files"
|
31
31
|
task :clean do
|
32
|
-
%w{doc coverage pkg .yardoc .rbx}.map{|name| Pathname.new(name) }.each do |path|
|
32
|
+
%w{doc coverage pkg .yardoc .rbx Gemfile.lock}.map{|name| Pathname.new(name) }.each do |path|
|
33
33
|
path.rmtree if path.exist?
|
34
34
|
end
|
35
35
|
|
@@ -39,6 +39,7 @@ end
|
|
39
39
|
|
40
40
|
desc "Opens an interactive console with the library loaded"
|
41
41
|
task :console do
|
42
|
+
Bundler.setup
|
42
43
|
require 'pry'
|
43
44
|
require 'weekling'
|
44
45
|
Pry.start
|
data/lib/aef/weekling.rb
CHANGED
@@ -17,6 +17,8 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
17
|
PERFORMANCE OF THIS SOFTWARE.
|
18
18
|
=end
|
19
19
|
|
20
|
+
require 'time'
|
21
|
+
|
20
22
|
# Namespace for projects of Alexander E. Fischer <aef@raxys.net>.
|
21
23
|
#
|
22
24
|
# If you want to be able to simply type Example instead of Aef::Example to
|
@@ -31,13 +33,10 @@ module Aef
|
|
31
33
|
# Namespace for components of the weekling gem
|
32
34
|
module Weekling
|
33
35
|
|
34
|
-
# The currently loaded library version
|
35
|
-
VERSION = '1.0.0'.freeze
|
36
|
-
|
37
36
|
end
|
38
37
|
end
|
39
38
|
|
40
|
-
require '
|
39
|
+
require 'aef/weekling/version'
|
41
40
|
require 'aef/weekling/year'
|
42
41
|
require 'aef/weekling/week'
|
43
42
|
require 'aef/weekling/week_day'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
=begin
|
3
|
+
Copyright Alexander E. Fischer <aef@raxys.net>, 2012
|
4
|
+
|
5
|
+
This file is part of Weekling.
|
6
|
+
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
8
|
+
purpose with or without fee is hereby granted, provided that the above
|
9
|
+
copyright notice and this permission notice appear in all copies.
|
10
|
+
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
13
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
18
|
+
=end
|
19
|
+
|
20
|
+
module Aef
|
21
|
+
module Weekling
|
22
|
+
|
23
|
+
# The currently loaded library version
|
24
|
+
#
|
25
|
+
# Using Semantic Versioning (2.0.0-rc.1) rules
|
26
|
+
# @see http://semver.org/
|
27
|
+
VERSION = '1.0.1'.freeze
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
data/lib/weekling.rb
CHANGED
@@ -23,11 +23,11 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
23
23
|
|
24
24
|
require 'aef/weekling'
|
25
25
|
|
26
|
-
Object.
|
26
|
+
Object.send(:include, Aef::Weekling)
|
27
27
|
|
28
|
-
Integer.
|
28
|
+
Integer.send(:include, Aef::Weekling::CoreExtensions::ToYear)
|
29
29
|
|
30
30
|
[Date, Time, DateTime].each do |klass|
|
31
|
-
klass.
|
32
|
-
klass.
|
31
|
+
klass.send(:include, Aef::Weekling::CoreExtensions::ToYear)
|
32
|
+
klass.send(:include, Aef::Weekling::CoreExtensions::ToWeekAndWeekDay)
|
33
33
|
end
|
data/weekling.gemspec
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
=begin
|
3
|
+
Copyright Alexander E. Fischer <aef@raxys.net>, 2012
|
4
|
+
|
3
5
|
This file is part of Weekling.
|
4
6
|
|
5
7
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -15,9 +17,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
17
|
PERFORMANCE OF THIS SOFTWARE.
|
16
18
|
=end
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
require 'weekling/bare'
|
20
|
+
require File.expand_path('../lib/aef/weekling/version', __FILE__)
|
21
21
|
|
22
22
|
Gem::Specification.new do |s|
|
23
23
|
s.name = 'weekling'
|
@@ -42,13 +42,14 @@ week-days are interpreted as in ISO 8601.
|
|
42
42
|
s.executables = `git ls-files -- bin/*`.lines.map{|f| File.basename(f.chomp) }
|
43
43
|
s.require_paths = ["lib"]
|
44
44
|
|
45
|
-
s.
|
45
|
+
s.required_ruby_version = '>= 1.9.2'
|
46
|
+
|
47
|
+
s.add_development_dependency('bundler', '~> 1.1.0')
|
46
48
|
s.add_development_dependency('rake', '~> 0.9.2')
|
47
|
-
s.add_development_dependency('rspec', '~> 2.
|
48
|
-
s.add_development_dependency('simplecov', '~> 0.
|
49
|
+
s.add_development_dependency('rspec', '~> 2.8.0')
|
50
|
+
s.add_development_dependency('simplecov', '~> 0.6.1')
|
49
51
|
s.add_development_dependency('pry', '~> 0.9.8')
|
50
52
|
s.add_development_dependency('yard', '~> 0.7.5')
|
51
|
-
s.add_development_dependency('maruku', '~> 0.6.0')
|
52
53
|
|
53
54
|
s.cert_chain = "#{ENV['GEM_CERT_CHAIN']}".split(':')
|
54
55
|
s.signing_key = ENV['GEM_SIGNING_KEY']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weekling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -48,22 +48,22 @@ cert_chain:
|
|
48
48
|
-----END CERTIFICATE-----
|
49
49
|
|
50
50
|
'
|
51
|
-
date: 2012-
|
51
|
+
date: 2012-04-04 00:00:00.000000000 Z
|
52
52
|
dependencies:
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: bundler
|
55
|
-
requirement: &
|
55
|
+
requirement: &22840780 !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
58
58
|
- - ~>
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.0
|
60
|
+
version: 1.1.0
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
|
-
version_requirements: *
|
63
|
+
version_requirements: *22840780
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: rake
|
66
|
-
requirement: &
|
66
|
+
requirement: &22840260 !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
68
68
|
requirements:
|
69
69
|
- - ~>
|
@@ -71,32 +71,32 @@ dependencies:
|
|
71
71
|
version: 0.9.2
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
|
-
version_requirements: *
|
74
|
+
version_requirements: *22840260
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rspec
|
77
|
-
requirement: &
|
77
|
+
requirement: &22839760 !ruby/object:Gem::Requirement
|
78
78
|
none: false
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.
|
82
|
+
version: 2.8.0
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
|
-
version_requirements: *
|
85
|
+
version_requirements: *22839760
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
87
|
name: simplecov
|
88
|
-
requirement: &
|
88
|
+
requirement: &22839300 !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.
|
93
|
+
version: 0.6.1
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
|
-
version_requirements: *
|
96
|
+
version_requirements: *22839300
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
|
-
requirement: &
|
99
|
+
requirement: &22838840 !ruby/object:Gem::Requirement
|
100
100
|
none: false
|
101
101
|
requirements:
|
102
102
|
- - ~>
|
@@ -104,10 +104,10 @@ dependencies:
|
|
104
104
|
version: 0.9.8
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
|
-
version_requirements: *
|
107
|
+
version_requirements: *22838840
|
108
108
|
- !ruby/object:Gem::Dependency
|
109
109
|
name: yard
|
110
|
-
requirement: &
|
110
|
+
requirement: &22838380 !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
113
113
|
- - ~>
|
@@ -115,18 +115,7 @@ dependencies:
|
|
115
115
|
version: 0.7.5
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
|
-
version_requirements: *
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
name: maruku
|
121
|
-
requirement: &15288040 !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
|
-
requirements:
|
124
|
-
- - ~>
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: 0.6.0
|
127
|
-
type: :development
|
128
|
-
prerelease: false
|
129
|
-
version_requirements: *15288040
|
118
|
+
version_requirements: *22838380
|
130
119
|
description: ! 'Weekling is a Ruby library which provides class representations to
|
131
120
|
make date
|
132
121
|
|
@@ -144,10 +133,10 @@ extra_rdoc_files:
|
|
144
133
|
- LICENSE.md
|
145
134
|
files:
|
146
135
|
- .gitignore
|
136
|
+
- .rspec
|
147
137
|
- .travis.yml
|
148
138
|
- .yardopts
|
149
139
|
- Gemfile
|
150
|
-
- Gemfile.lock
|
151
140
|
- HISTORY.md
|
152
141
|
- LICENSE.md
|
153
142
|
- README.md
|
@@ -156,6 +145,7 @@ files:
|
|
156
145
|
- lib/aef/weekling/core_extensions.rb
|
157
146
|
- lib/aef/weekling/core_extensions/to_week_and_week_day.rb
|
158
147
|
- lib/aef/weekling/core_extensions/to_year.rb
|
148
|
+
- lib/aef/weekling/version.rb
|
159
149
|
- lib/aef/weekling/week.rb
|
160
150
|
- lib/aef/weekling/week_day.rb
|
161
151
|
- lib/aef/weekling/year.rb
|
@@ -179,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
169
|
requirements:
|
180
170
|
- - ! '>='
|
181
171
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
172
|
+
version: 1.9.2
|
183
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
174
|
none: false
|
185
175
|
requirements:
|
metadata.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
weekling (1.0.0rc1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
coderay (1.0.5)
|
10
|
-
diff-lcs (1.1.3)
|
11
|
-
maruku (0.6.0)
|
12
|
-
syntax (>= 1.0.0)
|
13
|
-
method_source (0.7.0)
|
14
|
-
multi_json (1.0.4)
|
15
|
-
pry (0.9.8)
|
16
|
-
coderay (~> 1.0.5)
|
17
|
-
method_source (~> 0.7)
|
18
|
-
slop (>= 2.4.3, < 3)
|
19
|
-
pry (0.9.8-java)
|
20
|
-
coderay (~> 1.0.5)
|
21
|
-
method_source (~> 0.7)
|
22
|
-
slop (>= 2.4.3, < 3)
|
23
|
-
spoon (~> 0.0)
|
24
|
-
rake (0.9.2.2)
|
25
|
-
rspec (2.6.0)
|
26
|
-
rspec-core (~> 2.6.0)
|
27
|
-
rspec-expectations (~> 2.6.0)
|
28
|
-
rspec-mocks (~> 2.6.0)
|
29
|
-
rspec-core (2.6.4)
|
30
|
-
rspec-expectations (2.6.0)
|
31
|
-
diff-lcs (~> 1.1.2)
|
32
|
-
rspec-mocks (2.6.0)
|
33
|
-
simplecov (0.5.4)
|
34
|
-
multi_json (~> 1.0.3)
|
35
|
-
simplecov-html (~> 0.5.3)
|
36
|
-
simplecov-html (0.5.3)
|
37
|
-
slop (2.4.3)
|
38
|
-
spoon (0.0.1)
|
39
|
-
syntax (1.0.0)
|
40
|
-
yard (0.7.5)
|
41
|
-
|
42
|
-
PLATFORMS
|
43
|
-
java
|
44
|
-
ruby
|
45
|
-
|
46
|
-
DEPENDENCIES
|
47
|
-
bundler (~> 1.0.21)
|
48
|
-
maruku (~> 0.6.0)
|
49
|
-
pry (~> 0.9.8)
|
50
|
-
rake (~> 0.9.2)
|
51
|
-
rspec (~> 2.6.0)
|
52
|
-
simplecov (~> 0.5.4)
|
53
|
-
weekling!
|
54
|
-
yard (~> 0.7.5)
|