intent 0.8.0 → 0.8.1
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/lib/intent/commands/project.rb +14 -6
- data/lib/intent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d27acb8a39aba726f83801c1477900d07367459a79056db3b1b92488429f5283
|
4
|
+
data.tar.gz: 6d2bb8282844c7b4523712adfe8a4fe318ad0d778974d3734ee9c61df1cf9db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376368598f70ab20ecedf1ca9b3755a07c8c564b4ea860e6a1c3888472440f1f0084accaf6fef4edcd94c1bbc74437096b3e56d49535fd1a1fb5308d4326856f
|
7
|
+
data.tar.gz: 77d2f59d3dadeecc4842a452154781457fc6c62d9417f0641754a0ff80ce307b5675c73a49293efa5c298b911800e0b18a672e56b24b390071f5fcd601c3fa98
|
@@ -68,12 +68,20 @@ module Intent
|
|
68
68
|
symbolic_path = File.join(documents.working_directory.path, 'NOTES.md')
|
69
69
|
File.symlink(target_path, symbolic_path)
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
ignore_path = File.join(documents.working_directory.path, '.gitignore')
|
72
|
+
if File.exist?(ignore_path)
|
73
|
+
ignore_contents = File.read(ignore_path)
|
74
|
+
unless ignore_contents.include?('NOTES.md')
|
75
|
+
File.open(ignore_path, 'a+') do |file|
|
76
|
+
if ignore_contents[-1] == "\n"
|
77
|
+
# preserve new line at eof
|
78
|
+
file.puts('NOTES.md')
|
79
|
+
else
|
80
|
+
file.write("\nNOTES.md")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
77
85
|
else
|
78
86
|
output.puts "#{project} does not have notes"
|
79
87
|
end
|
data/lib/intent/version.rb
CHANGED