corundum 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDZjODAzMjAxN2MyYmMzMDA1NjZlYjFmZmVhMTA0ZTNhYzE5Y2VhZg==
4
+ MzI1YWM4YzFmOWM5MzAwZWE2YmI0ZDA5Mjk4YmI2MWI2OWExN2Q4NQ==
5
5
  data.tar.gz: !binary |-
6
- NjI5OTU2MjdhZGVhYmUwYTM2Mjc0N2RjYjAxZDgzODZlYTM2YWUyNg==
6
+ NTI4ZjFmZDg0OThhN2IyMWIwODllZTJhMzVmMzM3MzgwMmYyM2E0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTRlNDczZTFjMzI4MDQ0NmM4Mzc2Nzg2NDc0NDhmNmVmZmI1YjMwMmRmMDcw
10
- ZDBmMTIxMDZiYWM5MGQ1MGIyOThmZTgzMDk5OTZhZjk3ZmUxOGE2MjNiNGY4
11
- Y2U3ZTkxZTQ2YzQxZmJjMzdlZTdjNDJjN2ZkMDljZjJjODczY2U=
9
+ MTJiNDNiNTJmY2JhMTg4NjBjMDdiODY5Y2I3ZjAwOTJlOTU5ZThjYTI4N2Vm
10
+ ZDM0NThiZTMwMDJkZDNkZDNjNDJiYmE4NWU5NjRhYzg3NzMyYzI2YmM2N2Q2
11
+ YjhkM2M2Mzc1MGYyMDU0NTUwM2ZhZWRjZmRhYTk3MTkzM2YxYmU=
12
12
  data.tar.gz: !binary |-
13
- N2Q0YmY2MzFiMzBhODJmM2E1NmM5ZmE0MTM0M2NlMzc2YzVhMWNmMWMxNjk0
14
- ZWI4MjUxNDYxYzZmNWIwZDA5ZTQ4Nzg3NThhNTc3NDZhMjUyNWNmYTU5NWJm
15
- NzU0ZGFlZDM4NjAxNGIyNWI0M2Q3OGRjOWQ1NWJkZmYxZTFkMmY=
13
+ ZjBmMjA2ODA5NzRlZGJmZWUwOWI0ZDY4MWJlZjM2N2Q3NjU1Mjk4YWQ3NTNm
14
+ Mjk2MDE0NGI2ZDk2MjQwNWQxNTU3NWQ2NTliNDM5ZjY0ODBlYTRiNzBkODMx
15
+ N2Q0OWVkMTlhN2E2ZmUyOGFkM2ZkNjJiOGY4NzY5MzVmNzQ1MzY=
@@ -6,6 +6,7 @@ module Corundum
6
6
  setting :browser
7
7
  setting :gemspec
8
8
 
9
+ #TODO update to use new paths DSL
9
10
  setting :corundum_dir
10
11
  setting :docs_root
11
12
 
@@ -34,21 +35,21 @@ module Corundum
34
35
 
35
36
  def resolve_configuration
36
37
  super
37
- if unset?(docs_root)
38
+ if field_unset?(:docs_root)
38
39
  self.docs_root = File::join(corundum_dir, "docs")
39
40
  end
40
41
 
41
- if unset?(target_dir)
42
+ if field_unset?(:target_dir)
42
43
  self.target_dir = File::join(docs_root, sub_dir)
43
44
  else
44
45
  self.sub_dir = target_dir.sub(/^#{docs_root}\//,"")
45
46
  end
46
47
 
47
- if unset?(entry_path)
48
+ if field_unset?(:entry_path)
48
49
  self.entry_path = File::join(target_dir, entry_file)
49
50
  end
50
51
 
51
- if unset?(entry_link)
52
+ if field_unset?(:entry_link)
52
53
  self.entry_link = File::join(sub_dir, entry_file)
53
54
  end
54
55
  end
@@ -1,19 +1,27 @@
1
- require 'corundum/documentation-task'
2
- require 'mattock/template-host'
3
1
  require 'compass'
2
+ require 'corundum/documentation-task'
3
+ #require 'mattock/template-host'
4
4
 
5
5
  module Corundum
6
6
  class DocumentationAssembly < DocumentationTask
7
- include Mattock::TemplateTaskLib
8
7
 
9
8
  title 'Assembled Documentation'
10
9
 
10
+ dir(:assembly_sub, "doc_assembly",
11
+ dir(:theme_dir, "theme",
12
+ dir(:theme_sass, "sass",
13
+ path(:root_stylesheet, "styles"))),
14
+ path(:index_source, "index.html"))
15
+
16
+ dir(:target, path(:stylesheet, "stylesheet.css"))
17
+
18
+ setting :templates
19
+
11
20
  setting :sub_dir, "assembled"
12
21
  setting :documenters, []
13
22
  setting :extra_data, {}
14
23
  setting :external_docs, {}
15
- setting :stylesheet
16
- setting :css_dir, "stylesheets"
24
+ setting :css_dir, "stylesheets" #XXX
17
25
  setting :compass_config, nested(
18
26
  :http_path => "/",
19
27
  :line_comments => false,
@@ -26,20 +34,37 @@ module Corundum
26
34
  def default_configuration(toolkit, *documenters)
27
35
  super(toolkit)
28
36
  self.documenters = documenters
29
- self.templates_are_in(Corundum::configuration_store.valise)
30
37
 
31
- self.compass_config.http_stylesheets_path = css_dir
32
- self.compass_config.project_path = template_path("doc_assembly/theme")
38
+ self.compass_config.http_stylesheets_path = css_dir #XXX
33
39
  end
34
40
 
35
41
  def resolve_configuration
36
42
  super
43
+ assembly_sub.absolute_path = assembly_sub.relative_path
44
+ target.absolute_path = target_dir
45
+
46
+ resolve_paths
47
+
48
+ if field_unset?(:templates)
49
+ self.templates = Corundum::configuration_store.valise.templates do |mapping|
50
+ case mapping
51
+ when "sass", "scss"
52
+ {:template_options => Compass.sass_engine_options }
53
+ else
54
+ nil
55
+ end
56
+ end
57
+ end
58
+
59
+ self.compass_config.project_path = templates.find("doc_assembly/theme").full_path
60
+
37
61
  self.documenters = documenters.each_with_object({}) do |doccer, hash|
38
62
  hash[File::join(target_dir, doccer.sub_dir)] = doccer
39
63
  end
40
- if unset?(stylesheet)
64
+ if field_unset?(:stylesheet)
41
65
  self.stylesheet = File::join(target_dir, "stylesheet.css")
42
66
  end
67
+
43
68
  end
44
69
 
45
70
 
@@ -58,18 +83,26 @@ module Corundum
58
83
  end
59
84
  end
60
85
 
61
- #Collision of doc groups
86
+ #XXX Collision of doc groups
62
87
  task :collect => documenters.keys
63
88
 
64
89
  task :setup_compass do
65
90
  Compass.add_configuration(compass_config.to_hash, __FILE__)
66
91
  end
67
92
 
68
- template_task("doc_assembly/theme/sass/styles.scss", stylesheet, Compass.sass_engine_options)
69
- file stylesheet => [:setup_compass, target_dir]
93
+ file stylesheet.abspath => [:setup_compass, target.abspath] do |task|
94
+ template = templates.find(root_stylesheet.abspath).contents
95
+ File::open(task.name, "w") do |file|
96
+ file.write(template.render(nil, nil))
97
+ end
98
+ end
70
99
 
71
- template_task("doc_assembly/index.html.erb", entry_point)
72
- file entry_point => [stylesheet, target_dir, :collect]
100
+ file entry_point => [stylesheet.abspath, target.abspath, :collect] do |task|
101
+ template = templates.find(index_source.abspath).contents
102
+ File::open(task.name, "w") do |file|
103
+ file.write(template.render(self, {}))
104
+ end
105
+ end
73
106
  end
74
107
  super
75
108
  end
@@ -2,21 +2,6 @@ require 'mattock/tasklib'
2
2
 
3
3
  module Corundum
4
4
  class QuestionableContent < Mattock::Tasklib
5
- default_namespace :content
6
- setting :type, :debugging
7
- setting :words
8
- setting :limit, 0
9
- setting :comments, false
10
- setting :accept_token, /#ok/
11
- setting :files
12
- setting :qa_rejections
13
-
14
- def default_configuration(core)
15
- super
16
- core.copy_settings_to(self)
17
- self.files = core.file_lists.code
18
- end
19
-
20
5
  #I hate putting these lists together. I have to keep reminding myself that
21
6
  #it's akin to discussing the use of the word.
22
7
  #Also, this is a place I'm especially open to contributions.
@@ -39,6 +24,22 @@ module Corundum
39
24
  WORD_SETS[other] = WORD_SETS[name]
40
25
  end
41
26
 
27
+ default_namespace :content
28
+ setting :type, :debugging
29
+ setting :words
30
+ setting :limit, 0
31
+ setting :comments, false
32
+ setting :accept_token, /#ok/
33
+ setting :files
34
+ setting :qa_rejections
35
+
36
+ def default_configuration(core)
37
+ super
38
+ core.copy_settings_to(self)
39
+ self.files = core.file_lists.code
40
+ self.qa_rejections = core.qa_rejections
41
+ end
42
+
42
43
  def resolve_configuration
43
44
  if field_unset?(:words)
44
45
  self.words = WORD_SETS.fetch(type.to_s) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corundum
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-25 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - ~>
129
129
  - !ruby/object:Gem::Version
130
- version: '0.5'
130
+ version: '0.7'
131
131
  prerelease: false
132
132
  name: mattock
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ~>
136
136
  - !ruby/object:Gem::Version
137
- version: '0.5'
137
+ version: '0.7'
138
138
  type: :runtime
139
139
  - !ruby/object:Gem::Dependency
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -333,7 +333,7 @@ metadata: {}
333
333
  post_install_message:
334
334
  rdoc_options:
335
335
  - --title
336
- - corundum-0.3 RDoc
336
+ - corundum-0.3.1 RDoc
337
337
  require_paths:
338
338
  - lib/
339
339
  required_ruby_version: !ruby/object:Gem::Requirement