polleverywhere 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -155,9 +155,21 @@ module PollEverywhere # :nodoc
155
155
  end
156
156
  end
157
157
 
158
+ def archive
159
+ if persisted?
160
+ http.delete.to(path + "/results/archive").response do |response|
161
+ return true
162
+ end
163
+
164
+ return false
165
+ else
166
+ false
167
+ end
168
+ end
169
+
158
170
  def clear
159
171
  if persisted?
160
- http.delete(path + "/clear").response do |response|
172
+ http.delete.to(path + "/results").response do |response|
161
173
  return true
162
174
  end
163
175
 
@@ -1,3 +1,3 @@
1
1
  module PollEverywhere
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -77,6 +77,11 @@ describe "API" do
77
77
  @mcp.clear.should be_true
78
78
  end
79
79
 
80
+ it "should archive results" do
81
+ @mcp.save
82
+ @mcp.archive.should be_true
83
+ end
84
+
80
85
  it "should destroy" do
81
86
  @mcp.destroy
82
87
  @mcp.id.should be_nil
data/spec/spec_helper.rb CHANGED
@@ -4,6 +4,6 @@ require 'rspec'
4
4
  require 'polleverywhere'
5
5
 
6
6
  PollEverywhere.config do
7
- username "test"
8
- password "test"
7
+ username "api_test"
8
+ password "api_test"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polleverywhere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
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-02 00:00:00.000000000Z
12
+ date: 2012-07-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70345757127400 !ruby/object:Gem::Requirement
16
+ requirement: &70218786356160 !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: :runtime
23
23
  prerelease: false
24
- version_requirements: *70345757127400
24
+ version_requirements: *70218786356160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rest-client
27
- requirement: &70345757125860 !ruby/object:Gem::Requirement
27
+ requirement: &70218786355540 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.6.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70345757125860
35
+ version_requirements: *70218786355540
36
36
  description: An easy way to integrate Poll Everywhere into your Ruby applications.
37
37
  email:
38
38
  - opensource@polleverywhere.com
@@ -75,12 +75,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
+ segments:
79
+ - 0
80
+ hash: -3436188828779530093
78
81
  required_rubygems_version: !ruby/object:Gem::Requirement
79
82
  none: false
80
83
  requirements:
81
84
  - - ! '>='
82
85
  - !ruby/object:Gem::Version
83
86
  version: '0'
87
+ segments:
88
+ - 0
89
+ hash: -3436188828779530093
84
90
  requirements: []
85
91
  rubyforge_project: polleverywhere
86
92
  rubygems_version: 1.8.10
@@ -93,4 +99,3 @@ test_files:
93
99
  - spec/lib/polleverywhere_spec.rb
94
100
  - spec/lib/serializable_spec.rb
95
101
  - spec/spec_helper.rb
96
- has_rdoc: