quotejar 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce3bb777cfe8ad55136256ed80608ec2aa5298d5
4
- data.tar.gz: 564d05d827cdf92450e92786f51b5a77b91cf680
3
+ metadata.gz: cc57e023e5370b4ee1f5722c8eba89c63954463e
4
+ data.tar.gz: fd2c2bc678473ded6b2fbadeb3b2bb6ad75b66cd
5
5
  SHA512:
6
- metadata.gz: 06deeb6f6edaaf15141f1d0cf6ebd0d32c072c034a6b9a7f7f15119359be0e604996d5c16b06c9788c698ff9797bd9b892cecaffac9138e377f5ae00666a8e03
7
- data.tar.gz: 5a600d621ea1b1fc0fb656a4dd8454090979f292d4b5d726b84a7967ff63adf860ded44fa206c5c239e40fbce0d29c23971eb7197c7b66754596173931755574
6
+ metadata.gz: f15a866fa8f2c5d50566e33ea0f8b0a524b1200b7b86e54dce57c821f131b318555c0abb1d0b7db4bf5039b45a4e3e7226cd98ad9e7cbf1809fe5e80222f4ce5
7
+ data.tar.gz: 48b94e6e17244ca4c13a8843e9f8683ea72cd23d00bc6dc4417f719a56f502ec1ad4a940b4c284271cf55ba344f0543d9a9d82b96567b4645202c885c6981b1c
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- /.yaml/
data/README.md CHANGED
@@ -14,8 +14,10 @@ all quotes saved for that child. If the child has not been stored previously,
14
14
  you will be prompted to save the child by entering the child's birthday, and
15
15
  then will be able to enter new quotes.
16
16
 
17
- Creating a new child will create a .yaml file to start that child's name, birthday and quotes.
17
+ Creating a new child will create a .yaml file to store that child's name, birthday and quotes.
18
18
  Creating new entries for an existing child will update that child's .yaml file.
19
+ Note: The .yaml file will be created in the directory where you have started your IRB session. Make sure
20
+ you use the same directory each time if you want to load previously create .yaml files.
19
21
 
20
22
  If you get booted out of the program during an IRB session, typing 'start' will begin QuoteJar again.
21
23
 
@@ -23,10 +25,11 @@ If you get booted out of the program during an IRB session, typing 'start' will
23
25
 
24
26
  - Ability to search quotes by date or age
25
27
  - Better tests
28
+ - User to specify where to store .yaml files for each child
26
29
 
27
30
  ## Contributing
28
31
 
29
- 1. Fork it ( https://github.com/[my-github-username]/quotejar/fork )
32
+ 1. Fork it ( https://github.com/jtrudell/quotejar/fork )
30
33
  2. Create your feature branch (`git checkout -b my-new-feature`)
31
34
  3. Commit your changes (`git commit -am 'Add some feature'`)
32
35
  4. Push to the branch (`git push origin my-new-feature`)
data/Sally.yaml CHANGED
@@ -1,4 +1,4 @@
1
1
  --- !ruby/object:Kids
2
2
  name: Sally
3
- birth_date: 2015-06-08 16:15:32.053664000 -05:00
3
+ birth_date: 2015-06-08 20:38:12.267471000 -05:00
4
4
  quotes: {}
@@ -1,3 +1,3 @@
1
1
  module Quotejar
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/quotejar.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'yaml'
2
- require './lib/quotejar/age.rb'
3
- require './lib/quotejar/kids.rb'
2
+ require_relative './quotejar/age.rb'
3
+ require_relative './quotejar/kids.rb'
4
4
 
5
5
  def load_kid(name) # loads kid object from .yaml file
6
6
  File.open("./#{name}.yaml", 'r') do |file|
@@ -38,3 +38,4 @@ require './lib/quotejar/kids.rb'
38
38
  create_kid(name)
39
39
  end
40
40
  end
41
+
data/quotejar.gemspec CHANGED
@@ -14,11 +14,13 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/jtrudell/quotejar"
15
15
  spec.license = "MIT"
16
16
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.files = `git ls-files`.split($/)
18
18
  spec.bindir = "exe"
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.9"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+
24
25
  end
26
+
@@ -0,0 +1,29 @@
1
+ require_relative '../../minitest_helper.rb'
2
+
3
+
4
+ # require 'minitest/autorun'
5
+ # require 'minitest/spec'
6
+ # require 'minitest/pride'
7
+ # require './quotejar'
8
+ # require './quotejar/age'
9
+ # require './quotejar/kids'
10
+ require 'time'
11
+ require 'yaml'
12
+
13
+ describe "Kids" do
14
+
15
+ before do # creates a new Kid object with the name Sally and a birthday of today
16
+ time = Time.new
17
+ @kid = Kids.new("Sally", time)
18
+ end
19
+
20
+ it "returns 'Sally' for kid.name and an empty hash for kid.quotes" do
21
+ @kid.name.must_equal "Sally"
22
+ @kid.quotes.must_equal Hash.new
23
+ end
24
+
25
+ it "responds to .save_kid and returns true in response to whether Sally.yaml exists" do
26
+ @kid.save_kid # save_kid method creates Sally.yaml for storing object
27
+ File.file?("#{@kid.name}.yaml").must_equal true
28
+ end
29
+ end
@@ -0,0 +1,8 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require_relative '../lib/quotejar.rb'
4
+ # require File.expand_path('/../lib/quotejar/age.rb')
5
+ # require File.expand_path('/../lib/quotejar/kids.rb')
6
+
7
+
8
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quotejar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jen Trudell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -49,7 +49,6 @@ files:
49
49
  - ".gitignore"
50
50
  - ".travis.yml"
51
51
  - Gemfile
52
- - Jen.yaml
53
52
  - LICENSE.txt
54
53
  - README.md
55
54
  - Rakefile
@@ -61,6 +60,8 @@ files:
61
60
  - lib/quotejar/kids.rb
62
61
  - lib/quotejar/version.rb
63
62
  - quotejar.gemspec
63
+ - test/lib/quotejar/quotejar_test.rb
64
+ - test/minitest_helper.rb
64
65
  homepage: https://github.com/jtrudell/quotejar
65
66
  licenses:
66
67
  - MIT
data/Jen.yaml DELETED
@@ -1,7 +0,0 @@
1
- --- !ruby/object:Kids
2
- name: Jen
3
- birth_date: 1978-04-03 00:00:00.000000000 -06:00
4
- quotes:
5
- 2015-06-08 16:22:02.431340000 -05:00:
6
- - hi
7
- - 37.181766751316324