stellar 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -55,7 +55,10 @@ file krb_file do
55
55
  kerberos[:user] = ask('MIT Kerberos Username: ') { |q| q.echo = true }
56
56
  kerberos[:pass] = ask('MIT Kerberos Password: ') { |q| q.echo = '*' }
57
57
  kerberos[:mit_id] = ask('MIT ID: ') { |q| q.echo = true }
58
- File.open(krb_file, 'w') {|f| f.write [kerberos.to_yaml].pack('m') }
58
+ # Verify the MIT information by trying to get a certificate.
59
+ if Stellar::Auth.get_certificate kerberos
60
+ File.open(krb_file, 'w') {|f| f.write [kerberos.to_yaml].pack('m') }
61
+ end
59
62
  end
60
63
  task :fixtures => krb_file
61
64
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/stellar.rb CHANGED
@@ -8,7 +8,12 @@ require 'mechanize'
8
8
 
9
9
  # TODO(pwnall): documentation
10
10
  module Stellar
11
-
11
+ # Creates a generic Stellar client.
12
+ # @see Stellar::Client
13
+ # @return [Stellar::Client] new generic Stellar client
14
+ def self.client
15
+ Stellar::Client.new
16
+ end
12
17
  end # namespace Stellar
13
18
 
14
19
  # Code.
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe Stellar do
4
+ describe '#client' do
5
+ let(:client) { Stellar.client }
6
+
7
+ it 'should be a Stellar client' do
8
+ client.should be_kind_of(Stellar::Client)
9
+ end
10
+ end
11
+ end
data/stellar.gemspec ADDED
@@ -0,0 +1,97 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "stellar"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Victor Costan"]
12
+ s.date = "2011-10-16"
13
+ s.description = "So we don't have to put up with Stellar's craptastic ui"
14
+ s.email = "victor@costan.us"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".project",
22
+ ".rspec",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/stellar.rb",
30
+ "lib/stellar/auth.rb",
31
+ "lib/stellar/client.rb",
32
+ "lib/stellar/courses.rb",
33
+ "lib/stellar/homework.rb",
34
+ "lib/stellar/mitca.crt",
35
+ "spec/fixtures/.gitkeep",
36
+ "spec/spec_helper.rb",
37
+ "spec/stellar/auth_spec.rb",
38
+ "spec/stellar/client_spec.rb",
39
+ "spec/stellar/courses_spec.rb",
40
+ "spec/stellar/homework_spec.rb",
41
+ "spec/stellar/homework_submissions_spec.rb",
42
+ "spec/stellar_spec.rb",
43
+ "spec/support/test-credentials.rb",
44
+ "stellar.gemspec"
45
+ ]
46
+ s.homepage = "http://github.com/pwnall/stellar"
47
+ s.licenses = ["MIT"]
48
+ s.require_paths = ["lib"]
49
+ s.rubygems_version = "1.8.11"
50
+ s.summary = "Automated access to MIT's Stellar data"
51
+
52
+ if s.respond_to? :specification_version then
53
+ s.specification_version = 3
54
+
55
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<mechanize>, [">= 2.0.2"])
57
+ s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.0"])
58
+ s.add_development_dependency(%q<rdoc>, [">= 3.9.4"])
59
+ s.add_development_dependency(%q<rspec>, [">= 2.6.0"])
60
+ s.add_development_dependency(%q<yard>, [">= 0.7.2"])
61
+ s.add_development_dependency(%q<yard-rspec>, [">= 0.1"])
62
+ s.add_development_dependency(%q<bundler>, [">= 1.0.21"])
63
+ s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
64
+ s.add_development_dependency(%q<rcov>, [">= 0"])
65
+ s.add_development_dependency(%q<ruby-debug>, [">= 0"])
66
+ s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
67
+ s.add_development_dependency(%q<highline>, [">= 1.6.2"])
68
+ else
69
+ s.add_dependency(%q<mechanize>, [">= 2.0.2"])
70
+ s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
71
+ s.add_dependency(%q<rdoc>, [">= 3.9.4"])
72
+ s.add_dependency(%q<rspec>, [">= 2.6.0"])
73
+ s.add_dependency(%q<yard>, [">= 0.7.2"])
74
+ s.add_dependency(%q<yard-rspec>, [">= 0.1"])
75
+ s.add_dependency(%q<bundler>, [">= 1.0.21"])
76
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
77
+ s.add_dependency(%q<rcov>, [">= 0"])
78
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
79
+ s.add_dependency(%q<ruby-debug19>, [">= 0"])
80
+ s.add_dependency(%q<highline>, [">= 1.6.2"])
81
+ end
82
+ else
83
+ s.add_dependency(%q<mechanize>, [">= 2.0.2"])
84
+ s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
85
+ s.add_dependency(%q<rdoc>, [">= 3.9.4"])
86
+ s.add_dependency(%q<rspec>, [">= 2.6.0"])
87
+ s.add_dependency(%q<yard>, [">= 0.7.2"])
88
+ s.add_dependency(%q<yard-rspec>, [">= 0.1"])
89
+ s.add_dependency(%q<bundler>, [">= 1.0.21"])
90
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
91
+ s.add_dependency(%q<rcov>, [">= 0"])
92
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
93
+ s.add_dependency(%q<ruby-debug19>, [">= 0"])
94
+ s.add_dependency(%q<highline>, [">= 1.6.2"])
95
+ end
96
+ end
97
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize
16
- requirement: &26061560 !ruby/object:Gem::Requirement
16
+ requirement: &15419440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.0.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26061560
24
+ version_requirements: *15419440
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &26060720 !ruby/object:Gem::Requirement
27
+ requirement: &15418740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *26060720
35
+ version_requirements: *15418740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &26060120 !ruby/object:Gem::Requirement
38
+ requirement: &15418020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.9.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *26060120
46
+ version_requirements: *15418020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &26059400 !ruby/object:Gem::Requirement
49
+ requirement: &15413920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *26059400
57
+ version_requirements: *15413920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: yard
60
- requirement: &26058440 !ruby/object:Gem::Requirement
60
+ requirement: &15413080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.7.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *26058440
68
+ version_requirements: *15413080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard-rspec
71
- requirement: &26054100 !ruby/object:Gem::Requirement
71
+ requirement: &15412400 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0.1'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *26054100
79
+ version_requirements: *15412400
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: bundler
82
- requirement: &26053420 !ruby/object:Gem::Requirement
82
+ requirement: &15411660 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.21
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *26053420
90
+ version_requirements: *15411660
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: jeweler
93
- requirement: &26052760 !ruby/object:Gem::Requirement
93
+ requirement: &15410740 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.6.4
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *26052760
101
+ version_requirements: *15410740
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rcov
104
- requirement: &26051820 !ruby/object:Gem::Requirement
104
+ requirement: &15409860 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *26051820
112
+ version_requirements: *15409860
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: ruby-debug
115
- requirement: &26050900 !ruby/object:Gem::Requirement
115
+ requirement: &15409140 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *26050900
123
+ version_requirements: *15409140
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: ruby-debug19
126
- requirement: &26050140 !ruby/object:Gem::Requirement
126
+ requirement: &15408460 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *26050140
134
+ version_requirements: *15408460
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: highline
137
- requirement: &26049520 !ruby/object:Gem::Requirement
137
+ requirement: &15406380 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: 1.6.2
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *26049520
145
+ version_requirements: *15406380
146
146
  description: So we don't have to put up with Stellar's craptastic ui
147
147
  email: victor@costan.us
148
148
  executables: []
@@ -173,7 +173,9 @@ files:
173
173
  - spec/stellar/courses_spec.rb
174
174
  - spec/stellar/homework_spec.rb
175
175
  - spec/stellar/homework_submissions_spec.rb
176
+ - spec/stellar_spec.rb
176
177
  - spec/support/test-credentials.rb
178
+ - stellar.gemspec
177
179
  homepage: http://github.com/pwnall/stellar
178
180
  licenses:
179
181
  - MIT
@@ -189,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
191
  version: '0'
190
192
  segments:
191
193
  - 0
192
- hash: -1218153484388710196
194
+ hash: -746749934758506157
193
195
  required_rubygems_version: !ruby/object:Gem::Requirement
194
196
  none: false
195
197
  requirements: