mami 0.0.7 → 1.0.0

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: 9d16356c8a7e060a8b3f57d450d7c1968842e7ca
4
- data.tar.gz: 377e80787308f06f8e7306f33e5f89a86768cc66
3
+ metadata.gz: 4f5833c4ca5d469ab14b1d15d5740f85445501c8
4
+ data.tar.gz: 52a835c2e6bc63f574f52cdc49bc19d330a4f0e0
5
5
  SHA512:
6
- metadata.gz: af68d72a4dd4dceeff63d8cbef24f0641861bfa3a7a434f4e5b94b225b0fbd3dc7ee01b2f779cef86c0952a52d10b14d1d7cfe935946a0d09855bdb414397353
7
- data.tar.gz: 4a61f37ba82fad65975d347d67676ef15c90a13993b8d43c26ed032091fb697d618f5b1d2e7d6f436c80adcd019a5e162f396dbda5767fec1a98536146f33412
6
+ metadata.gz: ff480293411e4843c4ec9fe8b9407f7e9111ba225c7fa78a3c144f4dbb35ff0963fa35616f7c0c2f96d7dade9ea0c70ba3cac4a736c5f8b99de8180cc1ad8e0a
7
+ data.tar.gz: fd6d9892a8ab65072f11631c17577bf802b237ab0e457b693cb0c7d3181d5e5e70b8e3293cabf48ebb560573c7c1a0fb7ff50330e1e29cb3b191f00be1fb452e
data/README.md CHANGED
@@ -12,7 +12,21 @@ Install it yourself as:
12
12
 
13
13
  ## Usage
14
14
 
15
- $ mami
15
+ Usage:
16
+ $ mami #=> /path/to/mami/2013-04-09-21-46-43.txt
17
+
18
+ Use cases:
19
+ (On vim command mode)
20
+ :w `mami`
21
+ #=> save text to /path/to/mami/2013-04-09-22-06-12.txt
22
+
23
+ $ some_command > `mami --extension log -d .`
24
+ #=> Write stdout to ./2013-04-09-22-07-08.log
25
+
26
+ Commands:
27
+ mami help [TASK] # Describe available tasks or one specific task
28
+ mami print # Prints timestamped text file path
29
+ mami version # Prints the mami's version information
16
30
 
17
31
  ## Contributing
18
32
 
data/lib/mami/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mami
2
- VERSION = "0.0.7"
2
+ VERSION = "1.0.0"
3
3
  end
data/spec/cli_spec.rb CHANGED
@@ -6,3 +6,22 @@ describe 'bundle executable' do
6
6
  expect(err).to include('Unknown switches')
7
7
  end
8
8
  end
9
+
10
+ describe 'common case' do
11
+ before do
12
+ ENV['MAMI_DIR'] = "/path/to/mami"
13
+ end
14
+
15
+ it 'returns common output' do
16
+ mami ''
17
+ expect(out).to match(%r!/path/to/mami/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}\.txt!)
18
+ expect(err).to eq('')
19
+ end
20
+ end
21
+
22
+ describe 'no config env' do
23
+ it 'returns error' do
24
+ mami ''
25
+ expect(err).to eq('mami requires MAMI_DIR or directory option')
26
+ end
27
+ end
data/spec/spec_helper.rb CHANGED
@@ -42,5 +42,6 @@ RSpec.configure do |config|
42
42
 
43
43
  Dir.chdir(original_wd)
44
44
  # Reset ENV
45
+ ENV['MAMI_DIR'] = nil
45
46
  end
46
47
  end
@@ -25,7 +25,6 @@ module Spec
25
25
  expect_err = options.delete(:expect_err)
26
26
  exitstatus = options.delete(:exitstatus)
27
27
  my_command_bin = options.delete(:my_command_bin)
28
- options["no-color"] = true unless options.key?("no-color") || %w(exec conf).include?(cmd.to_s[0..3])
29
28
 
30
29
  requires = options.delete(:requires) || []
31
30
  requires_str = requires.map{|r| "-r#{r}"}.join(" ")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mami
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-07 00:00:00.000000000 Z
11
+ date: 2013-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler