stash-client 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e5139e54592ba641445e59d063b0236f8787185
4
- data.tar.gz: 8acb8c89024e388efc81cdc569e5b58cd563af93
3
+ metadata.gz: 0012f609a4676aa988f01401c5d5ef471dd1f5fd
4
+ data.tar.gz: 6ea26e7b91f4b29122a59dbaf149586dfb1e809d
5
5
  SHA512:
6
- metadata.gz: d3c2303a1ca1429cd78be1ac6efa2c3500f4cf48bbd97b0deb5fc49a9623b0ce2d99b899b2a66e4ce94a85cdbfda11d4bcf9e184294aba3e349631924080c6bf
7
- data.tar.gz: 73ff0a0b9604a7ea2b39db680fd5c30899c3be4df816e334c7019573f3a1c55f435d5a0b03b1deaccf44875e10ab272b200fbd6731aedac647eb32a88caf9e43
6
+ metadata.gz: 89cfdbbc34ff882de070e6e60148182f8b543ae132e0158f2c7936055d245cebf6898f50adedd6bfa9d91801fcd5c918b3c2d7e2419b0a886fd05758eb0dd25b
7
+ data.tar.gz: 01616de76bbde5b294d9c5ea8123fa3df0a045064991b422548c70fa3b3257d1cfe27bbfa7fddfb45856e52b0270d2c364027e66f0214755f73b1fa8e491092c
data/lib/stash/client.rb CHANGED
@@ -57,6 +57,8 @@ module Stash
57
57
  # default limit to 100 commits
58
58
  query_values['limit'] = 100
59
59
  end
60
+
61
+ uri.query_values = query_values
60
62
 
61
63
  fetch_all(uri)
62
64
  end
@@ -1,5 +1,5 @@
1
1
  module Stash
2
2
  class Client
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -26,9 +26,14 @@ module Stash
26
26
  end
27
27
 
28
28
  it 'fetches commits' do
29
- stub_request(:get, 'foo:bar@git.example.com/rest/api/1.0/repos/foo/commits').to_return(body: response_with_value('key' => 'value'))
29
+ stub_request(:get, 'foo:bar@git.example.com/rest/api/1.0/repos/foo/commits?limit=100').to_return(body: response_with_value('key' => 'value'))
30
30
  client.commits_for({'link' => {'url' => '/repos/foo/browse'}}).should == [{'key' => 'value'}]
31
31
  end
32
32
 
33
+ it 'respects since/until when fetching commits' do
34
+ stub_request(:get, 'foo:bar@git.example.com/rest/api/1.0/repos/foo/commits?since=cafebabe&until=deadbeef').to_return(body: response_with_value('key' => 'value'))
35
+ client.commits_for({'link' => {'url' => '/repos/foo/browse'}}, since: 'cafebabe', until: 'deadbeef').should == [{'key' => 'value'}]
36
+ end
37
+
33
38
  end
34
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken