origen_updater 0.1.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4f0f3e5ca86e2580b8ca388dcd5edbee39570301
4
+ data.tar.gz: 9f86c2064281cacdfcb7fff28361d2d306cdd996
5
+ SHA512:
6
+ metadata.gz: 10f938db03bc45bd07ea6ed29ab9e7d8fba70d7c8afab5ea807f8f250633a5a42ce4a7c7a4e570ff7becb36d5bf869f7a945bea97b70e000e3c7bf1904fd35bb
7
+ data.tar.gz: 53cd587cd1c4592709e1d3b53e064a33b309fb4931191ad209d91f5698b98a4134621f6dc8e0adc1df0cfce03dcf6bf216fa9432c7df7cf166aed3de723d8556
@@ -0,0 +1,106 @@
1
+ require 'origen'
2
+ class OrigenUpdaterApplication < Origen::Application
3
+
4
+ # See http://origen-sdk.org/origen/api/Origen/Application/Configuration.html
5
+ # for a full list of the configuration options available
6
+
7
+ # These attributes should never be changed, the duplication here will be resolved in future
8
+ # by condensing these attributes that do similar things
9
+ self.name = "origen_updater"
10
+ self.namespace = "OrigenUpdater"
11
+ config.name = "origen_updater"
12
+ config.initials = "OrigenUpdater"
13
+ config.rc_url = "git@github.com:Origen-SDK/origen_updater.git"
14
+ config.release_externally = true
15
+
16
+ # To enable deployment of your documentation to a web server (via the 'origen web'
17
+ # command) fill in these attributes.
18
+ #config.web_directory = "git@github.com:Origen-SDK/Origen-SDK.github.io.git/origen_updater"
19
+ #config.web_domain = "http://origen-sdk.org/origen_updater"
20
+
21
+ # When false Origen will be less strict about checking for some common coding errors,
22
+ # it is recommended that you leave this to true for better feedback and easier debug.
23
+ # This will be the default setting in Origen v3.
24
+ config.strict_errors = true
25
+
26
+ config.shared = {
27
+ command_launcher: "config/shared_commands.rb"
28
+ }
29
+
30
+ # See: http://origen-sdk.org/origen/latest/guides/utilities/lint/
31
+ config.lint_test = {
32
+ # Require the lint tests to pass before allowing a release to proceed
33
+ run_on_tag: true,
34
+ # Auto correct violations where possible whenever 'origen lint' is run
35
+ auto_correct: true,
36
+ # Limit the testing for large legacy applications
37
+ #level: :easy,
38
+ # Run on these directories/files by default
39
+ #files: ["lib", "config/application.rb"],
40
+ }
41
+
42
+ config.semantically_version = true
43
+
44
+ # An example of how to set application specific LSF parameters
45
+ #config.lsf.project = "msg.te"
46
+
47
+ # An example of how to specify a prefix to add to all generated patterns
48
+ #config.pattern_prefix = "nvm"
49
+
50
+ # An example of how to add header comments to all generated patterns
51
+ #config.pattern_header do
52
+ # cc "This is a pattern created by the example origen application"
53
+ #end
54
+
55
+ # By default all generated output will end up in ./output.
56
+ # Here you can specify an alternative directory entirely, or make it dynamic such that
57
+ # the output ends up in a setup specific directory.
58
+ #config.output_directory do
59
+ # "#{Origen.root}/output/#{$dut.class}"
60
+ #end
61
+
62
+ # Similarly for the reference files, generally you want to setup the reference directory
63
+ # structure to mirror that of your output directory structure.
64
+ #config.reference_directory do
65
+ # "#{Origen.root}/.ref/#{$dut.class}"
66
+ #end
67
+
68
+ # This will automatically deploy your documentation after every tag
69
+ #def after_release_email(tag, note, type, selector, options)
70
+ # command = "origen web compile --remote --api"
71
+ # Dir.chdir Origen.root do
72
+ # system command
73
+ # end
74
+ #end
75
+
76
+ # Ensure that all tests pass before allowing a release to continue
77
+ #def validate_release
78
+ # if !system("origen specs") || !system("origen examples")
79
+ # puts "Sorry but you can't release with failing tests, please fix them and try again."
80
+ # exit 1
81
+ # else
82
+ # puts "All tests passing, proceeding with release process!"
83
+ # end
84
+ #end
85
+
86
+ # To enabled source-less pattern generation create a class (for example PatternDispatcher)
87
+ # to generate the pattern. This should return false if the requested pattern has been
88
+ # dispatched, otherwise Origen will proceed with looking up a pattern source as normal.
89
+ #def before_pattern_lookup(requested_pattern)
90
+ # PatternDispatcher.new.dispatch_or_return(requested_pattern)
91
+ #end
92
+
93
+ # If you use pattern iterators you may come across the case where you request a pattern
94
+ # like this:
95
+ # origen g example_pat_b0.atp
96
+ #
97
+ # However it cannot be found by Origen since the pattern name is actually example_pat_bx.atp
98
+ # In the case where the pattern cannot be found Origen will pass the name to this translator
99
+ # if it exists, and here you can make any substitutions to help Origen find the file you
100
+ # want. In this example any instances of _b\d, where \d means a number, are replaced by
101
+ # _bx.
102
+ #config.pattern_name_translator do |name|
103
+ # name.gsub(/_b\d/, "_bx")
104
+ #end
105
+
106
+ end
data/config/boot.rb ADDED
@@ -0,0 +1,24 @@
1
+ # This file is used to boot your plugin when it is running in standalone mode
2
+ # from its own workspace - i.e. when the plugin is being developed.
3
+ #
4
+ # It will not be loaded when the plugin is imported by a 3rd party app - in that
5
+ # case only lib/origen_updater.rb is loaded.
6
+ #
7
+ # Therefore this file can be used to load anything extra that you need to boot
8
+ # the development environment for this app. For example, this is typically used
9
+ # to load some additional test classes to use your plugin APIs so that they can
10
+ # be tested and/or interacted with in the console.
11
+ require "origen_updater"
12
+
13
+ module OrigenUpdaterDev
14
+ # Example of how to explicitly require a file
15
+ # require "origen_updater_dev/my_file"
16
+
17
+ # Load all files in the lib/origen_updater_dev directory.
18
+ # Note that there is no problem from requiring a file twice (Ruby will ignore
19
+ # the second require), so if you have a file that must be required first, then
20
+ # explicitly require it up above and then let this take care of the rest.
21
+ Dir.glob("#{File.dirname(__FILE__)}/../lib/origen_updater_dev/**/*.rb").sort.each do |file|
22
+ require file
23
+ end
24
+ end
@@ -0,0 +1,74 @@
1
+ # This file should be used to extend the origen with application specific commands
2
+
3
+ # Map any command aliases here, for example to allow 'origen ex' to refer to a
4
+ # command called execute you would add a reference as shown below:
5
+ aliases ={
6
+ # "ex" => "execute",
7
+ }
8
+
9
+ # The requested command is passed in here as @command, this checks it against
10
+ # the above alias table and should not be removed.
11
+ @command = aliases[@command] || @command
12
+
13
+ # Now branch to the specific task code
14
+ case @command
15
+
16
+ # Here is an example of how to implement a command, the logic can go straight
17
+ # in here or you can require an external file if preferred.
18
+ when "my_command"
19
+ puts "Doing something..."
20
+ #require "commands/my_command" # Would load file lib/commands/my_command.rb
21
+ # You must always exit upon successfully capturing a command to prevent
22
+ # control flowing back to Origen
23
+ exit 0
24
+
25
+ ## Example of how to make a command to run unit tests, this simply invokes RSpec on
26
+ ## the spec directory
27
+ #when "specs"
28
+ # require "rspec"
29
+ # exit RSpec::Core::Runner.run(['spec'])
30
+
31
+ ## Example of how to make a command to run diff-based tests
32
+ #when "examples", "test"
33
+ # Origen.load_application
34
+ # status = 0
35
+ #
36
+ # # Compiler tests
37
+ # ARGV = %w(templates/example.txt.erb -t debug -r approved)
38
+ # load "origen/commands/compile.rb"
39
+ # # Pattern generator tests
40
+ # #ARGV = %w(some_pattern -t debug -r approved)
41
+ # #load "#{Origen.top}/lib/origen/commands/generate.rb"
42
+ #
43
+ # if Origen.app.stats.changed_files == 0 &&
44
+ # Origen.app.stats.new_files == 0 &&
45
+ # Origen.app.stats.changed_patterns == 0 &&
46
+ # Origen.app.stats.new_patterns == 0
47
+ #
48
+ # Origen.app.stats.report_pass
49
+ # else
50
+ # Origen.app.stats.report_fail
51
+ # status = 1
52
+ # end
53
+ # puts
54
+ # if @command == "test"
55
+ # Origen.app.unload_target!
56
+ # require "rspec"
57
+ # result = RSpec::Core::Runner.run(['spec'])
58
+ # status = status == 1 ? 1 : result
59
+ # end
60
+ # exit status # Exit with a 1 on the event of a failure per std unix result codes
61
+
62
+ # Always leave an else clause to allow control to fall back through to the
63
+ # Origen command handler.
64
+ else
65
+ # You probably want to also add the your commands to the help shown via
66
+ # origen -h, you can do this be assigning the required text to @application_commands
67
+ # before handing control back to Origen. Un-comment the example below to get started.
68
+ # @application_commands = <<-EOT
69
+ # specs Run the specs (tests), -c will enable coverage
70
+ # examples Run the examples (tests), -c will enable coverage
71
+ # test Run both specs and examples, -c will enable coverage
72
+ # EOT
73
+
74
+ end
@@ -0,0 +1,18 @@
1
+ # The requested command is passed in here as @command
2
+ case @command
3
+
4
+ when "update"
5
+ require "#{Origen.root!}/lib/origen_updater/commands/update"
6
+ # Important to exit when a command has been fulfilled or else Origen core will try and execute it
7
+ exit 0
8
+
9
+ # Always leave an else clause to allow control to fall back through to the Origen command handler.
10
+ # You probably want to also add the command details to the help shown via 'origen -h',
11
+ # you can do this bb adding the required text to @plugin_commands before handing control back to
12
+ # Origen.
13
+ else
14
+ @plugin_commands << <<-EOT
15
+ update Update your app environment based on your Gemfile
16
+ EOT
17
+
18
+ end
data/config/version.rb ADDED
@@ -0,0 +1,8 @@
1
+ module OrigenUpdater
2
+ MAJOR = 0
3
+ MINOR = 1
4
+ BUGFIX = 1
5
+ DEV = nil
6
+
7
+ VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
8
+ end
@@ -0,0 +1 @@
1
+ puts 'Hello, OrigenUpdater here!'
@@ -0,0 +1,4 @@
1
+ require 'origen'
2
+ require_relative '../config/application.rb'
3
+ module OrigenUpdater
4
+ end
@@ -0,0 +1,6 @@
1
+ # You can define any Rake tasks to support your application here (or in any file
2
+ # ending in .rake in this directory).
3
+ #
4
+ # Rake (Ruby Make) is very useful for creating build scripts, see this short video
5
+ # for a quick introduction:
6
+ # http://railscasts.com/episodes/66-custom-rake-tasks
@@ -0,0 +1,37 @@
1
+ % render "layouts/basic.html" do
2
+
3
+ %# HTML tags can be embedded in mark down files if you want to do specific custom
4
+ %# formatting like this, but in most cases that is not required.
5
+ <h1><%= Origen.app.namespace %> <span style="font-size: 14px">(<%= Origen.app.version %>)</span></h1>
6
+
7
+ ### Purpose
8
+
9
+ This plugin...
10
+
11
+ ### How To Install
12
+
13
+ In your Gemfile add:
14
+
15
+ ~~~ruby
16
+ gem "<%= Origen.app.name %>"
17
+ ~~~
18
+
19
+ or if your application is a plugin, then add this to your <code>.gemspec</code>
20
+
21
+ ~~~ruby
22
+ spec.add_runtime_dependency "<%= Origen.app.name %>", ">= <%= Origen.app.version %>"
23
+ ~~~
24
+
25
+ __NOTE:__ In the case of a plugin, you will also need to <code>require '<%= Origen.app.name %>'</code> somewhere in your environment.
26
+
27
+
28
+ ### How To Use
29
+
30
+ Add quickstart documentation here...
31
+
32
+
33
+ ### How To Setup a Development Environment
34
+
35
+ Describe how a developer would setup a new workspace for this plugin...
36
+
37
+ % end
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: <%= options[:title] || Origen.config.name %>
3
+ ---
4
+ <%= render "partials/navbar.html", tab: options[:tab] %>
5
+
6
+ <div class="row">
7
+ %# The markdown attribute is important if you are going to include content written
8
+ %# in markdown, without this is will be included verbatim
9
+ <div class="span12" markdown="1">
10
+ <%= yield %>
11
+
12
+ </div>
13
+ </div>
@@ -0,0 +1,20 @@
1
+ <nav class="navbar navbar-inverse navbar-fixed-top">
2
+ <div class="container">
3
+ <div class="navbar-header">
4
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
5
+ <span class="sr-only">Toggle navigation</span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ </button>
10
+ <a class="navbar-brand" href="<%= path "/" %>">Home</a>
11
+ </div>
12
+ <div id="navbar" class="collapse navbar-collapse">
13
+ <ul class="nav navbar-nav">
14
+ <li class="<%= options[:tab] == :api ? 'active' : '' %>"><a href="<%= path "/api/" %>">API</a></li>
15
+ <li class="<%= options[:tab] == :release ? 'active' : '' %>"><a href="<%= path "/release_notes" %>">Release Notes</a></li>
16
+ </ul>
17
+ <%= import "origen/web/logo.html" %>
18
+ </div><!--/.nav-collapse -->
19
+ </div>
20
+ </nav>
@@ -0,0 +1,5 @@
1
+ % render "layouts/basic.html", tab: :release do
2
+
3
+ <%= render "#{Origen.root}/doc/history" %>
4
+
5
+ % end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: origen_updater
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Stephen McGinty
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: origen
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.1
27
+ description:
28
+ email:
29
+ - stephen.f.mcginty@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - config/application.rb
35
+ - config/boot.rb
36
+ - config/commands.rb
37
+ - config/shared_commands.rb
38
+ - config/version.rb
39
+ - lib/origen_updater.rb
40
+ - lib/origen_updater/commands/update.rb
41
+ - lib/tasks/origen_updater.rake
42
+ - templates/web/index.md.erb
43
+ - templates/web/layouts/_basic.html.erb
44
+ - templates/web/partials/_navbar.html.erb
45
+ - templates/web/release_notes.md.erb
46
+ homepage:
47
+ licenses: []
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '2'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.8.11
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 2.5.1
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Deals with the trials and tribulations of updating Origen within a corporate
69
+ Linux env
70
+ test_files: []