codebadges 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebadges
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Chen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-21 00:00:00.000000000 Z
12
+ date: 2015-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -40,22 +40,51 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: nokogiri
43
+ name: vcr
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 1.6.2
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: webmock
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: oga
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
49
77
  type: :runtime
50
78
  prerelease: false
51
79
  version_requirements: !ruby/object:Gem::Requirement
52
80
  requirements:
53
81
  - - ">="
54
82
  - !ruby/object:Gem::Version
55
- version: 1.6.2
56
- description: Use username as an input, automatically give you the badges the user
57
- has.
58
- email: chung1350@hotmail.com
83
+ version: '0'
84
+ description: Get user achievements and course info from Codecademy
85
+ email:
86
+ - chung1350@hotmail.com
87
+ - soumya.ray@gmail.com
59
88
  executables:
60
89
  - codebadges
61
90
  extensions: []
@@ -64,15 +93,21 @@ files:
64
93
  - ".gitignore"
65
94
  - ".travis.yml"
66
95
  - Gemfile
96
+ - LICENSE.txt
67
97
  - README.md
68
98
  - Rakefile
69
99
  - bin/codebadges
70
100
  - codebadges.gemspec
71
101
  - lib/codebadges.rb
72
102
  - lib/codebadges/badges.rb
103
+ - lib/codebadges/courses.rb
73
104
  - lib/codebadges/version.rb
74
- - spec/badges_test.rb
75
- - spec/testfiles/test.txt
105
+ - spec/badges_spec.rb
106
+ - spec/courses_spec.rb
107
+ - spec/fixtures/badges.yml
108
+ - spec/fixtures/courses.yml
109
+ - spec/fixtures/vcr_cassettes/badges.yml
110
+ - spec/fixtures/vcr_cassettes/courses.yml
76
111
  homepage: https://github.com/ISS-SOA/Codecademy-Ruby
77
112
  licenses:
78
113
  - MIT
@@ -96,7 +131,11 @@ rubyforge_project:
96
131
  rubygems_version: 2.4.6
97
132
  signing_key:
98
133
  specification_version: 4
99
- summary: Grab the badges information from the Codecademy
134
+ summary: Access user and course information on Codecademy
100
135
  test_files:
101
- - spec/badges_test.rb
102
- - spec/testfiles/test.txt
136
+ - spec/badges_spec.rb
137
+ - spec/courses_spec.rb
138
+ - spec/fixtures/badges.yml
139
+ - spec/fixtures/courses.yml
140
+ - spec/fixtures/vcr_cassettes/badges.yml
141
+ - spec/fixtures/vcr_cassettes/courses.yml
data/spec/badges_test.rb DELETED
@@ -1,115 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'minitest/rg'
3
- require './lib/codebadges.rb'
4
-
5
- badge = {
6
- 'Sorting Your Friends' => 'May 18, 2014',
7
- '100 Exercises' => 'May 18, 2014',
8
- 'Max Streak Count of 3' => 'May 11, 2014',
9
- 'Design a Button for Your Website' => 'May 9, 2014',
10
- 'CSS: An Overview' => 'May 9, 2014',
11
- 'Build Your Own Webpage' => 'May 9, 2014',
12
- '50 Exercises' => 'May 9, 2014',
13
- 'Clickable Photo Page' => 'May 9, 2014',
14
- 'HTML Basics III' => 'May 9, 2014',
15
- '25 points earned in one day' => 'May 9, 2014',
16
- 'HTML Basics' => 'May 9, 2014',
17
- '25 Exercises' => 'May 9, 2014',
18
- '10 Exercises' => 'Dec 12, 2012',
19
- 'Max Streak Count of 1' => 'Dec 12, 2012',
20
- 'First Lesson' => 'Jun 20, 2012'
21
- }
22
-
23
- badges_from_file = {
24
- 'soumya.ray' => {
25
- 'Sorting Your Friends' => 'May 18, 2014',
26
- '100 Exercises' => 'May 18, 2014',
27
- 'Max Streak Count of 3' => 'May 11, 2014',
28
- 'Design a Button for Your Website' => 'May 9, 2014',
29
- 'CSS: An Overview' => 'May 9, 2014',
30
- 'Build Your Own Webpage' => 'May 9, 2014',
31
- '50 Exercises' => 'May 9, 2014',
32
- 'Clickable Photo Page' => 'May 9, 2014',
33
- 'HTML Basics III' => 'May 9, 2014',
34
- '25 points earned in one day' => 'May 9, 2014',
35
- 'HTML Basics' => 'May 9, 2014',
36
- '25 Exercises' => 'May 9, 2014',
37
- '10 Exercises' => 'Dec 12, 2012',
38
- 'Max Streak Count of 1' => 'Dec 12, 2012',
39
- 'First Lesson' => 'Jun 20, 2012'
40
- },
41
- 'chenlizhan' => {
42
- 'Animate Your Name' => 'Sep 26, 2014',
43
- 'Banking on Ruby' => 'Aug 25, 2014',
44
- 'Object-Oriented Programming II' => 'Aug 25, 2014',
45
- 'Virtual Computer' => 'Aug 25, 2014',
46
- '500 Exercises' => 'Aug 25, 2014',
47
- 'Object-Oriented Programming I' => 'Aug 22, 2014',
48
- 'Blocks, Procs, and Lambdas' => 'Aug 22, 2014',
49
- 'The Refactor Factory' => 'Aug 21, 2014',
50
- 'The Zen of Ruby' => 'Aug 21, 2014',
51
- '150 points earned in one day' => 'Aug 21, 2014',
52
- 'A Night at the Movies' => 'Aug 21, 2014',
53
- 'Hashes and Symbols' => 'Aug 21, 2014',
54
- '125 points earned in one day' => 'Aug 21, 2014',
55
- 'Ordering Your Library' => 'Aug 21, 2014',
56
- 'Methods, Blocks, & Sorting' => 'Aug 21, 2014',
57
- '100 points earned in one day' => 'Aug 21, 2014',
58
- 'Create a Histogram' => 'Aug 21, 2014',
59
- 'Data Structures' => 'Aug 21, 2014',
60
- 'Redacted!' => 'Aug 21, 2014',
61
- 'Loops & Iterators' => 'Aug 21, 2014',
62
- 'Thith Meanth War!' => 'Aug 21, 2014',
63
- 'Control Flow in Ruby' => 'Aug 21, 2014',
64
- 'Putting the Form in Formatter' => 'Aug 21, 2014',
65
- 'Introduction to Ruby' => 'Aug 21, 2014',
66
- 'File Input/Output' => 'Jul 24, 2014',
67
- 'Max Streak Count of 5' => 'Jul 24, 2014',
68
- 'Classes' => 'Jul 24, 2014',
69
- 'Introduction to Classes' => 'Jul 23, 2014',
70
- 'Introduction to Bitwise Operators' => 'Jul 22, 2014',
71
- 'Advanced Topics in Python' => 'Jul 22, 2014',
72
- 'Exam Statistics' => 'Jul 22, 2014',
73
- 'Max Streak Count of 3' => 'Jul 22, 2014',
74
- 'Practice Makes Perfect' => 'Jul 21, 2014',
75
- '200 Exercises' => 'Jul 21, 2014',
76
- '75 points earned in one day' => 'Jul 21, 2014',
77
- 'Loops' => 'Jul 21, 2014',
78
- 'Battleship!' => 'Jul 20, 2014',
79
- 'Lists and Functions' => 'Jul 20, 2014',
80
- 'Student Becomes the Teacher' => 'Jul 20, 2014',
81
- 'PygLatin' => 'Jul 20, 2014',
82
- 'A Day at the Supermarket' => 'Jul 19, 2014',
83
- 'Python Lists and Dictionaries' => 'Jul 19, 2014',
84
- '100 Exercises' => 'Jul 19, 2014',
85
- 'Taking a Vacation' => 'Jul 19, 2014',
86
- 'Functions' => 'Jul 19, 2014',
87
- 'Conditionals & Control Flow' => 'Jul 18, 2014',
88
- '50 points earned in one day' => 'Jul 18, 2014',
89
- '50 Exercises' => 'Jul 18, 2014',
90
- 'Date and Time' => 'Jul 18, 2014',
91
- 'Strings & Console Output' => 'Jul 18, 2014',
92
- '25 points earned in one day' => 'Jul 18, 2014',
93
- '25 Exercises' => 'Jul 18, 2014',
94
- 'Tip Calculator' => 'Jul 18, 2014',
95
- 'Python Syntax' => 'Jul 18, 2014',
96
- 'First Lesson' => 'Jul 18, 2014',
97
- '10 Exercises' => 'Jul 18, 2014',
98
- 'Max Streak Count of 1' => 'Mar 29, 2014'
99
- }
100
- }
101
-
102
- badges_found = CodeBadges::CodecademyBadges.get_badges('soumya.ray')
103
-
104
- describe 'Get badges for one user' do
105
-
106
- it 'has the right number of badges' do
107
- badges_found.size.wont_be :<, badge.size
108
- end
109
-
110
- badge.map do |b_name, b_date|
111
- it "finds '#{b_name}' badge" do
112
- badges_found[b_name].must_equal Date.parse(b_date)
113
- end
114
- end
115
- end
@@ -1,2 +0,0 @@
1
- soumya.ray
2
- chenlizhan