sophia 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -13,27 +13,23 @@ The Git is incredible, I realy like how it works and how we use (CLI) it.
13
13
  So I decided to make a way to organize my files (why only books?) in the same
14
14
  way who Git track files. Of course not controlling versions, git already does
15
15
  this very well. Sophia consists in add files to an index and mark them with tags
16
- for when you request to the lovely librarian Sophia for 'medieval fantasy
16
+ for when you request to the lovely librarian Sophia for "medieval fantasy
17
17
  books", she can give you a list of your catalog and it is easy to identify where
18
18
  these files are.
19
19
 
20
20
  ## Installation
21
21
 
22
- Add this line to your application's Gemfile:
23
-
24
- gem 'sophia'
25
-
26
- And then execute:
22
+ $ gem install sophia
27
23
 
28
- $ bundle
24
+ ## Usage
29
25
 
30
- Or install it yourself as:
26
+ A list of commands can be listed by:
31
27
 
32
- $ gem install sophia
28
+ $ sophia
33
29
 
34
- ## Usage
30
+ or
35
31
 
36
- TODO: Write usage instructions here
32
+ $ sophia help
37
33
 
38
34
  ## Contributing
39
35
 
@@ -41,4 +37,4 @@ TODO: Write usage instructions here
41
37
  2. Create your feature branch (`git checkout -b my-new-feature`)
42
38
  3. Commit your changes (`git commit -am 'Add some feature'`)
43
39
  4. Push to the branch (`git push origin my-new-feature`)
44
- 5. Create new Pull Request
40
+ 5. Create new Pull Request
@@ -9,7 +9,7 @@ module Sophia
9
9
  def hi
10
10
  message = "Hello my owner, I'm excited to organize all books, "
11
11
  message << "texts, images or any other type of file that you have!"
12
- puts message
12
+ shell.say message
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Sophia
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -8,7 +8,9 @@ describe Sophia::Lexico do
8
8
 
9
9
  it "say hello into terminal" do
10
10
  lexico = Sophia::Lexico.new
11
- lexico.hi.downcase.should include 'hello'
11
+
12
+ message = capture(:stdout) { lexico.hi }
13
+ expect(message.downcase).to include 'hello'
12
14
  end
13
15
 
14
16
  end
@@ -2,4 +2,27 @@ $:.unshift File.expand_path('..', __FILE__)
2
2
  $:.unshift File.expand_path('../../lib', __FILE__)
3
3
  require "rubygems"
4
4
  require "test/unit"
5
- require "rspec"
5
+ require "rspec"
6
+
7
+ RSpec.configure do |config|
8
+ config.before do
9
+ ARGV.replace []
10
+ end
11
+
12
+ config.expect_with :rspec do |c|
13
+ c.syntax = :expect
14
+ end
15
+
16
+ def capture(stream)
17
+ begin
18
+ stream = stream.to_s
19
+ eval "$#{stream} = StringIO.new"
20
+ yield
21
+ result = eval("$#{stream}").string
22
+ ensure
23
+ eval("$#{stream} = #{stream.upcase}")
24
+ end
25
+
26
+ result
27
+ end
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sophia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
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: 2013-01-18 00:00:00.000000000 Z
12
+ date: 2013-01-26 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: sophia
15
15
  email: