dhis2 3.0.4 → 3.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
- SHA1:
3
- metadata.gz: 1aa84c5184a6aaccdbde59f8734d44c4cf615c87
4
- data.tar.gz: ba4851e6ac597be06e479ab19faf84c87be86480
2
+ SHA256:
3
+ metadata.gz: 87d86e286fe149ce17087321e940d49d34a15a5d3a1f4287a599fb9b5c800b24
4
+ data.tar.gz: 861718252031a153a89c9e014d1d6bb0e15b0e263892ba9ac26a589c8a796a70
5
5
  SHA512:
6
- metadata.gz: e50be53b6a30f28461d949bbafb001ddaafb87bfe37c83c5605ef7978b7af77dbe14f79e36082ea0709a97dda1aced9bc07b9819744ddd6c8f99fe726f063279
7
- data.tar.gz: e0468e8ccd80eb67c604d0d9467df4d7e8e6670abdd7e72787da5204b29a0b47fad7c6e8d70d1fad2b1a6a4e8aa8a52299403efbc780396a607a3717289d129d
6
+ metadata.gz: 54d802045bc3d6a97eb59a938d11a13ae77ea53789a505122340e89140b4f5bd6e1cbad563139720d3899b9d96622234a7d5d5f059860bd67a810665ec848310
7
+ data.tar.gz: bde063aa8c1ad26c0aae75b1d6e08b7260505fb0132bd8c715d6136e4486dd8af120b40b767bed08d7b33aa54ea55b9332b4727dddc461a4493b3d7bbd9e5697
data/README.md CHANGED
@@ -352,6 +352,21 @@ You can also run `bin/console` for an interactive prompt that will allow you to
352
352
 
353
353
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
354
354
 
355
+ ## deployment to rubygems.org
356
+
357
+ one time setup
358
+
359
+ ```
360
+ gem install gem-release
361
+ curl -u rubygemaccount https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
362
+ chmod 0600 ~/.gem/credentials
363
+
364
+ ```
365
+
366
+ ```
367
+ gem bump --tag --release
368
+ ```
369
+
355
370
  ## Contributing
356
371
 
357
372
  Bug reports and pull requests are welcome on GitHub at https://github.com/BLSQ/dhis2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -9,6 +9,10 @@ module Dhis2
9
9
  base.extend(ClassMethods)
10
10
  end
11
11
 
12
+ def default
13
+ self.class.default(client)
14
+ end
15
+
12
16
  Schema = Dry::Validation.Schema do
13
17
  required(:name).filled
14
18
  required(:data_dimension_type).value(
@@ -20,6 +24,9 @@ module Dhis2
20
24
  def resource_name
21
25
  "categories"
22
26
  end
27
+ def default(client)
28
+ find_by(client, name: "default")
29
+ end
23
30
  def creation_defaults(args)
24
31
  {
25
32
  data_dimension_type: "DISAGGREGATION"
@@ -12,7 +12,14 @@ module Dhis2
12
12
  base.extend(ClassMethods)
13
13
  end
14
14
 
15
+ def default
16
+ self.class.default(client)
17
+ end
18
+
15
19
  module ClassMethods
20
+ def default(client)
21
+ find_by(client, name: "default")
22
+ end
16
23
  end
17
24
  end
18
25
  end
data/lib/dhis2/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dhis2
4
- VERSION = "3.0.4"
4
+ VERSION = "3.0.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhis2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Van Aken
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-14 00:00:00.000000000 Z
11
+ date: 2018-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -373,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
373
373
  version: '0'
374
374
  requirements: []
375
375
  rubyforge_project:
376
- rubygems_version: 2.6.14
376
+ rubygems_version: 2.7.6
377
377
  signing_key:
378
378
  specification_version: 4
379
379
  summary: Simple Ruby wrapper on DHIS2 API.