soda_xml_team 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdd088c94b73418807eb01eb8185d64da675b0f7
4
- data.tar.gz: 358dc4c8fe43b05a03361a0f904416169f7c65b9
3
+ metadata.gz: c846596c95cb2ba0a10abd860e52ec79a1af3beb
4
+ data.tar.gz: a8a5dd6583affd46708ab97c597f30e582376d65
5
5
  SHA512:
6
- metadata.gz: 5d828d183ac7579722944ddbeed1ec4cc79651f565a26c51a4c9570aa554b9f44ad3a9225ec5bcd4474fc70e14a69450e4a8719b0dd7b20c92ec1846cdf16b72
7
- data.tar.gz: fa15a7711f5c0b9393e046782bb46a0056b1315f48b3bc0d4879bff85b02644222bc29d297d32f31612b20d935ae9d2c0b34502baaa0406d3de22ac9afafe538
6
+ metadata.gz: ef7b4409a4e5b0504a339869c5911639056a7ae3257eeee216b0a3319704df6407d34ec31378ca4875f94fd72158475c0895b2af4887a8f304ecfdec9e64d640
7
+ data.tar.gz: 722d5618aed563516cbc869e0e80b0241daa6465cd5da9aceff88f59be19d5986040e3848ecd09d8e94833f2ce791ae08c19b4b34b132befa90ed93c93b26508
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'nokogiri'
4
+ require 'json'
4
5
 
5
6
  # Arguments
6
7
  file = "#{ARGV[0]}" || nil
8
+ format = "#{ARGV[1]}" || nil
7
9
 
8
10
  if file.nil? || file == ''
9
- puts 'Usage: soda-league-directory path-to-file.xml'
11
+ puts 'Usage: soda-league-directory path-to-file.xml [json|ruby]'
10
12
  Kernel.exit(false)
11
13
  end
12
14
 
@@ -56,6 +58,9 @@ File.open("#{ARGV[0]}", 'r') do |io|
56
58
  final_output << object
57
59
  end
58
60
 
59
- puts final_output.to_s
60
-
61
+ if format == '' || format == 'ruby'
62
+ puts final_output.to_s
63
+ else
64
+ puts JSON.generate(final_output).to_s
65
+ end
61
66
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # SODA XML Team module
3
3
  module SodaXmlTeam
4
- VERSION = '1.4.0'
4
+ VERSION = '1.4.1'
5
5
  end
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency 'nokogiri', '>= 1.6.3'
27
27
  spec.add_dependency 'httparty', '>= 0.13'
28
+ spec.add_dependency 'json', '>= 1.7.7'
28
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soda_xml_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Yeargin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.13'
97
+ - !ruby/object:Gem::Dependency
98
+ name: json
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.7.7
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 1.7.7
97
111
  description: A basic layer for interacting with XML Team's Sports On Demand API (SODA)
98
112
  email:
99
113
  - stephen@seatsha.re