origen 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/application.rb +9 -9
- data/config/boot.rb +2 -0
- data/config/version.rb +1 -1
- data/helpers/guides.rb +14 -0
- data/lib/origen/application.rb +1 -1
- data/lib/origen/pins.rb +2 -2
- data/lib/origen/revision_control/git.rb +1 -1
- data/lib/origen/specs/doc_resource.rb +54 -6
- data/lib/origen/specs/note.rb +35 -1
- data/templates/nanoc/layouts/bootstrap.html.erb +37 -7
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2449785c5161644ff8da66aa8403aae62f4d08
|
4
|
+
data.tar.gz: 8ee9264e19480135516b1c47a8a493d2cb748036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4de43c9c9c3f8dd7b31e8deea1036dcd4ca91ffd2cfa81081747b2b327805f992be7d08e758279caff1769f0a0ce76dc2b0ab0adbce05fa5ded120339839006b
|
7
|
+
data.tar.gz: df12a88ed32d574088e91c7cdf4e189bdabff2aa285961845c62c2cfdc784c42755f83b75ce703707488655f0144ed5f5e92264277b3527cce558752e14002cc
|
data/config/application.rb
CHANGED
@@ -109,15 +109,15 @@ class OrigenCoreApplication < Origen::Application
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
-
def before_deploy_site
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
end
|
112
|
+
#def before_deploy_site
|
113
|
+
# Dir.chdir Origen.root do
|
114
|
+
# system "origen specs -c"
|
115
|
+
# system "origen examples -c"
|
116
|
+
# dir = "#{Origen.root}/web/output/coverage"
|
117
|
+
# FileUtils.remove_dir(dir, true) if File.exists?(dir)
|
118
|
+
# system "mv #{Origen.root}/coverage #{dir}"
|
119
|
+
# end
|
120
|
+
#end
|
121
121
|
|
122
122
|
def after_release_email(tag, note, type, selector, options)
|
123
123
|
begin
|
data/config/boot.rb
CHANGED
data/config/version.rb
CHANGED
data/helpers/guides.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
class Origen::Generator::Compiler
|
2
|
+
|
3
|
+
def origen_core_frontmatter(options={})
|
4
|
+
<<END
|
5
|
+
analytics: UA-64455560-1
|
6
|
+
url: #{current_url}
|
7
|
+
facebook: origensdk
|
8
|
+
twitter: origensdk
|
9
|
+
author_url: https://plus.google.com/u/1/b/106463981272125989995/106463981272125989
|
10
|
+
site_name: Origen - The Semiconductor Developer's Kit
|
11
|
+
END
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
data/lib/origen/application.rb
CHANGED
data/lib/origen/pins.rb
CHANGED
@@ -276,7 +276,7 @@ module Origen
|
|
276
276
|
end
|
277
277
|
alias_method :add_ground_pins, :add_ground_pin
|
278
278
|
|
279
|
-
#
|
279
|
+
# Specify the order that pins will appear in the output pattern, unspecified
|
280
280
|
# pins will appear in an arbitrary order at the end
|
281
281
|
#
|
282
282
|
# API v2, deprecated
|
@@ -296,7 +296,7 @@ module Origen
|
|
296
296
|
Origen.app.pin_pattern_order << options unless options.empty?
|
297
297
|
end
|
298
298
|
|
299
|
-
#
|
299
|
+
# Specify the pins will not appear in the output pattern
|
300
300
|
def pin_pattern_exclude(*pin_ids)
|
301
301
|
if pin_ids.last.is_a?(Hash)
|
302
302
|
options = pin_ids.pop
|
@@ -293,7 +293,7 @@ module Origen
|
|
293
293
|
end
|
294
294
|
|
295
295
|
def changes_pending_commit?
|
296
|
-
!(git('status --verbose', verbose: false).last =~ /^(no changes|nothing to commit)/)
|
296
|
+
!(git('status --verbose', verbose: false).last =~ /^(no changes|nothing to commit|nothing added to commit but untracked files present)/)
|
297
297
|
end
|
298
298
|
|
299
299
|
def initialize_local_dir
|
@@ -2,9 +2,44 @@ module Origen
|
|
2
2
|
module Specs
|
3
3
|
# This class is used to store text information to help with documentation processes
|
4
4
|
class Doc_Resource
|
5
|
-
|
6
|
-
attr_accessor :
|
5
|
+
# Mode is part of the 4-D Hash for the Tables. Corresponds to Spec 4-D Hash
|
6
|
+
attr_accessor :mode
|
7
7
|
|
8
|
+
# Type is part of the 4-D Hash for the Tables. Corresponds to Spec 4-D Hash
|
9
|
+
# Usual values
|
10
|
+
#
|
11
|
+
# * DC -> Direct Current
|
12
|
+
# * AC -> Alternate Current
|
13
|
+
# * Temp -> Temperature
|
14
|
+
# * Supply -> Supply
|
15
|
+
attr_accessor :type
|
16
|
+
|
17
|
+
# SubType is part of the 4-D Hash for the Tables. Corresponds to Spec 4-D Hash
|
18
|
+
attr_accessor :sub_type
|
19
|
+
|
20
|
+
# Audience is part of the 4-D Hash for the Tables. Corresponds to Spec 4-D Hash
|
21
|
+
attr_accessor :audience
|
22
|
+
|
23
|
+
# Table Title that should appear for the table. If blank, generic Table Title will be used
|
24
|
+
# Hash is created from mode, type, sub_type, and audience.
|
25
|
+
attr_accessor :table_title
|
26
|
+
|
27
|
+
# Note References that should be referenced within the table title
|
28
|
+
attr_accessor :note_refs
|
29
|
+
|
30
|
+
# Exhibit References that should be referenced within the table title
|
31
|
+
attr_accessor :exhibit_refs
|
32
|
+
|
33
|
+
# DITA Formatted Text that appears before the table
|
34
|
+
attr_accessor :before_table
|
35
|
+
|
36
|
+
# DITA Formatted Text that appears after the table
|
37
|
+
attr_accessor :after_table
|
38
|
+
|
39
|
+
# Documentation Options that will change the appearance of the output.
|
40
|
+
attr_accessor :doc_options
|
41
|
+
|
42
|
+
# Initialize the Class
|
8
43
|
def initialize(selector = {}, table_title = {}, text = {}, options = {})
|
9
44
|
@mode = selector[:mode]
|
10
45
|
@type = selector[:type]
|
@@ -18,6 +53,7 @@ module Origen
|
|
18
53
|
@doc_options = options
|
19
54
|
end
|
20
55
|
|
56
|
+
# Converts to an XML file.
|
21
57
|
def to_xml
|
22
58
|
tmp = {}
|
23
59
|
tmp['mode'] = @mode unless @mode.nil?
|
@@ -67,15 +103,27 @@ module Origen
|
|
67
103
|
unless @before_table.nil? && @after_table.nil?
|
68
104
|
xml.paragraphs do
|
69
105
|
unless @before_table.nil?
|
70
|
-
if @before_table.is_a? Nokogiri::XML::Node
|
71
|
-
xml.before_table
|
106
|
+
if (@before_table.is_a? Nokogiri::XML::Node) || (@before_table.is_a? Nokogiri::XML::Element)
|
107
|
+
xml.before_table do
|
108
|
+
if @before_table.name == 'body'
|
109
|
+
xml << @before_table.children.to_xml
|
110
|
+
else
|
111
|
+
xml << @before_table.to_xml
|
112
|
+
end
|
113
|
+
end
|
72
114
|
else
|
73
115
|
xml.before_table @before_table
|
74
116
|
end
|
75
117
|
end
|
76
118
|
unless @after_table.nil?
|
77
|
-
if @after_table.is_a? Nokogiri::XML::Node
|
78
|
-
xml.after_table
|
119
|
+
if (@after_table.is_a? Nokogiri::XML::Node) || (@after_table.is_a? Nokogiri::XML::Element)
|
120
|
+
xml.after_table do
|
121
|
+
if @after_table.name == 'body'
|
122
|
+
xml << @after_table.children.to_xml
|
123
|
+
else
|
124
|
+
xml << @after_table.to_xml
|
125
|
+
end
|
126
|
+
end
|
79
127
|
else
|
80
128
|
xml.after_table @after_table
|
81
129
|
end
|
data/lib/origen/specs/note.rb
CHANGED
@@ -2,8 +2,42 @@ module Origen
|
|
2
2
|
module Specs
|
3
3
|
# This class is used to store spec note information used to document IP
|
4
4
|
class Note
|
5
|
-
|
5
|
+
# id is the id for the note. The goal for the id is to allow multiple specs to reference one note.
|
6
|
+
# spec.notes = [id1, id2, id3]
|
7
|
+
# spec1.notes = [id1, id4, id5]
|
8
|
+
attr_accessor :id
|
6
9
|
|
10
|
+
# Type should be :ac or :dc, but this might have been phased out.
|
11
|
+
# TODO: Check to see if :type has been deprecated or is still needed
|
12
|
+
attr_accessor :type
|
13
|
+
|
14
|
+
# Mode will match the mode that this note belongs to.
|
15
|
+
# TODO: Check to see if :mode has been deprecated or is still needed
|
16
|
+
attr_accessor :mode
|
17
|
+
|
18
|
+
# Audience should be :ac or :dc, but this might have been phased out.
|
19
|
+
# TODO: Check to see if :type has been deprecated or is still needed
|
20
|
+
attr_accessor :audience
|
21
|
+
|
22
|
+
# Plain text of the note. No Mark-up allowed in this field.
|
23
|
+
attr_accessor :text
|
24
|
+
|
25
|
+
# Markup of the text field. Currently markup has been tested with
|
26
|
+
#
|
27
|
+
# * DITA
|
28
|
+
# * XML
|
29
|
+
# * HTML
|
30
|
+
#
|
31
|
+
# Need to test the following markup
|
32
|
+
#
|
33
|
+
# * Markdown
|
34
|
+
attr_accessor :markup
|
35
|
+
|
36
|
+
# Internal comment that could be used to know why the note was needed. Think of this as a breadcrumb
|
37
|
+
# to find out about more information on the note.
|
38
|
+
attr_accessor :internal_comment
|
39
|
+
|
40
|
+
# Initialize the class
|
7
41
|
def initialize(id, type, options = {})
|
8
42
|
@id = id
|
9
43
|
@type = type
|
@@ -5,14 +5,44 @@
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
7
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
8
|
+
<meta property="og:locale" content="en_US">
|
9
|
+
<meta name="content-language" content="en_US">
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
<% title = @item[:title] || "Origen, The Semiconductor Developer's Kit" %>
|
12
|
+
<title><%= title %></title>
|
13
|
+
<meta property="og:title" content="<%= title %>">
|
14
|
+
<meta name="twitter:title" content="<%= title %>">
|
15
|
+
<meta itemprop="name" content="<%= title %>">
|
16
|
+
<% if @item[:description] %>
|
17
|
+
<meta name="description" content="<%= @item[:description] %>">
|
18
|
+
<meta name="twitter:description" content="<%= @item[:description] %>">
|
19
|
+
<meta property="og:description" content="<%= @item[:description] %>">
|
20
|
+
<meta itemprop="description" content="<%= @item[:description] %>">
|
21
|
+
<% end %>
|
22
|
+
<% if @item[:author] %>
|
23
|
+
<meta name="author" content="<%= @item[:author] %>">
|
24
|
+
<% end %>
|
25
|
+
<% if @item[:author_url] %>
|
26
|
+
<link rel="author" href="<%= @item[:author_url] %>">
|
27
|
+
<% end %>
|
28
|
+
<% if @item[:url] %>
|
29
|
+
<meta property="og:url" content="<%= @item[:url] %>">
|
30
|
+
<meta name="twitter:url" content="<%= @item[:url] %>">
|
31
|
+
<% end %>
|
32
|
+
<% image = @item[:image] || "http://origen-sdk.org/favicon-260x260.png" %>
|
33
|
+
<meta property="og:image" content="<%= image %>">
|
34
|
+
<meta name="twitter:image" content="<%= image %>">
|
35
|
+
<meta itemprop="image" content="<%= image %>">
|
36
|
+
<meta name="twitter:card" content="summary">
|
37
|
+
<% if @item[:site_name] %>
|
38
|
+
<meta property="og:site_name" content="<%= @item[:site_name] %>">
|
39
|
+
<% end %>
|
40
|
+
<% if @item[:facebook] %>
|
41
|
+
<meta property="fb:admins" content="<%= @item[:facebook] %>">
|
42
|
+
<% end %>
|
43
|
+
<% if @item[:twitter] %>
|
44
|
+
<meta name="twitter:site" content="@<%= @item[:twitter] %>">
|
45
|
+
<% end %>
|
16
46
|
|
17
47
|
<!-- Bootstrap core CSS -->
|
18
48
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -427,6 +427,7 @@ files:
|
|
427
427
|
- config/rubocop/strict_disabled.yml
|
428
428
|
- config/rubocop/strict_enabled.yml
|
429
429
|
- config/version.rb
|
430
|
+
- helpers/guides.rb
|
430
431
|
- helpers/url.rb
|
431
432
|
- lib/c99/ate_interface.rb
|
432
433
|
- lib/c99/doc_interface.rb
|