chaos_scenario 0.1

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/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ *.gem
2
+ bundle
3
+ Gemfile.lock
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Chaos Scenario
2
+
3
+ A random scenario generator.
@@ -0,0 +1,10 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "chaos_scenario"
3
+ s.version = "0.1"
4
+ s.authors = ["Paul Meskers"]
5
+ s.email = ["paul@paulmeskers.com"]
6
+ s.files = `git ls-files`.split("\n")
7
+ s.summary = "Generate random scenarios or plots."
8
+
9
+ s.license = "MIT"
10
+ end
@@ -0,0 +1,15 @@
1
+ module ChaosScenario
2
+ module Generator
3
+ extend self
4
+
5
+ def create_scenario
6
+ puts "A #{protagonist} #{placement} #{location} #{goal}"
7
+ end
8
+
9
+ def method_missing classifier
10
+ list = YAML.load_file("#{ROOT_PATH}/data/#{classifier}s.yml")
11
+ list["#{classifier}s"].sample
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ require 'yaml'
2
+ require 'pathname'
3
+
4
+ module ChaosScenario
5
+ ROOT_PATH = Pathname.new(__FILE__).dirname
6
+
7
+ autoload :Generator, 'chaos_scenario/generator'
8
+
9
+ def self.ensue
10
+ puts ROOT_PATH
11
+ Generator.create_scenario
12
+ end
13
+
14
+ end
@@ -0,0 +1,3 @@
1
+ goals:
2
+ - looking for love
3
+ - trying to get home
@@ -0,0 +1,4 @@
1
+ locations:
2
+ - a nether world
3
+ - the ruins of an ancient civilization
4
+ - abandoned subway tunnels
@@ -0,0 +1,5 @@
1
+ placements:
2
+ - amidst
3
+ - in the depths of
4
+ - at the edge of
5
+ - hiding in
@@ -0,0 +1,4 @@
1
+ protagonists:
2
+ - man
3
+ - goat
4
+ - wizard
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chaos_scenario
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ version: "0.1"
9
+ platform: ruby
10
+ authors:
11
+ - Paul Meskers
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2012-09-30 00:00:00 -04:00
17
+ default_executable:
18
+ dependencies: []
19
+
20
+ description:
21
+ email:
22
+ - paul@paulmeskers.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - .gitignore
31
+ - README.md
32
+ - chaos_scenario.gemspec
33
+ - lib/chaos_scenario.rb
34
+ - lib/chaos_scenario/generator.rb
35
+ - lib/data/goals.yml
36
+ - lib/data/locations.yml
37
+ - lib/data/placements.yml
38
+ - lib/data/protagonists.yml
39
+ has_rdoc: true
40
+ homepage:
41
+ licenses:
42
+ - MIT
43
+ post_install_message:
44
+ rdoc_options: []
45
+
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ segments:
53
+ - 0
54
+ version: "0"
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.3.6
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Generate random scenarios or plots.
69
+ test_files: []
70
+