myjohndeere 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: 0b4f89cd80e0531cd6802d5ebe1f7a4b2e8d2bc2
4
- data.tar.gz: 012aa77e16ebec30811970a269589bfe536d2faa
3
+ metadata.gz: 5dafcc9c9950e6860dca3b81be39f5c9a0462bef
4
+ data.tar.gz: 3f7f45ba12ec9e0913e435740af627f69b8c0f06
5
5
  SHA512:
6
- metadata.gz: 9faf70547f8c4b9fa177c63d3ee397ff59424f12867025a0358b24fce5d4d78866a59ee12081dff011493b4e2018c67c2c0063364bca7a04aac2ea4e63c628ba
7
- data.tar.gz: 17fddf4a3e8ba7921595d1ccecb5ea9fd3a1d039179347269fc9450851f71f5bb1fcddd9195bffce05d3754e3301236c3d6030aa8e3eb8efd38ff980f6e9de33
6
+ metadata.gz: ac3c75d99618e470f6328ec10693b3e385e14227686de42b00347f6048b6e04e4ceafb525018d3e8a3a3bfd9a0e69194d2f23e0c7a6f79964e06c618c455cc0d
7
+ data.tar.gz: 5f7b927077224fbdd045b7ab25127aeb0997e3bcd00e386c19b9f73ddca4d1838e5654cb4285c7c5d13fe17198440c84d6b58e9502a211794350b21d307047d1
@@ -10,7 +10,7 @@ module MyJohnDeere
10
10
  end
11
11
 
12
12
  def self.create(access_token, organization_id, field_id,
13
- title, caption, metadata = [], date_created=nil)
13
+ title, caption, metadata: [], date_created: nil)
14
14
  body = {
15
15
  title: title,
16
16
  text: caption,
@@ -1,3 +1,3 @@
1
1
  module MyJohnDeere
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -43,8 +43,21 @@ class TestMapLayerSummary < Minitest::Test
43
43
  FIELD_ID,
44
44
  "Test number 2",
45
45
  "Hello from farm lens again",
46
- [MyJohnDeere::MetadataItem.new("key", "val")],
47
- Time.parse("2016-01-02T16:14:23.421Z")
46
+ metadata: [MyJohnDeere::MetadataItem.new("key", "val")],
47
+ date_created: Time.parse("2016-01-02T16:14:23.421Z")
48
+ )
49
+ assert_equal MLS_ID, response.id
50
+ assert_equal ORGANIZATION_ID, response.organization_id
51
+ end
52
+
53
+ def test_create_with_empty_optionals
54
+ stub_request(:post, /\/organizations\/#{ORGANIZATION_ID}\/fields\/#{FIELD_ID}\/mapLayerSummaries/).
55
+ to_return(status: 201, headers: {"Location"=>"https://sandboxapi.deere.com/platform/mapLayerSummaries/#{MLS_ID}"})
56
+ response = MyJohnDeere::MapLayerSummary.create(default_access_token,
57
+ ORGANIZATION_ID,
58
+ FIELD_ID,
59
+ "Test number 2",
60
+ "Hello from farm lens again"
48
61
  )
49
62
  assert_equal MLS_ID, response.id
50
63
  assert_equal ORGANIZATION_ID, response.organization_id
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myjohndeere
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
  - Paul Susmarski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth