WhiteCloth 0.0.2

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.
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rvmrc ADDED
@@ -0,0 +1,27 @@
1
+ ruby_string="ruby-1.9.2-p180"
2
+ gemset_name="whitecloth"
3
+
4
+ if rvm list strings | grep -q "${ruby_string}" ; then
5
+
6
+ # Load or create the specified environment
7
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
8
+ && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
9
+ \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
10
+ else
11
+ rvm --create "${ruby_string}@${gemset_name}"
12
+ fi
13
+
14
+ # Ensure that Bundler is installed, install it if it is not.
15
+ if ! command -v bundle ; then
16
+ gem install bundler
17
+ fi
18
+
19
+ # Bundle while reducing excess noise.
20
+ bundle | grep -v 'Using' | grep -v 'complete' | sed '/^$/d'
21
+
22
+ else
23
+
24
+ # Notify the user to install the desired interpreter before proceeding.
25
+ echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
26
+
27
+ fi
@@ -0,0 +1,120 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{FluxTuna}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["David Love"]
12
+ s.date = %q{2011-05-16}
13
+ s.default_executable = %q{whitecloth}
14
+ s.description = %q{See: http://research.homeunix.org.uk}
15
+ s.email = %q{david@homeunix.org.uk}
16
+ s.executables = ["whitecloth"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".rvmrc",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "HISTORY",
27
+ "LICENSE",
28
+ "README.rdoc",
29
+ "Rakefile",
30
+ "VERSION",
31
+ "bin/whitecloth",
32
+ "lib/LICENSE",
33
+ "lib/WhiteCloth.rb",
34
+ "lib/whitecloth/cli.rb",
35
+ "lib/whitecloth/cli/base.rb",
36
+ "lib/whitecloth/cli/commands.rb",
37
+ "lib/whitecloth/cli/commands/bootstrap.rb",
38
+ "lib/whitecloth/cli/commands/help.rb",
39
+ "lib/whitecloth/cli/commands/show.rb",
40
+ "lib/whitecloth/cli/logger.rb",
41
+ "test/data/bayeux/Labs/Lab1/L1_Internet.byx",
42
+ "test/data/bayeux/Labs/Lab1/L1_Internet.yaml",
43
+ "test/data/bayeux/Labs/Lab2/L2_StaticR.byx",
44
+ "test/data/bayeux/Labs/Lab2/L2_StaticR.yaml",
45
+ "test/data/bayeux/Labs/Lab3/L3_DNS.byx",
46
+ "test/data/bayeux/Labs/Lab3/L3_DNS.yaml",
47
+ "test/data/bayeux/Labs/Labs.byx",
48
+ "test/data/bayeux/Labs/Labs.yaml",
49
+ "test/data/bayeux/Resources/Resources.byx",
50
+ "test/data/bayeux/Resources/Resources.yaml",
51
+ "test/data/bayeux/Welcome.byx",
52
+ "test/data/bayeux/Welcome.yaml",
53
+ "test/data/data_test.rb",
54
+ "test/dir_walk/create_witness_test.rb",
55
+ "test/init_test.rb"
56
+ ]
57
+ s.homepage = %q{http://github.com/dlove24/FluxTuna}
58
+ s.licenses = ["ISC"]
59
+ s.require_paths = ["lib"]
60
+ s.rubygems_version = %q{1.6.2}
61
+ s.summary = %q{Experimental Framework for exploiting Semi-Formal Structures}
62
+
63
+ if s.respond_to? :specification_version then
64
+ s.specification_version = 3
65
+
66
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
+ s.add_runtime_dependency(%q<algorithms>, [">= 0"])
68
+ s.add_runtime_dependency(%q<uuidtools>, [">= 0"])
69
+ s.add_runtime_dependency(%q<hiredis>, ["~> 0.3.1"])
70
+ s.add_runtime_dependency(%q<em-synchrony>, [">= 0"])
71
+ s.add_runtime_dependency(%q<redis>, ["~> 2.2.0"])
72
+ s.add_runtime_dependency(%q<cli>, [">= 0"])
73
+ s.add_runtime_dependency(%q<cri>, [">= 0"])
74
+ s.add_runtime_dependency(%q<gibberish>, [">= 0"])
75
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
76
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
77
+ s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
78
+ s.add_development_dependency(%q<vclog>, [">= 0"])
79
+ s.add_development_dependency(%q<minitest>, [">= 0"])
80
+ s.add_development_dependency(%q<rcov>, [">= 0"])
81
+ s.add_development_dependency(%q<riot>, [">= 0"])
82
+ s.add_development_dependency(%q<reek>, ["~> 1.2.8"])
83
+ else
84
+ s.add_dependency(%q<algorithms>, [">= 0"])
85
+ s.add_dependency(%q<uuidtools>, [">= 0"])
86
+ s.add_dependency(%q<hiredis>, ["~> 0.3.1"])
87
+ s.add_dependency(%q<em-synchrony>, [">= 0"])
88
+ s.add_dependency(%q<redis>, ["~> 2.2.0"])
89
+ s.add_dependency(%q<cli>, [">= 0"])
90
+ s.add_dependency(%q<cri>, [">= 0"])
91
+ s.add_dependency(%q<gibberish>, [">= 0"])
92
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
93
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
94
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
95
+ s.add_dependency(%q<vclog>, [">= 0"])
96
+ s.add_dependency(%q<minitest>, [">= 0"])
97
+ s.add_dependency(%q<rcov>, [">= 0"])
98
+ s.add_dependency(%q<riot>, [">= 0"])
99
+ s.add_dependency(%q<reek>, ["~> 1.2.8"])
100
+ end
101
+ else
102
+ s.add_dependency(%q<algorithms>, [">= 0"])
103
+ s.add_dependency(%q<uuidtools>, [">= 0"])
104
+ s.add_dependency(%q<hiredis>, ["~> 0.3.1"])
105
+ s.add_dependency(%q<em-synchrony>, [">= 0"])
106
+ s.add_dependency(%q<redis>, ["~> 2.2.0"])
107
+ s.add_dependency(%q<cli>, [">= 0"])
108
+ s.add_dependency(%q<cri>, [">= 0"])
109
+ s.add_dependency(%q<gibberish>, [">= 0"])
110
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
111
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
112
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
113
+ s.add_dependency(%q<vclog>, [">= 0"])
114
+ s.add_dependency(%q<minitest>, [">= 0"])
115
+ s.add_dependency(%q<rcov>, [">= 0"])
116
+ s.add_dependency(%q<riot>, [">= 0"])
117
+ s.add_dependency(%q<reek>, ["~> 1.2.8"])
118
+ end
119
+ end
120
+
data/Gemfile ADDED
@@ -0,0 +1,51 @@
1
+ ###
2
+ ### Sources
3
+ ###
4
+
5
+ # Main Ruby Gems site
6
+ source "http://rubygems.org"
7
+
8
+ ###
9
+ ### Core Gems. These are required in _all_ environments (additional environments
10
+ ### follow).
11
+ ###
12
+
13
+ # Additional data structures
14
+ gem "algorithms"
15
+
16
+ # GUID library
17
+ gem "uuidtools"
18
+
19
+ # Gem required for linking to the Redis server
20
+ gem "hiredis", "~> 0.3.1"
21
+ gem "em-synchrony"
22
+ gem "redis", "~> 2.2.0", :require => ["redis/connection/synchrony", "redis"]
23
+
24
+ # Command line parser
25
+ gem "cli"
26
+ gem "cri"
27
+
28
+ # Simpler access to the OpenSSL library
29
+ gem "gibberish"
30
+
31
+ ###
32
+ ### Development Gems. All _additional_ gems required by development (as opposed to
33
+ ### production environments). If it is required at run-time, it
34
+ ### belongs above.
35
+ group :development do
36
+
37
+ # Gem management tools
38
+ gem "bundler", "~> 1.0.0"
39
+ gem "jeweler", "~> 1.6.0"
40
+
41
+ # Documentation Tools
42
+ gem "yard", "~> 0.6.0"
43
+ gem "vclog"
44
+
45
+ # Testing Tools
46
+ gem "minitest", ">= 0"
47
+ gem "rcov", ">= 0"
48
+ gem "riot"
49
+ gem "reek", "~> 1.2.8"
50
+
51
+ end
@@ -0,0 +1,61 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ algorithms (0.3.0)
5
+ ansi (1.2.5)
6
+ cli (0.0.1.2)
7
+ cri (1.0.1)
8
+ em-synchrony (0.2.0)
9
+ eventmachine (>= 0.12.9)
10
+ eventmachine (0.12.10)
11
+ facets (2.9.1)
12
+ gibberish (1.0.2)
13
+ git (1.2.5)
14
+ hiredis (0.3.1)
15
+ jeweler (1.6.0)
16
+ bundler (~> 1.0.0)
17
+ git (>= 1.2.5)
18
+ rake
19
+ minitest (2.1.0)
20
+ rake (0.8.7)
21
+ rcov (0.9.9)
22
+ redis (2.2.0)
23
+ reek (1.2.8)
24
+ ruby2ruby (~> 1.2)
25
+ ruby_parser (~> 2.0)
26
+ sexp_processor (~> 3.0)
27
+ riot (0.12.3)
28
+ rr
29
+ rr (1.0.2)
30
+ ruby2ruby (1.2.5)
31
+ ruby_parser (~> 2.0)
32
+ sexp_processor (~> 3.0)
33
+ ruby_parser (2.0.6)
34
+ sexp_processor (~> 3.0)
35
+ sexp_processor (3.0.5)
36
+ uuidtools (2.1.2)
37
+ vclog (1.8.1)
38
+ ansi (>= 1.2)
39
+ facets (>= 2.4)
40
+ yard (0.6.8)
41
+
42
+ PLATFORMS
43
+ ruby
44
+
45
+ DEPENDENCIES
46
+ algorithms
47
+ bundler (~> 1.0.0)
48
+ cli
49
+ cri
50
+ em-synchrony
51
+ gibberish
52
+ hiredis (~> 0.3.1)
53
+ jeweler (~> 1.6.0)
54
+ minitest
55
+ rcov
56
+ redis (~> 2.2.0)
57
+ reek (~> 1.2.8)
58
+ riot
59
+ uuidtools
60
+ vclog
61
+ yard (~> 0.6.0)
data/HISTORY ADDED
@@ -0,0 +1,33 @@
1
+ RELEASE HISTORY
2
+
3
+ v0.0.1 / 2011-05-16
4
+
5
+ Regenerate gemspec for version 0.0.1 (David Love david@homeunix.org.uk)
6
+
7
+ Changes:
8
+
9
+ * 2 Patch Enhancements
10
+
11
+ * Regenerate the HISTORY file on version change
12
+ * Basic framework for the application added. No functionality yet.
13
+
14
+ * 2 General Enhancements
15
+
16
+ * Version bump to 0.0.1
17
+ * Initial commit to WhiteCloth.
18
+
19
+
20
+ HEAD / 2011-05-17
21
+
22
+ Current Development (David Love)
23
+
24
+ Changes:
25
+
26
+ * 1 Patch Enhancements
27
+
28
+ * Update the gemspec with the correct project information
29
+
30
+ * 1 General Enhancements
31
+
32
+ * Regenerate gemspec for version 0.0.1
33
+
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2011 David Love <david@homeunix.org.uk>
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any
4
+ purpose with or without fee is hereby granted, provided that the above
5
+ copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,20 @@
1
+ = WhiteCloth
2
+
3
+ This is an _experimental_ language framework, attempting to put my theoretical work on semi-formal structures to work. At the moment it doesn't do a lot: hopefully that will change soon.
4
+
5
+
6
+ == Contributing to WhiteCloth
7
+
8
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
9
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
10
+ * Fork the project
11
+ * Start a feature/bugfix branch
12
+ * Commit and push until you are happy with your contribution
13
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
14
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2011 David Love. See LICENSE for
19
+ further details.
20
+
@@ -0,0 +1,100 @@
1
+ # Copyright (c) 2011 David Love
2
+ #
3
+ # Permission to use, copy, modify, and/or distribute this software for
4
+ # any purpose with or without fee is hereby granted, provided that the
5
+ # above copyright notice and this permission notice appear in all copies.
6
+ #
7
+ # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
+ #
15
+ # encoding: utf-8
16
+
17
+ ###
18
+ ### Set-up. Actions to run before all tasks
19
+ ###
20
+
21
+ ## Use Bundler to make sure the gem environment is up-to-date
22
+ require 'rubygems'
23
+ require 'bundler'
24
+ begin
25
+ Bundler.setup(:default, :development)
26
+ rescue Bundler::BundlerError => e
27
+ $stderr.puts e.message
28
+ $stderr.puts "Run `bundle install` to install missing gems"
29
+ exit e.status_code
30
+ end
31
+ require 'rake'
32
+
33
+ ###
34
+ ### Gemspec. Mangage the creation of the relevant gem and gemspec files. Most of this
35
+ ### is delegated to Jeweler
36
+ ###
37
+
38
+ require 'jeweler'
39
+ Jeweler::Tasks.new do |gem|
40
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
41
+ gem.name = "WhiteCloth"
42
+ gem.homepage = "http://github.com/dlove24/WhiteCloth"
43
+ gem.license = "ISC"
44
+ gem.summary = "Experimental Framework for exploiting Semi-Formal Structures"
45
+ gem.description = "See: http://research.homeunix.org.uk"
46
+ gem.email = "david@homeunix.org.uk"
47
+ gem.authors = ["David Love"]
48
+ # dependencies defined in Gemfile
49
+ end
50
+ Jeweler::RubygemsDotOrgTasks.new
51
+
52
+ ###
53
+ ### Testing. Run the unit/system/integration tests
54
+ ###
55
+
56
+ require 'rake/testtask'
57
+
58
+ desc "Run all our tests"
59
+ task :test do
60
+ Rake::TestTask.new do |t|
61
+ t.libs << "test"
62
+ t.verbose = false
63
+
64
+ # List of files. We need to specifiy these explicity so they
65
+ # are loaded in the correct order: init, data, then the tests
66
+ # themselves
67
+ t.test_files = ["test/init_test.rb",
68
+
69
+ "test/data/data_test.rb",
70
+
71
+ "test/dir_walk/create_witness_test.rb"]
72
+ end
73
+ end
74
+
75
+ ## Set testing as the default action
76
+ task :default => :test
77
+
78
+ ###
79
+ ### Documentation. Generate/update the project documentation
80
+ ###
81
+
82
+ ## Use Yard to generate the documentations
83
+ require 'yard'
84
+ YARD::Rake::YardocTask.new
85
+
86
+ ###
87
+ ### Release. Additional actions to take when releasing the gem
88
+ ###
89
+
90
+ ## Additional actions for the release task
91
+ task :before_release do
92
+ # Update the HISTORY file
93
+ `vclog history -f gnu > HISTORY`
94
+ end
95
+
96
+ ## Update the HISTORY file before a version bump
97
+ Rake::Task["version:bump:major"].enhance([:before_release])
98
+ Rake::Task["version:bump:minor"].enhance([:before_release])
99
+ Rake::Task["version:bump:patch"].enhance([:before_release])
100
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ### Copyright (c) 2011 David Love <david@homeunix.org.uk>
4
+ ###
5
+ ### Permission to use, copy, modify, and/or distribute this software for
6
+ ### any purpose with or without fee is hereby granted, provided that the
7
+ ### above copyright notice and this permission notice appear in all copies.
8
+ ###
9
+ ### THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ ### WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ ### MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ### ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ ### WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ### ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ ### OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+ ###
17
+
18
+ ### @author David Love
19
+ ###
20
+ ### Bootstraping Command. Used to initalize various aspects of the Mercury
21
+ ### environment.
22
+ ###
23
+ ### @note The sub-commands provided by the bootstrap command assume (at-least)
24
+ ### a minimally working Ruby environment, with the required gems installed. Various
25
+ ### 'First Boot' scripts are available in the `scripts` directory for different
26
+ ### platforms which will achive at least this minimal state
27
+ ###
28
+
29
+ # Add lib to load path
30
+ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
31
+
32
+ # Load the rubygems library
33
+ require 'rubygems'
34
+
35
+ # Load core application library
36
+ require 'whitecloth'
37
+
38
+ # Load command line handler
39
+ require 'whitecloth/cli'
40
+
41
+ # Load the commands from the cmds dir
42
+ plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../cmds')
43
+
44
+ Dir[plugin_dir + '/*.rb'].sort.each{|file|
45
+ require file
46
+ }
47
+
48
+ # Run base
49
+ WhiteCloth::CLI::Base.new.run(ARGV)