hanreki 2.0.0 → 3.0.0

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: 5063f6f82205ddf8c8ba3393966f4e743e95c834
4
- data.tar.gz: '06729fefac6d2ff13f70e81f4dede11d8940159b'
3
+ metadata.gz: c2d698da88d9c3edc063388da9e4e19ffbff5ba3
4
+ data.tar.gz: d19b3dcbed28f8314a11a145b6c3dbd7ac194e6d
5
5
  SHA512:
6
- metadata.gz: ef56f66855bc14838ff616b045f9452def5b53fc7591f602ab9aec1a1bd16b32fe6cd06fcbdcbd4230bc642362bb4a0150a0603106deb5fb4ced4f60abb5757a
7
- data.tar.gz: 979e7634f02f3b456c83e63d4f3b49cda6be01c9800f50aeb17aa750ff849e5b81a8a7620d4c52c03037d91aca304147f51907ca6742d4965f7fd0e57bcc7d9e
6
+ metadata.gz: 17f870410ac5fc836afc6c52c624b1cb4eba56c72dc826464d32098526aeb10a025982be1e17c81762cf3f34df1835cdd321fa410ef87774a223b5ff4a34dd2a
7
+ data.tar.gz: 995e5bab04efa8c883fb03653b6554c0ce792acfdddc10e691ad45083d4484cdf3255e5f4407c405497526d9f4bd96d9441c98a0105a644c7076b1e037c3e214
data/README.md CHANGED
@@ -5,6 +5,11 @@
5
5
 
6
6
  Simple schedule manager for [CAMPHOR-](https://camph.net/)
7
7
 
8
+ ## Features
9
+ - Manage public & private schedules
10
+ - Manage events using simple CSV master files
11
+ - Convert master files to iCal and JSON files
12
+
8
13
  ## Installation
9
14
  ### Gem
10
15
  Install hanreki with gem command:
@@ -27,6 +32,23 @@ And then execute:
27
32
  ## Usage
28
33
  Run `hanreki help` or `bundle exec hanreki help`.
29
34
 
35
+ ### Create a master file
36
+ `hanreki blank` generates a master file for the next month.
37
+
38
+ ### Sync
39
+ `hanreki sync` generates iCal and JSON files from master files.
40
+
41
+ ### Edit
42
+ `hanreki edit` opens a editor and validates master files.
43
+ Hanreki chooses the editor in the following order:
44
+
45
+ 1. Editor specified by the environment variable: `CAMPHOR_SCHEDULE_EDITOR`
46
+ 2. Editor specified by the environment variable: `EDITOR`
47
+ 3. `vi`
48
+
49
+ ### Validation
50
+ `hanreki validate` validates master files.
51
+
30
52
  ## Development
31
53
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
54
 
data/lib/hanreki/cli.rb CHANGED
@@ -30,12 +30,11 @@ module Hanreki
30
30
  validate
31
31
  end
32
32
 
33
- desc 'sync', 'Sync iCal, JSON, and JSONP'
33
+ desc 'sync', 'Sync iCal and JSON'
34
34
  def sync
35
35
  schedule = load_schedule
36
36
  schedule.out_ical
37
37
  schedule.out_json
38
- schedule.out_jsonp
39
38
  end
40
39
 
41
40
  desc 'validate', 'Validate master files'
@@ -13,8 +13,6 @@ class Schedule
13
13
  ICAL_PRIVATE_PATH = 'ical/camphor_private_events.ics'
14
14
  JSON_PUBLIC_PATH = 'json/camphor_public_events.json'
15
15
  JSON_PRIVATE_PATH = 'json/camphor_private_events.json'
16
- JSONP_PUBLIC_PATH = 'jsonp/camphor_public_events.js'
17
- JSONP_PRIVATE_PATH = 'jsonp/camphor_private_events.js'
18
16
  JSON_SCHEMA_PATH = File.expand_path('../schema.json', __FILE__)
19
17
 
20
18
  def initialize
@@ -64,16 +62,6 @@ class Schedule
64
62
  end
65
63
  end
66
64
 
67
- # Output private and public JSONP calendar files
68
- def out_jsonp(callback = 'callback')
69
- File.open(JSONP_PUBLIC_PATH, 'w') do |f|
70
- f.write("#{callback}(#{events_to_json(public_events, :public)});")
71
- end
72
- File.open(JSONP_PRIVATE_PATH, 'w') do |f|
73
- f.write("#{callback}(#{events_to_json(private_events, :private)});")
74
- end
75
- end
76
-
77
65
  # Output master file
78
66
  def out_master
79
67
  CSV.open(
@@ -1,3 +1,3 @@
1
1
  module Hanreki
2
- VERSION = '2.0.0'
2
+ VERSION = '3.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanreki
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CAMPHOR-
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2017-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor