timeboss 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.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +33 -0
- data/.travis.yml +0 -9
- data/README.md +11 -1
- data/bin/tbsh +2 -2
- data/lib/tasks/calendars.rake +2 -2
- data/lib/timeboss/version.rb +1 -1
- data/timeboss.gemspec +1 -0
- metadata +22 -7
- data/lib/timeboss/support/shellable.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 847be3292a921e4222074f98d62271bfbea96b9b
|
4
|
+
data.tar.gz: 40866d6a468f3dddc282af7ef893637a8e323b9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e06fb2e4b8d023d3725a2db5fb98a427cf4b705be7f34e5ca7a52a4c8e3aca9a142868d0f5e01529727c46fa86513daf8a27cdb20fabca5b783b4d74145691a1
|
7
|
+
data.tar.gz: ef5d7f72b7f26469cc5c34d3628faae0a75cdcc91b0d41c84cb2d81c9767abcf3729269a453fe352dbe69d09e4a719f24688d2495e735f17faf3bc0d4e5bb512
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
25
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
26
|
+
# uses: ruby/setup-ruby@v1
|
27
|
+
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
28
|
+
with:
|
29
|
+
ruby-version: 2.6
|
30
|
+
- name: Install dependencies
|
31
|
+
run: bundle install
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rspec
|
data/.travis.yml
CHANGED
@@ -5,12 +5,3 @@ rvm:
|
|
5
5
|
- 2.6
|
6
6
|
script:
|
7
7
|
- bundle exec rspec
|
8
|
-
deploy:
|
9
|
-
provider: rubygems
|
10
|
-
api_key:
|
11
|
-
secure: jUWa2Jx0HRVv7Dl0zYPTskHQ+RJGy2TUcBWOjyFbBUbeDKiRh8J/NnbMuCOvmL94htSaFk5lcs6k74Itu6jW12+KyT98OAnOardFPFuI0cHHhIMEhF6ms8EhyOCZ0vvR9zav11gfNzyF716qO09DQSDuoKWWNdhrYj8a5paLdbHuRqQiw3YUmnjVQ/v9SPYaZ7ziXC4X4tBxQhK2ujNsNfztSVrpYb6pnsXnt+hFQOnskzi0+er4854iymykeyNVgB71KgivrE3T55ZTXPPglshsZQE7M7FlYA5L3bwzR7SlA202yFYHB3hUN3obwO3BjO4OiAdKQnSosBHaXI13ZvCOz02AfEJhwoxkBXw1/2CvSQ12QQPVgqkpxWY03h+URk+gGHCV+JaqZPCV9excmVWg/IOQou0IJ6h84VFViyVc2aFVN2AIdoaG3NsppbV3j4VuLG6J2VVpNmUzN3pGgi5YSjVq9Hp+huXZFfWpnUgAxc680hKgcFajE3JNANG+NbNEeoDmITvZyV5kvJklgUKPsl2wNk+wY/GGrSBgNOVlyXqTWLZb/8Z/cSrN5DEc6D5BIS/SG95wlCRT8jUqbyEPjT+H77TH2ySfwWZzblLqbIxaLiZr3hX16oMdUx7Cya5LKLFgQBpU6cFUxvZX7SqHwjk1vnuG592Kxd9GkX4=
|
12
|
-
gem: timeboss
|
13
|
-
on:
|
14
|
-
tags: true
|
15
|
-
repo: kevinstuffandthings/timeboss
|
16
|
-
skip_cleanup: 'true'
|
data/README.md
CHANGED
@@ -139,7 +139,7 @@ period = calendar.parse('2020W3..2020Q1')
|
|
139
139
|
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.
|
140
140
|
|
141
141
|
### REPL
|
142
|
-
To open a REPL for the broadcast calendar, use the `tbsh` executable, or the `timeboss:calendars:broadcast:repl` rake task.
|
142
|
+
To open a [REPL](https://repl.it/github/kevinstuffandthings/timeboss) locally for the broadcast calendar, use the `tbsh` executable, or the `timeboss:calendars:broadcast:repl` rake task.
|
143
143
|
|
144
144
|
For the Gregorian calendar (or any other implemented calendars), supply the name on the command line.
|
145
145
|
- `tbsh gregorian`
|
@@ -157,6 +157,12 @@ $ tbsh
|
|
157
157
|
=> ["2020M7", "2020M8", "2020M9", "2020M10", "2020M11", "2020M12", "2021M1", "2021M2", "2021M3", "2021M4", "2021M5", "2021M6", "2021M7", "2021M8", "2021M9"]
|
158
158
|
```
|
159
159
|
|
160
|
+
If you want to try things out locally without installing the gem or updating your ruby environment, you can use [Docker](https://docker.com):
|
161
|
+
|
162
|
+
```bash
|
163
|
+
$ docker run --rm -it ruby:2.6.6-slim /bin/bash -c "gem install timeboss >/dev/null && tbsh"
|
164
|
+
```
|
165
|
+
|
160
166
|
_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!_
|
161
167
|
|
162
168
|
## Creating new calendars
|
@@ -231,3 +237,7 @@ With the new calendar implemented, it can be accessed in one of 2 ways:
|
|
231
237
|
calendar = TimeBoss::Calendars[:august_fiscal]
|
232
238
|
calendar.this_year
|
233
239
|
```
|
240
|
+
|
241
|
+
# Problems?
|
242
|
+
Please submit an [issue](https://github.com/kevinstuffandthings/timeboss/issues).
|
243
|
+
We'll figure out how to get you up and running with TimeBoss as smoothly as possible.
|
data/bin/tbsh
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'timeboss/calendars'
|
4
|
-
require '
|
4
|
+
require 'shellable'
|
5
5
|
|
6
6
|
calendar = if ARGV.length == 1
|
7
7
|
TimeBoss::Calendars[ARGV.first]
|
@@ -12,4 +12,4 @@ calendar = if ARGV.length == 1
|
|
12
12
|
abort "Unknown calendar" if calendar.nil?
|
13
13
|
|
14
14
|
puts "Active calendar: #{calendar.title}"
|
15
|
-
|
15
|
+
Shellable.open(calendar)
|
data/lib/tasks/calendars.rake
CHANGED
@@ -11,8 +11,8 @@ namespace :timeboss do
|
|
11
11
|
|
12
12
|
desc "Open a REPL with the #{entry.name} calendar"
|
13
13
|
task repl: ['timeboss:init'] do
|
14
|
-
require '
|
15
|
-
|
14
|
+
require 'shellable'
|
15
|
+
Shellable.open(entry.calendar)
|
16
16
|
end
|
17
17
|
|
18
18
|
task shell: ["timeboss:calendars:#{entry.name}:repl"]
|
data/lib/timeboss/version.rb
CHANGED
data/timeboss.gemspec
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McDonald
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: shellable
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: yard
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,6 +146,7 @@ extra_rdoc_files: []
|
|
132
146
|
files:
|
133
147
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
134
148
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
149
|
+
- ".github/workflows/ruby.yml"
|
135
150
|
- ".gitignore"
|
136
151
|
- ".replit"
|
137
152
|
- ".rspec"
|
@@ -168,7 +183,6 @@ files:
|
|
168
183
|
- lib/timeboss/calendars.rb
|
169
184
|
- lib/timeboss/calendars/broadcast.rb
|
170
185
|
- lib/timeboss/calendars/gregorian.rb
|
171
|
-
- lib/timeboss/support/shellable.rb
|
172
186
|
- lib/timeboss/version.rb
|
173
187
|
- spec/calendar/day_spec.rb
|
174
188
|
- spec/calendar/quarter_spec.rb
|
@@ -184,7 +198,7 @@ homepage: https://github.com/kevinstuffandthings/timeboss
|
|
184
198
|
licenses:
|
185
199
|
- MIT
|
186
200
|
metadata: {}
|
187
|
-
post_install_message:
|
201
|
+
post_install_message:
|
188
202
|
rdoc_options: []
|
189
203
|
require_paths:
|
190
204
|
- lib
|
@@ -199,8 +213,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
213
|
- !ruby/object:Gem::Version
|
200
214
|
version: '0'
|
201
215
|
requirements: []
|
202
|
-
|
203
|
-
|
216
|
+
rubyforge_project:
|
217
|
+
rubygems_version: 2.6.14
|
218
|
+
signing_key:
|
204
219
|
specification_version: 4
|
205
220
|
summary: Broadcast Calendar navigation in Ruby made simple
|
206
221
|
test_files:
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module TimeBoss
|
2
|
-
module Support
|
3
|
-
module Shellable
|
4
|
-
def self.open(context)
|
5
|
-
context.extend(self).open_shell
|
6
|
-
end
|
7
|
-
|
8
|
-
def open_shell
|
9
|
-
require 'irb'
|
10
|
-
IRB.setup nil
|
11
|
-
IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
|
12
|
-
require 'irb/ext/multi-irb'
|
13
|
-
IRB.irb nil, self
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|