sheets_db 0.1.0 → 0.2.0

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: 0522857a175930f3d8da223feca5a4c6c2776416
4
- data.tar.gz: 8675133f8dc45b598ec153bd15a2e0929ab518ec
3
+ metadata.gz: 79311929a22ad3020b4f10dd35187c065258be3d
4
+ data.tar.gz: 42cf57ac37d63a476c8f6b89f15d513831eae6ff
5
5
  SHA512:
6
- metadata.gz: 829c7a9ba78e488acb5b7a53f1e73dfb8c81f0852269e20b318490dc239fe448fbf35df7cf9081f3c86cbe66f255c2ac21f7db7f8bfc8123b3bfeb3d86440fa0
7
- data.tar.gz: d92a4221ac985d3075af370a7137d4ed305437d4b854b234068864a6268e61f2b37b8a81517beaf887cf5d76715d97feb1a28c0eef4430c0bf781f50074d1329
6
+ metadata.gz: 267a8927e4649167de13499dac9feabc49d152065884aa646762060ede825e86fa0283a325d7f86753e9b50634b5b8cc98d2aad635a047577d7d363f48deed3c
7
+ data.tar.gz: 0e6b9126a185e64271f4f34afe833ccea1086403ccb34fb9555622397ea442f8252d5036d756b768f32ae041afdd5b1442760674f4ea35871c6c227f772c5b63
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Ravi Gadad
3
+ Copyright (c) 2016 Abl Schools
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
32
 
33
33
  ## Contributing
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sheets_db. 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.
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ablschools/sheets_db. 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.
36
36
 
37
37
 
38
38
  ## License
@@ -169,7 +169,7 @@ end
169
169
 
170
170
  The only required argument to the `attribute` class method is the name of the column itself. All other options are optional:
171
171
 
172
- `type`: The `attribute` method currently supports three types: `Integer`, `DateTime`, and the default `String`. Any other value given to the `type` option will be ignored and the default will be used.
172
+ `type`: The `attribute` method currently supports four types: `Integer`, `DateTime`, `Boolean` and the default `String`. Any other value given to the `type` option will be ignored and the default will be used. (Note that the `Boolean` type must be specified as a string or symbol (`type: :Boolean`) since there is no actual `Boolean` class in Ruby.)
173
173
 
174
174
  `multiple`: This option defaults to false. If true, it tells SheetsDB to parse the value as a comma-separated list of values, and return an array by splitting on the comma (if no comma is found, it will return a single element array).
175
175
 
@@ -1,3 +1,3 @@
1
1
  module SheetsDB
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -113,6 +113,8 @@ module SheetsDB
113
113
  raw_value.to_i
114
114
  when "DateTime"
115
115
  DateTime.strptime(raw_value, "%m/%d/%Y %H:%M:%S")
116
+ when "Boolean"
117
+ { "TRUE" => true, "FALSE" => false }.fetch(raw_value.upcase, nil)
116
118
  else
117
119
  raw_value
118
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheets_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ravi Gadad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-01 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google_drive