contextio 1.7.0 → 1.7.1
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/CHANGES.md +6 -0
- data/CONTRIBUTING.md +19 -0
- data/README.md +6 -15
- data/RELEASING.md +15 -0
- data/lib/contextio/message.rb +2 -2
- data/lib/contextio/version.rb +1 -1
- data/spec/unit/contextio/message_spec.rb +39 -0
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5e2dbe2586d58809974fbc1700cc773d43d6e78
|
4
|
+
data.tar.gz: 216fa008cae2c54e0c195020f9405684ebabc777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a5f33b09fd9d40bd3702df6333a422d84b259558a574265c73212950ba9eaf53f9bcbf63b432613c04c136dbdab394c219ea97766a58eed66363347c68981b
|
7
|
+
data.tar.gz: 03b711445a19b70b57f57502c549e8d33acb55fd42337f29353dcd31fbdbcbfde074b848ceaf40d58e9d051d5aef18dece9bfeb83f94046f0352bbb5ed22d0b0
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 1.7.1
|
4
|
+
|
5
|
+
* Fix bug in `ContextIO::Message#set_flags` that was failing, and also fixes the
|
6
|
+
wrong api url it was trying to call. - [Paul Bonaud](https://github.com/popox)
|
7
|
+
* Spruce up README, and add CONTRIBUTING and RELEASING guides. - Ben Hamill
|
8
|
+
|
3
9
|
## 1.7.0
|
4
10
|
|
5
11
|
* Further README updates for clarity. - Johnny Goodman
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Help is gladly welcomed. If you have a feature you'd like to add, it's much more
|
4
|
+
likely to get in (or get in faster) the closer you stick to these steps:
|
5
|
+
|
6
|
+
1. Open an Issue to talk about it. We can discuss whether it's the right
|
7
|
+
direction or maybe help track down a bug, etc.
|
8
|
+
1. Fork the project, and make a branch to work on your feature/fix. Master is
|
9
|
+
where you'll want to start from.
|
10
|
+
1. Turn the Issue into a Pull Request. There are several ways to do this, but
|
11
|
+
[hub](https://github.com/defunkt/hub) is probably the easiest.
|
12
|
+
1. Make sure your Pull Request includes tests.
|
13
|
+
1. Bonus points if your Pull Request updates `CHANGES.md` to include a summary
|
14
|
+
of your changes and your name like the other entries. If the last entry is
|
15
|
+
the last release, add a new `## Unreleased` heading.
|
16
|
+
1. *Do not* rev the version number in your pull request.
|
17
|
+
|
18
|
+
If you don't know how to fix something, even just a Pull Request that includes a
|
19
|
+
failing test can be helpful. If in doubt, make an Issue to discuss.
|
data/README.md
CHANGED
@@ -354,26 +354,17 @@ There are some consistent mappings between the requests documented in the
|
|
354
354
|
|
355
355
|
## Contributing
|
356
356
|
|
357
|
-
|
358
|
-
likely to get in (or get in faster) the closer you stick to these steps:
|
357
|
+
If you'd like to contribute, please see the [contribution guidelines](CONTRIBUTING.md).
|
359
358
|
|
360
|
-
1. Open an Issue to talk about it. We can discuss whether it's the right
|
361
|
-
direction or maybe help track down a bug, etc.
|
362
|
-
1. Fork the project, and make a branch to work on your feature/fix. Master is
|
363
|
-
where you'll want to start from.
|
364
|
-
1. Turn the Issue into a Pull Request. There are several ways to do this, but
|
365
|
-
[hub](https://github.com/defunkt/hub) is probably the easiest.
|
366
|
-
1. Make sure your Pull Request includes tests.
|
367
|
-
1. Bonus points if your Pull Request updates `CHANGES.md` to include a summary
|
368
|
-
of your changes and your name like the other entries. If the last entry is
|
369
|
-
the last release, add a new `## Unreleased` heading.
|
370
359
|
|
371
|
-
|
372
|
-
|
360
|
+
## Releasing
|
361
|
+
|
362
|
+
Maintainers: Please make sure to follow the [release steps](RELEASING.md) when
|
363
|
+
it's time to cut a new release.
|
373
364
|
|
374
365
|
|
375
366
|
## Copyright
|
376
367
|
|
377
|
-
Copyright (c) 2012-
|
368
|
+
Copyright (c) 2012-2014 Context.IO
|
378
369
|
|
379
370
|
This gem is distributed under the MIT License. See LICENSE.md for details.
|
data/RELEASING.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
## Releasing
|
2
|
+
|
3
|
+
If you want to push a new version of this gem, do this:
|
4
|
+
|
5
|
+
1. Ideally, every Pull Request should already have included an addition to the
|
6
|
+
`CHANGES.md` file summarizing the changes and crediting the author(s). It
|
7
|
+
doesn't hurt to review this to see if anything needs adding.
|
8
|
+
1. Commit any changes you make.
|
9
|
+
1. Go into version.rb and bump the version number
|
10
|
+
[as appopriate](http://semver.org/).
|
11
|
+
1. Go into CHANGES.md and change the "Unlreleased" heading to match the new
|
12
|
+
version number.
|
13
|
+
1. Commit these changes with a message like, "Minor version bump," or similar.
|
14
|
+
1. Run `rake release`.
|
15
|
+
1. High five someone nearby.
|
data/lib/contextio/message.rb
CHANGED
@@ -33,12 +33,12 @@ class ContextIO
|
|
33
33
|
# As of this writing, the documented valid flags are: seen, answered,
|
34
34
|
# flagged, deleted, and draft. However, this will send whatever you send it.
|
35
35
|
def set_flags(flag_hash)
|
36
|
-
args = flag_hash.
|
36
|
+
args = flag_hash.inject({}) do |memo, (flag_name, value)|
|
37
37
|
memo[flag_name] = value ? 1 : 0
|
38
38
|
memo
|
39
39
|
end
|
40
40
|
|
41
|
-
api.request(:post, resource_url, args)['success']
|
41
|
+
api.request(:post, "#{resource_url}/flags", args)['success']
|
42
42
|
end
|
43
43
|
|
44
44
|
def folders
|
data/lib/contextio/version.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'contextio/message'
|
3
|
+
|
4
|
+
describe ContextIO::Message do
|
5
|
+
let(:api) { double('api') }
|
6
|
+
|
7
|
+
subject { ContextIO::Message.new(api, resource_url: 'resource/url') }
|
8
|
+
|
9
|
+
describe "#flags" do
|
10
|
+
before do
|
11
|
+
allow(api).to receive(:request).and_return({'seen' => 0})
|
12
|
+
end
|
13
|
+
|
14
|
+
it "gets to the flags method api" do
|
15
|
+
expect(api).to receive(:request).with(
|
16
|
+
:get,
|
17
|
+
'resource/url/flags'
|
18
|
+
)
|
19
|
+
|
20
|
+
subject.flags
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#set_flags" do
|
25
|
+
before do
|
26
|
+
allow(api).to receive(:request).and_return({'seen' => 1})
|
27
|
+
end
|
28
|
+
|
29
|
+
it "gets to the flags method api" do
|
30
|
+
expect(api).to receive(:request).with(
|
31
|
+
:post,
|
32
|
+
'resource/url/flags',
|
33
|
+
{:seen => 1}
|
34
|
+
)
|
35
|
+
|
36
|
+
subject.set_flags({:seen => true})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contextio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hamill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -176,9 +176,11 @@ files:
|
|
176
176
|
- ".rspec"
|
177
177
|
- ".yardopts"
|
178
178
|
- CHANGES.md
|
179
|
+
- CONTRIBUTING.md
|
179
180
|
- Gemfile
|
180
181
|
- LICENSE.md
|
181
182
|
- README.md
|
183
|
+
- RELEASING.md
|
182
184
|
- Rakefile
|
183
185
|
- contextio.gemspec
|
184
186
|
- lib/contextio.rb
|
@@ -231,6 +233,7 @@ files:
|
|
231
233
|
- spec/unit/contextio/connect_token_collection_spec.rb
|
232
234
|
- spec/unit/contextio/connect_token_spec.rb
|
233
235
|
- spec/unit/contextio/email_settings_spec.rb
|
236
|
+
- spec/unit/contextio/message_spec.rb
|
234
237
|
- spec/unit/contextio/oauth_provider_collection_spec.rb
|
235
238
|
- spec/unit/contextio/oauth_provider_spec.rb
|
236
239
|
- spec/unit/contextio/source_collection_spec.rb
|
@@ -257,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
260
|
version: '0'
|
258
261
|
requirements: []
|
259
262
|
rubyforge_project:
|
260
|
-
rubygems_version: 2.2.
|
263
|
+
rubygems_version: 2.2.2
|
261
264
|
signing_key:
|
262
265
|
specification_version: 4
|
263
266
|
summary: Provides interface to Context.IO
|
@@ -277,6 +280,7 @@ test_files:
|
|
277
280
|
- spec/unit/contextio/connect_token_collection_spec.rb
|
278
281
|
- spec/unit/contextio/connect_token_spec.rb
|
279
282
|
- spec/unit/contextio/email_settings_spec.rb
|
283
|
+
- spec/unit/contextio/message_spec.rb
|
280
284
|
- spec/unit/contextio/oauth_provider_collection_spec.rb
|
281
285
|
- spec/unit/contextio/oauth_provider_spec.rb
|
282
286
|
- spec/unit/contextio/source_collection_spec.rb
|