appolo 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fc269f53a80828c8b16a1da7a983550e295faad
4
- data.tar.gz: de98e8fc3c95d52ed518b5ec2261aa823b0beb90
3
+ metadata.gz: 8d2d63fe70042474f6ed6cceec195d51988dd806
4
+ data.tar.gz: 34d814c1417eb1d822c03f416a28cdd53e75ee30
5
5
  SHA512:
6
- metadata.gz: 10aebf9d882c6a5d525b018ddcbee1332cbe19fc7ab4b46329e722b47d56c76f0092788f1914344cc4eb1f3348943cf05b27b01e3dbe98b28bff23e3fda811f7
7
- data.tar.gz: e561bc626040d4287b0c14c8d980e9979b4eedcbfca93e7d40716c3bb2700c8f5cdb9df23da2eec51dd926038dd2fefbe79254559991c1fc43f321039e577168
6
+ metadata.gz: c8c0ee1d60e2e7fa0ccd7ba1393808c58dff3ca222c031b00f609a1ad66f57a5b4c37f2a12e4859a32418c87a80b6cdbea19fd2d0bbcd1475387a415c97a6f56
7
+ data.tar.gz: 9c582c01a01648891c136354624736fb2383a6d6f4e84a5ca0740902d40ec40b1a2c379e9129f64a968fa51343ca4929728ea7993020fe70d6c678c33c5483ea
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'rspec', '~> 3.0'
27
27
  spec.add_development_dependency 'rest-client', '~> 1.8', '>= 1.8.0'
28
28
  spec.add_development_dependency 'json', '~> 1.8', '>= 1.8.3'
29
- spec.add_development_dependency 'parallel', '~> 1.6.1'
29
+ #spec.add_development_dependency 'parallel', '~> 1.6.1'
30
30
 
31
31
  end
@@ -48,7 +48,7 @@ module Appolo
48
48
  :classes => 'https://adeetc.thothapp.com/api/v1/classes/',
49
49
  :programs => 'https://adeetc.thothapp.com/api/v1/programs/',
50
50
  :courses => 'https://adeetc.thothapp.com/api/v1/courseunits/',
51
- :lec_semesters => 'https://adeetc.thothapp.com/api/v1/lectivesemesters'
51
+ :lec_semesters => 'https://adeetc.thothapp.com/api/v1/lectivesemesters/'
52
52
  }
53
53
 
54
54
  ##
@@ -1,6 +1,6 @@
1
1
  require 'json'
2
2
  require 'rest-client'
3
- require 'parallel'
3
+
4
4
  require_relative '../model_utils'
5
5
  require_relative '../secondary/links'
6
6
  require_relative '../secondary/avatar_url'
@@ -59,8 +59,11 @@ class Classes < Element
59
59
  all_participants = JSON.parse response_all_participants
60
60
  temp = []
61
61
  all_participants['students'].each do |participant|
62
- temp.push Student.new participant
62
+ temp.push(Student.new(participant))
63
63
  end
64
+ #temp = Parallel.each(all_participants['students'], :in_processes => 1){
65
+ # |participant| temp.push(Student.new(participant))
66
+ #}
64
67
  temp
65
68
  end
66
69
 
@@ -70,9 +73,14 @@ class Classes < Element
70
73
  response_all_lectures = RestClient.get @links.lectures
71
74
  all_lectures = JSON.parse response_all_lectures
72
75
  temp = []
73
- temp = Parallel.each(all_lectures['classLectures'], :in_processes => 1){
74
- |lecture| temp.push Lecture.new lecture
75
- }
76
+ all_lectures['classLectures'].each do |lecture|
77
+ temp.push(Lecture.new(lecture))
78
+ end
79
+
80
+ #Parallel.each(all_lectures['classLectures'], :in_processes => 1){
81
+ # |lecture| temp.push(Lecture.new(lecture))
82
+ #}
83
+
76
84
  temp
77
85
  end
78
86
 
@@ -81,10 +89,15 @@ class Classes < Element
81
89
  def resources
82
90
  response_all_resources = RestClient.get @links.resources
83
91
  all_resources = JSON.parse response_all_resources
84
- temp = []
85
- temp = Parallel.each(all_resources['classResources'], :in_processes => 1){
86
- |resource| temp.push Resource.new resource
87
- }
92
+ temp = Array.new
93
+ all_resources['classResources'].each do |resource|
94
+ temp.push(Resource.new(resource))
95
+ end
96
+
97
+ #Parallel.each(all_resources['classResources'], :in_processes => 1){
98
+ # |resource| temp << Resource.new(resource)
99
+ #}
100
+
88
101
  temp
89
102
  end
90
103
 
@@ -4,7 +4,7 @@ require_relative 'courses'
4
4
 
5
5
  class Program < Element
6
6
 
7
- attr_reader :full_name, :course_units
7
+ attr_reader :name, :course_units
8
8
 
9
9
  @@type_for_links = 'programs'
10
10
 
@@ -17,7 +17,7 @@ class Program < Element
17
17
  json_data[ModelUtils::LINKS],
18
18
  @@type_for_links)
19
19
 
20
- @full_name = (json_data[ModelUtils::FULL_NAME] || json_data[ModelUtils::NAME])
20
+ @name = (json_data[ModelUtils::FULL_NAME] || json_data[ModelUtils::NAME])
21
21
 
22
22
  @course_units = get_course_units json_data[ModelUtils::COURSE_UNIT]
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Appolo
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Gabriel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2015-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,20 +92,6 @@ dependencies:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: 1.8.3
95
- - !ruby/object:Gem::Dependency
96
- name: parallel
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - "~>"
100
- - !ruby/object:Gem::Version
101
- version: 1.6.1
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - "~>"
107
- - !ruby/object:Gem::Version
108
- version: 1.6.1
109
95
  description: |-
110
96
  Ruby gem that provides quick and easy access to the web api of Thoth WebApp -
111
97
  https://adeetc.thothapp.com/