micktagger 0.1.0 → 0.1.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.
- data/.travis.yml +4 -0
- data/README.md +1 -0
- data/lib/micktagger/cli.rb +10 -0
- data/lib/micktagger/version.rb +1 -1
- data/{empty.yaml → spec/fixtures/fake_home/.gitkeep} +0 -0
- data/spec/fixtures/fake_home/delete_after_reading.txt +1 -0
- data/spec/fixtures/fake_home/readme.md +1 -0
- data/spec/integration/mt_spec.rb +11 -0
- metadata +8 -2
data/.travis.yml
ADDED
data/README.md
CHANGED
data/lib/micktagger/cli.rb
CHANGED
@@ -22,7 +22,17 @@ module MickTagger
|
|
22
22
|
params[:tag] = tag
|
23
23
|
end
|
24
24
|
|
25
|
+
parser.on('-h', '--help [TAG]', String) do |tag|
|
26
|
+
puts parser
|
27
|
+
exit
|
28
|
+
end
|
29
|
+
|
25
30
|
files = parser.parse!
|
31
|
+
|
32
|
+
if files.empty? && params[:action] != :list
|
33
|
+
$stdin.each_line.each { |line| files << line.strip }
|
34
|
+
end
|
35
|
+
|
26
36
|
files.map! {|file| File.expand_path(file) }
|
27
37
|
|
28
38
|
case params[:action]
|
data/lib/micktagger/version.rb
CHANGED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Hey you! Have a good day :)
|
@@ -0,0 +1 @@
|
|
1
|
+
# Nice to see you :)
|
data/spec/integration/mt_spec.rb
CHANGED
@@ -28,4 +28,15 @@ describe 'micktagger command line interface' do
|
|
28
28
|
dotfile = read_and_parse_fake_dotfile
|
29
29
|
dotfile.should_not include(readme_full_path)
|
30
30
|
end
|
31
|
+
|
32
|
+
it 'allows me to tag files piped to STDIN' do
|
33
|
+
dir = "#{ENV['HOME']}"
|
34
|
+
|
35
|
+
`cd #{dir} && ls #{dir} | mt -a important`
|
36
|
+
|
37
|
+
dotfile = read_and_parse_fake_dotfile
|
38
|
+
|
39
|
+
dotfile["#{dir}/readme.md"].should include('important')
|
40
|
+
dotfile["#{dir}/delete_after_reading.txt"].should include('important')
|
41
|
+
end
|
31
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micktagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,17 +36,20 @@ extensions: []
|
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
38
|
- .gitignore
|
39
|
+
- .travis.yml
|
39
40
|
- Gemfile
|
40
41
|
- Gemfile.lock
|
41
42
|
- LICENSE
|
42
43
|
- README.md
|
43
44
|
- bin/mt
|
44
|
-
- empty.yaml
|
45
45
|
- lib/micktagger.rb
|
46
46
|
- lib/micktagger/cli.rb
|
47
47
|
- lib/micktagger/dotfile_handler.rb
|
48
48
|
- lib/micktagger/version.rb
|
49
49
|
- micktagger.gemspec
|
50
|
+
- spec/fixtures/fake_home/.gitkeep
|
51
|
+
- spec/fixtures/fake_home/delete_after_reading.txt
|
52
|
+
- spec/fixtures/fake_home/readme.md
|
50
53
|
- spec/integration/mt_spec.rb
|
51
54
|
- spec/spec_helper.rb
|
52
55
|
- spec/support/dotfile_helpers.rb
|
@@ -79,6 +82,9 @@ summary: With MickTagger you can tag files, list files tagged with a specified t
|
|
79
82
|
remove tags and do cool stuff — all on the command line! It only needs a small json
|
80
83
|
dotfile in your homedirectory to save that information.
|
81
84
|
test_files:
|
85
|
+
- spec/fixtures/fake_home/.gitkeep
|
86
|
+
- spec/fixtures/fake_home/delete_after_reading.txt
|
87
|
+
- spec/fixtures/fake_home/readme.md
|
82
88
|
- spec/integration/mt_spec.rb
|
83
89
|
- spec/spec_helper.rb
|
84
90
|
- spec/support/dotfile_helpers.rb
|