widget 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gemrc ADDED
@@ -0,0 +1,8 @@
1
+ test_options:
2
+ auto_test_on_install: false
3
+ test_on_install: true
4
+ install_development_dependencies: true
5
+ test_development_dependencies: false
6
+ upload_results: true
7
+ force_install: false
8
+ force_uninstall_on_failure: false
data/.gemtest ADDED
File without changes
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ tmp/**/*
data/Gemfile CHANGED
@@ -1,12 +1,2 @@
1
1
  source "http://rubygems.org"
2
-
3
- gem "commandable", "0.2.0.beta2"
4
- gem "hashmodel", "0.4.0.beta2"
5
-
6
- group :development do
7
- gem "rspec", "2.5.0"
8
- gem "aruba", "0.3.3"
9
- gem "cucumber", "0.10.0"
10
- end
11
-
12
2
  gemspec
data/Gemfile.lock CHANGED
@@ -1,39 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- widget (0.0.1)
5
- commandable (= 0.2.0.beta2)
6
- hashmodel (= 0.4.0.beta2)
4
+ widget (0.0.3)
5
+ aruba (~> 0.3)
6
+ commandable (~> 0.2.0.rc)
7
+ cucumber (~> 0.10)
8
+ hashmodel (~> 0.4.0.rc)
9
+ rspec (~> 2.5)
7
10
 
8
11
  GEM
9
12
  remote: http://rubygems.org/
10
13
  specs:
11
- aruba (0.3.3)
12
- childprocess (~> 0.1.7)
13
- cucumber (~> 0.10)
14
- rspec (~> 2.5)
14
+ aruba (0.3.5)
15
+ childprocess (>= 0.1.7)
16
+ cucumber (>= 0.10.0)
17
+ rspec (>= 2.5.0)
15
18
  builder (3.0.0)
16
- childprocess (0.1.7)
17
- ffi (~> 0.6.3)
18
- commandable (0.2.0.beta2)
19
+ childprocess (0.1.8)
20
+ ffi (~> 1.0.6)
21
+ commandable (0.2.0.rc1)
19
22
  term-ansicolor-hi (~> 1.0.7)
20
- cucumber (0.10.0)
23
+ cucumber (0.10.2)
21
24
  builder (>= 2.1.2)
22
- diff-lcs (~> 1.1.2)
23
- gherkin (~> 2.3.2)
24
- json (~> 1.4.6)
25
- term-ansicolor (~> 1.0.5)
25
+ diff-lcs (>= 1.1.2)
26
+ gherkin (>= 2.3.5)
27
+ json (>= 1.4.6)
28
+ term-ansicolor (>= 1.0.5)
26
29
  diff-lcs (1.1.2)
27
- ffi (0.6.3)
30
+ ffi (1.0.7)
28
31
  rake (>= 0.8.7)
29
32
  file-tail (1.0.5)
30
33
  spruz (>= 0.1.0)
31
34
  gherkin (2.3.5)
32
35
  json (>= 1.4.6)
33
- hashmodel (0.4.0.beta2)
34
- file-tail
35
- sourcify
36
- json (1.4.6)
36
+ hashmodel (0.4.0.rc1)
37
+ file-tail (~> 1.0)
38
+ sourcify (~> 0.4)
39
+ json (1.5.1)
37
40
  rake (0.8.7)
38
41
  rspec (2.5.0)
39
42
  rspec-core (~> 2.5.0)
@@ -61,9 +64,4 @@ PLATFORMS
61
64
  ruby
62
65
 
63
66
  DEPENDENCIES
64
- aruba (= 0.3.3)
65
- commandable (= 0.2.0.beta2)
66
- cucumber (= 0.10.0)
67
- hashmodel (= 0.4.0.beta2)
68
- rspec (= 2.5.0)
69
67
  widget!
data/Rakefile CHANGED
@@ -1,4 +1,29 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
- task :default => [:build]
4
+ task :default => [:build]
5
+
6
+ require 'rake'
7
+ require 'rake/rdoctask'
8
+ require 'rspec/core/rake_task'
9
+ require 'cucumber/rake/task'
10
+
11
+ desc "Run all examples"
12
+ RSpec::Core::RakeTask.new(:spec) do |t|
13
+ t.rspec_opts = %w[--color]
14
+ t.verbose = true
15
+ end
16
+
17
+ Cucumber::Rake::Task.new(:cucumber) do |t|
18
+ t.cucumber_opts = %w{--tags ~@jruby} unless defined?(JRUBY_VERSION)
19
+ end
20
+
21
+ task :default => [:test, :build]
22
+ task :test =>[:cucumber, :spec]
23
+
24
+ task :clobber do
25
+ rm_rf 'pkg'
26
+ rm_rf 'tmp'
27
+ rm_rf 'coverage'
28
+ rm_rf 'rdoc'
29
+ end
data/db/hashmodel.dat CHANGED
Binary file
@@ -3,6 +3,7 @@ Before do
3
3
  File.delete(file_name) if File.exists?(file_name)
4
4
  Widget::Data.reset_instance
5
5
  @data = Widget::Data.instance
6
+ @aruba_timeout_seconds = 30
6
7
  end
7
8
 
8
9
  Given /^I have a widget named "([^"]*)"$/ do |name|
@@ -4,10 +4,10 @@ Feature: Create Widgets
4
4
  I want to be able to create a widget
5
5
 
6
6
  Scenario: Create a new widget
7
- When I run "widget new 'Widgee 5'"
7
+ When I run `widget new 'Widgee 5'`
8
8
  Then the output should contain "You created widget Widgee 5"
9
9
 
10
10
  Scenario: Try to create a widget that already exists
11
11
  Given I have a widget named "Widgee 5"
12
- When I run "widget new 'Widgee 5'"
12
+ When I run `widget new 'Widgee 5'`
13
13
  Then the output should contain "Widgee 5 already exists!"
@@ -4,15 +4,15 @@ Feature: Delete Widgets
4
4
  I want to be able delete widgets
5
5
 
6
6
  Scenario: Removing all widgets
7
- When I run "widget reset"
7
+ When I run `widget reset`
8
8
  Then the output should contain "All widgets destroyed"
9
9
 
10
10
  Scenario: Remove a widget by name
11
11
  Given I have a widget named "Widgee 5"
12
- When I run "widget destroy 'Widgee 5'"
12
+ When I run `widget destroy 'Widgee 5'`
13
13
  Then the output should contain "Widgee 5 destroyed"
14
14
 
15
15
  Scenario: Try to remove a widget that doesn't exist
16
16
  Given There are no widgets
17
- When I run "widget destroy 'Widgee 5'"
17
+ When I run `widget destroy 'Widgee 5'`
18
18
  Then the output should contain "There is no Widgee 5 in storage"
@@ -5,16 +5,16 @@ Feature: Show Widget details
5
5
 
6
6
  Scenario: Show a widget's details
7
7
  Given I have a widget named "Widgee 1"
8
- When I run "widget show 'Widgee 1'"
8
+ When I run `widget show 'Widgee 1'`
9
9
  Then the output should match /Widgee 1: created:(.*)modified(.*)/
10
10
 
11
11
  Scenario: Try to show a widget that doesn't exist
12
12
  Given There are no widgets
13
- When I run "widget show 'Widgee 1'"
13
+ When I run `widget show 'Widgee 1'`
14
14
  Then the output should contain "There is no Widgee 1 in storage"
15
15
 
16
16
  Scenario: Show all widget detail
17
17
  Given I have 5 widgets named "Widgee #{n}"
18
- When I run "widget show"
18
+ When I run `widget show`
19
19
  Then the output should contain 5 lines matching "Widgee #{n}: created:(.*)modified(.*)"
20
20
 
@@ -5,10 +5,10 @@ Feature: List Widgets
5
5
 
6
6
  Scenario: List widget names
7
7
  Given I have 5 widgets named "Widgee #{n}"
8
- When I run "widget list"
8
+ When I run `widget list`
9
9
  Then the output should contain 5 lines matching "Widgee #{n}"
10
10
 
11
11
  Scenario: Listing when there are no widgets
12
12
  Given There are no widgets
13
- When I run "widget list"
13
+ When I run `widget list`
14
14
  Then the output should contain "<none>"
@@ -5,10 +5,10 @@ Feature: Show Widget details
5
5
 
6
6
  Scenario: Upgrade a widget
7
7
  Given I have a widget named "Widgee 1"
8
- When I run "widget upgrade 'Widgee 1'"
8
+ When I run `widget upgrade 'Widgee 1'`
9
9
  Then the output should contain "You just gave Widgee 1 a fresh coat of paint!"
10
10
 
11
11
  Scenario: Try to upgrade a widget that doesn't exist
12
12
  Given There are no widgets
13
- When I run "widget upgrade 'Widgee 1'"
13
+ When I run `widget upgrade 'Widgee 1'`
14
14
  Then the output should contain "There is no Widgee 1 in storage"
@@ -6,5 +6,5 @@ Commandable.app_name = "commandable"
6
6
  Commandable.app_info =
7
7
  """
8
8
  \e[92mWidget!\e[0m - It makes stuff and things! Exclamation!
9
- Copyright (c) 2112 Richard Christy & Sal Governale
9
+ Copyright (c) 2011 Mike Bethany
10
10
  """
@@ -1,3 +1,12 @@
1
1
  module Widget
2
- VERSION = "0.0.1"
2
+ module VERSION # :nodoc:
3
+ MAJOR = 0
4
+ MINOR = 0
5
+ TINY = 3
6
+ PRE = nil
7
+
8
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
+
10
+ SUMMARY = "Widget #{STRING}"
11
+ end
3
12
  end
@@ -65,7 +65,7 @@ module Widget
65
65
  HASHMODEL_FILE = File.expand_path((File.dirname(__FILE__) + '/../../db/hashmodel.dat'))
66
66
 
67
67
  def load_widgets
68
- Marshal.load(File.open(HASHMODEL_FILE, "r"))
68
+ Marshal.load(File.open(HASHMODEL_FILE, "r"))
69
69
  end
70
70
 
71
71
  def save_widgets(widget=@widgets)
data/widget.gemspec CHANGED
@@ -4,19 +4,23 @@ require "widget/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "widget"
7
- s.version = Widget::VERSION
7
+ s.version = Widget::VERSION::STRING
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Mike Bethany"]
10
10
  s.email = ["mikbe.tk@gmail.com"]
11
11
  s.homepage = "http://mikbe.tk"
12
- s.summary = %q{A demonstration app showing how to use Commandable and HashModle}
12
+ s.summary = %q{A demonstration app showing how to use Commandable and HashModel.}
13
13
  s.description = %q{A demonstration app showing how to use Commandable and HashModel. It also serves as a test platform for fleshing out problems and designing new features for the aforementioned libraries.}
14
14
 
15
- s.add_dependency("hashmodel", "0.4.0.beta2")
16
- s.add_dependency("commandable", "0.2.0.beta2")
15
+ s.add_dependency("hashmodel", "~>0.4.0.rc")
16
+ s.add_dependency("commandable", "~>0.2.0.rc")
17
+
18
+ s.add_dependency("rspec", "~>2.5")
19
+ s.add_dependency("aruba", "~>0.3")
20
+ s.add_dependency("cucumber", "~>0.10")
17
21
 
18
22
  s.files = `git ls-files`.split("\n")
19
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
20
24
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
25
  s.require_paths = ["lib"]
22
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,26 +14,59 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hashmodel
17
- requirement: &2156171880 !ruby/object:Gem::Requirement
17
+ requirement: &2157848640 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - =
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.4.0.beta2
22
+ version: 0.4.0.rc
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156171880
25
+ version_requirements: *2157848640
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: commandable
28
- requirement: &2156171180 !ruby/object:Gem::Requirement
28
+ requirement: &2157848100 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
- - - =
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.0.beta2
33
+ version: 0.2.0.rc
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156171180
36
+ version_requirements: *2157848100
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &2157847620 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '2.5'
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *2157847620
48
+ - !ruby/object:Gem::Dependency
49
+ name: aruba
50
+ requirement: &2157847140 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: '0.3'
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *2157847140
59
+ - !ruby/object:Gem::Dependency
60
+ name: cucumber
61
+ requirement: &2157846660 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: '0.10'
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: *2157846660
37
70
  description: A demonstration app showing how to use Commandable and HashModel. It
38
71
  also serves as a test platform for fleshing out problems and designing new features
39
72
  for the aforementioned libraries.
@@ -45,14 +78,14 @@ extensions: []
45
78
  extra_rdoc_files: []
46
79
  files:
47
80
  - .DS_Store
81
+ - .gemrc
82
+ - .gemtest
48
83
  - .gitignore
49
84
  - Gemfile
50
85
  - Gemfile.lock
51
86
  - LICENCE.txt
52
87
  - README.markdown
53
88
  - Rakefile
54
- - _test/marshal.rb
55
- - _test/widget.hashmodel
56
89
  - autotest/discover.rb
57
90
  - bin/widget
58
91
  - db/hashmodel.dat
@@ -64,8 +97,6 @@ files:
64
97
  - features/widget_details.feature
65
98
  - features/widget_list_names.feature
66
99
  - features/widget_upgrade.feature
67
- - images/salandrichard.jpeg
68
- - images/salandrichard.jpg
69
100
  - lib/.DS_Store
70
101
  - lib/widget.rb
71
102
  - lib/widget/.DS_Store
@@ -100,7 +131,7 @@ rubyforge_project:
100
131
  rubygems_version: 1.6.2
101
132
  signing_key:
102
133
  specification_version: 3
103
- summary: A demonstration app showing how to use Commandable and HashModle
134
+ summary: A demonstration app showing how to use Commandable and HashModel.
104
135
  test_files:
105
136
  - features/setup/env.rb
106
137
  - features/step-definitions/step-definitions.rb
data/_test/marshal.rb DELETED
@@ -1,20 +0,0 @@
1
- require 'hashmodel'
2
-
3
- # puts hm
4
- # data = Marshal.dump(hm)
5
- #File.new("dummy.hashmodel", "r")
6
-
7
- hashmodel_file = "widget.hashmodel"
8
-
9
- hm = HashModel.new
10
- hm.add(:name=>"Phish")
11
-
12
- File.open(hashmodel_file, "w"){|file| file.write(Marshal.dump(HashModel.new))} unless File.exist?(hashmodel_file)
13
-
14
- hmo = Marshal.load(File.open(hashmodel_file, "r"))
15
-
16
- puts hmo.class
17
- puts hmo
18
-
19
- # hm.add(:name=>"Widgee 5")
20
- # put hm
Binary file
Binary file
Binary file