rasskey 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile CHANGED
@@ -1,4 +1,14 @@
1
1
  source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
2
5
 
3
- # Specify your gem's dependencies in rasskey.gemspec
4
- gemspec
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "rspec", "~> 2.1.0"
10
+ gem "cucumber", ">= 0"
11
+ gem "bundler", "~> 1.0.0"
12
+ gem "jeweler", "~> 1.5.1"
13
+ gem "rcov", ">= 0"
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,41 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ builder (2.1.2)
5
+ cucumber (0.9.4)
6
+ builder (~> 2.1.2)
7
+ diff-lcs (~> 1.1.2)
8
+ gherkin (~> 2.2.9)
9
+ json (~> 1.4.6)
10
+ term-ansicolor (~> 1.0.5)
11
+ diff-lcs (1.1.2)
12
+ gherkin (2.2.9)
13
+ json (~> 1.4.6)
14
+ term-ansicolor (~> 1.0.5)
15
+ git (1.2.5)
16
+ jeweler (1.5.1)
17
+ bundler (~> 1.0.0)
18
+ git (>= 1.2.5)
19
+ rake
20
+ json (1.4.6)
21
+ rake (0.8.7)
22
+ rcov (0.9.9)
23
+ rspec (2.1.0)
24
+ rspec-core (~> 2.1.0)
25
+ rspec-expectations (~> 2.1.0)
26
+ rspec-mocks (~> 2.1.0)
27
+ rspec-core (2.1.0)
28
+ rspec-expectations (2.1.0)
29
+ diff-lcs (~> 1.1.2)
30
+ rspec-mocks (2.1.0)
31
+ term-ansicolor (1.0.5)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ bundler (~> 1.0.0)
38
+ cucumber
39
+ jeweler (~> 1.5.1)
40
+ rcov
41
+ rspec (~> 2.1.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 John E. Vincent
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,2 +1,53 @@
1
+ require 'rubygems'
1
2
  require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "rasskey"
16
+ gem.homepage = "http://github.com/lusis/rasskey"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{Small Ruby library for ASCII drawing}
19
+ gem.description = %Q{Small Ruby library for ASCII drawing}
20
+ gem.email = "lusis.org+rubygems.org@gmail.com"
21
+ gem.authors = ["lusis"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rspec/core'
30
+ require 'rspec/core/rake_task'
31
+ RSpec::Core::RakeTask.new(:spec) do |spec|
32
+ spec.pattern = FileList['spec/**/*_spec.rb']
33
+ end
34
+
35
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
36
+ spec.pattern = 'spec/**/*_spec.rb'
37
+ spec.rcov = true
38
+ end
39
+
40
+ require 'cucumber/rake/task'
41
+ Cucumber::Rake::Task.new(:features)
42
+
43
+ task :default => :spec
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "rasskey #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.5
@@ -0,0 +1,9 @@
1
+ Feature: something something
2
+ In order to something something
3
+ A user something something
4
+ something something something
5
+
6
+ Scenario: something something
7
+ Given inspiration
8
+ When I create a sweet new gem
9
+ Then everyone should see how awesome I am
File without changes
@@ -0,0 +1,13 @@
1
+ require 'bundler'
2
+ begin
3
+ Bundler.setup(:default, :development)
4
+ rescue Bundler::BundlerError => e
5
+ $stderr.puts e.message
6
+ $stderr.puts "Run `bundle install` to install missing gems"
7
+ exit e.status_code
8
+ end
9
+
10
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
11
+ require 'rasskey'
12
+
13
+ require 'rspec/expectations'
data/rasskey.gemspec CHANGED
@@ -1,21 +1,76 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
1
4
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "rasskey/version"
4
5
 
5
6
  Gem::Specification.new do |s|
6
- s.name = "rasskey"
7
- s.version = Rasskey::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["lusis"]
10
- s.email = ["lusis.org+rubygems.org@gmail.com"]
11
- s.homepage = "http://github.com/lusis/rasskey"
12
- s.summary = %q{Small Ruby Library for ASCII drawing}
13
- s.description = %q{Small Ruby Library for ASCII drawing}
7
+ s.name = %q{rasskey}
8
+ s.version = "0.0.5"
14
9
 
15
- s.rubyforge_project = "rasskey"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["lusis"]
12
+ s.date = %q{2010-11-29}
13
+ s.description = %q{Small Ruby library for ASCII drawing}
14
+ s.email = %q{lusis.org+rubygems.org@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "features/rasskey.feature",
29
+ "features/step_definitions/rasskey_steps.rb",
30
+ "features/support/env.rb",
31
+ "lib/rasskey.rb",
32
+ "lib/rasskey/box.rb",
33
+ "lib/rasskey/extensions/string.rb",
34
+ "lib/rasskey/version.rb",
35
+ "rasskey.gemspec",
36
+ "spec/rasskey_box_spec.rb",
37
+ "spec/rasskey_string_spec.rb",
38
+ "spec/spec_helper.rb"
39
+ ]
40
+ s.homepage = %q{http://github.com/lusis/rasskey}
41
+ s.licenses = ["MIT"]
20
42
  s.require_paths = ["lib"]
43
+ s.rubygems_version = %q{1.3.7}
44
+ s.summary = %q{Small Ruby library for ASCII drawing}
45
+ s.test_files = [
46
+ "spec/rasskey_box_spec.rb",
47
+ "spec/rasskey_string_spec.rb",
48
+ "spec/spec_helper.rb"
49
+ ]
50
+
51
+ if s.respond_to? :specification_version then
52
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
+ s.specification_version = 3
54
+
55
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
+ s.add_development_dependency(%q<rspec>, ["~> 2.1.0"])
57
+ s.add_development_dependency(%q<cucumber>, [">= 0"])
58
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
59
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
60
+ s.add_development_dependency(%q<rcov>, [">= 0"])
61
+ else
62
+ s.add_dependency(%q<rspec>, ["~> 2.1.0"])
63
+ s.add_dependency(%q<cucumber>, [">= 0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<rspec>, ["~> 2.1.0"])
70
+ s.add_dependency(%q<cucumber>, [">= 0"])
71
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
72
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
73
+ s.add_dependency(%q<rcov>, [">= 0"])
74
+ end
21
75
  end
76
+
@@ -0,0 +1,28 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Rasskey::Box" do
4
+ it "should return a RassKey::Box object" do
5
+ box = RassKey::Box.new
6
+ box.padding.should == 1
7
+ box.glyph.should == "*"
8
+ box.caption.should == nil
9
+ box.instance_of?(RassKey::Box).should be_true
10
+ end
11
+
12
+ it "should draw the default box with text 'test'" do
13
+ box = RassKey::Box.new
14
+ box.draw("test").should == "********\n* test *\n********"
15
+ end
16
+
17
+ it "should accept an option hash " do
18
+ box = RassKey::Box.new :padding => 10, :glyph => "#"
19
+ box.draw("test").should == "##########################\n# #\n# #\n# #\n# #\n# #\n# test #\n# #\n# #\n# #\n# #\n# #\n##########################"
20
+ end
21
+
22
+ it "should accept attr_accessors" do
23
+ box = RassKey::Box.new
24
+ box.padding = 3
25
+ box.glyph = "%"
26
+ box.draw("test").should == "%%%%%%%%%%%%\n% %\n% test %\n% %\n%%%%%%%%%%%%"
27
+ end
28
+ end
@@ -0,0 +1,15 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Rasskey::String" do
4
+
5
+ it "should draw the default box with text 'test'" do
6
+ mystr = "test"
7
+ mystr.to_box.should == "********\n* test *\n********"
8
+ end
9
+
10
+ it "should accept an option hash " do
11
+ mystr = "test"
12
+ mystr.to_box({:padding => 10, :glyph => "#"}).should == "##########################\n# #\n# #\n# #\n# #\n# #\n# test #\n# #\n# #\n# #\n# #\n# #\n##########################"
13
+ end
14
+
15
+ end
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'rasskey'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasskey
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - lusis
@@ -15,33 +15,118 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-28 00:00:00 -05:00
18
+ date: 2010-11-29 00:00:00 -05:00
19
19
  default_executable:
20
- dependencies: []
21
-
22
- description: Small Ruby Library for ASCII drawing
23
- email:
24
- - lusis.org+rubygems.org@gmail.com
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ prerelease: false
23
+ name: rspec
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 11
30
+ segments:
31
+ - 2
32
+ - 1
33
+ - 0
34
+ version: 2.1.0
35
+ requirement: *id001
36
+ type: :development
37
+ - !ruby/object:Gem::Dependency
38
+ prerelease: false
39
+ name: cucumber
40
+ version_requirements: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ requirement: *id002
50
+ type: :development
51
+ - !ruby/object:Gem::Dependency
52
+ prerelease: false
53
+ name: bundler
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 23
60
+ segments:
61
+ - 1
62
+ - 0
63
+ - 0
64
+ version: 1.0.0
65
+ requirement: *id003
66
+ type: :development
67
+ - !ruby/object:Gem::Dependency
68
+ prerelease: false
69
+ name: jeweler
70
+ version_requirements: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ hash: 1
76
+ segments:
77
+ - 1
78
+ - 5
79
+ - 1
80
+ version: 1.5.1
81
+ requirement: *id004
82
+ type: :development
83
+ - !ruby/object:Gem::Dependency
84
+ prerelease: false
85
+ name: rcov
86
+ version_requirements: &id005 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ requirement: *id005
96
+ type: :development
97
+ description: Small Ruby library for ASCII drawing
98
+ email: lusis.org+rubygems.org@gmail.com
25
99
  executables: []
26
100
 
27
101
  extensions: []
28
102
 
29
- extra_rdoc_files: []
30
-
103
+ extra_rdoc_files:
104
+ - LICENSE.txt
105
+ - README.md
31
106
  files:
32
- - .gitignore
107
+ - .document
108
+ - .rspec
33
109
  - Gemfile
110
+ - Gemfile.lock
111
+ - LICENSE.txt
34
112
  - README.md
35
113
  - Rakefile
114
+ - VERSION
115
+ - features/rasskey.feature
116
+ - features/step_definitions/rasskey_steps.rb
117
+ - features/support/env.rb
36
118
  - lib/rasskey.rb
37
119
  - lib/rasskey/box.rb
38
120
  - lib/rasskey/extensions/string.rb
39
121
  - lib/rasskey/version.rb
40
122
  - rasskey.gemspec
123
+ - spec/rasskey_box_spec.rb
124
+ - spec/rasskey_string_spec.rb
125
+ - spec/spec_helper.rb
41
126
  has_rdoc: true
42
127
  homepage: http://github.com/lusis/rasskey
43
- licenses: []
44
-
128
+ licenses:
129
+ - MIT
45
130
  post_install_message:
46
131
  rdoc_options: []
47
132
 
@@ -67,10 +152,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
152
  version: "0"
68
153
  requirements: []
69
154
 
70
- rubyforge_project: rasskey
155
+ rubyforge_project:
71
156
  rubygems_version: 1.3.7
72
157
  signing_key:
73
158
  specification_version: 3
74
- summary: Small Ruby Library for ASCII drawing
75
- test_files: []
76
-
159
+ summary: Small Ruby library for ASCII drawing
160
+ test_files:
161
+ - spec/rasskey_box_spec.rb
162
+ - spec/rasskey_string_spec.rb
163
+ - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- pkg/*
2
- *.gem
3
- .bundle
4
- *.swp