tofulcrum 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +6 -0
- data/lib/tofulcrum/fulcrum-xls-form/xls_reader.rb +17 -0
- data/lib/tofulcrum/version.rb +1 -1
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OTZhYTRjOTFhZmE1NTE3OWYzM2NkZTA4YjFmY2NjN2NjOTgzNzM3OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWU0YzI2OTRiOTMyMmM1YzRmZWUxMWQ3MjcyNjExZmU3NmIwYjY3OA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Mzk0MjE3MmNkYzJkYzk4ZDhiOWYyM2Q3MDFmOTJkMmY2NzJiOTUyM2U0ODU1
|
10
|
+
ZDhmMjZiOTAzZTkxNmUxM2QzZDk4MjRlNzdhNjZkMDIxYmUwOWY1M2M5NDE4
|
11
|
+
N2YwZDg5NWU2YWI5Mzc3YWFlYzNlYjgxMTRmNTQxNGE0NjAwOTc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTcxODZhN2ExZWVlMWZmZGM1NzEzNWQzZTc0ODhjYWQ4ODZkMzQxNjM2M2M5
|
14
|
+
ODhiZGYwYzg4MTgwMzliZmFiODk1ZDRhN2U1OTAzYjk4Yjg4N2M3MzUyMDJj
|
15
|
+
MGI0MTY5NzE2ZDI1MTRkYWYwNzdhMTdjMDBlY2Q2MjZmYTJiYmE=
|
data/README.md
CHANGED
@@ -8,8 +8,14 @@ Import CSV data into an existing Fulcrum app from the command line.
|
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
|
+
### Importing Data
|
12
|
+
|
11
13
|
$ tofulcrum import somefile.csv <form_id> <api_key>
|
12
14
|
|
15
|
+
### Converting Excel files to Fulcrum format
|
16
|
+
|
17
|
+
$ tofulcrum xls form_template.xls
|
18
|
+
|
13
19
|
## Notes
|
14
20
|
|
15
21
|
It will automatically map the column headers to the data names in the form. If any column is not found, it will fail. So your CSV
|
@@ -5,10 +5,12 @@ module Fulcrum
|
|
5
5
|
'section end',
|
6
6
|
'text',
|
7
7
|
'choice',
|
8
|
+
'yesno',
|
8
9
|
'numeric',
|
9
10
|
'repeatable begin',
|
10
11
|
'repeatable end',
|
11
12
|
'date',
|
13
|
+
'time',
|
12
14
|
'address',
|
13
15
|
'signature',
|
14
16
|
'photos',
|
@@ -98,6 +100,19 @@ module Fulcrum
|
|
98
100
|
when 'ChoiceField'
|
99
101
|
hash[:choices] = @choices[row['choices']] if hash[:type] == 'ChoiceField'
|
100
102
|
hash[:allow_other] = boolean_value(row[:allow_other])
|
103
|
+
when 'YesNoField'
|
104
|
+
positive = { label: 'Yes', value: 'yes' }
|
105
|
+
negative = { label: 'No', value: 'no' }
|
106
|
+
neutral = { label: 'N/A', value: 'n/a' }
|
107
|
+
|
108
|
+
positive[:label] = positive[:value] = row['positive'] if row['positive'].present?
|
109
|
+
negative[:label] = negative[:value] = row['negative'] if row['negative'].present?
|
110
|
+
neutral[:label] = neutral[:value] = row['neutral'] if row['neutral'].present?
|
111
|
+
|
112
|
+
hash[:positive] = positive
|
113
|
+
hash[:negative] = negative
|
114
|
+
hash[:neutral] = neutral
|
115
|
+
hash[:neutral_enabled] = row['neutral'].present?
|
101
116
|
when 'AddressField'
|
102
117
|
hash[:auto_populate] = boolean_value(row[:auto_populate], true)
|
103
118
|
end
|
@@ -119,9 +134,11 @@ module Fulcrum
|
|
119
134
|
when 'section begin' then 'Section'
|
120
135
|
when 'text' then 'TextField'
|
121
136
|
when 'choice' then 'ChoiceField'
|
137
|
+
when 'yesno' then 'YesNoField'
|
122
138
|
when 'numeric' then 'TextField'
|
123
139
|
when 'repeatable begin' then 'Repeatable'
|
124
140
|
when 'date' then 'DateTimeField'
|
141
|
+
when 'time' then 'TimeField'
|
125
142
|
when 'address' then 'AddressField'
|
126
143
|
when 'signature' then 'SignatureField'
|
127
144
|
when 'photos' then 'PhotoField'
|
data/lib/tofulcrum/version.rb
CHANGED
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tofulcrum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zac McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.7.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.7.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: fulcrum
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: axlsx
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: roo
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: Convert data to Fulcrum
|
@@ -116,7 +116,7 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
-
-
|
119
|
+
- .gitignore
|
120
120
|
- Gemfile
|
121
121
|
- LICENSE.txt
|
122
122
|
- README.md
|
@@ -137,18 +137,19 @@ require_paths:
|
|
137
137
|
- lib
|
138
138
|
required_ruby_version: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ! '>='
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- -
|
145
|
+
- - ! '>='
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.1.5
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Import data into Fulcrum from a CSV
|
154
154
|
test_files: []
|
155
|
+
has_rdoc:
|