quotey 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- quotey (0.0.1)
4
+ quotey (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  diff-lcs (1.1.3)
10
+ rake (0.9.2.2)
10
11
  rspec (2.11.0)
11
12
  rspec-core (~> 2.11.0)
12
13
  rspec-expectations (~> 2.11.0)
@@ -21,4 +22,5 @@ PLATFORMS
21
22
 
22
23
  DEPENDENCIES
23
24
  quotey!
25
+ rake
24
26
  rspec (~> 2.11)
data/README.md CHANGED
@@ -35,6 +35,12 @@ Want to make sure you get a fresh quote everytime? Worry not!
35
35
 
36
36
  Note that once Quotey finishes the list it re-reads the file that was given during the instantiation.
37
37
 
38
+
39
+ ## Future plans / TODO
40
+ * Consider using Thor for the CLI interface
41
+ * Consider switching the class interface to class methods/variables
42
+ * CLI testing (using Aruba or RSpec)
43
+
38
44
  ## Contributing
39
45
 
40
46
  1. Fork it
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'quotey'
4
+ require 'optparse'
5
+
6
+ options = {}
7
+ options[:amount] = 1
8
+
9
+ OptionParser.new do |opts|
10
+ opts.on("-f", "--file FILENAME", "File to import quotes from") do |file|
11
+ options[:file] = file
12
+ end
13
+
14
+ opts.on("-u","--[no-]repeat","Don't repeat quotes") do |u|
15
+ options[:no_repeat] = u
16
+ end
17
+
18
+ opts.on("-n NUMBER","--num NUMBER",Integer,"specify number of quotes to generate") do |n|
19
+ options[:amount] = n
20
+ end
21
+
22
+ opts.on_tail("-h", "--help", "Show Help") do
23
+ puts opts
24
+ exit
25
+ end
26
+ end.parse!
27
+
28
+ my_quote_object = Quotey::Quoter.new(options)
29
+
30
+ options[:amount].times do
31
+ puts my_quote_object.get_quote
32
+ end
33
+
@@ -1,3 +1,3 @@
1
1
  module Quotey
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -4,7 +4,7 @@ require File.expand_path('../lib/quotey/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["psychocandy"]
6
6
  gem.email = ["amirf@null.co.il"]
7
- gem.description = %q{Quotey - A gem to generate random quotes}
7
+ gem.description = %q{Quotey - A gem for generating random quotes }
8
8
  gem.summary = %q{Generate random quotes for fun & profit}
9
9
  gem.homepage = ""
10
10
 
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Quotey::VERSION
17
17
 
18
18
  gem.add_development_dependency "rspec", "~> 2.11"
19
+ gem.add_development_dependency "rake"
19
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quotey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-29 00:00:00.000000000 Z
12
+ date: 2012-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -27,10 +27,27 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.11'
30
- description: Quotey - A gem to generate random quotes
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: ! 'Quotey - A gem for generating random quotes '
31
47
  email:
32
48
  - amirf@null.co.il
33
- executables: []
49
+ executables:
50
+ - quotey
34
51
  extensions: []
35
52
  extra_rdoc_files: []
36
53
  files:
@@ -41,6 +58,7 @@ files:
41
58
  - LICENSE
42
59
  - README.md
43
60
  - Rakefile
61
+ - bin/quotey
44
62
  - lib/quotey.rb
45
63
  - lib/quotey/misc_quotes.txt
46
64
  - lib/quotey/quoter.rb
@@ -60,12 +78,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
78
  - - ! '>='
61
79
  - !ruby/object:Gem::Version
62
80
  version: '0'
81
+ segments:
82
+ - 0
83
+ hash: -3822855582586132815
63
84
  required_rubygems_version: !ruby/object:Gem::Requirement
64
85
  none: false
65
86
  requirements:
66
87
  - - ! '>='
67
88
  - !ruby/object:Gem::Version
68
89
  version: '0'
90
+ segments:
91
+ - 0
92
+ hash: -3822855582586132815
69
93
  requirements: []
70
94
  rubyforge_project:
71
95
  rubygems_version: 1.8.23