nikki 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bfaba939a9d1ab7eb954a7754a33e6d8c2a84d6a
4
- data.tar.gz: df88a5fe6e5a501c95e4ce08eecee69ad627cd41
3
+ metadata.gz: 3af1b34692ff19d9c2da510c3cd4296ec5283e4c
4
+ data.tar.gz: e1ca1aa574afb7d2d01d43fc157f32c1aa46e9c4
5
5
  SHA512:
6
- metadata.gz: 5fa450eb8394858b22cf2da1f1048e02ea1430ac90a20d28284788f444b3db4e8cab33137ffadcc133a56073ddb0263511cf846ed4efef0d4b38200fd524ddbf
7
- data.tar.gz: b947019300adc5c52985db99e1e6c88e6cc3f6e9231971f41c841e5eb1492aacdc81aed0019788bc483df779c56ceca40b5da148615bc6ef11cb6f59f6ab316a
6
+ metadata.gz: 608f65b0730f0c3bed2e61c514de86b31dc1a4c9e1830ee5b4f7d735fd8fdd225640785680e5749b34c675ee52167c6c58c1c97ac8e876ac9551c8446aa45ffd
7
+ data.tar.gz: 0b85588e5f356e7943d8d18be449294822918e7e4a5f08571f27d1bef5256aed0689e87fe3146ab3a3e64716b57686b59f12efcb5cadea22194f858dddbdc51c
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
- <<<<<<< HEAD
2
1
  *.gem
3
2
  *.rbc
4
3
  .bundle
@@ -16,6 +15,5 @@ spec/reports
16
15
  test/tmp
17
16
  test/version_tmp
18
17
  tmp
19
- =======
20
18
  .codekit
21
- >>>>>>> f81665bccd16c1a42bab86632a3bf9fd4d080625
19
+ .DS_STORE
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/nikki.png)](http://badge.fury.io/rb/nikki)
2
+ [![Inline docs](http://inch-pages.github.io/github/brandonpittman/nikki.png)](http://inch-pages.github.io/github/brandonpittman/nikki)
2
3
 
3
4
  # nikki
4
5
 
data/Rakefile CHANGED
@@ -1,15 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
+ require "rspec/core/rake_task"
3
4
  require 'cucumber'
4
5
  require 'cucumber/rake/task'
5
6
 
6
- Rake::TestTask.new do |t|
7
- t.libs << 'test'
8
- t.test_files = FileList['test/*.rb']
9
- end
7
+ RSpec::Core::RakeTask.new(:spec)
10
8
 
11
9
  Cucumber::Rake::Task.new(:features) do |t|
12
10
  t.cucumber_opts = "features --format pretty"
13
11
  end
14
12
 
15
- task(default: :test)
13
+ task(default: :spec)
data/bin/nikki CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require File.dirname(__FILE__) + '/../lib/nikki.rb'
4
4
 
5
- Nikki::Generator.start(ARGV)
5
+ Generator.start(ARGV)
@@ -1,27 +1,13 @@
1
- @entry_creation
2
1
  Feature: Add a new entry to the journal
2
+ As someone keepings a daily one-line journal
3
+ I want to be able to be able to save a new line with the day of the month next to it.
3
4
 
4
- Because I'm keeping a daily one-line journal, I want to be able to be able to save a new line with the day of the month next to it.
5
-
6
- Background:
7
- Given I have a journal file
8
-
9
- @file_creation
10
5
  Scenario: I haven't created a journal file
11
- When the journal file can't be found
6
+ Given the file "nikki_2014.yaml" should not exist
12
7
  Then a file should be created
13
- And my journal entry saved
14
-
15
- Scenario: I have a journal file and it's the first of the month
16
- When it's the first of the month
17
- Then the name of the month as an H2 header should be appended
18
- And and my entry should be saved
19
-
20
- Scenario: I have a journal file and it's *not* the first of the month
21
- When it's not the first of the month
22
- Then my entry should be appended along with the day of the month
8
+ And an empty file named "nikki_2014.yaml"
9
+ And a file named "nikki_2014.yaml" should exist
23
10
 
24
- @missed_day
25
11
  Scenario: I didn't update the journal yesterday
26
- When the mtime of the journal isn't yesterday
27
- Then the journal should open in my editor
12
+ Given :last_updated isn't yesterday
13
+ Then the file "nikki_2014.yaml" should open in my editor
@@ -0,0 +1,8 @@
1
+ Feature: Look up random journal entry
2
+ As a curious person
3
+ I want to look up random journal entries
4
+
5
+ Scenario: look up random entry
6
+ Given a file named "nikki.yaml"
7
+ When I run random
8
+ Then STDOUT should match "\d{4}-\d{2}-\d{2}: .+\."
@@ -2,51 +2,24 @@ require "time"
2
2
  require "pathname"
3
3
  require "nikki"
4
4
 
5
- include Nikki
5
+ class Journal
6
+ def last_updated
7
+ Date.today
8
+ end
6
9
 
7
- Given(/^I have a journal file$/) do
8
- @nikki = Generator.new
9
- @file = @nikki.file
10
- FileUtils.touch(@file) unless @file.exist?
10
+ def yesterday
11
+ Date.today - 1
12
+ end
11
13
  end
12
14
 
13
- When(/^the journal file can't be found$/) do
14
- FileUtils.rm(@file) if File.exist?(@file)
15
- end
15
+ journal = Journal.new
16
16
 
17
17
  Then(/^a file should be created$/) do
18
- FileUtils.touch(@file)
19
- end
20
-
21
- Then(/^(my journal entry) saved$/) do |arg|
22
- File.open(@file,"a") { |f| f.puts @nikki.text(arg) }
23
- end
24
-
25
- When(/^it's the first of the month$/) do
26
- @first = Date.new(2014,2,1)
27
- end
28
-
29
- Then(/^the name of the month as an H2 header should be appended$/) do
30
- File.open(@file, "a") { |file| file.puts "\n## #{@first.strftime("%B").strip}\n\n" }
31
- end
32
-
33
- Then(/^and my (entry) should be saved$/) do |arg|
34
- File.open(@file, "a") { |file| file.puts "#{@first.strftime("%e").strip}. #{arg}" }
35
- end
36
-
37
- When(/^it's not the first of the month$/) do
38
- @not_first = Date.new(2014,2,2)
39
- end
40
-
41
- Then(/^my (entry) should be appended along with the day of the month$/) do |arg|
42
- File.open(@file, "a") { |file| file.puts "#{@not_first.strftime("%e").strip}. #{arg}" }
43
18
  end
44
19
 
45
- When(/^the mtime of the journal isn't yesterday$/) do
46
- today = Date.today
47
- @file.mtime.to_date != Date.today-1
20
+ Given(/^:last_updated isn't yesterday$/) do
21
+ journal.last_updated != journal.yesterday
48
22
  end
49
23
 
50
- Then(/^the journal should open in my editor$/) do
51
- %x{open -a 'Sublime Text' #{@file}}
24
+ Then(/^the file "(.*?)" should open in my editor$/) do |arg|
52
25
  end
@@ -0,0 +1,11 @@
1
+ Given(/^a file named "(.*?)"$/) do |arg1|
2
+ pending
3
+ end
4
+
5
+ When(/^I run random$/) do
6
+ pending # express the regexp above with the code you wish you had
7
+ end
8
+
9
+ Then(/^STDOUT should match "(.*?)"$/) do |arg1|
10
+ pending # express the regexp above with the code you wish you had
11
+ end
@@ -1,5 +1,8 @@
1
- # require "aruba/cucumber"
2
- # require "fileutils"
1
+ $LOAD_PATH << File.expand_path('../../../lib', __FILE__)
2
+
3
+ require "aruba/cucumber"
4
+ require "fileutils"
5
+ require "cucumber/rspec/doubles"
3
6
 
4
7
  # Before do
5
8
  # @real_home = ENV['HOME']
@@ -10,4 +13,4 @@
10
13
 
11
14
  # After do
12
15
  # ENV['HOME'] = @real_home
13
- # end
16
+ # end
data/lib/nikki/version.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # Sets version for RubyGems
1
2
  module Nikki
2
- VERSION = "0.2.0"
3
+ # Sets version for RubyGems
4
+ VERSION = "0.4.0"
3
5
  end
data/lib/nikki.rb CHANGED
@@ -2,125 +2,191 @@ require 'thor'
2
2
  require "pathname"
3
3
  require "yaml"
4
4
  require "date"
5
+ require 'fileutils'
6
+
7
+ # @author Brandon Pittman
8
+ # This is the main class that interfaces with Thor's methods and does all the heavy lifting for Nikki.
9
+ class Generator < Thor
10
+
11
+ desc "setup", "Creates new Nikki and config files."
12
+ # Setup up Nikki for use
13
+ # @note This methods creates the ".nikki" directory, config file and journal file.
14
+ def setup
15
+ create_path
16
+ create_file
17
+ create_config_file
18
+ end
5
19
 
6
- module Nikki
7
- class Generator < Thor
20
+ desc "new ENTRY", "Creates a new entry in the Nikki journal."
21
+ # Add entry to journal
22
+ # @param entry [String] entry to add to the journal
23
+ # Will open your configured text editor on OS X if you didn't update the journal the previous day.
24
+ # This will allow you to add missing entries in bulk.
25
+ # It reads the settings in from the config YAML file and changes the date updated.
26
+ # It does the same with the journal file, reading in the YAML and merging the hash of entries, and then saves the YAML back again.
27
+ # There's also a method to check off a corresponding task in OmniFocus at the end.
28
+ def new(*args)
29
+ settings = read_config
30
+ settings[:updated] = today
31
+ entry = args.join(" ")
32
+ entry_hash = { today => entry }
33
+ journal = read_file.merge(entry_hash)
34
+ write_file(journal)
35
+ open unless updated_yesterday?
36
+ write_config(settings)
37
+ add_to_omnifocus
38
+ puts latest
39
+ end
8
40
 
9
- desc "new ENTRY", "Creates a new entry in the Nikki journal."
10
- def new(*args)
11
- settings = read_config
12
- settings[:updated] = today
13
- entry = args.join(" ")
14
- file.open('a') { |file| file.puts text(entry)}
15
- open unless updated_yesterday?
16
- write_config(settings)
41
+ desc "open", "Open current year's journal file in editor."
42
+ option :marked, :aliases => :m, :type => :boolean
43
+ # Open Nikki journal in configured text editor
44
+ def open
45
+ if options[:marked]
46
+ %x{open -a Marked #{file}}
47
+ else
48
+ %x{open -a "#{editor}" #{file}}
17
49
  end
50
+ end
18
51
 
19
- desc "open", "Open current year's journal file in editor."
20
- option :marked, :aliases => :m, :type => :boolean
21
- def open
22
- if options[:marked]
23
- %x{open -a Marked #{file}}
24
- else
25
- %x{open -a "#{editor}" #{file}}
26
- end
52
+ desc "config", "Change Nikki's settings."
53
+ option :editor, :aliases => :e, :banner => "Set default editor to open journal file in."
54
+ option :yesterday, :aliases => :y, :type => :boolean, :banner => "Set nikki's \"updated\" date to yesterday."
55
+ option :today, :aliases => :t, :type => :boolean, :banner => "Set nikki's \"updated\" date to today."
56
+ option :print, :aliases => :p, :type => :boolean, :banner => "Prints nikki's config settings."
57
+ option :latest, :aliases => :l, :type => :boolean, :banner => "Prints latest journal entries."
58
+ # Configure Nikki's settings
59
+ # @option options [String] :editor (read_config[:editor]) Sets Nikki's editor to open journal file
60
+ # @option options [Boolean] :yesterday Set `settings[:updated]` to yesterday
61
+ # @option options [Boolean] :today Set `settings[:updated]` to today
62
+ # @option options [Boolean] :print Prints Nikki's configuration settings to STDOUT
63
+ # @option options [Boolean] :latest Prints Nikki's latest entries to STDOUT
64
+ def config
65
+ settings = read_config
66
+ settings[:editor] = options[:editor] || read_config[:editor]
67
+ settings[:updated] = Date.today-1 if options[:yesterday]
68
+ settings[:updated] = Date.today if options[:today]
69
+ write_config(settings)
70
+ puts settings.to_yaml if options[:print]
71
+ puts latest if options[:latest]
72
+ end
73
+
74
+ no_commands do
75
+ def path
76
+ Pathname.new("#{ENV['HOME']}/.nikki/")
27
77
  end
28
78
 
29
- desc "config", "Change Nikki's settings."
30
- option :editor, :aliases => :e
31
- option :yesterday, :aliases => :y, :type => :boolean
32
- option :today, :aliases => :t, :type => :boolean
33
- option :display, :aliases => :d, :type => :boolean
34
- def config
35
- settings = read_config
36
- settings[:editor] = options[:editor] || read_config[:editor]
37
- settings[:updated] = Date.today-1 if options[:yesterday]
38
- settings[:updated] = Date.today if options[:today]
39
- puts settings.to_yaml
40
- write_config(settings)
79
+ def create_path
80
+ path.mkdir unless path.exist?
41
81
  end
42
82
 
43
- no_commands do
44
- def path
45
- home = Pathname.new("#{ENV['HOME']}/")
46
- end
83
+ def config_file
84
+ path.join("nikki.config.yaml")
85
+ end
47
86
 
48
- def config_file
49
- path.join(".nikki.config.yaml")
50
- end
87
+ def read_config
88
+ create_path
89
+ config_file_exist?
90
+ YAML.load(config_file.read)
91
+ end
51
92
 
52
- def read_config
53
- config_file_exist?
54
- YAML.load(config_file.read)
55
- end
93
+ def write_config(hash)
94
+ config_file.open('w') { |t| t << hash.to_yaml }
95
+ end
56
96
 
57
- def write_config(hash)
58
- config_file.open('w') { |t| t << hash.to_yaml }
59
- end
97
+ def read_file
98
+ create_path
99
+ file_exist?
100
+ YAML.load(file.read)
101
+ end
60
102
 
61
- def editor
62
- read_config[:editor]
63
- end
103
+ def write_file(hash)
104
+ file.write(hash.to_yaml)
105
+ end
64
106
 
65
- def file
66
- path.join(".nikki_#{Time.now.strftime("%Y")}.md")
67
- end
107
+ def editor
108
+ read_config[:editor]
109
+ end
68
110
 
69
- def config_file_exist?
70
- return true if config_file.exist?
71
- create_config_file
72
- return true
73
- end
111
+ def file
112
+ path.join("nikki.yaml")
113
+ end
74
114
 
75
- def file_exist?
76
- return true if file.exist?
77
- create_file
78
- return true
79
- end
115
+ def config_file_exist?
116
+ return true if config_file.exist?
117
+ create_config_file
118
+ return true
119
+ end
80
120
 
81
- def create_config_file
82
- FileUtils.touch(config_file)
83
- settings = {}
84
- settings[:updated] = today
85
- settings[:editor] = 'TextEdit'
86
- write_config(settings)
87
- end
121
+ def file_exist?
122
+ return true if file.exist?
123
+ create_file
124
+ return true
125
+ end
88
126
 
89
- def create_file
90
- FileUtils.touch(file)
91
- end
127
+ def create_config_file
128
+ settings = {}
129
+ settings[:updated] = today
130
+ settings[:editor] = 'TextEdit'
131
+ write_config(settings)
132
+ end
92
133
 
93
- def marked
94
- Pathname.new("/Applications/Marked.app")
95
- end
134
+ def create_file
135
+ FileUtils.touch(file)
136
+ end
96
137
 
97
- def today
98
- Date.today
99
- end
138
+ def marked
139
+ Pathname.new("/Applications/Marked.app")
140
+ end
100
141
 
101
- def first_of_month?
102
- today.day == "1"
103
- end
142
+ def today
143
+ Date.today
144
+ end
104
145
 
105
- def date
106
- today.day
107
- end
146
+ def months_with_names
147
+ {1=>{:name=>"January"},
148
+ 2=>{:name=>"February"},
149
+ 3=>{:name=>"March"},
150
+ 4=>{:name=>"April"},
151
+ 5=>{:name=>"May"},
152
+ 6=>{:name=>"June"},
153
+ 7=>{:name=>"July"},
154
+ 8=>{:name=>"August"},
155
+ 9=>{:name=>"September"},
156
+ 10=>{:name=>"October"},
157
+ 11=>{:name=>"November"},
158
+ 12=>{:name=>"December"}}
159
+ end
108
160
 
109
- def month
110
- today.month
111
- end
161
+ def leap_year?
162
+ Date.today.leap?
163
+ end
112
164
 
113
- def updated_yesterday?
114
- read_config[:updated] == Date.today-1
115
- end
165
+ def last_updated
166
+ read_config[:updated]
167
+ end
168
+
169
+ def updated_yesterday?
170
+ last_updated == Date.today-1
171
+ end
116
172
 
117
- def text(entry)
118
- if first_of_month?
119
- "\n## #{month}\n\n#{date}. #{entry}"
120
- else
121
- "#{date}. #{entry}"
122
- end
173
+ def latest
174
+ list = []
175
+ (0..3).each do |n|
176
+ list << "#{today-n}: #{read_file[today-n]}"
123
177
  end
178
+ list.reverse!
179
+ end
180
+
181
+ def add_to_omnifocus
182
+ %x{osascript <<-APPLESCRIPT
183
+ tell application "OmniFocus"
184
+ tell default document
185
+ set nikki_task to first remaining task of flattened context "House" whose name is "Record what I learned today"
186
+ set completed of nikki_task to true
187
+ end tell
188
+ end tell
189
+ APPLESCRIPT}
124
190
  end
125
191
  end
126
192
  end
data/nikki.gemspec CHANGED
@@ -18,10 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = ['nikki']
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
- spec.add_dependency "thor", "~> 0.18"
21
+
22
+ spec.add_dependency "thor"
22
23
 
23
24
  spec.add_development_dependency "bundler", "~> 1.5"
24
25
  spec.add_development_dependency "rake"
25
26
  spec.add_development_dependency "cucumber"
26
27
  spec.add_development_dependency "aruba"
28
+ spec.add_development_dependency "rspec"
27
29
  end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Generator do
4
+ let(:gen) {Generator.new}
5
+
6
+ it "reads the exisiting journal file" do
7
+ expect(gen.file.class).to eq(Pathname)
8
+ end
9
+
10
+ it "reads the config file YAML as Hash" do
11
+ expect(gen.read_config.class).to eq(Hash)
12
+ end
13
+
14
+ it "knows the date of the last updated" do
15
+ expect(gen.last_updated.class).to eq(Date)
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ require 'nikki'
2
+
3
+ RSpec.configure do |config|
4
+ config.run_all_when_everything_filtered = true
5
+ config.filter_run :focus
6
+
7
+ # Run specs in random order to surface order dependencies. If you find an
8
+ # order dependency and want to debug it, you can fix the order by providing
9
+ # the seed, which is printed after each run.
10
+ # --seed 1234
11
+ config.order = 'random'
12
+ end
data/tags ADDED
@@ -0,0 +1,37 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
+ !_TAG_PROGRAM_NAME Exuberant Ctags //
5
+ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
+ !_TAG_PROGRAM_VERSION 5.8 //
7
+ Generator lib/nikki.rb /^class Generator < Thor$/;" c
8
+ Nikki lib/nikki/version.rb /^module Nikki$/;" m
9
+ NikkiTest test/tc_nikki.rb /^class NikkiTest < MiniTest::Unit::TestCase$/;" c
10
+ config lib/nikki.rb /^ def config$/;" f class:Generator
11
+ config_file lib/nikki.rb /^ def config_file$/;" f class:Generator
12
+ config_file_exist? lib/nikki.rb /^ def config_file_exist?$/;" f class:Generator
13
+ create_config_file lib/nikki.rb /^ def create_config_file$/;" f class:Generator
14
+ create_file lib/nikki.rb /^ def create_file$/;" f class:Generator
15
+ create_path lib/nikki.rb /^ def create_path$/;" f class:Generator
16
+ editor lib/nikki.rb /^ def editor$/;" f class:Generator
17
+ file features/step_definitions/reveal_file.steps.rb /^def file$/;" f
18
+ file lib/nikki.rb /^ def file$/;" f class:Generator
19
+ file_exist? lib/nikki.rb /^ def file_exist?$/;" f class:Generator
20
+ last_updated lib/nikki.rb /^ def last_updated$/;" f class:Generator
21
+ latest lib/nikki.rb /^ def latest$/;" f class:Generator
22
+ leap_year? lib/nikki.rb /^ def leap_year?$/;" f class:Generator
23
+ marked lib/nikki.rb /^ def marked$/;" f class:Generator
24
+ months_with_names lib/nikki.rb /^ def months_with_names$/;" f class:Generator
25
+ new lib/nikki.rb /^ def new(*args)$/;" f class:Generator
26
+ open lib/nikki.rb /^ def open$/;" f class:Generator
27
+ path lib/nikki.rb /^ def path$/;" f class:Generator
28
+ read_config lib/nikki.rb /^ def read_config$/;" f class:Generator
29
+ read_file lib/nikki.rb /^ def read_file$/;" f class:Generator
30
+ setup lib/nikki.rb /^ def setup$/;" f class:Generator
31
+ test_file_exist? test/tc_nikki.rb /^ def test_file_exist?$/;" f class:NikkiTest
32
+ test_read_config test/tc_nikki.rb /^ def test_read_config$/;" f class:NikkiTest
33
+ test_updated_yesterday? test/tc_nikki.rb /^ def test_updated_yesterday?$/;" f class:NikkiTest
34
+ today lib/nikki.rb /^ def today$/;" f class:Generator
35
+ updated_yesterday? lib/nikki.rb /^ def updated_yesterday?$/;" f class:Generator
36
+ write_config lib/nikki.rb /^ def write_config(hash)$/;" f class:Generator
37
+ write_file lib/nikki.rb /^ def write_file(hash)$/;" f class:Generator
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nikki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Pittman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-10 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.18'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.18'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: A simple one-line-a-day journaling app.
84
98
  email:
85
99
  - brandonpittman@gmail.com
@@ -89,21 +103,24 @@ extensions: []
89
103
  extra_rdoc_files: []
90
104
  files:
91
105
  - ".gitignore"
106
+ - ".rspec"
92
107
  - Gemfile
93
108
  - License.txt
94
109
  - README.md
95
110
  - Rakefile
96
111
  - TODO.md
97
112
  - bin/nikki
98
- - features/initialize_journal.feature
99
113
  - features/new_entry.feature
100
- - features/reveal_journal.feature
114
+ - features/random.feature
101
115
  - features/step_definitions/new_entry.steps.rb
102
- - features/step_definitions/reveal_file.steps.rb
116
+ - features/step_definitions/random_steps.rb
103
117
  - features/support/env.rb
104
118
  - lib/nikki.rb
105
119
  - lib/nikki/version.rb
106
120
  - nikki.gemspec
121
+ - spec/nikki_spec.rb
122
+ - spec/spec_helper.rb
123
+ - tags
107
124
  - test/tc_nikki.rb
108
125
  homepage: http://github.com/brandonpittman/nikki
109
126
  licenses:
@@ -130,10 +147,12 @@ signing_key:
130
147
  specification_version: 4
131
148
  summary: A simple one-line-a-day journaling app.
132
149
  test_files:
133
- - features/initialize_journal.feature
134
150
  - features/new_entry.feature
135
- - features/reveal_journal.feature
151
+ - features/random.feature
136
152
  - features/step_definitions/new_entry.steps.rb
137
- - features/step_definitions/reveal_file.steps.rb
153
+ - features/step_definitions/random_steps.rb
138
154
  - features/support/env.rb
155
+ - spec/nikki_spec.rb
156
+ - spec/spec_helper.rb
139
157
  - test/tc_nikki.rb
158
+ has_rdoc:
@@ -1,10 +0,0 @@
1
- @file_creation
2
- Feature: Initialize a new config file
3
- I want more information about exactly when last a journal was updated
4
- And I want to have a place to save a custom journal location
5
-
6
- Background: No config file exists
7
-
8
- Scenario: New user wants to create a new journal using defaults
9
-
10
- Scenario: New user wants to create a new journal with a custom save location
@@ -1,9 +0,0 @@
1
- Feature: Reveal journal file
2
-
3
- Scenario: I try to reveal a journal file
4
- Given the file doesn't exist
5
- Then create the file
6
- And reveal the file
7
-
8
- Given the file does exist
9
- Then reveal the file
@@ -1,22 +0,0 @@
1
- require "pathname"
2
- require "fileutils"
3
-
4
- def file
5
- path = Pathname.new("/tmp/journal.md")
6
- end
7
-
8
- Given(/^the file doesn't exist$/) do
9
- FileUtils.rm_rf(file) if file.exist?
10
- end
11
-
12
- Then(/^create the file$/) do
13
- FileUtils.touch(file)
14
- end
15
-
16
- Then(/^reveal the file$/) do
17
- %x{open -a 'Sublime Text' #{file}}
18
- end
19
-
20
- Given(/^the file does exist$/) do
21
- FileUtils.touch(file) unless file.exist?
22
- end