canvas-workflow 0.5.0 → 0.7.0
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 +4 -4
- data/.yardopts +3 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +11 -0
- data/{assets/_config.yml → _config.yml} +0 -0
- data/bin/canvas +10 -1
- data/lib/canvas/workflow/cli/build.rb +30 -0
- data/lib/canvas/workflow/cli/error.rb +15 -0
- data/lib/canvas/workflow/travis.rb +3 -3
- data/lib/canvas/workflow/version.rb +1 -1
- metadata +7 -18
- data/lib/canvas/workflow/cli/jekyll.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6eca2df23be413bc70fce4013c32e8a33727a309d8fc93b065575865663e24
|
4
|
+
data.tar.gz: 840966af55829acc2af8e6853fb39a194904e9be776d551a328560a4c02fd3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e7cf140bb34011498b48f98a2adcc62976515c79d1f1264ce8429c2e21ab1e38902d6fcc703496be6052fa9fc037e10a1945e050fefba7c2a26bc0de276aca
|
7
|
+
data.tar.gz: 6e129630ae936d3d8bb60bee24ecbd6427074cec94eab51ca4c334c25bd70b401d5425eec6643de0de1afc55bae27e89842755f6a4c9bcc044380da826fcd70a
|
data/.yardopts
ADDED
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
File without changes
|
data/bin/canvas
CHANGED
@@ -2,4 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'canvas-workflow'
|
4
4
|
|
5
|
-
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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)
|
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.
|
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-
|
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/
|
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
|