sparky 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.
@@ -0,0 +1,13 @@
1
+ class Sparky
2
+ # Shortcut for Lorem.create
3
+ #
4
+ # Example:
5
+ # Lorem(:words, 10)
6
+ def self.lorem (type = :sentences, count = 1)
7
+ Lorem.create(type, count)
8
+ end
9
+
10
+ def self.name
11
+ Name.create
12
+ end
13
+ end
@@ -0,0 +1,19 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Sparky::Lorem do
4
+ it "should respond to #create" do
5
+ Sparky::Lorem.should respond_to( :create )
6
+ end
7
+
8
+ it "should have a total_words count for the classic Lorem ipsum passage" do
9
+ Sparky::Lorem.total_words.should == 249
10
+ end
11
+
12
+ it "should default to one sentence of Lorem" do
13
+ # Since this crap is random this is the best way
14
+ sentence = Sparky::Lorem.create
15
+ sentence.should_not be_nil
16
+ sentence.should be_a_kind_of( String )
17
+ ['.', '!', '?', '...'].should include( sentence[sentence.length - 1, 1] )
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Sparky do
4
+ it "should respond to #lorem" do
5
+ Sparky.should respond_to( :lorem )
6
+ end
7
+
8
+ it "should respond to #name" do
9
+ Sparky.should respond_to( :name )
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'sparky'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sparky
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jason Campbell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-11-17 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.2.9
24
+ version:
25
+ description: Light it up sparky! Random text (lorem ipsum), numbers, and names that at least look real..
26
+ email: jason@greatergood.cc
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - LICENSE
33
+ - README.rdoc
34
+ files:
35
+ - lib/sparky.rb
36
+ - lib/sparky/lorem.rb
37
+ - lib/sparky/name.rb
38
+ - lib/sparky/names/first_names.rb
39
+ - lib/sparky/names/last_names.rb
40
+ - lib/sparky/sparky.rb
41
+ - LICENSE
42
+ - README.rdoc
43
+ has_rdoc: true
44
+ homepage: http://github.com/jxson/sparky
45
+ licenses: []
46
+
47
+ post_install_message:
48
+ rdoc_options:
49
+ - --charset=UTF-8
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project:
67
+ rubygems_version: 1.3.5
68
+ signing_key:
69
+ specification_version: 3
70
+ summary: What do you call a dog with no back legs and metal nuts?
71
+ test_files:
72
+ - spec/sparky/lorem_spec.rb
73
+ - spec/sparky/sparky_spec.rb
74
+ - spec/spec_helper.rb