mayford 0.0.1.pre
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/Gemfile +4 -0
- data/bin/mayford +59 -0
- data/lib/mayford/base.rb +13 -0
- data/lib/mayford/init_mayford.rb +7 -0
- data/lib/mayford/mfd_json.rb +8 -0
- data/lib/mayford/mfd_xml.rb +8 -0
- data/lib/mayford/mfd_yml.rb +8 -0
- data/lib/mayford/version.rb +5 -0
- data/lib/mayford.rb +6 -0
- metadata +65 -0
data/Gemfile
ADDED
data/bin/mayford
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'optparse'
|
9
|
+
require 'mayford'
|
10
|
+
rescue LoadError
|
11
|
+
require 'rubygems'
|
12
|
+
require 'mayford'
|
13
|
+
end
|
14
|
+
|
15
|
+
help = <<HELP
|
16
|
+
A data structure generator.
|
17
|
+
|
18
|
+
Basic Command Line Usage:
|
19
|
+
mayford --help filename.mfd # Help
|
20
|
+
mayford --json filename.mfd # Initializes the mayford json structure.
|
21
|
+
mayford --xml filename.mfd # Initializes the mayford xml structure.
|
22
|
+
mayford --yml filename.mfd # Initializes the mayford yml structure.
|
23
|
+
|
24
|
+
HELP
|
25
|
+
|
26
|
+
file_name = ARGV[1]
|
27
|
+
|
28
|
+
exec = {}
|
29
|
+
options = {}
|
30
|
+
opts = OptionParser.new do |opts|
|
31
|
+
opts.banner = help
|
32
|
+
|
33
|
+
opts.on("--json") do
|
34
|
+
options['json'] = true
|
35
|
+
end
|
36
|
+
|
37
|
+
opts.on("--xml") do
|
38
|
+
options['xml'] = true
|
39
|
+
end
|
40
|
+
|
41
|
+
opts.on("--yml") do
|
42
|
+
options['yml'] = true
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
opts.parse!
|
48
|
+
|
49
|
+
if options['json']
|
50
|
+
init_json = InitJson.new(:file_name => file_name)
|
51
|
+
end
|
52
|
+
|
53
|
+
if options['xml']
|
54
|
+
init_xml = InitXml.new(:file_name => file_name)
|
55
|
+
end
|
56
|
+
|
57
|
+
if options['yml']
|
58
|
+
init_yml = InitYml.new(:file_name => file_name)
|
59
|
+
end
|
data/lib/mayford/base.rb
ADDED
data/lib/mayford.rb
ADDED
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mayford
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.pre
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Brian Connatser
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-18 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: &2156328100 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.5.0
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2156328100
|
25
|
+
description: A data structure generator.
|
26
|
+
email: connatser@gmail.com
|
27
|
+
executables:
|
28
|
+
- mayford
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files: []
|
31
|
+
files:
|
32
|
+
- lib/mayford.rb
|
33
|
+
- lib/mayford/init_mayford.rb
|
34
|
+
- lib/mayford/base.rb
|
35
|
+
- lib/mayford/mfd_json.rb
|
36
|
+
- lib/mayford/mfd_xml.rb
|
37
|
+
- lib/mayford/mfd_yml.rb
|
38
|
+
- lib/mayford/version.rb
|
39
|
+
- Gemfile
|
40
|
+
- bin/mayford
|
41
|
+
homepage: ''
|
42
|
+
licenses: []
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ! '>'
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 1.3.1
|
59
|
+
requirements: []
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 1.8.10
|
62
|
+
signing_key:
|
63
|
+
specification_version: 3
|
64
|
+
summary: Mayford
|
65
|
+
test_files: []
|