todoist_querynaut 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 7f73893ea7cd9d1a1c41da63fe054d00ad9754951f86ffb42e9991f1ccae7da6
4
- data.tar.gz: 81ccdb2257690c89bf0b1ec03566e66febc2aced0e4a7adbbd5b1f8ca68a854b
2
+ SHA1:
3
+ metadata.gz: 8918c407a48603bf2610a07ebcd35e82b2971ca4
4
+ data.tar.gz: 85294d5182e25b9c3fd1af98ac0d47e74c42505b
5
5
  SHA512:
6
- metadata.gz: 50d6eb03429265db556ed0efa7fcf1283b19321eacc762c4c1e424c8b5752f0177ce457470a5436fa322ecd0bdc8a3ea567530a2a9b4a2aa68bb6bd916bdf8f0
7
- data.tar.gz: 7e6928d2d2017d68664f7c1bb0eb26f676132ffa52c560d899253c2932d3e95904a019a26dcd5139c6ebaee7cbfad4c9e8fa0590e236354e384beabb255e4c05
6
+ metadata.gz: 3f28b69b005430f18bc0c2e323cbd06472639faf7235213e34a408473fcfe073cf3f37a73114d2b8332a8c5f3b757298d36a5c615575131952ca19d77aa9ec78
7
+ data.tar.gz: 30fc5c9b83a36b64b1169bbc316b0aa935bb8189ccb7074ea6dff63323186aff7dfa1ad053151d97612f6ee1ac66ab9f5b11bed53b863585b4b937f85511493c
@@ -19,7 +19,7 @@ describe TodoistQuerynaut::Client do
19
19
 
20
20
  describe "#all_items" do
21
21
  it "should run a 'view all' query" do
22
- stub_request(:post, "https://todoist.com/API/v6/query").
22
+ stub_request(:post, "https://todoist.com/API/v7/query").
23
23
  with(:body => {"queries" => "[\"view all\"]", "token" => "some_token"}).
24
24
  to_return(:status => 200, :body => json_response_raw("query_view_all"), :headers => {})
25
25
  result = TodoistQuerynaut::Client.new(Todoist::Client.new("some_token")).all_items
@@ -30,7 +30,7 @@ describe TodoistQuerynaut::Client do
30
30
 
31
31
  describe "#project_name_to_id" do
32
32
  before :each do
33
- stub_request(:post, "https://todoist.com/API/v6/sync").
33
+ stub_request(:post, "https://todoist.com/API/v7/sync").
34
34
  with(:body => { "seq_no" => "0", "seq_no_global" => "0", "resource_types" => '["projects"]', "token" => "some_token" }).
35
35
  to_return(:status => 200, :body => json_response_raw("sync_projects_all"), :headers => {})
36
36
  @client = TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -53,7 +53,7 @@ describe TodoistQuerynaut::Client do
53
53
 
54
54
  describe "#run" do
55
55
  before :each do
56
- stub_request(:post, "https://todoist.com/API/v6/query").
56
+ stub_request(:post, "https://todoist.com/API/v7/query").
57
57
  with(:body => {"queries" => "[\"view all\"]", "token" => "some_token"}).
58
58
  to_return(:status => 200, :body => json_response_raw("query_view_all"), :headers => {})
59
59
  @client = TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -8,7 +8,7 @@ describe TodoistQuerynaut::TodoistQuery::Intersection do
8
8
  TodoistQuerynaut::TodoistQuery::LiteralQuery.new("today", 0...5)
9
9
  ])
10
10
 
11
- stub_request(:post, "https://todoist.com/API/v6/query").
11
+ stub_request(:post, "https://todoist.com/API/v7/query").
12
12
  with(:body => {"queries" => "[\"today\"]", "token" => "some_token"}).
13
13
  to_return(:status => 200, :body => json_response_raw("query_today"), :headers => {})
14
14
  result = intersection_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -22,10 +22,10 @@ describe TodoistQuerynaut::TodoistQuery::Intersection do
22
22
  TodoistQuerynaut::TodoistQuery::LiteralQuery.new("overdue_one", 0...11)
23
23
  ])
24
24
 
25
- stub_request(:post, "https://todoist.com/API/v6/query").
25
+ stub_request(:post, "https://todoist.com/API/v7/query").
26
26
  with(:body => {"queries" => "[\"overdue_one\"]", "token" => "some_token"}).
27
27
  to_return(:status => 200, :body => json_response_raw("query_overdue_one"), :headers => {})
28
- stub_request(:post, "https://todoist.com/API/v6/query").
28
+ stub_request(:post, "https://todoist.com/API/v7/query").
29
29
  with(:body => {"queries" => "[\"overdue\"]", "token" => "some_token"}).
30
30
  to_return(:status => 200, :body => json_response_raw("query_overdue"), :headers => {})
31
31
  result = intersection_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -17,7 +17,7 @@ describe TodoistQuerynaut::TodoistQuery::LiteralQuery do
17
17
  it "should run a 'today' query" do
18
18
  literal_query = TodoistQuerynaut::TodoistQuery::LiteralQuery.new("today", 0...5)
19
19
 
20
- stub_request(:post, "https://todoist.com/API/v6/query").
20
+ stub_request(:post, "https://todoist.com/API/v7/query").
21
21
  with(:body => {"queries" => "[\"today\"]", "token" => "some_token"}).
22
22
  to_return(:status => 200, :body => json_response_raw("query_today"), :headers => {})
23
23
  result = literal_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -29,7 +29,7 @@ describe TodoistQuerynaut::TodoistQuery::LiteralQuery do
29
29
  it "should run a 'overdue' query" do
30
30
  literal_query = TodoistQuerynaut::TodoistQuery::LiteralQuery.new("overdue", 0...7)
31
31
 
32
- stub_request(:post, "https://todoist.com/API/v6/query").
32
+ stub_request(:post, "https://todoist.com/API/v7/query").
33
33
  with(:body => {"queries" => "[\"overdue\"]", "token" => "some_token"}).
34
34
  to_return(:status => 200, :body => json_response_raw("query_overdue"), :headers => {})
35
35
  result = literal_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -6,10 +6,10 @@ describe TodoistQuerynaut::TodoistQuery::NegatedQuery do
6
6
  negated_query = TodoistQuerynaut::Parser.parse("!today")
7
7
 
8
8
  # will run two queries: today and "view all"
9
- stub_request(:post, "https://todoist.com/API/v6/query").
9
+ stub_request(:post, "https://todoist.com/API/v7/query").
10
10
  with(:body => {"queries" => "[\"today\"]", "token" => "some_token"}).
11
11
  to_return(:status => 200, :body => json_response_raw("query_today"), :headers => {})
12
- stub_request(:post, "https://todoist.com/API/v6/query").
12
+ stub_request(:post, "https://todoist.com/API/v7/query").
13
13
  with(:body => {"queries" => "[\"view all\"]", "token" => "some_token"}).
14
14
  to_return(:status => 200, :body => json_response_raw("query_view_all"), :headers => {})
15
15
  result = negated_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -17,7 +17,7 @@ describe TodoistQuerynaut::TodoistQuery::PriorityQuery do
17
17
  it "should run a 'p4' query" do
18
18
  priority_query = TodoistQuerynaut::TodoistQuery::PriorityQuery.new("p4", 0...2)
19
19
 
20
- stub_request(:post, "https://todoist.com/API/v6/query").
20
+ stub_request(:post, "https://todoist.com/API/v7/query").
21
21
  with(:body => {"queries" => "[\"p4\"]", "token" => "some_token"}).
22
22
  to_return(:status => 200, :body => json_response_raw("query_p4"), :headers => {})
23
23
  result = priority_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -15,10 +15,10 @@ describe TodoistQuerynaut::TodoistQuery::ProjectNameQuery do
15
15
 
16
16
  describe "#run_query" do
17
17
  before :each do
18
- stub_request(:post, "https://todoist.com/API/v6/query").
18
+ stub_request(:post, "https://todoist.com/API/v7/query").
19
19
  with(:body => {"queries" => "[\"view all\"]", "token" => "some_token"}).
20
20
  to_return(:status => 200, :body => json_response_raw("query_view_all"), :headers => {})
21
- stub_request(:post, "https://todoist.com/API/v6/sync").
21
+ stub_request(:post, "https://todoist.com/API/v7/sync").
22
22
  with(:body => { "seq_no" => "0", "seq_no_global" => "0", "resource_types" => '["projects"]', "token" => "some_token" }).
23
23
  to_return(:status => 200, :body => json_response_raw("sync_projects_all"), :headers => {})
24
24
  end
@@ -8,10 +8,10 @@ describe TodoistQuerynaut::TodoistQuery::Union do
8
8
  TodoistQuerynaut::TodoistQuery::LiteralQuery.new("overdue", 0...7)
9
9
  ])
10
10
 
11
- stub_request(:post, "https://todoist.com/API/v6/query").
11
+ stub_request(:post, "https://todoist.com/API/v7/query").
12
12
  with(:body => {"queries" => "[\"today\"]", "token" => "some_token"}).
13
13
  to_return(:status => 200, :body => json_response_raw("query_today"), :headers => {})
14
- stub_request(:post, "https://todoist.com/API/v6/query").
14
+ stub_request(:post, "https://todoist.com/API/v7/query").
15
15
  with(:body => {"queries" => "[\"overdue\"]", "token" => "some_token"}).
16
16
  to_return(:status => 200, :body => json_response_raw("query_overdue"), :headers => {})
17
17
  result = union_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
@@ -25,7 +25,7 @@ describe TodoistQuerynaut::TodoistQuery::Union do
25
25
  TodoistQuerynaut::TodoistQuery::LiteralQuery.new("today", 0...5),
26
26
  ])
27
27
 
28
- stub_request(:post, "https://todoist.com/API/v6/query").
28
+ stub_request(:post, "https://todoist.com/API/v7/query").
29
29
  with(:body => {"queries" => "[\"today\"]", "token" => "some_token"}).
30
30
  to_return(:status => 200, :body => json_response_raw("query_today"), :headers => {})
31
31
  result = union_query.run_query TodoistQuerynaut::Client.new(Todoist::Client.new("some_token"))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todoist_querynaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Siegl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-07 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.17'
69
69
  - !ruby/object:Gem::Dependency
70
- name: ruby-todoist-api
70
+ name: ruby-todoist-api-v7
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.3'
75
+ version: '1.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.3'
82
+ version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: treetop
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -139,17 +139,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.7.6
142
+ rubygems_version: 2.5.2.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Todoist Query Language implementation
146
146
  test_files:
147
- - spec/lib/todoist_querynaut/todoist_query/literal_query_spec.rb
148
- - spec/lib/todoist_querynaut/todoist_query/priority_query_spec.rb
147
+ - spec/spec_helper.rb
148
+ - spec/lib/todoist_querynaut/client_spec.rb
149
+ - spec/lib/todoist_querynaut/parser_spec.rb
149
150
  - spec/lib/todoist_querynaut/todoist_query/union_spec.rb
150
151
  - spec/lib/todoist_querynaut/todoist_query/project_name_query_spec.rb
151
152
  - spec/lib/todoist_querynaut/todoist_query/negated_query_spec.rb
153
+ - spec/lib/todoist_querynaut/todoist_query/priority_query_spec.rb
152
154
  - spec/lib/todoist_querynaut/todoist_query/intersection_spec.rb
153
- - spec/lib/todoist_querynaut/parser_spec.rb
154
- - spec/lib/todoist_querynaut/client_spec.rb
155
- - spec/spec_helper.rb
155
+ - spec/lib/todoist_querynaut/todoist_query/literal_query_spec.rb