csl_cli 1.5.0 → 1.6.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +55 -15
  3. data/lib/csl_cli/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc6bd13b3fa8931bd954b5cfa633847f782f1286
4
- data.tar.gz: 4125d07f37a301af9c2d6fe6eb184ea75cc93344
3
+ metadata.gz: 570a55c301091df6b229ba176d13051325a25fbb
4
+ data.tar.gz: c1c671e0cfbc4a710daa31e3c52a6990327f0eb0
5
5
  SHA512:
6
- metadata.gz: d757d071af172779a51ec503d2b9c50ec00b7f0dcd7c0e6e4450ed219a12eb7ea098f557756805d19548d27722c6d83d4e698653369bd5f03955227cdb7b574f
7
- data.tar.gz: 80768a11f7f4dca1bc93c5acccb3e6bc94f65ffe4eb210d078d506c11b5f438a2c58d49d4fed343ea7562fd4af05960a15be1ace0b3aebf808f71b28d020a607
6
+ metadata.gz: 4595fbe1fa10ea8dbb4aee6273a049a5266a47956c6b6909ec7e62ec496a92798718736d7ec828ad713217c6d11c7e2c86ae28bbfe757211bc67909ec58414c4
7
+ data.tar.gz: 1b28b6da4794045122cc6f60b034abec69d75210124f4af73b83c4c0ddb0581e6c33c46900d21421ef3fafa46684df847d01a17dc7bc7c7fe8e97408966dfcae
data/README.md CHANGED
@@ -1,28 +1,69 @@
1
1
  # CslCli
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/csl_cli`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem is the command line interface for the context switch logger (https://github.com/brtz/csl-app).
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
7
+ If you wish to install this cli to your system run:
8
+
9
+ $ gem install csl_cli
10
10
 
11
- ```ruby
12
- gem 'csl_cli'
13
- ```
11
+ It is also available as a container: https://hub.docker.com/r/brtz/csl-cli/
14
12
 
15
- And then execute:
13
+ ## Usage
16
14
 
17
- $ bundle
15
+ #### Configuration
18
16
 
19
- Or install it yourself as:
17
+ The cli relies on a few settings. They can be provided as environment variables
18
+ or within a config file (~/.csv_config.json).
20
19
 
21
- $ gem install csl_cli
20
+ Example .csv_config.json:
22
21
 
23
- ## Usage
22
+ {
23
+ "email": "yourEmail",
24
+ "password": "yourPassword",
25
+ "app_url": "http://yourappurl:port"
26
+ }
27
+
28
+ Please make sure to chmod 0600 the config file, so only your user can read it.
29
+
30
+ If a config cannot be loaded, cslcli is going to fall back to these environment variables:
31
+
32
+ CSL_CLI_EMAIL
33
+ CSL_CLI_PASSWORD
34
+ CSL_CLI_APP_URL
35
+
36
+ To run this gem as a container:
37
+
38
+ docker run -it --rm --name cslcli -v "./localfolder:/root" brtz/csl-cli csl help
39
+
40
+ You can also drop the volume and pass the environment variables into the container (-e).
41
+
42
+ #### Commands
43
+
44
+ $ csl --help
45
+ Commands:
46
+ csl help [COMMAND] # Describe available commands or one specific command
47
+ csl list # lists your context switches
48
+ csl login # Log in at csl app using environmet variables (csl_cli_email, csl_cli_password, csl_cli_app_url)
49
+ csl logout # removes the token from disk
50
+ csl switch NOTE # creates a context switch with NOTE
51
+
52
+ The first step is to log in. This is done by calling:
53
+
54
+ csl login
55
+
56
+ It will store the received token within ~/.csv_token. Once you are logged in, you can
57
+ create new context switches:
58
+
59
+ csl switch "my first context switch"
60
+
61
+ If done right, you can now list them with:
62
+
63
+ csl list
64
+
65
+ Please check csl help [COMMAND] for further options (like format on list command).
24
66
 
25
- TODO: Write usage instructions here
26
67
 
27
68
  ## Development
28
69
 
@@ -32,10 +73,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
73
 
33
74
  ## Contributing
34
75
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/csl_cli.
76
+ Bug reports and pull requests are welcome on GitHub at https://github.com/brtz/csl-cli.
36
77
 
37
78
 
38
79
  ## License
39
80
 
40
81
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -1,3 +1,3 @@
1
1
  module CslCli
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csl_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Bartels