canvas-workflow 0.5.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: 4776993ecddc6700c7ada9b4219877137866df237762eafc2d1c32d0e1320cd2
4
- data.tar.gz: 59a259dfbba4cd751c62b3df9c8422e17dab2a2af8f76ad130f78bf0548474b4
3
+ metadata.gz: 0d6eca2df23be413bc70fce4013c32e8a33727a309d8fc93b065575865663e24
4
+ data.tar.gz: 840966af55829acc2af8e6853fb39a194904e9be776d551a328560a4c02fd3b7
5
5
  SHA512:
6
- metadata.gz: 80fa795db4d8087402688e6ecefb6b38faa04e278d8ed0180674f40d81142d9256c44e2715814128f3bbd4fb271eb7026d98ce49302dd78ddb9f5c5442b3dcc6
7
- data.tar.gz: 90bc64fdb497861414f74318832e31dc114e508f1d43fa9cb65d9b37540924c57218f77badbe368af9585881fb80166c29730bf38ccc6b3e15e256822ba7fcd1
6
+ metadata.gz: 54e7cf140bb34011498b48f98a2adcc62976515c79d1f1264ce8429c2e21ab1e38902d6fcc703496be6052fa9fc037e10a1945e050fefba7c2a26bc0de276aca
7
+ data.tar.gz: 6e129630ae936d3d8bb60bee24ecbd6427074cec94eab51ca4c334c25bd70b401d5425eec6643de0de1afc55bae27e89842755f6a4c9bcc044380da826fcd70a
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --tag bug:"Known bugs"
2
+ --tag internal
3
+ --hide-tag internal
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.7.0](https://github.com/jiverson002/canvas-workflow/releases/tag/0.7.0)
2
+
3
+ ### Enhancements
4
+ * Change subcommand jekyll build => build, to abstract what tool is being used
5
+ to build.
6
+
7
+ ## [0.6.0](https://github.com/jiverson002/canvas-workflow/releases/tag/0.6.0)
8
+ * Yanked.
9
+
1
10
  ## [0.5.0](https://github.com/jiverson002/canvas-workflow/releases/tag/0.5.0)
2
11
  * Renamed project to canvas-workflow.
3
12
  * Incorporated canvas-workflow-travis into this project.
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # group :runtime
6
+ gemspec
7
+
8
+ group :test do
9
+ gem "rspec", "~>3.7"
10
+ gem "webmock", "~>3.3"
11
+ end
File without changes
data/bin/canvas CHANGED
@@ -2,4 +2,13 @@
2
2
 
3
3
  require 'canvas-workflow'
4
4
 
5
- Canvas::Workflow::CLI.start(ARGV)
5
+ file = "/tmp/canvas-workflow"
6
+
7
+ exit(false) if File.exist?(file)
8
+
9
+ begin
10
+ Canvas::Workflow::CLI.start(ARGV)
11
+ rescue Canvas::Workflow::CLI::Error => e
12
+ File.write(file, e.exitstatus.to_s)
13
+ exit(e.exitstatus)
14
+ end
@@ -0,0 +1,30 @@
1
+ module Canvas
2
+ module Workflow
3
+ module CLI
4
+ class Build < Thor
5
+ desc "build", "Build the Canvas Workflow project"
6
+ option :with_bundler, :aliases => :b,
7
+ :type => :boolean, :default => false,
8
+ :desc => "build using bundler?"
9
+ def build
10
+ config = File.expand_path("../../../../../_config.yml", __FILE__)
11
+
12
+ cmd = ""
13
+ cmd << "bundle exec " if options[:with_bundler]
14
+ cmd << "jekyll build --config #{config},_config.yml --verbose"
15
+ #puts "#{cmd}"
16
+ ret = system("#{cmd}")
17
+ raise Error.new($?.exitstatus) if (ret.nil? || ret == false)
18
+ end
19
+
20
+ default_task :build
21
+ end
22
+
23
+ desc "build", "Manage static site generator"
24
+ subcommand "build", Build
25
+ end
26
+ end
27
+ end
28
+
29
+ # Canvas::Workflow::CLI.desc "build", "Manage static site generator"
30
+ # Canvas::Workflow::CLI.subcommand "build", Canvas::Workflow::CLI::Build
@@ -0,0 +1,15 @@
1
+ module Canvas
2
+ module Workflow
3
+ module CLI
4
+ class Error < StandardError
5
+ def initialize(exitstatus)
6
+ @exitstatus = exitstatus
7
+ end
8
+
9
+ def exitstatus
10
+ @exitstatus
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -33,7 +33,7 @@ module Canvas
33
33
  # get the list of files that have been deleted since the last passed
34
34
  # commit
35
35
  @removed ||= `git diff --diff-filter=D --name-only #{commit_sha}`
36
- exit($?.exitstatus) if $?.exitstatus != 0
36
+ raise Error.new($?.exitstatus) if $?.exitstatus != 0
37
37
  end
38
38
 
39
39
  # check if the param file has been removed
@@ -58,7 +58,7 @@ module Canvas
58
58
  # commit
59
59
  @created ||= `git diff --diff-filter=AR --name-only #{commit_sha}`
60
60
  end
61
- exit($?.exitstatus) if $?.exitstatus != 0
61
+ raise Error.new($?.exitstatus) if $?.exitstatus != 0
62
62
 
63
63
  # check if the param file has been created
64
64
  @created.include?(file)
@@ -82,7 +82,7 @@ module Canvas
82
82
  # passed commit
83
83
  @modified ||= `git diff --diff-filter=M --name-only #{commit_sha}`
84
84
  end
85
- exit($?.exitstatus) if $?.exitstatus != 0
85
+ raise Error.new($?.exitstatus) if $?.exitstatus != 0
86
86
 
87
87
  # check if the param file has been modified
88
88
  @modified.include?(file)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Canvas
4
4
  module Workflow
5
- VERSION = "0.5.0".freeze
5
+ VERSION = "0.7.0".freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Iverson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-16 00:00:00.000000000 Z
11
+ date: 2018-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: safe_yaml
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: thor
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -116,20 +102,23 @@ executables:
116
102
  extensions: []
117
103
  extra_rdoc_files: []
118
104
  files:
105
+ - ".yardopts"
119
106
  - CHANGELOG.md
107
+ - Gemfile
120
108
  - LICENSE
121
109
  - README.md
110
+ - _config.yml
122
111
  - _includes/newline
123
112
  - _layouts/assignment.html
124
113
  - _layouts/page.html
125
114
  - _layouts/syllabus.html
126
- - assets/_config.yml
127
115
  - bin/canvas
128
116
  - lib/canvas-workflow.rb
129
117
  - lib/canvas/workflow.rb
130
118
  - lib/canvas/workflow/cli.rb
119
+ - lib/canvas/workflow/cli/build.rb
131
120
  - lib/canvas/workflow/cli/deploy.rb
132
- - lib/canvas/workflow/cli/jekyll.rb
121
+ - lib/canvas/workflow/cli/error.rb
133
122
  - lib/canvas/workflow/cli/push.rb
134
123
  - lib/canvas/workflow/client.rb
135
124
  - lib/canvas/workflow/pandarus.rb
@@ -1,28 +0,0 @@
1
- module Canvas
2
- module Workflow
3
- module CLI
4
- class Jekyll < Thor
5
- desc "build", "Build the Canvas Workflow project"
6
- option :with_bundler, :aliases => :b,
7
- :type => :boolean, :default => false,
8
- :desc => "build using bundler?"
9
- def build
10
- assets = File.expand_path("../../../../../assets", __FILE__)
11
- asset = File.join(assets, "_config.yml")
12
-
13
- cmd = ""
14
- cmd << "bundle exec " if options[:with_bundler]
15
- cmd << "jekyll build --config #{asset},_config.yml --verbose"
16
- #puts "#{cmd}"
17
- exec("#{cmd}")
18
- end
19
- end
20
-
21
- desc "jekyll SUBCOMMAND ...ARGS", "Manage static site generator"
22
- subcommand "jekyll", Jekyll
23
- end
24
- end
25
- end
26
-
27
- # Canvas::Workflow::CLI.desc "jekyll SUBCOMMAND ...ARGS", "Manage static site generator"
28
- # Canvas::Workflow::CLI.subcommand "jekyll", Canvas::Workflow::CLI::Jekyll