snafu 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.textile +12 -1
  3. data/README.textile +68 -7
  4. data/lib/snafu.rb +9 -2
  5. data/lib/snafu/achievements.rb +17 -0
  6. data/lib/snafu/client.rb +33 -23
  7. data/lib/snafu/giants.rb +35 -0
  8. data/lib/snafu/models.rb +4 -1
  9. data/lib/snafu/models/achievement.rb +24 -0
  10. data/lib/snafu/models/giant.rb +21 -0
  11. data/lib/snafu/models/glitch_time.rb +116 -0
  12. data/lib/snafu/models/hub.rb +5 -2
  13. data/lib/snafu/models/location.rb +3 -3
  14. data/lib/snafu/models/street.rb +13 -5
  15. data/lib/snafu/util.rb +12 -0
  16. data/lib/snafu/version.rb +1 -1
  17. data/snafu.gemspec +2 -2
  18. data/spec/snafu/achievements_spec.rb +51 -0
  19. data/spec/snafu/client_spec.rb +37 -15
  20. data/spec/snafu/giants_spec.rb +60 -0
  21. data/spec/snafu/locations_spec.rb +33 -32
  22. data/spec/snafu/models/achievement_spec.rb +31 -0
  23. data/spec/snafu/models/giant_spec.rb +38 -0
  24. data/spec/snafu/models/glitch_image_spec.rb +7 -17
  25. data/spec/snafu/models/glitch_time_spec.rb +176 -0
  26. data/spec/snafu/models/hub_spec.rb +2 -2
  27. data/spec/snafu/models/street_spec.rb +1 -1
  28. data/spec/snafu/models/util_spec.rb +22 -0
  29. data/spec/snafu_spec.rb +4 -3
  30. data/spec/spec_helper.rb +17 -16
  31. metadata +46 -54
  32. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_accept_a_hash_of_POST_arguments.yml +0 -39
  33. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if.yml +0 -36
  34. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate.yml +0 -36
  35. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate_called_with_true.yml +0 -36
  36. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate.yml +0 -36
  37. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate_true.yml +0 -36
  38. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_true.yml +0 -36
  39. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_raise_a_GlitchAPIError_if_receiving_an_unsucessful_response_from_the_Glitch_API.yml +0 -36
  40. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_a_valid_hub_if_given_a_valid_Hub_ID.yml +0 -39
  41. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_an_array_of_valid_street_information_if_given_a_valid_Hub_ID.yml +0 -39
  42. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_populated_the_returned_Hub_objects_with_an_id_and_name.yml +0 -39
  43. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_Hub_objects.yml +0 -39
  44. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_all_hubs.yml +0 -39
  45. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_street_should_return_a_complete_street_if_given_a_valid_street_ID.yml +0 -40
  46. data/spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml +0 -39
  47. data/spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_response_from_Glitch.yml +0 -39
  48. data/spec/fixtures/vcr_cassettes/Snafu_Models_Street/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml +0 -40
  49. data/spec/fixtures/vcr_cassettes/Snafu_Models_Street_new/should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml +0 -40
  50. data/spec/fixtures/vcr_cassettes/calendar_getHoldays/valid_calendar.yml +0 -39
@@ -2,32 +2,22 @@ require 'spec_helper'
2
2
 
3
3
  module Snafu
4
4
  module Models
5
- describe Snafu::Models::GlitchImage do
6
- before(:each) do
7
- @valid_image = GlitchImage.new(
8
- :url => "http://example.com",
9
- :width => 100,
10
- :height => 100
11
- )
12
- end
5
+ describe GlitchImage do
6
+ let(:valid_image) { GlitchImage.new(:url => "http://example.com", :width => 100, :height => 100) }
13
7
  context "initialize()" do
14
8
  it "should retain all parameters" do
15
- @valid_image.url.should_not be_nil
16
- @valid_image.height.should be > 0
17
- @valid_image.width.should be > 0
9
+ valid_image.url.should_not be_nil
10
+ valid_image.height.should be > 0
11
+ valid_image.width.should be > 0
18
12
  end
19
13
 
20
14
  it "should convert a string width argument into an integer" do
21
- glitch_image = GlitchImage.new(
22
- :width => "100"
23
- )
15
+ glitch_image = GlitchImage.new(:width => "100")
24
16
  glitch_image.width.should be_a Integer
25
17
  end
26
18
 
27
19
  it "should convert a string height argument into an integer" do
28
- glitch_image = GlitchImage.new(
29
- :height => "100"
30
- )
20
+ glitch_image = GlitchImage.new(:height => "100")
31
21
  glitch_image.height.should be_a Integer
32
22
  end
33
23
  end
@@ -0,0 +1,176 @@
1
+ require 'spec_helper'
2
+
3
+ module Snafu
4
+ module Models
5
+ describe GlitchTime do
6
+ let(:glitch_epoch) { 1238562000 }
7
+ let(:secs_in_game_year) { 4435200 }
8
+ let(:secs_in_game_week) { 115200 }
9
+ let(:secs_in_game_day) { 14400 }
10
+ let(:secs_in_game_hour) { 600 }
11
+ let(:secs_in_game_minute) { 10 }
12
+ let(:days_in_month) { [29, 3, 53, 17, 73, 19, 13, 37, 5, 47, 11, 1] }
13
+ let(:names_of_months) { %w(Primuary Spork Bruise Candy Fever Junuary Septa Remember Doom Widdershins Eleventy Recurse) }
14
+ let(:names_of_days) { %w(Hairday Moonday Twoday Weddingday Theday Fryday Standday Fabday Recurse) }
15
+
16
+ describe "#new" do
17
+ it "should retain the timestamp that is passed" do
18
+ time = GlitchTime.new(glitch_epoch)
19
+ time.timestamp.should eql(glitch_epoch)
20
+ end
21
+
22
+ it "should raise an error when given a time before the glitch epoch" do
23
+ lambda { GlitchTime.new(glitch_epoch - 1) }.should raise_error(GlitchTime::InvalidTimestampError)
24
+ end
25
+
26
+ it "should set the correct timestamp if given a valid Time object" do
27
+ GlitchTime.new(Time.at(glitch_epoch)).timestamp.should eql(glitch_epoch)
28
+ end
29
+
30
+ it "should set the timestamp to the current time if no time is specified" do
31
+ Timecop.freeze(Time.now)
32
+ time = GlitchTime.new
33
+ time.timestamp.should eql(Time.now.to_i)
34
+ end
35
+ end
36
+
37
+ describe "#seconds_since_epoch" do
38
+ it "should return the seconds since the glitch epoch" do
39
+ time = GlitchTime.new(glitch_epoch + 12345)
40
+ time.seconds_since_epoch.should eql(12345)
41
+ end
42
+ end
43
+
44
+ describe "#year" do
45
+ it "should return 0 if timestamp is the Glitch epoch" do
46
+ time = GlitchTime.new(glitch_epoch)
47
+ time.year.should eql(0)
48
+ end
49
+
50
+ it "should return 1 for a timestamp one game year from the Glitch epoch" do
51
+ time = GlitchTime.new(glitch_epoch + secs_in_game_year)
52
+ time.year.should eql(1)
53
+ end
54
+ end
55
+
56
+ describe "#day_of_year" do
57
+ it "should return the day of the year" do
58
+ 5.times { |day| GlitchTime.new(glitch_epoch + secs_in_game_day * day).day_of_year.should eql(day) }
59
+ end
60
+
61
+ it "should roll back to 0 at the end of a game year" do
62
+ GlitchTime.new(glitch_epoch + secs_in_game_year).day_of_year.should eql(0)
63
+ end
64
+ end
65
+
66
+ describe "#month" do
67
+ it "should return the month of the year" do
68
+ 12.times do |month|
69
+ time = GlitchTime.new(glitch_epoch + day_of_year_for_first_day_of_month(month) * secs_in_game_day)
70
+ time.month.should eql(month)
71
+ end
72
+ end
73
+ end
74
+
75
+ describe "#day_of_month" do
76
+ it "should return the day of the month" do
77
+ 12.times do |n|
78
+ time = GlitchTime.new(beginning_of_first_day_of_month(n))
79
+ time.day_of_month.should eql(0)
80
+ end
81
+ end
82
+ end
83
+
84
+ describe "#name_of_month" do
85
+ it "should return the name of the month" do
86
+ 12.times do |n|
87
+ GlitchTime.new(glitch_epoch + day_of_year_for_first_day_of_month(n) * secs_in_game_day).name_of_month.should eql(names_of_months[n])
88
+ end
89
+ end
90
+ end
91
+
92
+ describe "#day_of_week" do
93
+ it "should return the correct day of week" do
94
+ 8.times { |day| GlitchTime.new(glitch_epoch + secs_in_game_day * (day + 1) - 1).day_of_week.should == day}
95
+ end
96
+
97
+ it "should return 3 for the day we wrote this code" do
98
+ time = GlitchTime.new(1327359466)
99
+ time.day_of_week.should == 2
100
+ end
101
+
102
+ it "should return Twoday for the day we wrote this code" do
103
+ time = GlitchTime.new(1327359466)
104
+ time.name_of_day.should eql("Twoday")
105
+ end
106
+
107
+ it "should return -1 for the day if it is Recurse day" do
108
+ 5.times { |year| GlitchTime.new(glitch_epoch + secs_in_game_year * (year + 1) - 1).day_of_week.should == -1 }
109
+ end
110
+ end
111
+
112
+ describe "#name_of_day" do
113
+ it "should return the name of the day" do
114
+ 8.times { |day| GlitchTime.new(glitch_epoch + (secs_in_game_day * day)).name_of_day.should eql(names_of_days[day])}
115
+ end
116
+ it "should return 'Recurse' if it is Recurse day" do
117
+ 5.times { |year| GlitchTime.new(glitch_epoch + secs_in_game_year * (year + 1) - 1).name_of_day.should eql("Recurse")}
118
+ end
119
+ end
120
+
121
+ describe "#hour" do
122
+ it "should return the hour of the day" do
123
+ 24.times { |hour| GlitchTime.new(glitch_epoch + (hour * secs_in_game_hour)).hour.should == hour}
124
+ 24.times { |hour| GlitchTime.new(glitch_epoch + secs_in_game_day + (hour * secs_in_game_hour)).hour.should == hour}
125
+ end
126
+ end
127
+
128
+ describe "#minute" do
129
+ it "should return the minute of the hour" do
130
+ 60.times do |minute|
131
+ time = GlitchTime.new(glitch_epoch + secs_in_game_day + (minute * secs_in_game_minute))
132
+ time.minute.should == minute
133
+ end
134
+ end
135
+
136
+ it "should pad the minute if passed the :padded => true option" do
137
+ 10.times do
138
+ time = random_time
139
+ while time.minute >= 10 do
140
+ time = random_time
141
+ end
142
+ time.minute(padded: true).to_s.should match(/\A0\d\z/)
143
+ end
144
+ end
145
+ end
146
+
147
+ describe "#to_s" do
148
+ it "should display the full time" do
149
+ time = GlitchTime.new
150
+ pattern_string = "#{time.hour}:#{time.minute(padded: true)}, #{time.name_of_day} #{time.day_of_month + 1} of #{time.name_of_month}, year #{time.year}"
151
+ time.to_s.should match(pattern_string)
152
+ end
153
+ end
154
+
155
+ def day_of_year_for_first_day_of_month(month_number)
156
+ result = 0
157
+ result = days_in_month[0..month_number-1].inject(:+) if month_number > 0
158
+ result
159
+ end
160
+
161
+ def beginning_of_first_day_of_month(month_number)
162
+ seconds_in_previous_days = 0
163
+ if month_number == 0
164
+ seconds_in_previous_days = 0
165
+ else
166
+ seconds_in_previous_days = (days_in_month[0..month_number-1].inject(:+)) * secs_in_game_day
167
+ end
168
+ glitch_epoch + seconds_in_previous_days
169
+ end
170
+
171
+ def random_time(seed = 1000)
172
+ GlitchTime.new(glitch_epoch + rand(1000))
173
+ end
174
+ end
175
+ end
176
+ end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  module Snafu
4
4
  module Models
5
5
  describe Snafu::Models::Hub do
6
- context "initialize()" do
6
+ describe "#initialize" do
7
7
  it "should populate values if given an options hash" do
8
8
  expected_id = "1"
9
9
  expected_name = "Some Hub"
@@ -19,7 +19,7 @@ module Snafu
19
19
  end
20
20
 
21
21
  it "should populate values if given the raw JSON response from HTTParty", :vcr do
22
- glitch_client = Snafu.new(:api_key => GLITCH_API_KEY, :oauth_token => GLITCH_OAUTH_TOKEN)
22
+ glitch_client = Snafu.new
23
23
  glitch_response = glitch_client.call("locations.getStreets", :hub_id => 27)
24
24
  new_hub = Hub.new(glitch_response)
25
25
  new_hub.streets.should_not be_nil
@@ -4,7 +4,7 @@ module Snafu
4
4
  module Models
5
5
  describe Snafu::Models::Street do
6
6
  before(:each) do
7
- @snafu = Snafu.new(:api_key => GLITCH_API_KEY, :oauth_token => GLITCH_OAUTH_TOKEN)
7
+ @snafu = Snafu.new
8
8
  @test_hub_id = "27"
9
9
  @test_hub_name = "Ix"
10
10
  @test_street_id = "LM416LNIKVLM1"
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe Snafu::Util do
4
+ let(:glitch_epoch) { 1238562000 }
5
+ let(:snafu) { Snafu.new }
6
+
7
+ describe "#glitch_time" do
8
+ it "should return the current GlitchTime if given no arguments" do
9
+ Timecop.freeze(Time.now)
10
+ glitch_time = snafu.glitch_time
11
+ direct_time = Snafu::Models::GlitchTime.new
12
+ glitch_time.timestamp.should eql(direct_time.timestamp)
13
+ end
14
+
15
+ it "should return the same GlitchTime if given a Glitch timestamp" do
16
+ timestamp = glitch_epoch + rand(1000)
17
+ glitch_time = snafu.glitch_time(timestamp)
18
+ direct_time = Snafu::Models::GlitchTime.new(timestamp)
19
+ glitch_time.timestamp.should eql(direct_time.timestamp)
20
+ end
21
+ end
22
+ end
@@ -3,12 +3,13 @@ require 'spec_helper'
3
3
  describe Snafu do
4
4
 
5
5
  it "should return a Snafu::Client object if supplied with valid parameters" do
6
- glitch_client = Snafu.new({:oauth_token => GLITCH_OAUTH_TOKEN})
6
+ glitch_client = Snafu.new()
7
7
  end
8
8
 
9
9
  it "should retain the Oauth Token" do
10
- test_oauth_token = GLITCH_OAUTH_TOKEN
11
- glitch_client = Snafu.new(:api_key => GLITCH_API_KEY, :oauth_token => GLITCH_OAUTH_TOKEN)
10
+ test_oauth_token = rand(100000).to_s
11
+ glitch_client = Snafu.new(:api_key => GLITCH_API_KEY, :oauth_token => test_oauth_token)
12
12
  glitch_client.oauth_token.should eql(test_oauth_token)
13
13
  end
14
+
14
15
  end
@@ -1,28 +1,29 @@
1
1
  require 'snafu'
2
2
  require 'vcr'
3
+ require 'timecop'
3
4
  require 'api_key' if File.exists?(File.dirname(__FILE__) + "/api_key.rb")
4
5
 
5
- VCR.config do |config|
6
- TWO_WEEKS = 14 * 24 * 60 * 60 # or use 7.days if you're using ActiveSupport
7
- config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
8
- config.stub_with :fakeweb
9
- config.default_cassette_options = { :re_record_interval => TWO_WEEKS }
10
- #config.allow_http_connections_when_no_cassette = true
6
+ VCR.configure do |c|
7
+ c.allow_http_connections_when_no_cassette = false
8
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
9
+ c.hook_into :fakeweb
10
+ c.configure_rspec_metadata!
11
+ #TWO_WEEKS = 14 * 24 * 60 * 60
12
+ #c.default_cassette_options = { :re_record_interval => TWO_WEEKS }
11
13
  end
12
14
 
13
15
  RSpec.configure do |config|
14
16
  config.filter_run_excluding :broken => true
15
17
  config.treat_symbols_as_metadata_keys_with_true_values = true
16
- config.around(:each, :vcr) do |example|
17
- name = example.metadata[:full_description].split(/\s+/, 2).join("/").gsub(/[^\w\/]+/, "_")
18
- VCR.use_cassette(name) { example.call }
19
- end
18
+ config.extend VCR::RSpec::Macros
20
19
  end
21
20
 
22
- if !defined? GLITCH_API_KEY
23
- GLITCH_API_KEY = "testing-key"
24
- end
25
-
26
- if !defined? GLITCH_OAUTH_TOKEN
27
- GLITCH_OAUTH_TOKEN = "testing-token"
21
+ # Handy time and date calculations
22
+ class Numeric
23
+ def milliseconds; self/1000.0; end
24
+ def seconds; self; end
25
+ def minutes; self*60; end
26
+ def hours; self*60*60; end
27
+ def days; self*60*60*24; end
28
+ def weeks; self*60*60*24*7; end
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snafu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-12 00:00:00.000000000Z
12
+ date: 2012-06-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70277761501020 !ruby/object:Gem::Requirement
16
+ requirement: &70111835294180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70277761501020
24
+ version_requirements: *70111835294180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: guard-rspec
27
- requirement: &70277761496860 !ruby/object:Gem::Requirement
27
+ requirement: &70111835293720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70277761496860
35
+ version_requirements: *70111835293720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: vcr
38
- requirement: &70277761493740 !ruby/object:Gem::Requirement
38
+ requirement: &70111835293260 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70277761493740
46
+ version_requirements: *70111835293260
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: fakeweb
49
- requirement: &70277761480920 !ruby/object:Gem::Requirement
49
+ requirement: &70111835292820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70277761480920
57
+ version_requirements: *70111835292820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70277761479300 !ruby/object:Gem::Requirement
60
+ requirement: &70111835292320 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,21 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70277761479300
68
+ version_requirements: *70111835292320
69
+ - !ruby/object:Gem::Dependency
70
+ name: timecop
71
+ requirement: &70111835291660 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70111835291660
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: httparty
71
- requirement: &70277761478120 !ruby/object:Gem::Requirement
82
+ requirement: &70111835290820 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ~>
@@ -76,9 +87,9 @@ dependencies:
76
87
  version: '0.8'
77
88
  type: :runtime
78
89
  prerelease: false
79
- version_requirements: *70277761478120
80
- description: ! "Snafu is an interface to API for Glitch, an online multi-player\n
81
- \ game created by Tiny Speck."
90
+ version_requirements: *70111835290820
91
+ description: Snafu is a Ruby gem that provides an interface to the API for Glitch,
92
+ a browser-based MMO created by Tiny Speck.
82
93
  email:
83
94
  - jeff@jkbrowning.com
84
95
  executables: []
@@ -93,39 +104,32 @@ files:
93
104
  - README.textile
94
105
  - Rakefile
95
106
  - lib/snafu.rb
107
+ - lib/snafu/achievements.rb
96
108
  - lib/snafu/client.rb
109
+ - lib/snafu/giants.rb
97
110
  - lib/snafu/locations.rb
98
111
  - lib/snafu/models.rb
112
+ - lib/snafu/models/achievement.rb
113
+ - lib/snafu/models/giant.rb
99
114
  - lib/snafu/models/glitch_image.rb
115
+ - lib/snafu/models/glitch_time.rb
100
116
  - lib/snafu/models/hub.rb
101
117
  - lib/snafu/models/location.rb
102
118
  - lib/snafu/models/street.rb
119
+ - lib/snafu/util.rb
103
120
  - lib/snafu/version.rb
104
121
  - snafu.gemspec
105
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_accept_a_hash_of_POST_arguments.yml
106
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if.yml
107
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate.yml
108
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate_called_with_true.yml
109
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate.yml
110
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate_true.yml
111
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_true.yml
112
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_raise_a_GlitchAPIError_if_receiving_an_unsucessful_response_from_the_Glitch_API.yml
113
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_a_valid_hub_if_given_a_valid_Hub_ID.yml
114
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_an_array_of_valid_street_information_if_given_a_valid_Hub_ID.yml
115
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_populated_the_returned_Hub_objects_with_an_id_and_name.yml
116
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_Hub_objects.yml
117
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_all_hubs.yml
118
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_street_should_return_a_complete_street_if_given_a_valid_street_ID.yml
119
- - spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
120
- - spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_response_from_Glitch.yml
121
- - spec/fixtures/vcr_cassettes/Snafu_Models_Street/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
122
- - spec/fixtures/vcr_cassettes/Snafu_Models_Street_new/should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
123
- - spec/fixtures/vcr_cassettes/calendar_getHoldays/valid_calendar.yml
122
+ - spec/snafu/achievements_spec.rb
124
123
  - spec/snafu/client_spec.rb
124
+ - spec/snafu/giants_spec.rb
125
125
  - spec/snafu/locations_spec.rb
126
+ - spec/snafu/models/achievement_spec.rb
127
+ - spec/snafu/models/giant_spec.rb
126
128
  - spec/snafu/models/glitch_image_spec.rb
129
+ - spec/snafu/models/glitch_time_spec.rb
127
130
  - spec/snafu/models/hub_spec.rb
128
131
  - spec/snafu/models/street_spec.rb
132
+ - spec/snafu/models/util_spec.rb
129
133
  - spec/snafu/models_spec.rb
130
134
  - spec/snafu_spec.rb
131
135
  - spec/spec_helper.rb
@@ -155,30 +159,18 @@ signing_key:
155
159
  specification_version: 3
156
160
  summary: A library for the Glitch API
157
161
  test_files:
158
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_accept_a_hash_of_POST_arguments.yml
159
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if.yml
160
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate.yml
161
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate_called_with_true.yml
162
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate.yml
163
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate_true.yml
164
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_true.yml
165
- - spec/fixtures/vcr_cassettes/Snafu_Client/call_should_raise_a_GlitchAPIError_if_receiving_an_unsucessful_response_from_the_Glitch_API.yml
166
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_a_valid_hub_if_given_a_valid_Hub_ID.yml
167
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_an_array_of_valid_street_information_if_given_a_valid_Hub_ID.yml
168
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_populated_the_returned_Hub_objects_with_an_id_and_name.yml
169
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_Hub_objects.yml
170
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_all_hubs.yml
171
- - spec/fixtures/vcr_cassettes/Snafu_Locations/get_street_should_return_a_complete_street_if_given_a_valid_street_ID.yml
172
- - spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
173
- - spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_response_from_Glitch.yml
174
- - spec/fixtures/vcr_cassettes/Snafu_Models_Street/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
175
- - spec/fixtures/vcr_cassettes/Snafu_Models_Street_new/should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml
176
- - spec/fixtures/vcr_cassettes/calendar_getHoldays/valid_calendar.yml
162
+ - spec/snafu/achievements_spec.rb
177
163
  - spec/snafu/client_spec.rb
164
+ - spec/snafu/giants_spec.rb
178
165
  - spec/snafu/locations_spec.rb
166
+ - spec/snafu/models/achievement_spec.rb
167
+ - spec/snafu/models/giant_spec.rb
179
168
  - spec/snafu/models/glitch_image_spec.rb
169
+ - spec/snafu/models/glitch_time_spec.rb
180
170
  - spec/snafu/models/hub_spec.rb
181
171
  - spec/snafu/models/street_spec.rb
172
+ - spec/snafu/models/util_spec.rb
182
173
  - spec/snafu/models_spec.rb
183
174
  - spec/snafu_spec.rb
184
175
  - spec/spec_helper.rb
176
+ has_rdoc: