doodle_client 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +64 -6
- data/doodle_client.gemspec +1 -1
- data/lib/doodle_client/version.rb +1 -1
- 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: 5b908fcfc28f2f4f5370f29e87912ff984e65719
|
|
4
|
+
data.tar.gz: d312e36de77d4ea468fe4f05d3858891207e4d86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d1ac72ddb5125cdeeac2c7dacffc121c95b1ef136659f6db4da649dca6b12361d38ac48ee171e856d9bb5a64cbd42d5cc10b8e6a78c0fb7478f3305164aaa27
|
|
7
|
+
data.tar.gz: 10ababe5828e62a9e9bc055456dc90801c87bb835708df9135f64b094622c76fc55944524a3a4c81f009f6bedada96b8c112cd9941231ec3d98cdfaa3ef346ff
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# DoodleClient
|
|
2
2
|
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/doodle_client`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
6
|
-
|
|
7
3
|
## Installation
|
|
8
4
|
|
|
9
5
|
Add this line to your application's Gemfile:
|
|
@@ -19,10 +15,72 @@ And then execute:
|
|
|
19
15
|
Or install it yourself as:
|
|
20
16
|
|
|
21
17
|
$ gem install doodle_client
|
|
18
|
+
|
|
19
|
+
### Troubleshooting
|
|
20
|
+
|
|
21
|
+
Needs nokogiri, so you'll probably hit at least one dependency issue if you don't have it installed already.
|
|
22
|
+
|
|
23
|
+
Try these 'one size fits all' approaches if you're stuck
|
|
24
|
+
|
|
25
|
+
**Ubuntu/Debian** - `apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev`
|
|
26
|
+
|
|
27
|
+
**CentOS/Redhat** - `yum install gcc ruby-devel zlib-devel`
|
|
22
28
|
|
|
23
29
|
## Usage
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
### Verify
|
|
32
|
+
|
|
33
|
+
Checks if a provided URL or id is a valid doodle.com reference.
|
|
34
|
+
|
|
35
|
+
Takes a string, returns true or false.
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
2.3.0 :001 > require 'doodle_client'
|
|
39
|
+
=> true
|
|
40
|
+
2.3.0 :002 > DoodleClient.verify("http://doodle.com/poll/kfha4cefe7zutuqu")
|
|
41
|
+
=> true
|
|
42
|
+
2.3.0 :003 > DoodleClient.verify("kfha4cefe7zutuqu")
|
|
43
|
+
=> true
|
|
44
|
+
2.3.0 :004 > DoodleClient.verify("http://doodle.com/poll/notarealdoodleid")
|
|
45
|
+
=> false
|
|
46
|
+
2.3.0 :005 > DoodleClient.verify("notarealdoodleid")
|
|
47
|
+
=> false
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### List
|
|
51
|
+
|
|
52
|
+
Lists the various options available on the poll. Currently doesn't have useul information like value.
|
|
53
|
+
|
|
54
|
+
Takes a string of either URL or id again.
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
2.3.0 :001 > require 'doodle_client'
|
|
58
|
+
=> true
|
|
59
|
+
2.3.0 :002 > DoodleClient.list("http://doodle.com/poll/kfha4cefe7zutuqu")
|
|
60
|
+
=> [[checkbox:0xce6a1c type: checkbox name: option0 value: false], [checkbox:0xce6850 type: checkbox name: option1 value: false], [checkbox:0xce6634 type: checkbox name: option2 value: false], [checkbox:0xce6468 type: checkbox name: option3 value: false]]
|
|
61
|
+
2.3.0 :003 > DoodleClient.list("kfha4cefe7zutuqu")
|
|
62
|
+
=> [[checkbox:0xc8e77c type: checkbox name: option0 value: false], [checkbox:0xc8e560 type: checkbox name: option1 value: false], [checkbox:0xc8e344 type: checkbox name: option2 value: false], [checkbox:0xc8e164 type: checkbox name: option3 value: false]]
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Vote
|
|
67
|
+
|
|
68
|
+
The main event, lets you vote on a poll.
|
|
69
|
+
|
|
70
|
+
Takes a string for URL/id, a string for the name you want to vote as and an array of true or false to reflect if you're attending or not.
|
|
71
|
+
|
|
72
|
+
```ruby
|
|
73
|
+
2.3.0 :001 > require 'doodle_client'
|
|
74
|
+
=> true
|
|
75
|
+
2.3.0 :002 > DoodleClient.vote("http://doodle.com/poll/kfha4cefe7zutuqu", "Sam", [true, false, true])
|
|
76
|
+
=> true
|
|
77
|
+
2.3.0 :003 > DoodleClient.vote("kfha4cefe7zutuqu", "Jim", [false, false, true])
|
|
78
|
+
=> true
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Resulting in:
|
|
82
|
+
|
|
83
|
+

|
|
26
84
|
|
|
27
85
|
## Development
|
|
28
86
|
|
|
@@ -32,7 +90,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
32
90
|
|
|
33
91
|
## Contributing
|
|
34
92
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
93
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/zyio/doodle_client.
|
|
36
94
|
|
|
37
95
|
|
|
38
96
|
## License
|
data/doodle_client.gemspec
CHANGED
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
19
19
|
if spec.respond_to?(:metadata)
|
|
20
|
-
|
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
|
21
21
|
else
|
|
22
22
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
|
23
23
|
"public gem pushes."
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: doodle_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Norbury
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-11-
|
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|