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 +4 -4
- data/.gitignore +0 -1
- data/README.md +5 -2
- data/Sally.yaml +1 -1
- data/lib/quotejar/version.rb +1 -1
- data/lib/quotejar.rb +3 -2
- data/quotejar.gemspec +3 -1
- data/test/lib/quotejar/quotejar_test.rb +29 -0
- data/test/minitest_helper.rb +8 -0
- metadata +4 -3
- data/Jen.yaml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc57e023e5370b4ee1f5722c8eba89c63954463e
|
4
|
+
data.tar.gz: fd2c2bc678473ded6b2fbadeb3b2bb6ad75b66cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f15a866fa8f2c5d50566e33ea0f8b0a524b1200b7b86e54dce57c821f131b318555c0abb1d0b7db4bf5039b45a4e3e7226cd98ad9e7cbf1809fe5e80222f4ce5
|
7
|
+
data.tar.gz: 48b94e6e17244ca4c13a8843e9f8683ea72cd23d00bc6dc4417f719a56f502ec1ad4a940b4c284271cf55ba344f0543d9a9d82b96567b4645202c885c6981b1c
|
data/.gitignore
CHANGED
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
|
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/
|
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
data/lib/quotejar/version.rb
CHANGED
data/lib/quotejar.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
|
3
|
-
|
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
|
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
|
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.
|
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-
|
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
|