orchestrate.io 0.1.3 → 0.1.4
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/.travis.yml +4 -0
- data/Gemfile +2 -0
- data/README.md +7 -7
- data/lib/orchestrate.io/events.rb +1 -0
- data/lib/orchestrate.io/request.rb +1 -0
- data/lib/orchestrate.io/version.rb +1 -1
- data/spec/orchestrate.io/core_ext/string_spec.rb +35 -0
- data/spec/orchestrate.io/events_spec.rb +5 -2
- data/spec/spec_helper.rb +7 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 030c4576b297c75a43131f0ee77a6480a3ad54de
|
4
|
+
data.tar.gz: 41d62609e2f8f47af724f6c81fdfd55692c8525f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8112bd88a96b59c3f70d8b466127f0ef128c02fe916269405650250bda8c90fbaece103c97f6e64420d9fdf415c239e80999b3f133cc9895ea9af4d2ad9c6ebe
|
7
|
+
data.tar.gz: 7b62f8740304def1591fbad20dc163a878ed00e75f7df08d291a975681cacd1074029d612b2c2d313565d41e227b100b4d38ffec77b449a9314c43318d17bba0
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
A Ruby interface to the [Orchestrate.io](https://orchestrate.io/) API
|
4
4
|
|
5
|
-
[](https://travis-ci.org/azukiwasher/ruby-orchestrate.io)
|
5
|
+
[](https://rubygems.org/gems/orchestrate.io)
|
6
|
+
[](https://travis-ci.org/azukiwasher/ruby-orchestrate.io)
|
7
|
+
[](https://codeclimate.com/repos/529e807189af7e6a3400abff/feed)
|
7
8
|
|
8
9
|
## Installation
|
9
10
|
|
@@ -42,7 +43,6 @@ require 'json'
|
|
42
43
|
@io.key_value :put do
|
43
44
|
collection "foo"
|
44
45
|
key "bar"
|
45
|
-
timestamp 1384224213
|
46
46
|
data @json_data
|
47
47
|
end.perform
|
48
48
|
|
@@ -55,7 +55,7 @@ end.perform
|
|
55
55
|
#### Search
|
56
56
|
|
57
57
|
```
|
58
|
-
@io.search do
|
58
|
+
@io.search :get do
|
59
59
|
collection "foo"
|
60
60
|
query @query_string
|
61
61
|
end.perform
|
@@ -68,16 +68,16 @@ end.perform
|
|
68
68
|
collection "foo"
|
69
69
|
key "bar"
|
70
70
|
type "log"
|
71
|
-
timestamp 1384224213
|
72
71
|
data @json_data
|
72
|
+
timestamp 1384224213
|
73
73
|
end.perform
|
74
74
|
|
75
75
|
@io.events :get do
|
76
76
|
collection "foo"
|
77
77
|
key "bar"
|
78
78
|
type "log"
|
79
|
-
|
80
|
-
|
79
|
+
from 1384224210
|
80
|
+
to 1384224213
|
81
81
|
end.perform
|
82
82
|
```
|
83
83
|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe String do
|
4
|
+
describe "#camelize" do
|
5
|
+
it 'camelizes the given string' do
|
6
|
+
string = "hana_moguella"
|
7
|
+
expect(string.camelize).to eql "HanaMoguella"
|
8
|
+
expect(string).to eql "hana_moguella"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#camelize!" do
|
13
|
+
it 'camelizes destructively the given string' do
|
14
|
+
string = "hana_moguella"
|
15
|
+
expect(string.camelize!).to eql "HanaMoguella"
|
16
|
+
expect(string).to eql "HanaMoguella"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#underscore" do
|
21
|
+
it 'snakes the given string' do
|
22
|
+
string = "HanaMoguella"
|
23
|
+
expect(string.underscore).to eql "hana_moguella"
|
24
|
+
expect(string).to eql "HanaMoguella"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#underscore!" do
|
29
|
+
it 'snakes destructively the given string' do
|
30
|
+
string = "HanaMoguella"
|
31
|
+
expect(string.underscore!).to eql "hana_moguella"
|
32
|
+
expect(string).to eql "hana_moguella"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -11,12 +11,13 @@ describe OrchestrateIo::Events do
|
|
11
11
|
key "the_godfather"
|
12
12
|
type "comments"
|
13
13
|
data "{\"Text\" :\"It's hard to find a moment in the film that isn't great.\"}"
|
14
|
+
timestamp 1386719809
|
14
15
|
end
|
15
16
|
}
|
16
17
|
|
17
18
|
it "performs a request with the correct options" do
|
18
19
|
client.should_receive(:request).
|
19
|
-
with(:put, "/v0/films/the_godfather/events/comments", {:body=>"{\"Text\" :\"It's hard to find a moment in the film that isn't great.\"}"})
|
20
|
+
with(:put, "/v0/films/the_godfather/events/comments", {:body=>"{\"Text\" :\"It's hard to find a moment in the film that isn't great.\"}",:query=>{:timestamp=>1386719809}}, )
|
20
21
|
request.perform
|
21
22
|
end
|
22
23
|
|
@@ -33,12 +34,14 @@ describe OrchestrateIo::Events do
|
|
33
34
|
collection "films"
|
34
35
|
key "the_godfather"
|
35
36
|
type "comments"
|
37
|
+
from 1386719809 # start
|
38
|
+
to 1386723374 # end
|
36
39
|
end
|
37
40
|
}
|
38
41
|
|
39
42
|
it "performs a request with the correct options" do
|
40
43
|
client.should_receive(:request).
|
41
|
-
with(:get, "/v0/films/the_godfather/events/comments", {})
|
44
|
+
with(:get, "/v0/films/the_godfather/events/comments", {:query=>{:start=>1386719809, :end=>1386723374}})
|
42
45
|
request.perform
|
43
46
|
end
|
44
47
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
|
2
3
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
3
4
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
4
5
|
# Require this file using `require "spec_helper"` to ensure that it is only
|
@@ -6,6 +7,7 @@
|
|
6
7
|
#
|
7
8
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
8
9
|
|
10
|
+
# Connect code quality with test coverage
|
9
11
|
unless ENV['CI']
|
10
12
|
require 'simplecov'
|
11
13
|
require 'simplecov-rcov'
|
@@ -23,13 +25,15 @@ require 'rspec'
|
|
23
25
|
require 'webmock/rspec'
|
24
26
|
require 'json'
|
25
27
|
require 'timecop'
|
28
|
+
require "codeclimate-test-reporter"
|
29
|
+
|
30
|
+
# Keep the client from external requests.
|
31
|
+
WebMock.disable_net_connect!(allow_localhost: true, allow: /codeclimate.com/)
|
32
|
+
CodeClimate::TestReporter.start
|
26
33
|
|
27
34
|
# Use Webmock to route all requests to our Sinatra application `PseudoOrchestrateIo`.
|
28
35
|
require_relative 'support/pseudo_orchestrate.io'
|
29
36
|
|
30
|
-
# Keep the client from external requests.
|
31
|
-
WebMock.disable_net_connect!(allow_localhost: true)
|
32
|
-
|
33
37
|
RSpec.configure do |config|
|
34
38
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
35
39
|
config.run_all_when_everything_filtered = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestrate.io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azukiwasher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- lib/orchestrate.io/version.rb
|
198
198
|
- orchestrate.io.gemspec
|
199
199
|
- spec/orchestrate.io/client_spec.rb
|
200
|
+
- spec/orchestrate.io/core_ext/string_spec.rb
|
200
201
|
- spec/orchestrate.io/events_spec.rb
|
201
202
|
- spec/orchestrate.io/graph_spec.rb
|
202
203
|
- spec/orchestrate.io/key_value_spec.rb
|
@@ -236,6 +237,7 @@ specification_version: 4
|
|
236
237
|
summary: A Ruby wrapper for the Orchestrate.io API.
|
237
238
|
test_files:
|
238
239
|
- spec/orchestrate.io/client_spec.rb
|
240
|
+
- spec/orchestrate.io/core_ext/string_spec.rb
|
239
241
|
- spec/orchestrate.io/events_spec.rb
|
240
242
|
- spec/orchestrate.io/graph_spec.rb
|
241
243
|
- spec/orchestrate.io/key_value_spec.rb
|