coursegen 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e2f6c2ea67094e8ba7dc3414f042a73ace63c19
4
- data.tar.gz: d7a51110c869df0830ba913f09ade795cc3563ca
3
+ metadata.gz: 2f846e4493d9e52b2bc2203aa0dac19e8cc64771
4
+ data.tar.gz: b39aac0b541a6831e110162023330370521920bf
5
5
  SHA512:
6
- metadata.gz: 72e610d9fd4f2ad960e95ee29d85b5fdc13592234819621db31e1f7caa8b1044fb1ed7f0d16251a8098ef86b7c945a4ff04f50ca14e54fcf6972f20e190de99c
7
- data.tar.gz: 4f17949ef7bf29d45d7b15cccb8cbf3334c4e74813a7f26f8d15b879bb680da2952c98c18af13c1c2da08a0ebc1dbd03414df164c2acf4612021c4acd6d53374
6
+ metadata.gz: ef294cf297d948adfc9f826076141b7fa951569347f3c65e71303a211b68ab0c518a5d3de396c1c71b16a1ee405559b0c742723543cd127931a62f07e1730173
7
+ data.tar.gz: 818dead361c1f770c64668a295fbb452e27c5826c1a98bc6e083d74b127e1c6af16f1ffbf3b978442ef77309b37d426aa1fa15d83e2f0c0da96f55c204f2c25f
@@ -1,25 +1,87 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursegen (0.0.5)
4
+ coursegen (0.0.7)
5
+ activesupport
6
+ adsf
7
+ cri
8
+ guard
9
+ guard-shell
10
+ kramdown
5
11
  nanoc
12
+ nokogiri
13
+ pry
14
+ rubytree
6
15
  thor
7
16
 
8
17
  GEM
9
18
  remote: https://rubygems.org/
10
19
  specs:
20
+ activesupport (4.1.7)
21
+ i18n (~> 0.6, >= 0.6.9)
22
+ json (~> 1.7, >= 1.7.7)
23
+ minitest (~> 5.1)
24
+ thread_safe (~> 0.1)
25
+ tzinfo (~> 1.1)
26
+ adsf (1.2.0)
27
+ rack (>= 1.0.0)
28
+ celluloid (0.16.0)
29
+ timers (~> 4.0.0)
30
+ coderay (1.1.0)
11
31
  colored (1.2)
12
32
  cri (2.6.1)
13
33
  colored (~> 1.2)
14
- nanoc (3.7.1)
34
+ ffi (1.9.6)
35
+ formatador (0.2.5)
36
+ guard (2.8.2)
37
+ formatador (>= 0.2.4)
38
+ listen (~> 2.7)
39
+ lumberjack (~> 1.0)
40
+ pry (>= 0.9.12)
41
+ thor (>= 0.18.1)
42
+ guard-shell (0.7.0)
43
+ guard (>= 2.0.0)
44
+ hitimes (1.2.2)
45
+ i18n (0.6.11)
46
+ json (1.8.1)
47
+ kramdown (1.5.0)
48
+ listen (2.8.0)
49
+ celluloid (>= 0.15.2)
50
+ rb-fsevent (>= 0.9.3)
51
+ rb-inotify (>= 0.9)
52
+ lumberjack (1.0.9)
53
+ method_source (0.8.2)
54
+ mini_portile (0.6.1)
55
+ minitest (5.4.3)
56
+ nanoc (3.7.3)
15
57
  cri (~> 2.3)
58
+ nokogiri (1.6.4.1)
59
+ mini_portile (~> 0.6.0)
60
+ pry (0.10.1)
61
+ coderay (~> 1.1.0)
62
+ method_source (~> 0.8.1)
63
+ slop (~> 3.4)
64
+ rack (1.5.2)
16
65
  rake (10.3.2)
66
+ rb-fsevent (0.9.4)
67
+ rb-inotify (0.9.5)
68
+ ffi (>= 0.5.0)
69
+ rubytree (0.9.4)
70
+ json (~> 1.8)
71
+ structured_warnings (~> 0.1)
72
+ slop (3.6.0)
73
+ structured_warnings (0.1.4)
17
74
  thor (0.19.1)
75
+ thread_safe (0.3.4)
76
+ timers (4.0.1)
77
+ hitimes
78
+ tzinfo (1.2.2)
79
+ thread_safe (~> 0.1)
18
80
 
19
81
  PLATFORMS
20
82
  ruby
21
83
 
22
84
  DEPENDENCIES
23
- bundler (~> 1.6)
85
+ bundler
24
86
  coursegen!
25
87
  rake
@@ -0,0 +1,6 @@
1
+ # Add files and commands to this file, like the example:
2
+ # watch(%r{file/path}) { `command(s)` }
3
+ #
4
+ guard :shell do
5
+ watch(/.erb/) { |m| `cg compile` }
6
+ end
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
1
  require "bundler/gem_tasks"
2
-
@@ -15,15 +15,14 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- puts spec.executables
19
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
19
  spec.require_paths = ["lib"]
21
20
 
22
- spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "bundler"
23
22
  spec.add_development_dependency "rake"
24
23
 
25
24
 
26
- spec.add_dependency "nanoc", "~>3.6.11"
25
+ spec.add_dependency "nanoc"
27
26
  spec.add_dependency "thor"
28
27
  spec.add_dependency "rubytree"
29
28
  spec.add_dependency "cri"
@@ -4,17 +4,20 @@ class ListOf
4
4
  # rows: array with one or more of:
5
5
  # "pages"
6
6
  # "subsections"
7
+ # subsections: array with one or more strings corresponding to subsection string in an item
8
+ # .e.g. "/content/topics/arch/"
7
9
  # cols: array with one or more of:
8
10
  # :date
9
11
  # :number
10
12
  # :title
11
13
  # :homeworks
12
14
 
13
- def initialize(markup_adaptor, data_adaptor, rows, cols)
15
+ def initialize(markup_adaptor, data_adaptor, rows, cols, subsections)
14
16
  @mark = markup_adaptor
15
17
  @rows = rows
16
18
  @cols = cols
17
19
  @data = data_adaptor
20
+ @subsections = subsections
18
21
  end
19
22
 
20
23
  def render
@@ -40,6 +43,7 @@ class ListOf
40
43
  end
41
44
 
42
45
  def generate_rows
46
+ binding.pry
43
47
  @data.rows do |row_id|
44
48
  next unless include_row?(row_id)
45
49
  if subsection_hdr?(row_id)
@@ -79,9 +83,17 @@ class ListOf
79
83
  end
80
84
 
81
85
  def include_row?(row_id)
86
+ include_by_row_type?(row_id) && include_by_subsection_path?(row_id)
87
+ end
88
+
89
+ def include_by_row_type?(row_id)
82
90
  @rows.include?(row_id.type)
83
91
  end
84
92
 
93
+ def include_by_subsection_path?(row_id)
94
+ @subsections.length == 0 || @subsections.include?(row_id.subsection)
95
+ end
96
+
85
97
  def subsection_hdr?(row_id)
86
98
  row_id.type == "subsection"
87
99
  end
@@ -10,10 +10,10 @@ module ListOfHelpers
10
10
  # :title
11
11
  # :homeworks
12
12
 
13
- def list_of(source:, rows:, cols:)
13
+ def list_of(source:, rows:, cols:, subsections: [])
14
14
  markup_adaptor = BootstrapMarkup.new
15
15
  data_adaptor = DataAdaptor.new(source)
16
- lecture_table_builder = ListOf.new(markup_adaptor, data_adaptor, rows, cols)
16
+ lecture_table_builder = ListOf.new(markup_adaptor, data_adaptor, rows, cols, subsections)
17
17
  lecture_table_builder.render
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,9 +1,8 @@
1
+ require 'coursegen'
2
+
1
3
  # bucket for AWS Deployment of the course
2
4
  AWS_BUCKET = "cosi236b.courses.salas.com"
3
5
 
4
- # Local directory path for directory of topics
5
- TOPICS_PATH = "/mydev/curriculous-topics"
6
-
7
6
  # Local directory path for directory of content
8
7
  CONTENT_PATH = "/mydev/cosi236b"
9
8
 
@@ -37,7 +36,7 @@ SECTION_CONFIG = [
37
36
  SectionDef.new("Background", "background", type: :section),
38
37
  SectionDef.new("Root", "root", hidden: true, type: :section),
39
38
  SectionDef.new("Topics", "topics", hidden: true, type: :section),
40
- SectionDef.new("Search", "search_results", hidden: true, type: :section)
39
+ SectionDef.new("Hidden", "hidden", hidden: true, type: :section)
41
40
  ]
42
41
 
43
42
 
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coursegen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pito Salas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-29 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: nanoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 3.6.11
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 3.6.11
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -203,6 +203,7 @@ files:
203
203
  - ".gitignore"
204
204
  - Gemfile
205
205
  - Gemfile.lock
206
+ - Guardfile
206
207
  - LICENSE.txt
207
208
  - README.md
208
209
  - Rakefile
@@ -281,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
282
  version: '0'
282
283
  requirements: []
283
284
  rubyforge_project:
284
- rubygems_version: 2.2.2
285
+ rubygems_version: 2.4.4
285
286
  signing_key:
286
287
  specification_version: 4
287
288
  summary: Use Nanoc to build courses and deploy them to S3