conformist 0.1.0 → 0.1.1

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.
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - jruby
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Conformist
2
2
 
3
- Bend CSVs to your will. Stop using array indexing and start using declarative schemas. Declarative schemas are easier to understand, quicker to setup and independent of I/O.
3
+ [![Build Status](https://secure.travis-ci.org/tatey/conformist.png)](http://travis-ci.org/tatey/conformist)
4
+
5
+ Bend CSVs to your will with declarative schemas. Map one or many columns, preprocess cells and lazily enumerate. Declarative schemas are easier to understand, quicker to setup and independent of I/O. Use CSV (Formally FasterCSV) or any array of array-like data structure.
4
6
 
5
7
  ![](http://f.cl.ly/items/00191n3O1J2E1a342F1L/conformist.jpg)
6
8
 
@@ -9,8 +11,8 @@ Bend CSVs to your will. Stop using array indexing and start using declarative sc
9
11
  Open a CSV file and declare a schema.
10
12
 
11
13
  ``` ruby
12
- require 'csv'
13
14
  require 'conformist'
15
+ require 'csv'
14
16
 
15
17
  csv = CSV.open '~/transmitters.csv'
16
18
  schema = Conformist.new do
@@ -241,14 +243,14 @@ class Parent
241
243
  column :name, 0, 1
242
244
  end
243
245
 
244
- class Child < Citizen
246
+ class Child < Parent
245
247
  column :category do
246
248
  'Child'
247
249
  end
248
250
  end
249
251
  ```
250
252
 
251
- ## Upgrading from <= 0.0.3 to 0.1.0
253
+ ## Upgrading from <= 0.0.3 to >= 0.1.0
252
254
 
253
255
  Where previously you had
254
256
 
@@ -275,20 +277,30 @@ class Citizen
275
277
  column :name, 0, 1
276
278
  end
277
279
 
278
- Citizen.conform(CSV.open('~/file.csv')).each do |citizen|
280
+ Citizen.conform(FasterCSV.open('~/file.csv')).each do |citizen|
279
281
  # ...
280
282
  end
281
283
  ```
282
284
 
283
285
  See CHANGELOG.md for a full list of changes.
284
286
 
285
- ## Compatibility and Dependancies
287
+ ## Compatibility
286
288
 
287
289
  * MRI 1.9.2+
288
290
  * MRI 1.8.7
289
291
  * JRuby 1.6.5
290
292
 
291
- Conformist has no explicit dependencies, although `CSV` or `FasterCSV` is commonly used.
293
+ ## Dependancies
294
+
295
+ No explicit dependencies, although `CSV` or `FasterCSV` is commonly used.
296
+
297
+ ## Contributing
298
+
299
+ 1. Fork
300
+ 2. Install dependancies by running `$ bundle install`
301
+ 3. Write tests and code
302
+ 4. Make sure the tests pass by running `$ rake`
303
+ 5. Push and send a pull request on GitHub
292
304
 
293
305
  ## Motivation
294
306
 
data/conformist.gemspec CHANGED
@@ -9,14 +9,14 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Tate Johnson"]
10
10
  s.email = ["tate@tatey.com"]
11
11
  s.homepage = "https://github.com/tatey/conformist"
12
- s.summary = %q{Bend CSVs to your will.}
13
- s.description = %q{Stop using array indexing and start using declarative schemas.}
12
+ s.summary = %q{Bend CSVs to your will with declarative schemas.}
13
+ s.description = %q{Bend CSVs to your will with declarative schemas.}
14
14
  s.post_install_message = <<-EOS
15
15
  ********************************************************************************
16
16
 
17
17
  Upgrading from <= 0.0.3? You should be aware of breaking changes. See
18
18
  https://github.com/tatey/conformist and skip to "Upgrading from 0.0.3 to
19
- 0.1.0" to learn more. Conformist will raise helpful messages where necessary.
19
+ 0.1.1" to learn more. Conformist will raise helpful messages where necessary.
20
20
 
21
21
  ********************************************************************************
22
22
  EOS
data/lib/conformist.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  require 'conformist/base'
2
4
  require 'conformist/builder'
3
5
  require 'conformist/column'
@@ -1,3 +1,3 @@
1
1
  module Conformist
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conformist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-05 00:00:00.000000000 Z
12
+ date: 2012-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70203800707960 !ruby/object:Gem::Requirement
16
+ requirement: &70138920491840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70203800707960
24
+ version_requirements: *70138920491840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &70203800707420 !ruby/object:Gem::Requirement
27
+ requirement: &70138920488020 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,8 +32,8 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70203800707420
36
- description: Stop using array indexing and start using declarative schemas.
35
+ version_requirements: *70138920488020
36
+ description: Bend CSVs to your will with declarative schemas.
37
37
  email:
38
38
  - tate@tatey.com
39
39
  executables: []
@@ -41,6 +41,7 @@ extensions: []
41
41
  extra_rdoc_files: []
42
42
  files:
43
43
  - .gitignore
44
+ - .travis.yml
44
45
  - CHANGELOG.md
45
46
  - Gemfile
46
47
  - LICENSE
@@ -70,7 +71,7 @@ homepage: https://github.com/tatey/conformist
70
71
  licenses: []
71
72
  post_install_message: ! "********************************************************************************\n\n
72
73
  \ Upgrading from <= 0.0.3? You should be aware of breaking changes. See\n https://github.com/tatey/conformist
73
- and skip to \"Upgrading from 0.0.3 to \n 0.1.0\" to learn more. Conformist will
74
+ and skip to \"Upgrading from 0.0.3 to \n 0.1.1\" to learn more. Conformist will
74
75
  raise helpful messages where necessary.\n\n********************************************************************************
75
76
  \ \n"
76
77
  rdoc_options: []
@@ -90,13 +91,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  version: '0'
91
92
  segments:
92
93
  - 0
93
- hash: -4117022895684605404
94
+ hash: 688471822358112849
94
95
  requirements: []
95
96
  rubyforge_project: conformist
96
97
  rubygems_version: 1.8.11
97
98
  signing_key:
98
99
  specification_version: 3
99
- summary: Bend CSVs to your will.
100
+ summary: Bend CSVs to your will with declarative schemas.
100
101
  test_files:
101
102
  - test/fixtures/acma.csv
102
103
  - test/fixtures/fcc.txt