work_together 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37991469f21918cdbc8d5893b009706744e2f612
4
- data.tar.gz: a835103329e4d1751b832e3c57b483bd9d60f5a4
3
+ metadata.gz: f00f7016c85d7d33b35a008fbdeaed2445f89c95
4
+ data.tar.gz: 5a0a3e25caaaa240aa3c5300c645d86aeaaea2fc
5
5
  SHA512:
6
- metadata.gz: ca071d41e94e3fe661b381db7503695b4e236411a6ab26a68fe0cb309ae79f782e56a5fd5914064aaed1681948ae6177ef7931d89be6ac22e0942c2a7bb1d32d
7
- data.tar.gz: 2ef26c270c8ad6f05980f293875139eeb734e839874a93129c8692a08ec599d68b58f0416c9a22cea4519695b700900a7a71833f3854d693fd90c159ac56653a
6
+ metadata.gz: 311152a58c8b601086eb4f7329028a67f264bd4b76b29caf5a197981cda41571e273faff06b782d31b95f60544ee51941cb01a4ba6d9a132667ee47377ca67e6
7
+ data.tar.gz: 8d1b1a9df73291b211c6295f52accd8eb24eb03d86cf7785f0cb3e24dfd79f6f92e098c379c3aa9b6b1910654d7c60909c74665449eb69e2cdf239249578c01c
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in work_together.gemspec
4
+ gem 'pry'
4
5
  gemspec
data/README.md CHANGED
@@ -1,41 +1,21 @@
1
1
  # WorkTogether
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/work_together`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ `gem install work_together`
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ `work-together --help`
6
6
 
7
- ## Installation
7
+ `work-together pairs --random /path/to/student/csv`
8
8
 
9
- Add this line to your application's Gemfile:
9
+ `work-together tables --random /path/to/student/csv`
10
10
 
11
- ```ruby
12
- gem 'work_together'
13
- ```
11
+ `work-together pairs --mindful /path/to/student/csv`
14
12
 
15
- And then execute:
13
+ `work-together talbes --mindful /path/to/student/csv`
16
14
 
17
- $ bundle
15
+ `work-together pairs --progress /path/to/student/csv`
18
16
 
19
- Or install it yourself as:
17
+ `work-together tables --progress /path/to/student/csv`
20
18
 
21
- $ gem install work_together
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/work_together.
36
-
37
-
38
- ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
19
+ Download student roster csv from batch, progress view in learn.co
41
20
 
21
+ Tests coming soon...
data/bin/work-together CHANGED
File without changes
@@ -99,16 +99,20 @@ class PairMaker
99
99
 
100
100
  def mindful_batch_of_two(two_groups_of_two)
101
101
  two_groups_of_two.each do |group|
102
- first = group[0]
103
- second = group[1]
104
- first_last = first[-1]
105
- second_first = second[0]
106
- first.delete_at(-1)
107
- second.delete_at(0)
108
- first << second_first
109
- second << first_last
110
- Table.new(first)
111
- Table.new(second)
102
+ if group.length >= 2
103
+ first = group[0]
104
+ second = group[1]
105
+ first_last = first[-1]
106
+ second_first = second[0]
107
+ first.delete_at(-1)
108
+ second.delete_at(0)
109
+ first << second_first
110
+ second << first_last
111
+ Table.new(first)
112
+ Table.new(second)
113
+ else
114
+ Table.new(group[0])
115
+ end
112
116
  end
113
117
  end
114
118
 
@@ -1,13 +1,17 @@
1
1
  require 'csv'
2
2
  require_relative './student.rb'
3
-
4
3
  class Parser
5
4
 
6
5
  def self.parse_and_make_students(file)
7
6
  CSV.foreach(file) do |row|
8
- name = "#{row[0]} #{row[1]}"
9
- progress = row[5]
10
- Student.new(name, progress)
7
+ make_student_attributes(row) unless row[0] == "first_name" || row[0].nil?
11
8
  end
9
+ binding.pry
10
+ end
11
+
12
+ def self.make_student_attributes(row)
13
+ name = "#{row[0]} #{row[1]}"
14
+ progress = row[5]
15
+ Student.new(name, progress)
12
16
  end
13
17
  end
@@ -1,3 +1,3 @@
1
1
  class WorkTogether
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: work_together
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophie DeBenedetto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler