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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b90bb4f4419d5fbc30cd8d12af8ddcce295c6a94
4
- data.tar.gz: 384701efa01bc29405b98719de878b17cedce385
3
+ metadata.gz: 676110b691c8a3e7aee1989c785a528a4fe695d7
4
+ data.tar.gz: e3a9e914796b340c4c382952d52308c1c5a33c9f
5
5
  SHA512:
6
- metadata.gz: 6f3bb3adb206a662be9812d856beababf62c04ad968086c0c3643c0b1b6984e20c272751bcb141fb60879e1aef8aa436dfc05ccfda514cc9eb6603258bbba804
7
- data.tar.gz: fdbc15a99d7c769e7aa23b49f0e0db418146da057c7ae189562a1771958edbee38c9c6f09697fd49784eb94c28f57ef66bc7f68ab932ee5723b28fdc919b8e50
6
+ metadata.gz: 3e493ec70edfdce1b89b63a4fc86282cae08c1a7c0b52bd3a72a00017a6b3918dba46d2ecfdf346cdca1fd7915ae6a1bc91d3818162abfd43344c7ac87bae11c
7
+ data.tar.gz: d42e8f9824fe1c165607bfe9658328859d480fd3b0b777ff81303f35dd5685d84bc9e75fbfd1da5bdeebf339dc34c87da1a9f8888f6c8bc94641f58c34e0a136
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ before_install: gem install newline_cli --source $PRIVATE_GEM_REPO
2
+ script: bundle exec rake
3
+
4
+ rvm:
5
+ - 2.3.3
6
+ - 2.4.0
7
+
8
+ sudo: false
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # NewlineHw
2
+ [![Build Status](https://travis-ci.org/TIYDC/newline_hw.svg?branch=master)](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 in a bootcamp like setting.
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
- `hw GIT_REPO`
25
+ `$ hw GIT_REPO`
25
26
 
26
- Example
27
+ ### Examples
27
28
 
28
- `hw https://github.com/rposborne/countries`
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 `hw <submission-id>` command. We use the NewlineCli to backfill data required to run the remainder of the commands.
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
@@ -1,2 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
- task default: :spec
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
8
+ rescue LoadError
9
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module NewlineHw
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
data/newline_hw.gemspec CHANGED
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "bundler", "~> 1.11"
35
35
  spec.add_development_dependency "rake", "~> 10.0"
36
36
  spec.add_development_dependency "webmock", "~> 2.3"
37
+ spec.add_development_dependency "rspec", "~> 3.0"
37
38
  end
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.1
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