json2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coco.yml +3 -0
- data/.gitignore +15 -0
- data/.reek +7 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +154 -0
- data/Rakefile +7 -0
- data/bin/json2 +15 -0
- data/json2.gemspec +28 -0
- data/lib/json2.rb +14 -0
- data/lib/json2/body.rb +53 -0
- data/lib/json2/csv_with_header.rb +86 -0
- data/lib/json2/csv_without_header.rb +70 -0
- data/lib/json2/header.rb +36 -0
- data/lib/json2/option.rb +75 -0
- data/lib/json2/symbol_respond_to.rb +26 -0
- data/lib/json2/version.rb +3 -0
- data/spec/body_spec.rb +22 -0
- data/spec/csv_with_header_spec.rb +43 -0
- data/spec/csv_without_header_spec.rb +22 -0
- data/spec/data/README +4 -0
- data/spec/data/colors-array.json +30 -0
- data/spec/data/colors-object.json +33 -0
- data/spec/data/colors2.json +12 -0
- data/spec/data/colors3.json +9 -0
- data/spec/data/github-user.json +43 -0
- data/spec/data/google-maps-example.json +32 -0
- data/spec/data/product2.json +32 -0
- data/spec/data/products.json +26 -0
- data/spec/data/users.json +1 -0
- data/spec/data/vote-loi-renseignement.json +5 -0
- data/spec/data/votes.json +15 -0
- data/spec/header_spec.rb +18 -0
- data/spec/integration/colors_array_spec.rb +25 -0
- data/spec/integration/colors_object_spec.rb +24 -0
- data/spec/integration/path_selection_spec.rb +45 -0
- data/spec/integration/votes_spec.rb +21 -0
- data/spec/json2_spec.rb +7 -0
- data/spec/option_spec.rb +67 -0
- data/spec/spec_helper.rb +9 -0
- metadata +197 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
{"markers": [
|
2
|
+
{
|
3
|
+
"point":"new GLatLng(40.266044,-74.718479)",
|
4
|
+
"homeTeam":"Lawrence Library",
|
5
|
+
"awayTeam":"LUGip",
|
6
|
+
"markerImage":"images/red.png",
|
7
|
+
"information": "Linux users group meets second Wednesday of each month.",
|
8
|
+
"fixture":"Wednesday 7pm",
|
9
|
+
"capacity":"",
|
10
|
+
"previousScore":""
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"point":"new GLatLng(40.211600,-74.695702)",
|
14
|
+
"homeTeam":"Hamilton Library",
|
15
|
+
"awayTeam":"LUGip HW SIG",
|
16
|
+
"markerImage":"images/white.png",
|
17
|
+
"information": "Linux users can meet the first Tuesday of the month to work out harward and configuration issues.",
|
18
|
+
"fixture":"Tuesday 7pm",
|
19
|
+
"capacity":"",
|
20
|
+
"tv":""
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"point":"new GLatLng(40.294535,-74.682012)",
|
24
|
+
"homeTeam":"Applebees",
|
25
|
+
"awayTeam":"After LUPip Mtg Spot",
|
26
|
+
"markerImage":"images/newcastle.png",
|
27
|
+
"information": "Some of us go there after the main LUGip meeting, drink brews, and talk.",
|
28
|
+
"fixture":"Wednesday whenever",
|
29
|
+
"capacity":"2 to 4 pints",
|
30
|
+
"tv":""
|
31
|
+
}
|
32
|
+
] }
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"name":"Product",
|
3
|
+
"properties":
|
4
|
+
{
|
5
|
+
"id":
|
6
|
+
{
|
7
|
+
"type":"number",
|
8
|
+
"description":"Product identifier",
|
9
|
+
"required":true
|
10
|
+
},
|
11
|
+
"name":
|
12
|
+
{
|
13
|
+
"description":"Name of the product",
|
14
|
+
"type":"string",
|
15
|
+
"required":true
|
16
|
+
},
|
17
|
+
"price":
|
18
|
+
{
|
19
|
+
"type":"number",
|
20
|
+
"minimum":0,
|
21
|
+
"required":true
|
22
|
+
},
|
23
|
+
"tags":
|
24
|
+
{
|
25
|
+
"type":"array",
|
26
|
+
"items":
|
27
|
+
{
|
28
|
+
"type":"string"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"id": "0001",
|
3
|
+
"type": "donut",
|
4
|
+
"name": "Cake",
|
5
|
+
"ppu": 0.55,
|
6
|
+
"batters":
|
7
|
+
{
|
8
|
+
"batter":
|
9
|
+
[
|
10
|
+
{ "id": "1001", "type": "Regular" },
|
11
|
+
{ "id": "1002", "type": "Chocolate" },
|
12
|
+
{ "id": "1003", "type": "Blueberry" },
|
13
|
+
{ "id": "1004", "type": "Devil's Food" }
|
14
|
+
]
|
15
|
+
},
|
16
|
+
"topping":
|
17
|
+
[
|
18
|
+
{ "id": "5001", "type": "None" },
|
19
|
+
{ "id": "5002", "type": "Glazed" },
|
20
|
+
{ "id": "5005", "type": "Sugar" },
|
21
|
+
{ "id": "5007", "type": "Powdered Sugar" },
|
22
|
+
{ "id": "5006", "type": "Chocolate with Sprinkles" },
|
23
|
+
{ "id": "5003", "type": "Chocolate" },
|
24
|
+
{ "id": "5004", "type": "Maple" }
|
25
|
+
]
|
26
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"results":[{"user":{"gender":"female","name":{"title":"ms","first":"brooke","last":"horton"},"location":{"street":"4565 dame street","county":"limerick","state":"louisiana","zip":"62565"},"email":"brooke.horton30@example.com","username":"bigladybug571","password":"immortal","salt":"PfBYu70X","md5":"d5a03efb5ca414e55599e72b3590f228","sha1":"c462e6a2a3a6471e6fb731db68e4dac410b0fcd2","sha256":"6df43ecac74d0d8aa5d8924f052bd1409d8f2ce79b454eab96d0bc0b06ed33c1","registered":"1100889959","dob":"1020769920","phone":"061-975-8824","cell":"081-363-6870","PPS":"9497003T","picture":{"large":"http://api.randomuser.me/portraits/women/79.jpg","medium":"http://api.randomuser.me/portraits/med/women/79.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/women/79.jpg"},"version":"0.6","nationality":"IE"},"seed":"69ae7dbd856b104405"},{"user":{"gender":"female","name":{"title":"miss","first":"ellen","last":"lynch"},"location":{"street":"9466 highfield road","county":"kerry","state":"washington","zip":"55161"},"email":"ellen.lynch14@example.com","username":"purplegoose637","password":"disney1","salt":"HmajPuFI","md5":"431a9bbffb01da49a505038d3e6e91b3","sha1":"edec63108283b252209701f5b407ab531b196653","sha256":"08e760a07d7039dce9924ce1b14e869e028f08eff65b163f4814584147d073f0","registered":"1329668009","dob":"1281438128","phone":"071-534-6942","cell":"081-588-8938","PPS":"4520058T","picture":{"large":"http://api.randomuser.me/portraits/women/83.jpg","medium":"http://api.randomuser.me/portraits/med/women/83.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/women/83.jpg"},"version":"0.6","nationality":"IE"}},{"user":{"gender":"female","name":{"title":"miss","first":"amy","last":"mckinney"},"location":{"street":"2526 victoria road","county":"cork","state":"florida","zip":"76014"},"email":"amy.mckinney43@example.com","username":"orangeduck672","password":"weller","salt":"PESvcrdW","md5":"3b700933f6a454b8a5819a9c4b73fdcf","sha1":"f198c581f2438b1022a86a9ecc9f1db88d1eddf6","sha256":"b399b026d58453bad315c5a568b4437c904f5d7f3b276d8e0cf14a7d59d5d1e0","registered":"950456542","dob":"508018939","phone":"031-372-4897","cell":"081-167-3768","PPS":"1482923T","picture":{"large":"http://api.randomuser.me/portraits/women/86.jpg","medium":"http://api.randomuser.me/portraits/med/women/86.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/women/86.jpg"},"version":"0.6","nationality":"IE"}},{"user":{"gender":"male","name":{"title":"mr","first":"nick","last":"kelley"},"location":{"street":"5073 boghall road","county":"fingal","state":"hawaii","zip":"64778"},"email":"nick.kelley10@example.com","username":"silverwolf336","password":"1213","salt":"9isyfHNa","md5":"3ee0ba355254878cdfe6c18cbbe906dc","sha1":"c7fc8b46e374c6e403745489500049d594050e37","sha256":"e3ae74d303fb33c9baffab7602f7ac7c35cd15a47ccd4a8d21a1e142675dbdaa","registered":"1374408702","dob":"620096529","phone":"021-610-6257","cell":"081-624-0639","PPS":"4144199T","picture":{"large":"http://api.randomuser.me/portraits/men/47.jpg","medium":"http://api.randomuser.me/portraits/med/men/47.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/men/47.jpg"},"version":"0.6","nationality":"IE"}},{"user":{"gender":"male","name":{"title":"mr","first":"robert","last":"butler"},"location":{"street":"4521 grange road","county":"westmeath","state":"idaho","zip":"20261"},"email":"robert.butler40@example.com","username":"orangesnake895","password":"1234567890","salt":"goCXKcLX","md5":"53e99733964d5d1dbf31978db4d3ae54","sha1":"f53f483a3208e3ff42c5f2b8bd28e6079be5f1d7","sha256":"961e604e726e9cc8161095e449caaf40fd58e191419b3f66ecc1c827e2057e16","registered":"1145663289","dob":"380804582","phone":"071-340-7349","cell":"081-917-2454","PPS":"9903801T","picture":{"large":"http://api.randomuser.me/portraits/men/41.jpg","medium":"http://api.randomuser.me/portraits/med/men/41.jpg","thumbnail":"http://api.randomuser.me/portraits/thumb/men/41.jpg"},"version":"0.6","nationality":"IE"}}]}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
{"Non inscrits": {"Abstention": ["Gilles\u00a0Bourdouleix"], "Non-votant": [], "Contre": ["V\u00e9ronique\u00a0Besse", "Jacques\u00a0Bompard", "Gilbert\u00a0Collard", "Nicolas\u00a0Dupont-Aignan", "Jean\u00a0Lassalle", "Marion\u00a0Mar\u00e9chal-Le\u00a0Pen", "Thomas\u00a0Th\u00e9venoud"], "Pour": ["Sylvie\u00a0Andrieux"]}, "Groupe de l'union pour un mouvement populaire": {"Abstention": ["Sylvain\u00a0Berrios", "Marc-Philippe\u00a0Daubresse", "Claude\u00a0de\u00a0Ganay", "Anne\u00a0Grommerch", "Fran\u00e7oise\u00a0Gu\u00e9got", "Philippe\u00a0Houillon", "Fr\u00e9d\u00e9ric\u00a0Lefebvre", "C\u00e9leste\u00a0Lett", "V\u00e9ronique\u00a0Louwagie", "Lionnel\u00a0Luca", "Thierry\u00a0Mariani", "Olivier\u00a0Marleix", "Alain\u00a0Marsaud", "Pierre\u00a0Morel-A-L'Huissier", "Bernard\u00a0Perrut", "Christophe\u00a0Priou", "Arnaud\u00a0Robinet", "Fernand\u00a0Sir\u00e9", "Jean-S\u00e9bastien\u00a0Vialatte", "Jean-Luc\u00a0Warsmann"], "Non-votant": [], "Contre": ["Yves\u00a0Albarello", "Patrick\u00a0Balkany", "\u00c9tienne\u00a0Blanc", "Xavier\u00a0Breton", "Philippe\u00a0Cochet", "Bernard\u00a0Debr\u00e9", "Jean-Pierre\u00a0Decool", "Patrick\u00a0Devedjian", "Nicolas\u00a0Dhuicq", "Sophie\u00a0Dion", "Virginie\u00a0Duby-Muller", "Herv\u00e9\u00a0Gaymard", "Claude\u00a0Goasguen", "Jean-Pierre\u00a0Gorges", "Henri\u00a0Guaino", "Jean-Jacques\u00a0Guillet", "Patrick\u00a0Hetzel", "Laure\u00a0de\u00a0La\u00a0Raudi\u00e8re", "Pierre\u00a0Lellouche", "Dominique\u00a0Le\u00a0M\u00e8ner", "Laurent\u00a0Marcangeli", "Herv\u00e9\u00a0Mariton", "Franck\u00a0Marlin", "Philippe\u00a0Meunier", "Jean-Claude\u00a0Mignon", "Yannick\u00a0Moreau", "\u00c9douard\u00a0Philippe", "Jean-Fr\u00e9d\u00e9ric\u00a0Poisson", "B\u00e9reng\u00e8re\u00a0Poletti", "Franck\u00a0Riester", "Thierry\u00a0Sol\u00e8re", "Alain\u00a0Suguenot", "Lionel\u00a0Tardy", "Jean-Charles\u00a0Taugourdeau", "Michel\u00a0Voisin"], "Pour": ["Damien\u00a0Abad", "Elie\u00a0Aboud", "Bernard\u00a0Accoyer", "Nicole\u00a0Ameline", "Benoist\u00a0Apparu", "Laurence\u00a0Arribag\u00e9", "Julien\u00a0Aubert", "Olivier\u00a0Audibert-Troin", "Jean-Pierre\u00a0Barbier", "Jacques\u00a0Alain\u00a0B\u00e9nisti", "Xavier\u00a0Bertrand", "Marcel\u00a0Bonnot", "Jean-Claude\u00a0Bouchet", "Val\u00e9rie\u00a0Boyer", "Philippe\u00a0Briand", "Bernard\u00a0Brochand", "Dominique\u00a0Bussereau", "Olivier\u00a0Carr\u00e9", "Gilles\u00a0Carrez", "Yves\u00a0Censi", "J\u00e9r\u00f4me\u00a0Chartier", "Luc\u00a0Chatel", "G\u00e9rard\u00a0Cherpion", "Guillaume\u00a0Chevrollier", "Alain\u00a0Chr\u00e9tien", "Jean-Louis\u00a0Christ", "Dino\u00a0Cinieri", "\u00c9ric\u00a0Ciotti", "Jean-Fran\u00e7ois\u00a0Cop\u00e9", "Fran\u00e7ois\u00a0Cornut-Gentille", "Jean-Louis\u00a0Costes", "\u00c9douard\u00a0Courtial", "Jean-Michel\u00a0Couve", "Marie-Christine\u00a0Dalloz", "G\u00e9rald\u00a0Darmanin", "Olivier\u00a0Dassault", "Bernard\u00a0Deflesselles", "Lucien\u00a0Degauchy", "R\u00e9mi\u00a0Delatte", "Jean-Pierre\u00a0Door", "Dominique\u00a0Dord", "David\u00a0Douillet", "Marianne\u00a0Dubois", "Christian\u00a0Estrosi", "Daniel\u00a0Fasquelle", "Georges\u00a0Fenech", "Fran\u00e7ois\u00a0Fillon", "Marie-Louise\u00a0Fort", "Yves\u00a0Foulon", "Marc\u00a0Francina", "Yves\u00a0Fromion", "Laurent\u00a0Furst", "Sauveur\u00a0Gandolfi-Scheit", "Annie\u00a0Genevard", "Guy\u00a0Geoffroy", "Bernard\u00a0G\u00e9rard", "Alain\u00a0Gest", "Daniel\u00a0Gibbes", "Franck\u00a0Gilard", "Georges\u00a0Ginesta", "Charles-Ange\u00a0Ginesy", "Jean-Pierre\u00a0Giran", "Philippe\u00a0Gosselin", "Philippe\u00a0Goujon", "Claude\u00a0Greff", "Arlette\u00a0Grosskost", "Serge\u00a0Grouard", "Jean-Claude\u00a0Guibal", "Christophe\u00a0Guilloteau", "Michel\u00a0Heinrich", "Michel\u00a0Herbillon", "Antoine\u00a0Herth", "Gu\u00e9nha\u00ebl\u00a0Huet", "S\u00e9bastien\u00a0Huyghe", "Christian\u00a0Jacob", "Denis\u00a0Jacquat", "Christian\u00a0Kert", "Nathalie\u00a0Kosciusko-Morizet", "Jacques\u00a0Kossowski", "Patrick\u00a0Labaune", "Val\u00e9rie\u00a0Lacroute", "Marc\u00a0Laffineur", "Jacques\u00a0Lamblin", "Jean-Fran\u00e7ois\u00a0Lamour", "Guillaume\u00a0Larriv\u00e9", "Charles\u00a0de\u00a0La\u00a0Verpilli\u00e8re", "Thierry\u00a0Lazaro", "Alain\u00a0Leboeuf", "Isabelle\u00a0Le\u00a0Callennec", "Marc\u00a0Le\u00a0Fur", "Bruno\u00a0Le\u00a0Maire", "Jean\u00a0Leonetti", "Pierre\u00a0Lequiller", "Philippe\u00a0Le\u00a0Ray", "Genevi\u00e8ve\u00a0Levy", "Gilles\u00a0Lurton", "Jean-Fran\u00e7ois\u00a0Mancel", "Alain\u00a0Marleix", "Philippe\u00a0Armand\u00a0Martin", "Patrice\u00a0Martin-Lalande", "Alain\u00a0Marty", "Jean-Claude\u00a0Mathis", "Fran\u00e7ois\u00a0de\u00a0Mazi\u00e8res", "G\u00e9rard\u00a0Menuel", "Damien\u00a0Meslot", "Pierre\u00a0Morange", "Alain\u00a0Moyne-Bressand", "Jacques\u00a0Myard", "Dominique\u00a0Nachury", "Yves\u00a0Nicolin", "Patrick\u00a0Ollier", "Val\u00e9rie\u00a0P\u00e9cresse", "Jacques\u00a0P\u00e9lissard", "Axel\u00a0Poniatowski", "Josette\u00a0Pons", "Didier\u00a0Quentin", "Fr\u00e9d\u00e9ric\u00a0Reiss", "Jean-Luc\u00a0Reitzer", "Bernard\u00a0Reyn\u00e8s", "Camille\u00a0de\u00a0Rocca\u00a0Serra", "Sophie\u00a0Rohfritsch", "Martial\u00a0Saddier", "Paul\u00a0Salen", "Fran\u00e7ois\u00a0Scellier", "Claudine\u00a0Schmid", "Andr\u00e9\u00a0Schneider", "Jean-Marie\u00a0Sermier", "Michel\u00a0Sordi", "\u00c9ric\u00a0Straumann", "Claude\u00a0Sturni", "Mich\u00e8le\u00a0Tabarot", "Guy\u00a0Teissier", "Michel\u00a0Terrot", "Jean-Marie\u00a0Tetart", "Dominique\u00a0Tian", "Fran\u00e7ois\u00a0Vannson", "Catherine\u00a0Vautrin", "Patrice\u00a0Verch\u00e8re", "Jean-Pierre\u00a0Vigier", "Philippe\u00a0Vitel", "Laurent\u00a0Wauquiez", "\u00c9ric\u00a0Woerth", "Marie-Jo\u00a0Zimmermann"]}, "Groupe radical, r\u00e9publicain, d\u00e9mocrate et progressiste": {"Abstention": [], "Non-votant": [], "Contre": [], "Pour": ["Jean-No\u00ebl\u00a0Carpentier", "Ary\u00a0Chalus", "G\u00e9rard\u00a0Charasse", "Jeanine\u00a0Dubi\u00e9", "Olivier\u00a0Falorni", "Paul\u00a0Giacobbi", "Jo\u00ebl\u00a0Giraud", "Gilda\u00a0Hobert", "Jacques\u00a0Krabal", "J\u00e9r\u00f4me\u00a0Lambert", "Jean-Pierre\u00a0Maggi", "Jacques\u00a0Moignard", "Dominique\u00a0Orliac", "Thierry\u00a0Robert", "St\u00e9phane\u00a0Saint-Andr\u00e9", "Roger-G\u00e9rard\u00a0Schwartzenberg", "Alain\u00a0Tourret"]}, "Groupe \u00e9cologiste": {"Abstention": ["V\u00e9ronique\u00a0Massonneau", "Barbara\u00a0Pompili"], "Non-votant": [], "Contre": ["Laurence\u00a0Abeille", "Brigitte\u00a0Allain", "Isabelle\u00a0Attard", "Danielle\u00a0Auroi", "Mich\u00e8le\u00a0Bonneton", "Sergio\u00a0Coronado", "C\u00e9cile\u00a0Duflot", "No\u00ebl\u00a0Mam\u00e8re", "Paul\u00a0Molac", "Jean-Louis\u00a0Roum\u00e9gas", "Eva\u00a0Sas"], "Pour": ["\u00c9ric\u00a0Alauzet", "Denis\u00a0Baupin", "Christophe\u00a0Cavard", "Fran\u00e7ois-Michel\u00a0Lambert", "Fran\u00e7ois\u00a0de\u00a0Rugy"]}, "Groupe de l'union des d\u00e9mocrates et ind\u00e9pendants": {"Abstention": ["Thierry\u00a0Benoit", "Laurent\u00a0Degallaix"], "Non-votant": [], "Contre": ["Charles\u00a0de\u00a0Courson", "Yannick\u00a0Favennec", "Jean-Christophe\u00a0Fromantin", "Philippe\u00a0Gom\u00e8s", "Yves\u00a0J\u00e9go", "Maurice\u00a0Leroy", "Herv\u00e9\u00a0Morin", "Bertrand\u00a0Pancher", "Arnaud\u00a0Richard", "Jonas\u00a0Tahuaitu", "Francis\u00a0Vercamer"], "Pour": ["St\u00e9phane\u00a0Demilly", "Philippe\u00a0Folliot", "Meyer\u00a0Habib", "Francis\u00a0Hillmeyer", "Sonia\u00a0Lagarde", "Jean-Christophe\u00a0Lagarde", "Michel\u00a0Piron", "Franck\u00a0Reynier", "Fran\u00e7ois\u00a0Rochebloine", "Maina\u00a0Sage", "Rudy\u00a0Salles", "Andr\u00e9\u00a0Santini", "Fran\u00e7ois\u00a0Sauvadet", "Jean-Paul\u00a0Tuaiva", "Philippe\u00a0Vigier", "Fran\u00e7ois-Xavier\u00a0Villain", "Michel\u00a0Zumkeller"]}, "Groupe socialiste, r\u00e9publicain et citoyen": {"Abstention": ["Laurent\u00a0Baumel", "Nicolas\u00a0Bays", "Jean-Luc\u00a0Bleunven", "Kheira\u00a0Bouziane-Laroussi", "Nathalie\u00a0Chabanne", "Dominique\u00a0Chauvel", "Pascal\u00a0Cherki", "Laurence\u00a0Dumont", "Genevi\u00e8ve\u00a0Gaillard", "Daniel\u00a0Goldberg", "Mathieu\u00a0Hanotin", "Pierre-Yves\u00a0Le\u00a0Borgn'", "Pierre-Alain\u00a0Muet", "Christian\u00a0Paul", "Patrice\u00a0Prat", "Marie-Line\u00a0Reynaud", "Denys\u00a0Robiliard"], "Non-votant": [], "Contre": ["Pouria\u00a0Amirshahi", "Fan\u00e9lie\u00a0Carrey-Conte", "Aur\u00e9lie\u00a0Filippetti", "Jean-Patrick\u00a0Gille", "Linda\u00a0Gourjade", "Philippe\u00a0Nogu\u00e8s", "Michel\u00a0Pouzol", "Barbara\u00a0Romagnan", "G\u00e9rard\u00a0Sebaoun", "Suzanne\u00a0Tallard"], "Pour": ["Ibrahim\u00a0Aboubacar", "Patricia\u00a0Adam", "Sylviane\u00a0Alaux", "Jean-Pierre\u00a0Allossery", "Fran\u00e7ois\u00a0Andr\u00e9", "Nathalie\u00a0App\u00e9r\u00e9", "Kader\u00a0Arif", "Christian\u00a0Assaf", "Jo\u00ebl\u00a0Aviragnet", "Pierre\u00a0Aylagas", "Jean-Marc\u00a0Ayrault", "Alexis\u00a0Bachelay", "Guillaume\u00a0Bachelay", "Jean-Paul\u00a0Bacquet", "Dominique\u00a0Baert", "G\u00e9rard\u00a0Bapt", "Fr\u00e9d\u00e9ric\u00a0Barbier", "Serge\u00a0Bardy", "Ericka\u00a0Bareigts", "Christian\u00a0Bataille", "Delphine\u00a0Batho", "Marie-No\u00eblle\u00a0Battistel", "Philippe\u00a0Baumel", "Catherine\u00a0Beaubatie", "Marie-Fran\u00e7oise\u00a0Bechtel", "Jean-Marie\u00a0Beffara", "Luc\u00a0Belot", "Karine\u00a0Berger", "Chantal\u00a0Berthelot", "Gis\u00e8le\u00a0Bi\u00e9mouret", "Philippe\u00a0Bies", "Erwann\u00a0Binet", "Yves\u00a0Blein", "Daniel\u00a0Boisserie", "Christophe\u00a0Borgel", "Florent\u00a0Boudi\u00e9", "Marie-Odile\u00a0Bouill\u00e9", "Christophe\u00a0Bouillon", "Brigitte\u00a0Bourguignon", "Malek\u00a0Boutih", "\u00c9meric\u00a0Br\u00e9hier", "Jean-Louis\u00a0Bricout", "Jean-Jacques\u00a0Bridey", "Fran\u00e7ois\u00a0Brottes", "Isabelle\u00a0Bruneau", "Gwenegan\u00a0Bui", "Sabine\u00a0Buis", "Jean-Claude\u00a0Buisine", "Sylviane\u00a0Bulteau", "Vincent\u00a0Burroni", "Alain\u00a0Calmette", "Jean-Christophe\u00a0Cambad\u00e9lis", "Colette\u00a0Capdevielle", "Yann\u00a0Capet", "Christophe\u00a0Caresche", "Marie-Arlette\u00a0Carlotti", "Martine\u00a0Carrillon-Couvreur", "Christophe\u00a0Castaner", "Laurent\u00a0Cathala", "Jean-Yves\u00a0Caullet", "Guy\u00a0Chambefort", "Jean-Paul\u00a0Chanteguet", "Marie-Anne\u00a0Chapdelaine", "Guy-Michel\u00a0Chauveau", "Jean-David\u00a0Ciot", "Alain\u00a0Claeys", "Jean-Michel\u00a0Cl\u00e9ment", "Marie-Fran\u00e7oise\u00a0Clergeau", "Romain\u00a0Colas", "Philip\u00a0Cordery", "Val\u00e9rie\u00a0Corre", "Jean-Jacques\u00a0Cottel", "Catherine\u00a0Coutelle", "Jacques\u00a0Cresta", "Pascale\u00a0Crozon", "Fr\u00e9d\u00e9ric\u00a0Cuvillier", "Seybah\u00a0Dagoma", "Yves\u00a0Daniel", "Carlos\u00a0Da\u00a0Silva", "Pascal\u00a0Deguilhem", "Florence\u00a0Delaunay", "Mich\u00e8le\u00a0Delaunay", "Guy\u00a0Delcourt", "Pascal\u00a0Demarthe", "S\u00e9bastien\u00a0Denaja", "Fran\u00e7oise\u00a0Descamps-Crosnier", "Sophie\u00a0Dessus", "Jean-Louis\u00a0Destans", "Michel\u00a0Destot", "Fanny\u00a0Dombre-Coste", "Ren\u00e9\u00a0Dosi\u00e8re", "Sandrine\u00a0Doucet", "Philippe\u00a0Doucet", "Fran\u00e7oise\u00a0Dubois", "Jean-Pierre\u00a0Dufau", "Anne-Lise\u00a0Dufour-Tonini", "Fran\u00e7oise\u00a0Dumas", "William\u00a0Dumas", "Jean-Louis\u00a0Dumont", "Jean-Paul\u00a0Dupr\u00e9", "Yves\u00a0Durand", "Philippe\u00a0Duron", "Olivier\u00a0Dussopt", "Henri\u00a0Emmanuelli", "Corinne\u00a0Erhel", "Sophie\u00a0Errante", "Marie-H\u00e9l\u00e8ne\u00a0Fabre", "Olivier\u00a0Faure", "Alain\u00a0Faur\u00e9", "Herv\u00e9\u00a0F\u00e9ron", "Richard\u00a0Ferrand", "Genevi\u00e8ve\u00a0Fioraso", "Hugues\u00a0Fourage", "Jean-Marc\u00a0Fournel", "Val\u00e9rie\u00a0Fourneyron", "Mich\u00e8le\u00a0Fournier-Armand", "Michel\u00a0Fran\u00e7aix", "Christian\u00a0Franqueville", "Jean-Claude\u00a0Fruteau", "Jean-Louis\u00a0Gagnaire", "Yann\u00a0Galut", "Guillaume\u00a0Garot", "H\u00e9l\u00e8ne\u00a0Geoffroy", "Jean-Marc\u00a0Germain", "Jean\u00a0Glavany", "Yves\u00a0Goasdou\u00e9", "Genevi\u00e8ve\u00a0Gosselin-Fleury", "Pascale\u00a0Got", "Marc\u00a0Goua", "Estelle\u00a0Grelier", "Jean\u00a0Grellier", "Edith\u00a0Gueugneau", "\u00c9lisabeth\u00a0Guigou", "Chantal\u00a0Guittet", "David\u00a0Habib", "Razzy\u00a0Hammadi", "Beno\u00eet\u00a0Hamon", "Jo\u00eblle\u00a0Huillier", "Sandrine\u00a0Hurel", "Christian\u00a0Hutin", "Monique\u00a0Iborra", "Fran\u00e7oise\u00a0Imbert", "Michel\u00a0Issindou", "\u00c9ric\u00a0Jalton", "Serge\u00a0Janquin", "Henri\u00a0Jibrayel", "R\u00e9gis\u00a0Juanico", "Armand\u00a0Jung", "Laurent\u00a0Kalinowski", "Marietta\u00a0Karamanli", "Philippe\u00a0Kemel", "Chaynesse\u00a0Khirouni", "Bernadette\u00a0Laclais", "Conchita\u00a0Lacuey", "Fran\u00e7ois\u00a0Lamy", "Anne-Christine\u00a0Lang", "Colette\u00a0Langlade", "Jean\u00a0Launay", "Jean-Luc\u00a0Laurent", "Jean-Yves\u00a0Le\u00a0Bouillonnec", "Gilbert\u00a0Le\u00a0Bris", "Anne-Yvonne\u00a0Le\u00a0Dain", "Jean-Yves\u00a0Le\u00a0D\u00e9aut", "Viviane\u00a0Le\u00a0Dissez", "Michel\u00a0Lefait", "Dominique\u00a0Lefebvre", "Annie\u00a0Le\u00a0Houerou", "Annick\u00a0Le\u00a0Loch", "Patrick\u00a0Lemasle", "Catherine\u00a0Lemorton", "Christophe\u00a0L\u00e9onard", "Annick\u00a0Lepetit", "Jean-Pierre\u00a0Le\u00a0Roch", "Bruno\u00a0Le\u00a0Roux", "Arnaud\u00a0Leroy", "Michel\u00a0Lesage", "Bernard\u00a0Lesterlin", "Serge\u00a0Letchimy", "Michel\u00a0Liebgott", "Martine\u00a0Ligni\u00e8res-Cassou", "Audrey\u00a0Linkenheld", "Fran\u00e7ois\u00a0Loncle", "Gabrielle\u00a0Louis-Carabin", "Lucette\u00a0Lousteau", "Victorin\u00a0Lurel", "Jacqueline\u00a0Maquet", "Marie-Lou\u00a0Marcel", "Jean-Ren\u00e9\u00a0Marsac", "Philippe\u00a0Martin", "Fr\u00e9d\u00e9rique\u00a0Massat", "Sandrine\u00a0Mazetier", "Michel\u00a0M\u00e9nard", "Patrick\u00a0Mennucci", "Kl\u00e9ber\u00a0Mesquida", "Philippe\u00a0Nauche", "Nathalie\u00a0Nieson", "Robert\u00a0Olive", "Maud\u00a0Olivier", "Monique\u00a0Orph\u00e9", "Michel\u00a0Pajon", "Luce\u00a0Pane", "R\u00e9mi\u00a0Pauvros", "Germinal\u00a0Peiro", "Herv\u00e9\u00a0Pellois", "Jean-Claude\u00a0Perez", "S\u00e9bastien\u00a0Pietrasanta", "Martine\u00a0Pinville", "Christine\u00a0Pires\u00a0Beaune", "Philippe\u00a0Plisson", "\u00c9lisabeth\u00a0Pochon", "Napole\u00a0Polut\u00e9l\u00e9", "Pascal\u00a0Popelin", "Dominique\u00a0Potier", "R\u00e9gine\u00a0Pov\u00e9da", "Christophe\u00a0Premat", "Joaquim\u00a0Pueyo", "Fran\u00e7ois\u00a0Pupponi", "Catherine\u00a0Qu\u00e9r\u00e9", "Val\u00e9rie\u00a0Rabault", "Monique\u00a0Rabin", "Dominique\u00a0Raimbourg", "Marie\u00a0R\u00e9calde", "Eduardo\u00a0Rihan\u00a0Cypel", "Alain\u00a0Rodet", "Fr\u00e9d\u00e9ric\u00a0Roig", "Bernard\u00a0Roman", "Gwendal\u00a0Rouillard", "Ren\u00e9\u00a0Rouquet", "Alain\u00a0Rousset", "Boinali\u00a0Said", "B\u00e9atrice\u00a0Santais", "Odile\u00a0Saugues", "Gilbert\u00a0Sauvan", "Christophe\u00a0Sirugue", "Julie\u00a0Sommaruga", "Pascal\u00a0Terrasse", "Sylvie\u00a0Tolmont", "Jean-Louis\u00a0Touraine", "St\u00e9phane\u00a0Travert", "Catherine\u00a0Troallic", "C\u00e9cile\u00a0Untermaier", "Jean-Jacques\u00a0Urvoas", "Daniel\u00a0Vaillant", "Jacques\u00a0Valax", "Clotilde\u00a0Valter", "Michel\u00a0Vauzelle", "Fabrice\u00a0Verdier", "Michel\u00a0Vergnier", "Patrick\u00a0Vignal", "Jean-Michel\u00a0Villaum\u00e9", "Jean\u00a0Jacques\u00a0Vlody", "Paola\u00a0Zanetti"]}, "Groupe de la gauche d\u00e9mocrate et r\u00e9publicaine": {"Abstention": [], "Non-votant": [], "Contre": ["Fran\u00e7ois\u00a0Asensi", "Huguette\u00a0Bello", "Alain\u00a0Bocquet", "Marie-George\u00a0Buffet", "Jean-Jacques\u00a0Candelier", "Patrice\u00a0Carvalho", "Gaby\u00a0Charroux", "Andr\u00e9\u00a0Chassaigne", "Jacqueline\u00a0Fraysse", "Alfred\u00a0Marie-Jeanne", "Jean-Philippe\u00a0Nilor", "Nicolas\u00a0Sansu"], "Pour": ["Bruno\u00a0Nestor\u00a0Az\u00e9rot", "Marc\u00a0Dolez", "Gabriel\u00a0Serville"]}}
|
5
|
+
|
data/spec/header_spec.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Json2
|
4
|
+
|
5
|
+
describe Header do
|
6
|
+
|
7
|
+
describe '.get' do
|
8
|
+
it 'simplify the header' do
|
9
|
+
header = Header.get(['a.b.foo', 'a.b.bar', 'a.b.baz'])
|
10
|
+
expect(header).to eq "foo,bar,baz\n"
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'keeps names unique' do
|
14
|
+
header = Header.get(['a.b.foo', 'a.b.bar', 'c.d.foo'])
|
15
|
+
expect(header).to eq "foo,bar,c.d.foo\n"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "colors-array.json as input" do
|
4
|
+
|
5
|
+
it 'produces the CSV' do
|
6
|
+
input = JSON.parse(File.open('spec/data/colors-array.json').read)
|
7
|
+
csv_with_header = Json2::CsvWithHeader.new(input)
|
8
|
+
expect(csv_with_header.output).to eq csv
|
9
|
+
end
|
10
|
+
|
11
|
+
def csv
|
12
|
+
<<END
|
13
|
+
color,value
|
14
|
+
red,#f00
|
15
|
+
green,#0f0
|
16
|
+
blue,#00f
|
17
|
+
cyan,#0ff
|
18
|
+
magenta,#f0f
|
19
|
+
yellow,#ff0
|
20
|
+
black,#000
|
21
|
+
END
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "colors-object.json as input" do
|
4
|
+
|
5
|
+
it 'produces the CSV' do
|
6
|
+
input = JSON.parse(File.open('spec/data/colors-object.json').read)
|
7
|
+
csv_with_header = Json2::CsvWithHeader.new(input)
|
8
|
+
expect(csv_with_header.output).to eq csv
|
9
|
+
end
|
10
|
+
|
11
|
+
def csv
|
12
|
+
<<END
|
13
|
+
color,value
|
14
|
+
red,#f00
|
15
|
+
green,#0f0
|
16
|
+
blue,#00f
|
17
|
+
cyan,#0ff
|
18
|
+
magenta,#f0f
|
19
|
+
yellow,#ff0
|
20
|
+
black,#000
|
21
|
+
END
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Path option" do
|
4
|
+
|
5
|
+
it 'gets batters.batter' do
|
6
|
+
options = { with_path: true, path: 'batters.batter' }
|
7
|
+
input = JSON.parse(File.open('spec/data/products.json').read)
|
8
|
+
csv_with_path = Json2::CsvWithHeader.new(input, options)
|
9
|
+
|
10
|
+
expect(csv_with_path.output).to eq csv
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'gets topping' do
|
14
|
+
options = { with_path: true, path: 'topping' }
|
15
|
+
input = JSON.parse(File.open('spec/data/products.json').read)
|
16
|
+
csv_with_path = Json2::CsvWithHeader.new(input, options)
|
17
|
+
|
18
|
+
expect(csv_with_path.output).to eq csv2
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def csv
|
23
|
+
<<END
|
24
|
+
id,type
|
25
|
+
1001,Regular
|
26
|
+
1002,Chocolate
|
27
|
+
1003,Blueberry
|
28
|
+
1004,Devil's Food
|
29
|
+
END
|
30
|
+
end
|
31
|
+
|
32
|
+
def csv2
|
33
|
+
<<END
|
34
|
+
id,type
|
35
|
+
5001,None
|
36
|
+
5002,Glazed
|
37
|
+
5005,Sugar
|
38
|
+
5007,Powdered Sugar
|
39
|
+
5006,Chocolate with Sprinkles
|
40
|
+
5003,Chocolate
|
41
|
+
5004,Maple
|
42
|
+
END
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "votes.json as input" do
|
4
|
+
|
5
|
+
it 'produces the CSV' do
|
6
|
+
input = JSON.parse(File.open('spec/data/votes.json').read)
|
7
|
+
csv_without_header = Json2::CsvWithoutHeader.new(input)
|
8
|
+
expect(csv_without_header.output).to eq csv
|
9
|
+
end
|
10
|
+
|
11
|
+
def csv
|
12
|
+
<<END
|
13
|
+
Nom du parti,Abstention,Jean
|
14
|
+
Nom du parti,Non-votant,
|
15
|
+
Nom du parti,Contre,Alice
|
16
|
+
Nom du parti,Contre,Georges
|
17
|
+
Nom du parti,Pour,Julie
|
18
|
+
END
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/spec/json2_spec.rb
ADDED
data/spec/option_spec.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Json2
|
4
|
+
|
5
|
+
describe Option do
|
6
|
+
|
7
|
+
describe '--without-header' do
|
8
|
+
|
9
|
+
it 'sets the option' do
|
10
|
+
ARGV.replace(['--without-header'])
|
11
|
+
opt = Option.new
|
12
|
+
expect(opt[:without_header]).to eq true
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '--version' do
|
18
|
+
it 'exits' do
|
19
|
+
ARGV.replace(['-v'])
|
20
|
+
expect { Option.new }.to raise_error(SystemExit)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '--help' do
|
25
|
+
it 'exits' do
|
26
|
+
ARGV.replace(['-h'])
|
27
|
+
expect { Option.new }.to raise_error(SystemExit)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe 'Unknown switch' do
|
32
|
+
it 'exits' do
|
33
|
+
ARGV.replace(['-z'])
|
34
|
+
expect { Option.new }.to raise_error(SystemExit)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '--path' do
|
39
|
+
|
40
|
+
it 'is not set by default' do
|
41
|
+
ARGV.replace([])
|
42
|
+
opt = Option.new
|
43
|
+
expect(opt[:with_path]).to eq false
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'sets the option' do
|
47
|
+
ARGV.replace(["--path=batters.batter"])
|
48
|
+
opt = Option.new
|
49
|
+
expect(opt[:with_path]).to eq true
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'sets the path' do
|
53
|
+
ARGV.replace(["--path=batters.batter"])
|
54
|
+
opt = Option.new
|
55
|
+
expect(opt[:path]).to eq 'batters.batter'
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'raises an error if arg is missing' do
|
59
|
+
ARGV.replace(['-p'])
|
60
|
+
expect {
|
61
|
+
Option.new
|
62
|
+
}.to raise_error(OptionParser::MissingArgument)
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: json2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- lkdjiin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: reek
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coco
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.13.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.13.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: flay
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: |-
|
98
|
+
json2 takes a json file as input and outputs a clean
|
99
|
+
csv.
|
100
|
+
email:
|
101
|
+
- xavier.nayrac@gmail.com
|
102
|
+
executables:
|
103
|
+
- json2
|
104
|
+
extensions: []
|
105
|
+
extra_rdoc_files: []
|
106
|
+
files:
|
107
|
+
- ".coco.yml"
|
108
|
+
- ".gitignore"
|
109
|
+
- ".reek"
|
110
|
+
- ".rspec"
|
111
|
+
- ".travis.yml"
|
112
|
+
- CHANGELOG.md
|
113
|
+
- Gemfile
|
114
|
+
- LICENSE.txt
|
115
|
+
- README.md
|
116
|
+
- Rakefile
|
117
|
+
- bin/json2
|
118
|
+
- json2.gemspec
|
119
|
+
- lib/json2.rb
|
120
|
+
- lib/json2/body.rb
|
121
|
+
- lib/json2/csv_with_header.rb
|
122
|
+
- lib/json2/csv_without_header.rb
|
123
|
+
- lib/json2/header.rb
|
124
|
+
- lib/json2/option.rb
|
125
|
+
- lib/json2/symbol_respond_to.rb
|
126
|
+
- lib/json2/version.rb
|
127
|
+
- spec/body_spec.rb
|
128
|
+
- spec/csv_with_header_spec.rb
|
129
|
+
- spec/csv_without_header_spec.rb
|
130
|
+
- spec/data/README
|
131
|
+
- spec/data/colors-array.json
|
132
|
+
- spec/data/colors-object.json
|
133
|
+
- spec/data/colors2.json
|
134
|
+
- spec/data/colors3.json
|
135
|
+
- spec/data/github-user.json
|
136
|
+
- spec/data/google-maps-example.json
|
137
|
+
- spec/data/product2.json
|
138
|
+
- spec/data/products.json
|
139
|
+
- spec/data/users.json
|
140
|
+
- spec/data/vote-loi-renseignement.json
|
141
|
+
- spec/data/votes.json
|
142
|
+
- spec/header_spec.rb
|
143
|
+
- spec/integration/colors_array_spec.rb
|
144
|
+
- spec/integration/colors_object_spec.rb
|
145
|
+
- spec/integration/path_selection_spec.rb
|
146
|
+
- spec/integration/votes_spec.rb
|
147
|
+
- spec/json2_spec.rb
|
148
|
+
- spec/option_spec.rb
|
149
|
+
- spec/spec_helper.rb
|
150
|
+
homepage: https://github.com/lkdjiin/json2
|
151
|
+
licenses:
|
152
|
+
- MIT
|
153
|
+
metadata: {}
|
154
|
+
post_install_message:
|
155
|
+
rdoc_options: []
|
156
|
+
require_paths:
|
157
|
+
- lib
|
158
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
requirements: []
|
169
|
+
rubyforge_project:
|
170
|
+
rubygems_version: 2.4.5
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: Transform json to csv.
|
174
|
+
test_files:
|
175
|
+
- spec/body_spec.rb
|
176
|
+
- spec/csv_with_header_spec.rb
|
177
|
+
- spec/csv_without_header_spec.rb
|
178
|
+
- spec/data/README
|
179
|
+
- spec/data/colors-array.json
|
180
|
+
- spec/data/colors-object.json
|
181
|
+
- spec/data/colors2.json
|
182
|
+
- spec/data/colors3.json
|
183
|
+
- spec/data/github-user.json
|
184
|
+
- spec/data/google-maps-example.json
|
185
|
+
- spec/data/product2.json
|
186
|
+
- spec/data/products.json
|
187
|
+
- spec/data/users.json
|
188
|
+
- spec/data/vote-loi-renseignement.json
|
189
|
+
- spec/data/votes.json
|
190
|
+
- spec/header_spec.rb
|
191
|
+
- spec/integration/colors_array_spec.rb
|
192
|
+
- spec/integration/colors_object_spec.rb
|
193
|
+
- spec/integration/path_selection_spec.rb
|
194
|
+
- spec/integration/votes_spec.rb
|
195
|
+
- spec/json2_spec.rb
|
196
|
+
- spec/option_spec.rb
|
197
|
+
- spec/spec_helper.rb
|