newline_hw 1.0.1 → 1.0.2
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/.travis.yml +8 -0
- data/README.md +34 -5
- data/Rakefile +8 -1
- data/lib/newline_hw/cli.rb +12 -0
- data/lib/newline_hw/shell/setup.rb +0 -6
- data/lib/newline_hw/version.rb +1 -1
- data/newline_hw.gemspec +1 -0
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 676110b691c8a3e7aee1989c785a528a4fe695d7
|
4
|
+
data.tar.gz: e3a9e914796b340c4c382952d52308c1c5a33c9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e493ec70edfdce1b89b63a4fc86282cae08c1a7c0b52bd3a72a00017a6b3918dba46d2ecfdf346cdca1fd7915ae6a1bc91d3818162abfd43344c7ac87bae11c
|
7
|
+
data.tar.gz: d42e8f9824fe1c165607bfe9658328859d480fd3b0b777ff81303f35dd5685d84bc9e75fbfd1da5bdeebf339dc34c87da1a9f8888f6c8bc94641f58c34e0a136
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# NewlineHw
|
2
|
+
[](https://travis-ci.org/TIYDC/newline_hw)
|
2
3
|
|
3
4
|
Is a tool to rapidly clone and setup projects in a standard format, this is primarily
|
4
|
-
used to improving the speed to review homework turned in
|
5
|
+
used to improving the speed to review homework turned in during a bootcamp setting.
|
5
6
|
|
6
7
|
## Installation
|
7
8
|
|
@@ -21,11 +22,39 @@ In your .bashrc / .bash_profile / .zshrc **THIS IS VERY REQUIRED**
|
|
21
22
|
|
22
23
|
Once the the eval code has been added to your bash or zsh profile you will have access to the `hw` command. This is where the majority of the tools use comes into play.
|
23
24
|
|
24
|
-
|
25
|
+
`$ hw GIT_REPO`
|
25
26
|
|
26
|
-
|
27
|
+
### Examples
|
27
28
|
|
28
|
-
|
29
|
+
Newline Assignment Submission ID
|
30
|
+
|
31
|
+
`$ hw 30698`
|
32
|
+
|
33
|
+
Github Repo
|
34
|
+
|
35
|
+
`$ hw https://github.com/rposborne/countries`
|
36
|
+
|
37
|
+
Pull Request
|
38
|
+
|
39
|
+
`$ hw https://github.com/hexorx/countries/pull/416`
|
40
|
+
|
41
|
+
Gist
|
42
|
+
|
43
|
+
`$ hw https://gist.github.com/alirobe/7f3b34ad89a159e6daa1`
|
44
|
+
|
45
|
+
Any Git URL
|
46
|
+
|
47
|
+
`$ hw git@bitbucket.org:pzolee/tcpserver.git`
|
48
|
+
|
49
|
+
### Configuration
|
50
|
+
|
51
|
+
User specific configuration is stored in a yaml file at the HOME path for a user.
|
52
|
+
|
53
|
+
Quickly edit this config in your editor by running this command.
|
54
|
+
|
55
|
+
`$ newline_hw config`
|
56
|
+
|
57
|
+
To see all possible config options go to [lib/newline_hw/config.rb](lib/newline_hw/config.rb)
|
29
58
|
|
30
59
|
### What it does
|
31
60
|
|
@@ -54,7 +83,7 @@ _Javascript_
|
|
54
83
|
|
55
84
|
## TIYO-Assistant Integration
|
56
85
|
|
57
|
-
This provides a message bus to allow TIYO assistant to send json to our local binary. This is used to open a terminal window (Apple Terminal or iTerm2) using appleScript and start a
|
86
|
+
This provides a message bus to allow TIYO assistant to send json to our local binary. This is used to open a terminal window (Apple Terminal or iTerm2) using appleScript and start a `$ hw <submission-id>` command. We use the NewlineCli to backfill data required to run the remainder of the commands.
|
58
87
|
|
59
88
|
1. You MUST be on a MAC (hope to drop this in the future)
|
60
89
|
1. You MUST have `newline_cli` installed
|
data/Rakefile
CHANGED
data/lib/newline_hw/cli.rb
CHANGED
@@ -30,6 +30,18 @@ module NewlineHw
|
|
30
30
|
option :editor
|
31
31
|
def setup_command(submission_id)
|
32
32
|
puts Shell::Setup.new(submission_id, config).cmd
|
33
|
+
rescue NewlineCli::AuthenticationError => e
|
34
|
+
say "Could not log into Newline using NewlineCLI, have you logged in?"
|
35
|
+
say "Error from NewlineCli #{e.message}"
|
36
|
+
exit 3
|
37
|
+
rescue Excon::Error::Socket => e
|
38
|
+
say "Error could not open a connection to newline. Do you have internet?"
|
39
|
+
say "Error message #{e.message}"
|
40
|
+
exit 3
|
41
|
+
rescue Excon::Error::Forbidden => e
|
42
|
+
say "You do not have access to this submission."
|
43
|
+
say "Error message #{e.message}"
|
44
|
+
exit 3
|
33
45
|
end
|
34
46
|
|
35
47
|
desc "run WORKINGDIR", "generate a shell command to run language and project specfic tasks a given SUBMISSION_ID"
|
@@ -98,12 +98,6 @@ module NewlineHw
|
|
98
98
|
|
99
99
|
private def query_submission_info
|
100
100
|
NewlineCli::Api.new.get("assignment_submissions/#{@newline_submission_id}")
|
101
|
-
rescue Excon::Error::Socket => e
|
102
|
-
puts "Error could not open a connection to newline #{e.message}"
|
103
|
-
exit 3
|
104
|
-
rescue Excon::Error::Forbidden => e
|
105
|
-
puts "You do not have access to this submission #{e.message}"
|
106
|
-
exit 3
|
107
101
|
end
|
108
102
|
end
|
109
103
|
end
|
data/lib/newline_hw/version.rb
CHANGED
data/newline_hw.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newline_hw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Osborne
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
111
125
|
description: Quickly Clone and setup basic ruby and JS projects.
|
112
126
|
email:
|
113
127
|
- russell@theironyard.com
|
@@ -121,6 +135,7 @@ files:
|
|
121
135
|
- ".gitignore"
|
122
136
|
- ".rspec"
|
123
137
|
- ".rubocop.yml"
|
138
|
+
- ".travis.yml"
|
124
139
|
- CODE_OF_CONDUCT.md
|
125
140
|
- Gemfile
|
126
141
|
- LICENSE.txt
|