rbtils 0.0.1 → 0.0.2

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: b00e004f6a120b2c92a986e94d15ec4bdf84cecc
4
- data.tar.gz: 8e5362f564d74b21410eadcc0b9c883431fa9e80
3
+ metadata.gz: dc141db7cfb9ade02f28f86571a940b3926b2b42
4
+ data.tar.gz: 90bdaa0ad423dfd1d19bf2aa2f3dd7e659bb9dfc
5
5
  SHA512:
6
- metadata.gz: 61afcde4aec89976cf123edd60358ea1ac5e5a78bd18c0a9804d90102afb7486781dbce6b96c167f02a317c5019b7688b074105e7a4d3ffef34dcd51085a1590
7
- data.tar.gz: 7e77c88344481538327a336b42f027614a8ef1a809903f271cace7cce2f2f83fc861bd9b723cd8594782c5719d4a6ccacc51566dc2582a3fad575bc5d8a471ed
6
+ metadata.gz: 8f9f7e7390f0d4598c3145c9699c8c25fb461d1f1185cd4e28fb44ef20076a08a036a5e8f0136d289686ed05f954696e9ad0bddca021656b8970b2949c169dd9
7
+ data.tar.gz: c88cc28bf5899cfbe123eccfd74f077a65a02e69cd4fe72230715f6848a26c9fec6ec6e335f9e85f77110948b125b6cf1386a614d5465dbe47f12eb7d694011a
@@ -0,0 +1,13 @@
1
+ # Contribute!
2
+
3
+ These tools are designed to be easily extendable to handle any sort of functionality you need.
4
+
5
+ ## Creating a New Controller
6
+
7
+ Commands are processed by controllers, which call three class methods: `pre_exec`, `exec` then `post_exec`. The router looks for your handler in the `Granify::Controller` namespace (see [lib/controllers/open.rb](lib/controllers/open.rb) for an example). `pre_exec` and `post_exec` are mainly used by the base controller to execute predefined profiling and cleanup tasks. If you want to overwrite them in your controller, make sure you add `super` so it still calls the parent class method.
8
+
9
+ |Handler method|Description|
10
+ |--------------|-----------|
11
+ |pre_exec|Designed to create shell script help text, can be used to run code before Controller::exec is executed.|
12
+ |exec|Automatically executes the requested method, if it exists.|
13
+ |post_exec|Execute post-run hooks. By default, old log files are deleted.|
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rubocop"
4
+ gem "notifaction"
@@ -0,0 +1,27 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ ast (2.0.0)
5
+ astrolabe (1.3.0)
6
+ parser (>= 2.2.0.pre.3, < 3.0)
7
+ evernote-thrift (1.25.1)
8
+ notifaction (0.0.7)
9
+ parser (2.2.0.3)
10
+ ast (>= 1.1, < 3.0)
11
+ powerpack (0.1.0)
12
+ rainbow (2.0.0)
13
+ rubocop (0.29.1)
14
+ astrolabe (~> 1.3)
15
+ parser (>= 2.2.0.1, < 3.0)
16
+ powerpack (~> 0.1)
17
+ rainbow (>= 1.99.1, < 3.0)
18
+ ruby-progressbar (~> 1.4)
19
+ ruby-progressbar (1.7.5)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ evernote-thrift
26
+ notifaction
27
+ rubocop
@@ -0,0 +1,18 @@
1
+ # Rbtils
2
+
3
+ Helpful utilities to improve your personal workflow. To extend it's functionality, please read the [contribution](CONTRIBUTE.md) document.
4
+
5
+ ## Installation
6
+
7
+ 1. `gem install rbtils`
8
+ 2. Execute `rbtils branch current` to test if everything installed correctly
9
+
10
+ ## How to Use
11
+
12
+ |Command|Description|Usage|
13
+ |--------------|-----------|--------------|
14
+ |branch|Show information about git branches you are working on|`rbtils branch current`, `rbtils branch recent`|
15
+ |clean|Manually cleanup old logs in `./logs/*`|`rbtils clean`|
16
+ |minify|Minify, rename and move all coffeescript/javascript to a /min folder in the current directory|`rbtils minify js`|
17
+ |open|Open a list of files in your favourite editor|`rbtils open files *files`|
18
+ |hound|Check your ruby or CS/JS code for syntax and convention issues|`rbtils hound js`|
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "date"
4
+ require "time"
5
+ require "json"
6
+ require "optparse"
7
+ require "rbconfig"
8
+ require "net/http"
9
+ require "uri"
10
+ require "fileutils"
11
+ require "cgi"
12
+ require "notifaction"
13
+
14
+ # include required files
15
+ require_relative "../lib/helpers/time.rb"
16
+ require_relative "../lib/config.rb"
17
+ require_relative "../lib/request.rb"
18
+ require_relative "../lib/log.rb"
19
+ require_relative "../lib/constants.rb"
20
+ require_relative "../lib/utils.rb"
21
+ require_relative "../lib/logs.rb"
22
+ require_relative "../lib/command.rb"
23
+ require_relative "../lib/model_data.rb"
24
+ require_relative "../lib/controller.rb"
25
+ require_relative "../lib/router.rb"
26
+ require_relative "../lib/model.rb"
27
+ require_relative "../lib/helper.rb"
28
+
29
+ # Modify configuration options here
30
+ $config = Granify::Cfg.new
31
+ # Bootstrap!
32
+ $config.bootstrap!
33
+
34
+ # Config file located, route the request
35
+ req = Granify::Router.new
36
+ req.route
@@ -1,6 +1,6 @@
1
1
  module Granify
2
2
  PACKAGE_NAME = "rbtils"
3
- INSTALLED_DIR = File.dirname($0)
3
+ INSTALLED_DIR = Gem::Specification.find_by_name(Granify::PACKAGE_NAME).gem_dir
4
4
  LOG_DIR = INSTALLED_DIR + "/logs"
5
5
  DEFAULT_LOG = Log.new # no args means default log
6
6
  HELPER_DIR = INSTALLED_DIR + "/lib/helpers/"
@@ -0,0 +1,4 @@
1
+ # Ignore everything in this directory
2
+ *
3
+ # Except this file
4
+ !.gitignore
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'rbtils'
3
+ s.version = '0.0.2'
4
+ s.date = '2015-07-03'
5
+ s.summary = "Utilities for your CLI workflow"
6
+ s.description = "A set of utilities that can be used independently of other projects"
7
+ s.authors = ["Ryan Priebe"]
8
+ s.email = 'hello@ryanpriebe.com'
9
+ s.files = `git ls-files`.split($\)
10
+ s.homepage = 'http://rubygems.org/gems/rbtils'
11
+ s.license = 'MIT'
12
+ s.executables = 'rbtils'
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbtils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe
@@ -12,10 +12,16 @@ date: 2015-07-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A set of utilities that can be used independently of other projects
14
14
  email: hello@ryanpriebe.com
15
- executables: []
15
+ executables:
16
+ - rbtils
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - CONTRIBUTE.md
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - README.md
24
+ - bin/rbtils
19
25
  - lib/command.rb
20
26
  - lib/config.rb
21
27
  - lib/configs/coffeelint.json
@@ -37,6 +43,9 @@ files:
37
43
  - lib/request.rb
38
44
  - lib/router.rb
39
45
  - lib/utils.rb
46
+ - logs/.gitignore
47
+ - logs/default.log
48
+ - rbtils.gemspec
40
49
  homepage: http://rubygems.org/gems/rbtils
41
50
  licenses:
42
51
  - MIT