power_school 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/power_school/configuration.rb +0 -1
- data/lib/power_school/connection.rb +1 -1
- data/lib/power_school/students.rb +20 -0
- data/lib/power_school/version.rb +1 -1
- data/lib/power_school.rb +7 -0
- metadata +20 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9700dbc021b5fad2a6992e56c523a29b2365272d
|
4
|
+
data.tar.gz: ed144d2a87b9b6ff0961645e2d7354f3ca933578
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ee61ccbb66f61cc447958e8ad8910fc00302582c7648df0442c00d1c09eaeed0c322be4972d0b1ddd8deb2586cec10016d5628a55d6c880c97005159fe4d40d
|
7
|
+
data.tar.gz: b4e7fd22b1669b5ac8f944b24f1f330c0ea8fe9fe6c9953a9281e6d35990075d67270a58772b30005d1daf35906f254267444b2082fe2d9bfd1aa0cef3bc0c45
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.0
|
@@ -49,7 +49,7 @@ module PowerSchool
|
|
49
49
|
PowerSchool::Connection.go_to "importexport/quickimport/quickimport1.html"
|
50
50
|
PowerSchool.browser.select_list(:id, "filenumber").select table_name
|
51
51
|
PowerSchool.browser.select_list(:id, "fielddelim").select "Other:"
|
52
|
-
PowerSchool.browser.text_field(:id => 'custfielddelim').set '
|
52
|
+
PowerSchool.browser.text_field(:id => 'custfielddelim').set ';'
|
53
53
|
PowerSchool.browser.select_list(:id, "recdelim").select "LF"
|
54
54
|
PowerSchool.browser.file_field(:id, "filename").set( file_name )
|
55
55
|
PowerSchool.browser.button(:id => "btnImport").click
|
@@ -15,5 +15,25 @@ module PowerSchool
|
|
15
15
|
def self.import(file_path)
|
16
16
|
PowerSchool::Connection.quick_import('Students', file_path)
|
17
17
|
end
|
18
|
+
|
19
|
+
def self.list_array( fields = ["Student_Number", "LastFirst", "Grade_Level"], css = "#content-main .box-round table tr", enroll_status = "Active" )
|
20
|
+
case enroll_status
|
21
|
+
when "Active"
|
22
|
+
PowerSchool::Connection.go_home("?selectstudent=")
|
23
|
+
when "Pre-registered"
|
24
|
+
PowerSchool::Connection.go_home("?selectstudent=/enroll_status=-1")
|
25
|
+
end
|
26
|
+
PowerSchool::Connection.go_to("studentlist/studentlist1.html")
|
27
|
+
|
28
|
+
PowerSchool::Connection.clear_form
|
29
|
+
|
30
|
+
fields.each_with_index do |field, index|
|
31
|
+
index = index + 1
|
32
|
+
PowerSchool.browser.text_field(:id => "tt"+index.to_s).set (field)
|
33
|
+
end
|
34
|
+
PowerSchool.browser.button(:id => "btnSubmit").click
|
35
|
+
student_array = PowerSchool.table_to_a( PowerSchool.browser.html, css)
|
36
|
+
end
|
37
|
+
|
18
38
|
end
|
19
39
|
end
|
data/lib/power_school/version.rb
CHANGED
data/lib/power_school.rb
CHANGED
@@ -11,4 +11,11 @@ require 'open-uri'
|
|
11
11
|
module PowerSchool
|
12
12
|
extend Configuration
|
13
13
|
|
14
|
+
def self.table_to_a( html, css )
|
15
|
+
resArray = Nokogiri::HTML(html).css(css).to_a
|
16
|
+
resArray = resArray.map {|row| row.css("td").map {|c| c.text}.to_a }
|
17
|
+
resArray.shift
|
18
|
+
resArray
|
19
|
+
end
|
20
|
+
|
14
21
|
end
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: power_school
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauro Morales
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: watir
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: capybara
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '1.3'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.3'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: Interact with PowerSchool
|
@@ -101,9 +101,9 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .rspec
|
106
|
-
- .ruby-version
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".ruby-version"
|
107
107
|
- Gemfile
|
108
108
|
- LICENSE.txt
|
109
109
|
- README.md
|
@@ -125,19 +125,18 @@ require_paths:
|
|
125
125
|
- lib
|
126
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- -
|
133
|
+
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.2.0
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Interact with PowerSchool by using capybara
|
142
142
|
test_files: []
|
143
|
-
has_rdoc:
|