mshard 0.0.2 → 0.1.0

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
2
  SHA1:
3
- metadata.gz: 3f51fa8da06af9a3edb8f5c6e24692ba0542b1d3
4
- data.tar.gz: e7bc0ee925a663c2df4a7d4ff8e50774991cee91
3
+ metadata.gz: 691ca7bc8f1955b7c13d7808b12598ce8df9e0f3
4
+ data.tar.gz: 866749507657c5ad117b2b770bd75fbce654453a
5
5
  SHA512:
6
- metadata.gz: a043497e015e0ebf7adf094953589784bc1f9fe76a772c4b5c2ef055198bb51b001eb143256ff32d36336b1c4a085fd80f8c98d2689c7fb2dbf190591aa3023b
7
- data.tar.gz: 713e52cf6adab1bab1ad2f840f4d0f250f71f1f34f445e10089aaf3f23f272fce9a79fd217b69015cd4be91de32c71963debfca9df7fb513bb7ff60a07a7ac99
6
+ metadata.gz: e028b4ce12a3b5659cff76ea39f3ce8aa4b2a8ac4b552c6ad97a1120239b70f350c1df3fb7a34679cdf138390f722b73fb73b1cd5eea86ba32f0129f5ed37bf0
7
+ data.tar.gz: 4e83afe9419050a1b325c1b3e48125cf4931bbd54dff9d5190dde64185233cb2d3231eff740bfbc06a786de839276035d8bf4f1db7901360ebe90c5baa9d490f
data/lib/mshard/mshard.rb CHANGED
@@ -6,11 +6,11 @@ module MShard
6
6
  base_uri ENV['MSHARD_URI']
7
7
 
8
8
  def get(id)
9
- self.class.get("/shards/#{id}")['contents']
9
+ self.class.get("/v2/shards/#{id}").body
10
10
  end
11
11
 
12
12
  def set(params)
13
- self.class.post('/shards', body: params)['id']
13
+ self.class.post('/v2/shards', body: params)['id']
14
14
  end
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module MShard
2
- VERSION = '0.0.2'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -5,4 +5,15 @@ describe MShard::MShard do
5
5
  id = subject.set(contents: 'a')
6
6
  expect(subject.get(id)).to eq('a')
7
7
  end
8
+
9
+ it 'works' do
10
+ subject.set(
11
+ pushbullet: true,
12
+ channel_tag: ENV['PUSHBULLET_CHANNEL'],
13
+ type: 'link',
14
+ title: 'title',
15
+ body: 'body',
16
+ contents: 'a'
17
+ )
18
+ end
8
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mshard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minwoo Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2015-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty