brown_noser 0.2.1 → 0.2.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: e40fcf62cf35b124491ebfad296fef3b965c5564
4
- data.tar.gz: c11e0646be3988b06ad3e84d678e59c9476e6f66
3
+ metadata.gz: 8f9e252bae7efd146ba761cb68d6bfeea8db22c3
4
+ data.tar.gz: 50ee3e123eed67dc5970bef134cc97d6d0c1af62
5
5
  SHA512:
6
- metadata.gz: 687cc3f565935ce35417393bdc934f82e1c7efdf51a213f32548221d946a5135e98b573670cdc68ddbf1c99a966b392cbc2eb74228c673b3dddd3d2d7efe5a42
7
- data.tar.gz: bb245d3eacfa69702a442f7cb2d53091ee27645e51c8f2729f782bbba68358374837b70ac45f0bfd37e8d089387482d637f1eca86421e54ad9352dd015100a51
6
+ metadata.gz: c993a030629e3361f042e7e9d5628a7096b1188e52502c0378f50a7af614063565d2975ad9e42349c4bd7523a1518afd3cad48317d5070a41a269f728d8bd230
7
+ data.tar.gz: 45f4a0c2377d58ec0730fecae5730e3895f086481c86fde6d49dcb3f3781b0bd2f506694d6b90af4b7f42067b775b5b1590ac885a0ae1e9102ddfc9076787e5f
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # BrownNoser
2
+ [![Gem Version](https://badge.fury.io/rb/brown_noser.svg)](https://badge.fury.io/rb/brown_noser)
2
3
 
3
4
  This tool is to help manage and inspect Git Repos used for our the Coursework at WCCCEDU.
4
5
 
@@ -1,3 +1,3 @@
1
1
  module BrownNoser
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/brown_noser.rb CHANGED
@@ -14,10 +14,13 @@ class BrownNoser
14
14
  OptionParser.new do |opts|
15
15
  opts.banner = "Usage: pet <USER> <REPO> [options]"
16
16
 
17
+ @options[:moss_lang] = 'cc'
18
+
17
19
  opts.on('-s', '--sync', 'Sync') { |v| @options[:sync_flag] = true }
18
20
  opts.on('-f', '--find QUERY', 'Find') { |v| @options[:query] = v }
19
21
  opts.on('-u', '--username USER', 'Github User') { |v| @options[:username] = v }
20
22
  opts.on('-p', '--password PASS', 'Github Pass') { |v| @options[:password] = v }
23
+ opts.on('-l', '--lang PROJECT_LANG', 'Source Language') { |v| @options[:moss_lang] }
21
24
  opts.on('-c', '--cheat MOSSID', 'Moss Userid') { |v| @options[:moss_id] = v }
22
25
 
23
26
  end.parse!
@@ -43,7 +43,9 @@ private
43
43
  ->(){
44
44
  files = `git ls-tree --full-name --name-only -r #{user}/#{branch} | grep '\.h$\\|\.cpp$'`.split("\n")
45
45
  copy_files = files.map do |file|
46
- copy_file(file, "#{dest_folder}/#{file}").call
46
+ dest_path = "#{dest_folder}/#{file}"
47
+ FileUtils.mkdir_p(File.dirname(dest_path))
48
+ copy_file(file, dest_path).call
47
49
  end
48
50
  copy_files.join(" && ")
49
51
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brown_noser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Scarrone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-06 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler