ftg 2.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 +7 -0
 - data/.gitignore +15 -0
 - data/.idea/.ftg.iml +31 -0
 - data/.idea/misc.xml +14 -0
 - data/.idea/modules.xml +8 -0
 - data/.idea/vcs.xml +6 -0
 - data/.idea/workspace.xml +45 -0
 - data/.ruby-version +1 -0
 - data/Gemfile +17 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +61 -0
 - data/Rakefile +1 -0
 - data/bin/console +14 -0
 - data/bin/ftg +7 -0
 - data/bin/setup +7 -0
 - data/config/private.json.example +6 -0
 - data/config/public.json +30 -0
 - data/ftg.gemspec +32 -0
 - data/lib/coffee.rb +79 -0
 - data/lib/colors.rb +38 -0
 - data/lib/ftg.rb +316 -0
 - data/lib/ftg_logger.rb +67 -0
 - data/lib/ftg_options.rb +28 -0
 - data/lib/ftg_stats.rb +135 -0
 - data/lib/ftg_sync.rb +112 -0
 - data/lib/idle_logger.rb +9 -0
 - data/lib/interactive.rb +115 -0
 - data/lib/migrations/create_tasks.rb +21 -0
 - data/lib/models/task.rb +5 -0
 - data/lib/task_formatter.rb +51 -0
 - data/lib/utils.rb +24 -0
 - metadata +105 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3c060f0a1edc950db48512dace44cc802b1b9f30
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 894bafc9f63895fb6c2f455f3090374e2f732d29
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 70c7eef693a613a59e73efb414692fe9635bb37b1af067c29823a408218771fefcc97a7f4b608f1be314fca3fe8d681b7129c0b67923eb43195dfecaa11548d0
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 84569c6f36c763b239b551436ebce5f3117ea6613703ba20436cec2b8253afeac11f2d2ac4ddd903f099644f63a148d0eee659f34f7ce27b3af1a5f748964044
         
     | 
    
        data/.gitignore
    ADDED
    
    
    
        data/.idea/.ftg.iml
    ADDED
    
    | 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <module type="RUBY_MODULE" version="4">
         
     | 
| 
      
 3 
     | 
    
         
            +
              <component name="CompassSettings">
         
     | 
| 
      
 4 
     | 
    
         
            +
                <option name="compassExecutableFilePath" value="$USER_HOME$/.rvm/gems/ruby-2.1.1/gems/compass-0.12.2/bin/compass" />
         
     | 
| 
      
 5 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 6 
     | 
    
         
            +
              <component name="NewModuleRootManager">
         
     | 
| 
      
 7 
     | 
    
         
            +
                <content url="file://$MODULE_DIR$" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                <orderEntry type="jdk" jdkName="RVM: ruby-2.2.3" jdkType="RUBY_SDK" />
         
     | 
| 
      
 9 
     | 
    
         
            +
                <orderEntry type="sourceFolder" forTests="false" />
         
     | 
| 
      
 10 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="activemodel (v4.0.13, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 11 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="activerecord (v4.0.13, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 12 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="activerecord-deprecated_finders (v1.0.4, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 13 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="activesupport (v4.0.13, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 14 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="arel (v4.0.2, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 15 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="awesome_print (v1.6.1, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 16 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="builder (v3.1.4, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 17 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.0, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 18 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="httparty (v0.13.7, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 19 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 20 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="json (v1.8.3, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 21 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 22 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="minitest (v4.7.5, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 23 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.11.2, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 24 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.5.5, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 25 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="pry (v0.10.2, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 26 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 27 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="slop (v3.6.0, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 28 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 29 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="tzinfo (v0.3.44, RVM: ruby-2.2.3) [gem]" level="application" />
         
     | 
| 
      
 30 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 31 
     | 
    
         
            +
            </module>
         
     | 
    
        data/.idea/misc.xml
    ADDED
    
    | 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <project version="4">
         
     | 
| 
      
 3 
     | 
    
         
            +
              <component name="ProjectLevelVcsManager" settingsEditedManually="false">
         
     | 
| 
      
 4 
     | 
    
         
            +
                <OptionsSetting value="true" id="Add" />
         
     | 
| 
      
 5 
     | 
    
         
            +
                <OptionsSetting value="true" id="Remove" />
         
     | 
| 
      
 6 
     | 
    
         
            +
                <OptionsSetting value="true" id="Checkout" />
         
     | 
| 
      
 7 
     | 
    
         
            +
                <OptionsSetting value="true" id="Update" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                <OptionsSetting value="true" id="Status" />
         
     | 
| 
      
 9 
     | 
    
         
            +
                <OptionsSetting value="true" id="Edit" />
         
     | 
| 
      
 10 
     | 
    
         
            +
                <ConfirmationsSetting value="0" id="Add" />
         
     | 
| 
      
 11 
     | 
    
         
            +
                <ConfirmationsSetting value="0" id="Remove" />
         
     | 
| 
      
 12 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 13 
     | 
    
         
            +
              <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.1.1" project-jdk-type="RUBY_SDK" />
         
     | 
| 
      
 14 
     | 
    
         
            +
            </project>
         
     | 
    
        data/.idea/modules.xml
    ADDED
    
    
    
        data/.idea/vcs.xml
    ADDED
    
    
    
        data/.idea/workspace.xml
    ADDED
    
    | 
         @@ -0,0 +1,45 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <project version="4">
         
     | 
| 
      
 3 
     | 
    
         
            +
              <component name="ChangeListManager">
         
     | 
| 
      
 4 
     | 
    
         
            +
                <option name="TRACKING_ENABLED" value="true" />
         
     | 
| 
      
 5 
     | 
    
         
            +
                <option name="SHOW_DIALOG" value="false" />
         
     | 
| 
      
 6 
     | 
    
         
            +
                <option name="HIGHLIGHT_CONFLICTS" value="true" />
         
     | 
| 
      
 7 
     | 
    
         
            +
                <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                <option name="LAST_RESOLUTION" value="IGNORE" />
         
     | 
| 
      
 9 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 10 
     | 
    
         
            +
              <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
         
     | 
| 
      
 11 
     | 
    
         
            +
              <component name="CreatePatchCommitExecutor">
         
     | 
| 
      
 12 
     | 
    
         
            +
                <option name="PATCH_PATH" value="" />
         
     | 
| 
      
 13 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 14 
     | 
    
         
            +
              <component name="NamedScopeManager">
         
     | 
| 
      
 15 
     | 
    
         
            +
                <order />
         
     | 
| 
      
 16 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 17 
     | 
    
         
            +
              <component name="ProjectLevelVcsManager" settingsEditedManually="false">
         
     | 
| 
      
 18 
     | 
    
         
            +
                <OptionsSetting value="true" id="Add" />
         
     | 
| 
      
 19 
     | 
    
         
            +
                <OptionsSetting value="true" id="Remove" />
         
     | 
| 
      
 20 
     | 
    
         
            +
                <OptionsSetting value="true" id="Checkout" />
         
     | 
| 
      
 21 
     | 
    
         
            +
                <OptionsSetting value="true" id="Update" />
         
     | 
| 
      
 22 
     | 
    
         
            +
                <OptionsSetting value="true" id="Status" />
         
     | 
| 
      
 23 
     | 
    
         
            +
                <OptionsSetting value="true" id="Edit" />
         
     | 
| 
      
 24 
     | 
    
         
            +
                <ConfirmationsSetting value="0" id="Add" />
         
     | 
| 
      
 25 
     | 
    
         
            +
                <ConfirmationsSetting value="0" id="Remove" />
         
     | 
| 
      
 26 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 27 
     | 
    
         
            +
              <component name="PropertiesComponent">
         
     | 
| 
      
 28 
     | 
    
         
            +
                <property name="settings.editor.selected.configurable" value="preferences.keymap" />
         
     | 
| 
      
 29 
     | 
    
         
            +
                <property name="settings.editor.splitter.proportion" value="0.2" />
         
     | 
| 
      
 30 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 31 
     | 
    
         
            +
              <component name="ShelveChangesManager" show_recycled="false" />
         
     | 
| 
      
 32 
     | 
    
         
            +
              <component name="TaskManager">
         
     | 
| 
      
 33 
     | 
    
         
            +
                <task active="true" id="Default" summary="Default task">
         
     | 
| 
      
 34 
     | 
    
         
            +
                  <option name="number" value="Default" />
         
     | 
| 
      
 35 
     | 
    
         
            +
                </task>
         
     | 
| 
      
 36 
     | 
    
         
            +
                <servers />
         
     | 
| 
      
 37 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 38 
     | 
    
         
            +
              <component name="VcsContentAnnotationSettings">
         
     | 
| 
      
 39 
     | 
    
         
            +
                <option name="myLimit" value="2678400000" />
         
     | 
| 
      
 40 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 41 
     | 
    
         
            +
              <component name="XDebuggerManager">
         
     | 
| 
      
 42 
     | 
    
         
            +
                <breakpoint-manager />
         
     | 
| 
      
 43 
     | 
    
         
            +
                <watches-manager />
         
     | 
| 
      
 44 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 45 
     | 
    
         
            +
            </project>
         
     | 
    
        data/.ruby-version
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ruby-2.2.3
         
     | 
    
        data/Gemfile
    ADDED
    
    | 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            source 'https://rubygems.org'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            gemspec
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ruby '2.2.3'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            # group :development, :test do
         
     | 
| 
      
 8 
     | 
    
         
            +
            #   gem 'dotenv'
         
     | 
| 
      
 9 
     | 
    
         
            +
            #   gem 'awesome_print'
         
     | 
| 
      
 10 
     | 
    
         
            +
            # end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            gem 'httparty'
         
     | 
| 
      
 13 
     | 
    
         
            +
            gem 'pry'
         
     | 
| 
      
 14 
     | 
    
         
            +
            gem 'activerecord'
         
     | 
| 
      
 15 
     | 
    
         
            +
            gem 'sqlite3'
         
     | 
| 
      
 16 
     | 
    
         
            +
            gem 'json'
         
     | 
| 
      
 17 
     | 
    
         
            +
            gem 'awesome_print'
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            The MIT License (MIT)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2015 pinouchon
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
      
 6 
     | 
    
         
            +
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
      
 7 
     | 
    
         
            +
            in the Software without restriction, including without limitation the rights
         
     | 
| 
      
 8 
     | 
    
         
            +
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
      
 9 
     | 
    
         
            +
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
      
 10 
     | 
    
         
            +
            furnished to do so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
      
 13 
     | 
    
         
            +
            all copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
      
 21 
     | 
    
         
            +
            THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,61 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # .ftg
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ## ferme toggl
         
     | 
| 
      
 4 
     | 
    
         
            +
            Utility that you can use so you can close toggl.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ## Example usage
         
     | 
| 
      
 7 
     | 
    
         
            +
            ````shell
         
     | 
| 
      
 8 
     | 
    
         
            +
            $> ftg
         
     | 
| 
      
 9 
     | 
    
         
            +
            2015-08-05:
         
     | 
| 
      
 10 
     | 
    
         
            +
              no_branch: 00:02:40 (and 00:00:00 idle)
         
     | 
| 
      
 11 
     | 
    
         
            +
              feature/jira-1323-ssl-redirect: 03:12:20 (and 00:50:40 idle)
         
     | 
| 
      
 12 
     | 
    
         
            +
              feature/jira-1056-checkout-spinner: 00:56:10 (and 00:02:40 idle)
         
     | 
| 
      
 13 
     | 
    
         
            +
              feature/jira-1126-remove-unused-css: 00:09:30 (and 00:00:00 idle)
         
     | 
| 
      
 14 
     | 
    
         
            +
              develop: 00:13:30 (and 00:00:00 idle)
         
     | 
| 
      
 15 
     | 
    
         
            +
              meetings/standup: 00:05:00 (and 00:07:50 idle)
         
     | 
| 
      
 16 
     | 
    
         
            +
            2015-08-06:
         
     | 
| 
      
 17 
     | 
    
         
            +
              feature/jira-1402-responsive-header: 01:12:20 (and 00:13:20 idle)
         
     | 
| 
      
 18 
     | 
    
         
            +
              feature/jira-1402-assets-upload-task: 02:32:20 (and 00:20:20 idle)
         
     | 
| 
      
 19 
     | 
    
         
            +
              feature/jira-1056-remove-newrelic-warnings: 00:43:10 (and 00:00:00 idle)
         
     | 
| 
      
 20 
     | 
    
         
            +
              master: 00:01:30 (and 00:00:00 idle)
         
     | 
| 
      
 21 
     | 
    
         
            +
              develop: 00:03:20 (and 00:00:00 idle)
         
     | 
| 
      
 22 
     | 
    
         
            +
              meetings: 00:40:00 (and 00:12:50 idle)
         
     | 
| 
      
 23 
     | 
    
         
            +
              meetings/standup: 00:05:00 (and 00:12:50 idle)
         
     | 
| 
      
 24 
     | 
    
         
            +
            ````
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            ## Requirements
         
     | 
| 
      
 28 
     | 
    
         
            +
            - MacOSX
         
     | 
| 
      
 29 
     | 
    
         
            +
            - [OhMyZsh](https://github.com/robbyrussell/oh-my-zsh])
         
     | 
| 
      
 30 
     | 
    
         
            +
            - ruby
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            ## How to install
         
     | 
| 
      
 33 
     | 
    
         
            +
            - Add the following at the end of your .zshrc:
         
     | 
| 
      
 34 
     | 
    
         
            +
            ````shell
         
     | 
| 
      
 35 
     | 
    
         
            +
            ####################################################### FTG
         
     | 
| 
      
 36 
     | 
    
         
            +
             precmd () {
         
     | 
| 
      
 37 
     | 
    
         
            +
                command="$(fc -n -e - -l -1)"
         
     | 
| 
      
 38 
     | 
    
         
            +
                c_alias="`alias $command`"
         
     | 
| 
      
 39 
     | 
    
         
            +
                c_alias=${c_alias:-no_alias}
         
     | 
| 
      
 40 
     | 
    
         
            +
                log_file="$HOME/.ftg/commands.log"
         
     | 
| 
      
 41 
     | 
    
         
            +
                branch="$(current_branch)"
         
     | 
| 
      
 42 
     | 
    
         
            +
                branch=${branch:-no_branch}
         
     | 
| 
      
 43 
     | 
    
         
            +
                echo "$USER\t$command\t$c_alias\t`pwd`\t$branch\t`date +%s`" >> "$log_file"
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                case "$(ps | grep '[i]dle_logger' | wc -l | awk {'print $1'})" in
         
     | 
| 
      
 46 
     | 
    
         
            +
                  '0')  ruby $HOME/.ftg/idle_logger.rb &
         
     | 
| 
      
 47 
     | 
    
         
            +
                ;;
         
     | 
| 
      
 48 
     | 
    
         
            +
                  '1')  # all good
         
     | 
| 
      
 49 
     | 
    
         
            +
                ;;
         
     | 
| 
      
 50 
     | 
    
         
            +
                  *)  echo "Problem with restarting idle_logger. See ~/.zshrc"
         
     | 
| 
      
 51 
     | 
    
         
            +
                ;;
         
     | 
| 
      
 52 
     | 
    
         
            +
            esac
         
     | 
| 
      
 53 
     | 
    
         
            +
            }
         
     | 
| 
      
 54 
     | 
    
         
            +
            alias ftg="ruby ~/.ftg/ftg_stats.rb"
         
     | 
| 
      
 55 
     | 
    
         
            +
            ####################################################### END FTG
         
     | 
| 
      
 56 
     | 
    
         
            +
            ````
         
     | 
| 
      
 57 
     | 
    
         
            +
            - `cd ~`
         
     | 
| 
      
 58 
     | 
    
         
            +
            - `git clone git@github.com:pinouchon/.ftg.git`
         
     | 
| 
      
 59 
     | 
    
         
            +
            - Restart your shell
         
     | 
| 
      
 60 
     | 
    
         
            +
            - ???
         
     | 
| 
      
 61 
     | 
    
         
            +
            - profit
         
     | 
    
        data/Rakefile
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "bundler/gem_tasks"
         
     | 
    
        data/bin/console
    ADDED
    
    | 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "bundler/setup"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "ftg"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # You can add fixtures and/or initialization code here to make experimenting
         
     | 
| 
      
 7 
     | 
    
         
            +
            # with your gem easier. You can also use a different console, if you like.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            # (If you use this, don't forget to add pry to your Gemfile!)
         
     | 
| 
      
 10 
     | 
    
         
            +
            # require "pry"
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Pry.start
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require "irb"
         
     | 
| 
      
 14 
     | 
    
         
            +
            IRB.start
         
     | 
    
        data/bin/ftg
    ADDED
    
    
    
        data/bin/setup
    ADDED
    
    
    
        data/config/public.json
    ADDED
    
    | 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {
         
     | 
| 
      
 2 
     | 
    
         
            +
              "ftg": {
         
     | 
| 
      
 3 
     | 
    
         
            +
                "TOGGL_API_TOKEN": null,
         
     | 
| 
      
 4 
     | 
    
         
            +
                "TOGGL_WORKSPACE_ID": null,
         
     | 
| 
      
 5 
     | 
    
         
            +
                "TOGGL_PIDS": null,
         
     | 
| 
      
 6 
     | 
    
         
            +
                "JIRA_USERNAME": null,
         
     | 
| 
      
 7 
     | 
    
         
            +
                "JIRA_PASSWORD": null,
         
     | 
| 
      
 8 
     | 
    
         
            +
                "recap_mailto": ["romain.champourlier@jobteaser.com", "paul-armand.assus@jobteaser.com"],
         
     | 
| 
      
 9 
     | 
    
         
            +
                "projects": ["sprint", "maintenance", "project", "meeting", "recruitment", "support", "technical", "other"],
         
     | 
| 
      
 10 
     | 
    
         
            +
                "default_tasks": {
         
     | 
| 
      
 11 
     | 
    
         
            +
                  "everyday": ["meeting/standup", "meeting/one_to_one", "meeting/sprint_status"],
         
     | 
| 
      
 12 
     | 
    
         
            +
                  "monday": ["meeting/retrospective"],
         
     | 
| 
      
 13 
     | 
    
         
            +
                  "tuesday": ["meeting/suivi_technique", "meeting/sprint_launch"],
         
     | 
| 
      
 14 
     | 
    
         
            +
                  "wednesday": [],
         
     | 
| 
      
 15 
     | 
    
         
            +
                  "thursday": ["meeting/sprint_launch"],
         
     | 
| 
      
 16 
     | 
    
         
            +
                  "friday": [],
         
     | 
| 
      
 17 
     | 
    
         
            +
                  "saturday": [],
         
     | 
| 
      
 18 
     | 
    
         
            +
                  "sunday": []
         
     | 
| 
      
 19 
     | 
    
         
            +
                },
         
     | 
| 
      
 20 
     | 
    
         
            +
                "greetings": {
         
     | 
| 
      
 21 
     | 
    
         
            +
                  "monday": "A demain",
         
     | 
| 
      
 22 
     | 
    
         
            +
                  "tuesday": "A demain",
         
     | 
| 
      
 23 
     | 
    
         
            +
                  "wednesday": "A demain",
         
     | 
| 
      
 24 
     | 
    
         
            +
                  "thursday": "A demain",
         
     | 
| 
      
 25 
     | 
    
         
            +
                  "friday": "Bon week end",
         
     | 
| 
      
 26 
     | 
    
         
            +
                  "saturday": "A lundi",
         
     | 
| 
      
 27 
     | 
    
         
            +
                  "sunday": "A lundi"
         
     | 
| 
      
 28 
     | 
    
         
            +
                }
         
     | 
| 
      
 29 
     | 
    
         
            +
              }
         
     | 
| 
      
 30 
     | 
    
         
            +
            }
         
     | 
    
        data/ftg.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,32 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # coding: utf-8
         
     | 
| 
      
 2 
     | 
    
         
            +
            # lib = File.expand_path('../lib', __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            # $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 4 
     | 
    
         
            +
            # require 'ftg/version'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.name          = "ftg"
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = '2.0'#Ftg::VERSION
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.authors       = ["pinouchon"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.email         = ["pinouchon@gmail.com"]
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              spec.summary       = %q{Toggl replacement}
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.description   = %q{Toggl replacement. Time tracking based on git branches}
         
     | 
| 
      
 14 
     | 
    
         
            +
              spec.homepage      = "https://github.com/pinouchon/.ftg"
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec.license       = "MIT"
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
         
     | 
| 
      
 18 
     | 
    
         
            +
              # delete this section to allow pushing this gem to any host.
         
     | 
| 
      
 19 
     | 
    
         
            +
              if spec.respond_to?(:metadata)
         
     | 
| 
      
 20 
     | 
    
         
            +
                spec.metadata['allowed_push_host'] = "https://rubygems.org"
         
     | 
| 
      
 21 
     | 
    
         
            +
              else
         
     | 
| 
      
 22 
     | 
    
         
            +
                raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
         
     | 
| 
      
 26 
     | 
    
         
            +
              spec.bindir        = "bin"
         
     | 
| 
      
 27 
     | 
    
         
            +
              spec.executables   = ["ftg"]  #spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 28 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              spec.add_development_dependency "bundler", "~> 1.10"
         
     | 
| 
      
 31 
     | 
    
         
            +
              spec.add_development_dependency "rake", "~> 10.0"
         
     | 
| 
      
 32 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/coffee.rb
    ADDED
    
    | 
         @@ -0,0 +1,79 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class Coffee
         
     | 
| 
      
 2 
     | 
    
         
            +
              def self.coffee1
         
     | 
| 
      
 3 
     | 
    
         
            +
                <<-COFFEE
         
     | 
| 
      
 4 
     | 
    
         
            +
                                   .
         
     | 
| 
      
 5 
     | 
    
         
            +
                                    `:.
         
     | 
| 
      
 6 
     | 
    
         
            +
                                      `:.
         
     | 
| 
      
 7 
     | 
    
         
            +
                              .:'     ,::
         
     | 
| 
      
 8 
     | 
    
         
            +
                             .:'      ;:'
         
     | 
| 
      
 9 
     | 
    
         
            +
                             ::      ;:'
         
     | 
| 
      
 10 
     | 
    
         
            +
                              :    .:'
         
     | 
| 
      
 11 
     | 
    
         
            +
                               `.  :.
         
     | 
| 
      
 12 
     | 
    
         
            +
                      _________________________
         
     | 
| 
      
 13 
     | 
    
         
            +
                     : _ _ _ _ _ _ _ _ _ _ _ _ :
         
     | 
| 
      
 14 
     | 
    
         
            +
                 ,---:".".".".".".".".".".".".":
         
     | 
| 
      
 15 
     | 
    
         
            +
                : ,'"`::.:.:.:.:.:.:.:.:.:.:.::'
         
     | 
| 
      
 16 
     | 
    
         
            +
                `.`.  `:-===-===-===-===-===-:'
         
     | 
| 
      
 17 
     | 
    
         
            +
                  `.`-._:                   :
         
     | 
| 
      
 18 
     | 
    
         
            +
                    `-.__`.               ,'
         
     | 
| 
      
 19 
     | 
    
         
            +
                ,--------`"`-------------'--------.
         
     | 
| 
      
 20 
     | 
    
         
            +
                 `"--.__                   __.--"'
         
     | 
| 
      
 21 
     | 
    
         
            +
                        `""-------------""'
         
     | 
| 
      
 22 
     | 
    
         
            +
                COFFEE
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              def self.coffee2
         
     | 
| 
      
 26 
     | 
    
         
            +
                <<-COFFEE
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                                                o$$$$$$oo
         
     | 
| 
      
 30 
     | 
    
         
            +
                                             o$"        "$oo
         
     | 
| 
      
 31 
     | 
    
         
            +
                                             $   o""""$o  "$o
         
     | 
| 
      
 32 
     | 
    
         
            +
                                            "$  o  "o  "o   $
         
     | 
| 
      
 33 
     | 
    
         
            +
                                            "$   $o $   $   o$
         
     | 
| 
      
 34 
     | 
    
         
            +
                                             "$       o$"$  o$
         
     | 
| 
      
 35 
     | 
    
         
            +
                                              "$ooooo$$  $  o$
         
     | 
| 
      
 36 
     | 
    
         
            +
                                    o$ """ $     " $$$   "  $
         
     | 
| 
      
 37 
     | 
    
         
            +
                                  o$        $o    $$"   "   "
         
     | 
| 
      
 38 
     | 
    
         
            +
                                 $$  $ " $   $$$o"$    o  o$"
         
     | 
| 
      
 39 
     | 
    
         
            +
                                 $"  o "" $   $" "   o"  $$
         
     | 
| 
      
 40 
     | 
    
         
            +
                                 $o  " "  $  o$"   o"  o$"
         
     | 
| 
      
 41 
     | 
    
         
            +
                                  "$o    $$  $   o"  o$$"
         
     | 
| 
      
 42 
     | 
    
         
            +
                                   ""o$o"$"  $oo"  o$"
         
     | 
| 
      
 43 
     | 
    
         
            +
                                    o$$ $   $$$  o$$
         
     | 
| 
      
 44 
     | 
    
         
            +
                                    o" o oo""  "" "$o
         
     | 
| 
      
 45 
     | 
    
         
            +
                                   o$o" ""          $
         
     | 
| 
      
 46 
     | 
    
         
            +
                                  $" " o"   " " "   "o
         
     | 
| 
      
 47 
     | 
    
         
            +
                                 $$ "  "  o$ o$o "   $
         
     | 
| 
      
 48 
     | 
    
         
            +
                                o$ $  $  o$$ "  "   ""
         
     | 
| 
      
 49 
     | 
    
         
            +
                                o  $ $"  " "o      o$
         
     | 
| 
      
 50 
     | 
    
         
            +
                                $ o         $o$oo$""
         
     | 
| 
      
 51 
     | 
    
         
            +
                               $o $   o  o  o"$$
         
     | 
| 
      
 52 
     | 
    
         
            +
                               $o  o  $  $    "$o
         
     | 
| 
      
 53 
     | 
    
         
            +
                               $o  $   o  $  $ "o
         
     | 
| 
      
 54 
     | 
    
         
            +
                                $  $   "o  $  "o"$o
         
     | 
| 
      
 55 
     | 
    
         
            +
                                $   "   o   $   o $$
         
     | 
| 
      
 56 
     | 
    
         
            +
                        $o$o$o$o$$o$$$o$$o$o$$o$$o$$$o$o$o$o$o$o$o$o$o$ooo
         
     | 
| 
      
 57 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o
         
     | 
| 
      
 58 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$   " $$$$$
         
     | 
| 
      
 59 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$      "$$$$
         
     | 
| 
      
 60 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$$
         
     | 
| 
      
 61 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$$
         
     | 
| 
      
 62 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$$
         
     | 
| 
      
 63 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     o$$$$"
         
     | 
| 
      
 64 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ooooo$$$$
         
     | 
| 
      
 65 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
         
     | 
| 
      
 66 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"""""
         
     | 
| 
      
 67 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         
     | 
| 
      
 68 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         
     | 
| 
      
 69 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         
     | 
| 
      
 70 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         
     | 
| 
      
 71 
     | 
    
         
            +
                        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
         
     | 
| 
      
 72 
     | 
    
         
            +
            "$o$o$o$o$o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
         
     | 
| 
      
 73 
     | 
    
         
            +
              "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
         
     | 
| 
      
 74 
     | 
    
         
            +
                "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"""
         
     | 
| 
      
 75 
     | 
    
         
            +
                   """""""""""""""""""""""""""""""""""""""""""""""""""""
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                COFFEE
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
      
 79 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/colors.rb
    ADDED
    
    | 
         @@ -0,0 +1,38 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class String
         
     | 
| 
      
 2 
     | 
    
         
            +
              def colorize(color_code)
         
     | 
| 
      
 3 
     | 
    
         
            +
                "\e[#{color_code}m#{self}\e[0m"
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def red
         
     | 
| 
      
 7 
     | 
    
         
            +
                colorize(31)
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              def green
         
     | 
| 
      
 11 
     | 
    
         
            +
                colorize(32)
         
     | 
| 
      
 12 
     | 
    
         
            +
              end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              def yellow
         
     | 
| 
      
 15 
     | 
    
         
            +
                colorize(33)
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              def blue
         
     | 
| 
      
 19 
     | 
    
         
            +
                colorize(34)
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              def pink
         
     | 
| 
      
 23 
     | 
    
         
            +
                colorize(35)
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              def light_blue
         
     | 
| 
      
 27 
     | 
    
         
            +
                colorize(36)
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              def grey
         
     | 
| 
      
 31 
     | 
    
         
            +
                colorize(90)
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              def cyan
         
     | 
| 
      
 35 
     | 
    
         
            +
                colorize(96)
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            end
         
     |