polleverywhere 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/lib/polleverywhere/models.rb +4 -4
- data/lib/polleverywhere/version.rb +1 -1
- data/spec/integration/api_spec.rb +14 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55593871c1e7e8215d2e8c31e9d113dee87f36c1
|
4
|
+
data.tar.gz: e37beb50242387f5d7e1d8a42bb35a98df5a2c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c8e895dd2677dd7685d11581f582c1ac6e2565955418b133dc325e2aa662ebafa78112076d49b362b7fe0522fcfc5aa00d991a9f6e0c66ea9ce2c042a78a66c
|
7
|
+
data.tar.gz: a5d766893b732343041719e530a964ce0ca1b415056aa71c866f47c00eecd33ef9886a8fb93a35edf64eafb3a9e0b197f9ba0f2b470e71f1713a9ffb46e41954
|
data/.travis.yml
CHANGED
@@ -172,7 +172,7 @@ module PollEverywhere # :nodoc
|
|
172
172
|
|
173
173
|
def archive
|
174
174
|
if persisted?
|
175
|
-
http.delete.
|
175
|
+
http.delete.from(path + "/results/archive").response do |response|
|
176
176
|
return true
|
177
177
|
end
|
178
178
|
|
@@ -184,7 +184,7 @@ module PollEverywhere # :nodoc
|
|
184
184
|
|
185
185
|
def clear
|
186
186
|
if persisted?
|
187
|
-
http.delete.
|
187
|
+
http.delete.from(path + "/results").response do |response|
|
188
188
|
return true
|
189
189
|
end
|
190
190
|
|
@@ -195,7 +195,7 @@ module PollEverywhere # :nodoc
|
|
195
195
|
end
|
196
196
|
|
197
197
|
def destroy
|
198
|
-
http.delete(path).response do |response|
|
198
|
+
http.delete.from(path).response do |response|
|
199
199
|
self.id = self.permalink = nil
|
200
200
|
end
|
201
201
|
end
|
@@ -291,4 +291,4 @@ module PollEverywhere # :nodoc
|
|
291
291
|
end
|
292
292
|
end
|
293
293
|
end
|
294
|
-
end
|
294
|
+
end
|
@@ -7,12 +7,15 @@ describe "API", :type => :request do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
context "multiple choice" do
|
10
|
-
before
|
10
|
+
before do
|
11
11
|
@mcp = PollEverywhere::MultipleChoicePoll.from_hash(:title => 'Hey dude!', :options => %w[red blue green])
|
12
12
|
end
|
13
|
+
after do
|
14
|
+
@mcp.destroy if @mcp.id
|
15
|
+
end
|
13
16
|
|
14
17
|
context "creation" do
|
15
|
-
before
|
18
|
+
before do
|
16
19
|
@mcp.save
|
17
20
|
end
|
18
21
|
|
@@ -41,13 +44,14 @@ describe "API", :type => :request do
|
|
41
44
|
|
42
45
|
context "get" do
|
43
46
|
it "should get poll" do
|
47
|
+
@mcp.save
|
44
48
|
@gotten_mcp = PollEverywhere::MultipleChoicePoll.get(@mcp.permalink)
|
45
49
|
expect(@gotten_mcp.title).to eql(@mcp.title)
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
49
53
|
context "updates" do
|
50
|
-
before
|
54
|
+
before do
|
51
55
|
@mcp.title = "My pita bread is moldy"
|
52
56
|
@mcp.options.first.value = "MOLD SUCKS!"
|
53
57
|
@mcp.save
|
@@ -97,12 +101,15 @@ describe "API", :type => :request do
|
|
97
101
|
end
|
98
102
|
|
99
103
|
context "free text" do
|
100
|
-
before
|
104
|
+
before do
|
101
105
|
@ftp = PollEverywhere::FreeTextPoll.from_hash(:title => 'Got feedback?')
|
102
106
|
end
|
107
|
+
after do
|
108
|
+
@ftp.destroy if @ftp.id
|
109
|
+
end
|
103
110
|
|
104
111
|
context "creation" do
|
105
|
-
before
|
112
|
+
before do
|
106
113
|
@ftp.save
|
107
114
|
end
|
108
115
|
|
@@ -117,13 +124,14 @@ describe "API", :type => :request do
|
|
117
124
|
|
118
125
|
context "get" do
|
119
126
|
it "should get poll" do
|
127
|
+
@ftp.save
|
120
128
|
@gotten_ftp = PollEverywhere::FreeTextPoll.get(@ftp.permalink)
|
121
129
|
expect(@gotten_ftp.title).to eql(@ftp.title)
|
122
130
|
end
|
123
131
|
end
|
124
132
|
|
125
133
|
context "updates" do
|
126
|
-
before
|
134
|
+
before do
|
127
135
|
@ftp.title = "My pita bread is moldy"
|
128
136
|
@ftp.save
|
129
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polleverywhere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler, Steel Fu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|