ft_42 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ft_42.rb +12 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eade5fa03e379b5753d2f8b2d62212545de8e3a5
4
- data.tar.gz: 9d972b0916ae3c3df9e120cdca320e0db23a9513
3
+ metadata.gz: 5b89fa0d5eb5e067d88c95d43f4d5bb78d60ae08
4
+ data.tar.gz: 9b84aebbc66fadbb76e458b345aae08ff654b195
5
5
  SHA512:
6
- metadata.gz: 681583c763bc7dffb7b23ed02fe99d5b91a661b971e2f3ff576154c57093b6930a5cc667ced914f12ade9a0b965fc069947ccd9bcb747cde7eeebdfff437ed47
7
- data.tar.gz: 641bfcce5ef3c19fe717ca3277f6b93a565d6bbba3fd2f79de9f635671e3d66ca83dc5eaf5964d78442e5d5c748b98f189a86b6e079ea3204d3155a23e368192
6
+ metadata.gz: c13ca2ee3381905051917308f3c40c7eb352ede19d7672b58c86b5be91a65e8540f75953c9cd5c52e778a437dcd28f671845f45e12655c9b3f44e43ab9f4a98a
7
+ data.tar.gz: 316c2f4a531fccdf3199a7aea8d21d0f8f5027f1b7c4a2379d5688ebe12f1ea9455656cdf7d7ff71d1ed5e55010785db145c3748dd5d2e843bab214aa2e25e8b
data/lib/ft_42.rb CHANGED
@@ -58,11 +58,12 @@ end
58
58
 
59
59
 
60
60
  class Client
61
- attr_reader :input_1, :input_2, :token
61
+ attr_reader :input_1, :input_2, :input_3, :token
62
62
 
63
- def initialize(input_1, input_2 = nil)
63
+ def initialize(input_1, input_2 = nil, input_3 = nil)
64
64
  @input_1 = input_1
65
65
  @input_2 = input_2
66
+ @input_3 = input_3
66
67
  @token = Token.new.token
67
68
  end
68
69
 
@@ -194,7 +195,12 @@ class ProjectUsers
194
195
  end
195
196
 
196
197
  def logins
197
- logins = project_users.map { |user_project| user_project["user"]["login"] }
198
+ project_users.map { |user_project| user_project["user"]["login"] }
199
+ end
200
+
201
+ def in_progress
202
+ in_progress = project_users.select { |user_project| user_project["status"] == "in_progress" }
203
+ in_progress.map { |user_project| user_project["user"]["login"] }
198
204
  end
199
205
  end
200
206
 
@@ -334,7 +340,7 @@ class ProjectPrinter
334
340
  end
335
341
 
336
342
  def tier
337
- puts "Tier: #{project.tier}"
343
+ puts "Difficulty Level: #{project.tier}"
338
344
  end
339
345
 
340
346
  private
@@ -357,7 +363,8 @@ class ProjectUsersPrinter
357
363
  end
358
364
 
359
365
  def usernames
360
- project_users.logins.each_with_index do |login, i|
366
+ puts "Currenly working on project:"
367
+ project_users.in_progress.each_with_index do |login, i|
361
368
  puts "#{i + 1}. #{login}"
362
369
  end
363
370
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ft_42
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Fernandez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-02 00:00:00.000000000 Z
11
+ date: 2016-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack