timeboss 0.2.2 → 0.2.3
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 +4 -4
- data/.replit +2 -0
- data/README.md +5 -5
- data/lib/tasks/calendars.rake +4 -2
- data/lib/timeboss/calendar.rb +1 -0
- data/lib/timeboss/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a8966731f645860d665b2a333b2996dad5e1224d25703ddfdd4f155779645df
|
4
|
+
data.tar.gz: d087b039000b8b7999eaeae1ba98526618741aef3535238551314e79446d9b8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c77aac0422e2ba3da7c8422014ddfa0196388c27c4d9e78775909099a6a2461d0b6d86f5f2b265fda05718711e60818f33519c17f025f4952cf7ff950444e2
|
7
|
+
data.tar.gz: a5cbb8b93686382b75222a191405de36449d725dee28db2dd396c9d8e394fa41d8da7dd41229c3c9674d7ba6c2ad78f9fe03f720a3279d47f0f4cc14eb41d939
|
data/.replit
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# TimeBoss [](https://travis-ci.com/kevinstuffandthings/timeboss) [](https://badge.fury.io/rb/timeboss)
|
1
|
+
# TimeBoss [](https://travis-ci.com/kevinstuffandthings/timeboss) [](https://badge.fury.io/rb/timeboss) [](https://repl.it/github/kevinstuffandthings/timeboss)
|
2
2
|
|
3
3
|
A gem providing convenient navigation of the [Broadcast Calendar](https://en.wikipedia.org/wiki/Broadcast_calendar), the standard Gregorian calendar, and is easily extensible to support multiple financial calendars.
|
4
4
|
|
@@ -135,12 +135,12 @@ period = calendar.parse('2020W3..2020Q1')
|
|
135
135
|
|
136
136
|
The examples above are just samples. Try different periods, operators, etc. All of the non-week-based operations will work similarly on the `TimeBoss::Calendars::Gregorian` calendar.
|
137
137
|
|
138
|
-
###
|
139
|
-
To open
|
138
|
+
### REPL
|
139
|
+
To open a REPL for the broadcast calendar, use the `tbsh` executable, or the `timeboss:calendars:broadcast:repl` rake task.
|
140
140
|
|
141
141
|
For the Gregorian calendar (or any other implemented calendars), supply the name on the command line.
|
142
142
|
- `tbsh gregorian`
|
143
|
-
- `rake timeboss:calendars:gregorian:
|
143
|
+
- `rake timeboss:calendars:gregorian:repl`
|
144
144
|
|
145
145
|
You will find yourself in the context of an instantiated `TimeBoss::Calendar` object:
|
146
146
|
|
@@ -154,7 +154,7 @@ $ tbsh
|
|
154
154
|
=> ["2020M7", "2020M8", "2020M9", "2020M10", "2020M11", "2020M12", "2021M1", "2021M2", "2021M3", "2021M4", "2021M5", "2021M6", "2021M7", "2021M8", "2021M9"]
|
155
155
|
```
|
156
156
|
|
157
|
-
_Having trouble with the
|
157
|
+
_Having trouble with the REPL? If you are using the examples from the [Usage](#Usage) section, keep in mind that the REPL is already in the context of the calendar -- so you don't need to specify the receiver!_
|
158
158
|
|
159
159
|
## Creating new calendars
|
160
160
|
To create a custom calendar, simply extend the `TimeBoss::Calendar` class, and implement a new `TimeBoss::Calendar::Support::MonthBasis` for it.
|
data/lib/tasks/calendars.rake
CHANGED
@@ -9,11 +9,13 @@ namespace :timeboss do
|
|
9
9
|
puts entry.calendar.parse(args[:expression])
|
10
10
|
end
|
11
11
|
|
12
|
-
desc "Open a
|
13
|
-
task
|
12
|
+
desc "Open a REPL with the #{entry.name} calendar"
|
13
|
+
task repl: ['timeboss:init'] do
|
14
14
|
require 'timeboss/support/shellable'
|
15
15
|
TimeBoss::Support::Shellable.open(entry.calendar)
|
16
16
|
end
|
17
|
+
|
18
|
+
task shell: ["timeboss:calendars:#{entry.name}:repl"]
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/timeboss/calendar.rb
CHANGED
data/lib/timeboss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timeboss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McDonald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
134
134
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
135
135
|
- ".gitignore"
|
136
|
+
- ".replit"
|
136
137
|
- ".rspec"
|
137
138
|
- ".travis.yml"
|
138
139
|
- ".yardopts"
|