croods 0.2.2 → 0.2.3

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
  SHA256:
3
- metadata.gz: a4a3ece0f2c1db0e1f5c9f85c0abd1c5148bae4b47b9f65d7ff4e94e4ab0791d
4
- data.tar.gz: 588d9db567ccbe5ceb229a29605507436690d31e9ea47a3603db9fa9bcb45f1c
3
+ metadata.gz: 7a0a091b4f81e2b96a736954d7aab969b2330e677244c7ac750313a2076da5bc
4
+ data.tar.gz: ba0ac8dab04f32472fe82c48fb7a077b6620cc94e8d277e3cd99b9ed665a858b
5
5
  SHA512:
6
- metadata.gz: 0e0dae287641c6fd8a404c9f22ade7cf1300534c1f5d64c6062f3bc7eb5d796384f419562595e3ef8e433d4b8cc0770d562aa7b1358beeb605653bff9a3d962a
7
- data.tar.gz: 0c339cbf37dc393e8bed3a065bb05551ac74e0965c5d54cbccb134c924edca5ff4ffcf026da0e73e1c7650ce21bb4759b55fafffb6cc4911e0e7affee3be5c79
6
+ metadata.gz: 43c835cbdd0fdb404d09d785b493f3944eab5b452147e46ac11bbae77ce144f95ca46c77449b06327ac98e7fbfc48e1124e959a46ff9f6bdc64d54b75cf9d437
7
+ data.tar.gz: 5413ebaf8683673e5418b2aabcffbe24687d8bb1c361ba61bec88d2cc371cb1591fc5519045015ec0871df72ea2643380cbf746d666886ea3bb365013d27fa34
data/README.md CHANGED
@@ -1,10 +1,23 @@
1
1
  [![CircleCI](https://circleci.com/gh/SeasonedSoftware/croods-rails.svg?style=svg)](https://circleci.com/gh/SeasonedSoftware/croods-rails)
2
2
  [![Maintainability](https://api.codeclimate.com/v1/badges/5531c26549b427684578/maintainability)](https://codeclimate.com/github/SeasonedSoftware/croods-rails/maintainability)
3
3
  [![Test Coverage](https://api.codeclimate.com/v1/badges/5531c26549b427684578/test_coverage)](https://codeclimate.com/github/SeasonedSoftware/croods-rails/test_coverage)
4
+ ![](https://ruby-gem-downloads-badge.herokuapp.com/croods?type=total)
4
5
 
5
6
  # Croods
6
7
  Short description and motivation.
7
8
 
9
+ ## Installation
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'croods'
14
+ ```
15
+
16
+ And then execute:
17
+ ```bash
18
+ $ bundle
19
+ ```
20
+
8
21
  ## Usage
9
22
  ### Resource
10
23
  Resource is a generic abstraction for any object your app needs to represent. Instead of `app/models/` and `app/controllers/`, with croods we have `app/resources/`.
@@ -93,23 +106,6 @@ use_for_authentication!(
93
106
  :validatable
94
107
  )
95
108
  ```
96
- ## Installation
97
- Add this line to your application's Gemfile:
98
-
99
- ```ruby
100
- gem 'croods'
101
- ```
102
-
103
- And then execute:
104
- ```bash
105
- $ bundle
106
- ```
107
-
108
- Or install it yourself as:
109
- ```bash
110
- $ gem install croods
111
- ```
112
-
113
109
 
114
110
  ## Contributing
115
111
 
@@ -24,6 +24,7 @@ module Croods
24
24
 
25
25
  request do
26
26
  add_attribute :password, :string, null: false
27
+ skip_attribute :admin
27
28
  end
28
29
  end
29
30
 
@@ -18,10 +18,14 @@ module Croods
18
18
  end
19
19
 
20
20
  def format(attribute)
21
- is_date = attribute.type == :datetime || attribute.type == :date
22
- return {} unless is_date
23
-
24
- { format: 'date-time' }
21
+ case attribute.type
22
+ when :datetime
23
+ { format: 'date-time' }
24
+ when :date
25
+ { format: 'date' }
26
+ else
27
+ {}
28
+ end
25
29
  end
26
30
 
27
31
  def types(attribute)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Croods
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: croods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Weinmann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2020-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: committee