origen 0.4.2 → 0.4.3

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: 4c1a7f85be5cd25a3d273bc9a39282fb14632bfc
4
- data.tar.gz: c84c92c248d688ed484c4ac535ec1d0fc865e44c
3
+ metadata.gz: 6d2449785c5161644ff8da66aa8403aae62f4d08
4
+ data.tar.gz: 8ee9264e19480135516b1c47a8a493d2cb748036
5
5
  SHA512:
6
- metadata.gz: eee9d18be7061f9e5035d3f6011680b33531fa778d6e9284fdacb45e81c42e0fd3a8001097b86f9ee419e83b418783b99bec356a2b2b910f19b1e2e3c028b3c8
7
- data.tar.gz: 1f76efe0acc7e6170fbddcca2802dda39070926a7fba0b398e22e95773c1dae3dc94cfcb43d701bfd07038e29b1d181c7e715d6d0e1ece106bf2f4836c07eff6
6
+ metadata.gz: 4de43c9c9c3f8dd7b31e8deea1036dcd4ca91ffd2cfa81081747b2b327805f992be7d08e758279caff1769f0a0ce76dc2b0ab0adbce05fa5ded120339839006b
7
+ data.tar.gz: df12a88ed32d574088e91c7cdf4e189bdabff2aa285961845c62c2cfdc784c42755f83b75ce703707488655f0144ed5f5e92264277b3527cce558752e14002cc
@@ -109,15 +109,15 @@ class OrigenCoreApplication < Origen::Application
109
109
  end
110
110
  end
111
111
 
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
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
@@ -5,3 +5,5 @@ require "c99/doc_interface"
5
5
  # this is to test that the importing application can override and
6
6
  # extend imported classes.
7
7
  require_relative "../lib/c99/nvm"
8
+
9
+ require_relative "../helpers/guides"
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 4
4
- BUGFIX = 2
4
+ BUGFIX = 3
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
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
@@ -115,7 +115,7 @@ module Origen
115
115
  )
116
116
 
117
117
  end
118
- else
118
+ elsif config.vault
119
119
  @revision_controller ||= RevisionControl::DesignSync.new(
120
120
  local: root,
121
121
  remote: config.vault
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
- # Specifiy the order that pins will appear in the output pattern, unspecified
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
- # Specifiy the pins will not appear in the output pattern
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
- attr_accessor :mode, :type, :sub_type, :audience, :table_title
6
- attr_accessor :note_refs, :exhibit_refs, :before_table, :after_table, :doc_options
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 @before_table.inner_html
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 after_table.inner_html
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
@@ -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
- attr_accessor :id, :type, :mode, :audience, :text, :markup, :internal_comment
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
- <title><%= @item[:title] %></title>
10
- <% if @item[:description] %>
11
- <meta name="description" content="<%= @item[:description] %>">
12
- <% end %>
13
- <% if @item[:author] %>
14
- <meta name="author" content="<%= @item[:author] %>">
15
- <% end %>
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.2
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-14 00:00:00.000000000 Z
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