monotone 0.0.2 → 0.0.3

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: b5e058f011a3cbd1227a6a5fe672f20c784ec8a1
4
- data.tar.gz: 1ea62e12d10b3e2413622623726bb6093c800a55
3
+ metadata.gz: 1c2a40ad0703d07bec0797c82e9fb84c12ee1b9a
4
+ data.tar.gz: 5a4f35a5f92f4dad8eeb0e34832b0c1e26be7450
5
5
  SHA512:
6
- metadata.gz: d4c8a8acf73071155bb2084256d069cdcc38e7eb874d59281355796e89123c713b137f506c422ab300ff7c629357fb116fb571b6b5b6bf1ee88c861c1df85914
7
- data.tar.gz: f05129406e6ae16476b63d016be268a5b0589880557f06a129d62d1d09c9d98cf0ff43f45f08ff248e672f2ce98b20ca55e286722750e9b7237b0100d320449f
6
+ metadata.gz: 3a0d44fa7d1ba4d34c7951cca6311a5e2372fddaa4946670857a608ec3f7745801bc3a9a05b2ce133fa6f6428e83d287aaf08f3ff9c926cf57e3d1434531dccd
7
+ data.tar.gz: 2e349e6e28beeee7b2b0df26e20f5815bb07394d8050cb87d7c80f87a66f6f444576c9d5e4c8c319110e338f37ed11d25bde5251a3125e97298ff8df2b68b975
data/README.md CHANGED
@@ -29,10 +29,10 @@ Monotone.next 'key' # Returns 1
29
29
 
30
30
  ### CLI
31
31
  ```bash
32
- mon-next key # Returns 0
33
- mon-next key # Returns 1
34
- mon-set key 0 # Returns 0
35
- mon-next key # Returns 1
32
+ monotone next key # Prints 0
33
+ monotone next key # Prints 1
34
+ monotone set key 0 # Prints 0
35
+ monotone next key # Prints 1
36
36
  ```
37
37
 
38
38
 
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ require 'monotone'
3
+
4
+ def usage
5
+ puts 'Usage: monotone [next|set] key [value]'
6
+ exit 1
7
+ end
8
+
9
+ if ARGV.size > 0
10
+ if ARGV[0] == 'next'
11
+ usage unless ARGV.size == 2
12
+ puts Monotone.next ARGV[1]
13
+ elsif ARGV[0] == 'set'
14
+ usage unless ARGV.size == 3
15
+ puts Monotone.set ARGV[1], ARGV[2].to_i
16
+ else
17
+ usage
18
+ end
19
+ else
20
+ usage
21
+ end
@@ -1,3 +1,3 @@
1
1
  module Monotone
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monotone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Shea
@@ -42,8 +42,7 @@ description: Generates increasing numbers, stored on the filesystem.
42
42
  email:
43
43
  - mike.shea@gmail.com
44
44
  executables:
45
- - mon-next
46
- - mon-set
45
+ - monotone
47
46
  extensions: []
48
47
  extra_rdoc_files: []
49
48
  files:
@@ -52,8 +51,7 @@ files:
52
51
  - LICENSE.txt
53
52
  - README.md
54
53
  - Rakefile
55
- - bin/mon-next
56
- - bin/mon-set
54
+ - bin/monotone
57
55
  - lib/monotone.rb
58
56
  - lib/monotone/version.rb
59
57
  - monotone.gemspec
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'monotone'
3
- unless ARGV.size == 1
4
- puts 'Usage: mon-next [KEY]'
5
- exit 1
6
- end
7
- puts Monotone.next ARGV[0]
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'monotone'
3
- unless ARGV.size == 2
4
- puts 'Usage: mon-set [KEY] [VALUE]'
5
- exit 1
6
- end
7
- puts Monotone.set ARGV[0], ARGV[1].to_i