flowheart 0.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,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in flowheart.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/flowheart.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "flowheart/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "flowheart"
7
+ s.version = Flowheart::VERSION
8
+ s.authors = ["cookiebatch"]
9
+ s.email = ["keymint1498@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Flowcharts}
12
+ s.description = %q{flowcharts}
13
+
14
+ s.rubyforge_project = "flowheart"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ s.add_development_dependency "rspec"
23
+ # s.add_runtime_dependency "rest-client"
24
+ end
data/lib/flowheart.rb ADDED
@@ -0,0 +1,26 @@
1
+ require "flowheart/version"
2
+
3
+ module Flow
4
+ class Chart
5
+ def initialize(name)
6
+ $name = name
7
+ $steps = []
8
+ end
9
+ end
10
+
11
+ module Heart
12
+ def newstep(chart, step)
13
+ $fullstep = step.to_s
14
+ $steps.push($fullstep)
15
+ end
16
+
17
+ def run(stepname, resp)
18
+ fs = stepname.to_s
19
+ if resp == 'yes'
20
+ [].delete(fs)
21
+ else
22
+ truesies = false
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module Flowheart
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,19 @@
1
+ require 'flowheart'
2
+ include Flow
3
+ include Flow::Heart
4
+
5
+ describe 'It' do
6
+ it 'creates flowcharts' do
7
+ @chart = Flow::Chart.new('pour milk')
8
+ end
9
+
10
+ it 'creates steps' do
11
+ @chart.newstep(@chart, 'Grab milk')
12
+ @chart.newstep(@chart, 'tilt hand')
13
+ end
14
+
15
+ it 'runs steps' do
16
+ step1 = @chart.run('grab milk', 'yes')
17
+ step2 = @chart.run('tilt hand', 'yes')
18
+ end
19
+ end
@@ -0,0 +1 @@
1
+ require 'flowheart'
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flowheart
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - cookiebatch
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &2156230800 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *2156230800
25
+ description: flowcharts
26
+ email:
27
+ - keymint1498@gmail.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - Rakefile
35
+ - flowheart.gemspec
36
+ - lib/flowheart.rb
37
+ - lib/flowheart/version.rb
38
+ - spec/flowheart_spec.rb
39
+ - spec/spec_helper.rb
40
+ homepage: ''
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project: flowheart
60
+ rubygems_version: 1.8.10
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: Flowcharts
64
+ test_files:
65
+ - spec/flowheart_spec.rb
66
+ - spec/spec_helper.rb