trebbiatrice 0.2 → 0.2.1

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: a80063d2dc3e210891f3e8ce8c69a90cc35528dd
4
- data.tar.gz: 0f26c4d8765e4cdaa50631b1e99c25dd8dc16189
3
+ metadata.gz: 0c128926dbf0039cdfaf62f598f4792484dac737
4
+ data.tar.gz: c546bcd1575a37311641a7dbfcaec39b3d52b603
5
5
  SHA512:
6
- metadata.gz: 62693076e41d52c1acfc8b159a8f759020f53a1f14547a9408b1398dbf523468977d1ce16f4c4e148b56db6f77c05802c425450cff3cc4c0864f0bf258044cb3
7
- data.tar.gz: adfc713277f1f482af215e8bdc37fd13d2ef8f003ae61d7e5474c98e2e24d4a3548d6271a9d79854483686093dfe75bb903ed3248015de82ac767e749d4d7752
6
+ metadata.gz: eb407621e08b2eca6e3bea0e6a5bc24d9deb139e1db0951ebf786f23928500cdc5b040330c309b78995f33c67381658c8c5049c36b16099fc9ab85c221df3469
7
+ data.tar.gz: 60d6d9b3b15555b6a658ce47a7e15d622c37af9f0a5981aceddc3f5420f97a392cacf34f5789123d32c3fb05ec3aa5f3db9628be7851e4ba867bdbf6645d90b0
data/README.md CHANGED
@@ -8,7 +8,7 @@ What do you need
8
8
  ----------------
9
9
  - Mac OS X (more platforms later)
10
10
  - Sublime Text (more editors later)
11
- - Projects/Workspace matching the ones you've available on Harvest
11
+ - (Projects/Workspace/Files/Folders)'s name matching the ones you've available on Harvest
12
12
 
13
13
  Installation
14
14
  ------------
@@ -22,6 +22,10 @@ export TREBBIA_MAIL='email'
22
22
 
23
23
  `$ trebbiatrice`
24
24
 
25
+ About Sublime Text
26
+ ------------------
27
+ If you do not work with workspaces/projects like I said before, you can add `"show_full_path": true` to your editor's settings. In this way, `trebbiatrice` will try to match the Harvest projects with the name of the folder in which your files your're working on are saved.
28
+
25
29
  TODO
26
30
  ----
27
31
  - Configuration file
@@ -19,7 +19,11 @@ module Trebbiatrice
19
19
  end
20
20
 
21
21
  def active_projects
22
- @harvest.projects.select { |project| /#{project[:name]}/i.match(@working_on) }
22
+ @harvest.projects.select do |project|
23
+ project_name = project[:name].downcase
24
+ matches = @working_on.split('/').select { |part| project_name.include?(part.downcase) }
25
+ matches.reject(&:empty?).any?
26
+ end
23
27
  end
24
28
 
25
29
  def get_task(name)
@@ -9,5 +9,5 @@
9
9
  #++
10
10
 
11
11
  module Trebbiatrice
12
- VERSION = '0.2'
12
+ VERSION = '0.2.1'
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trebbiatrice
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-08 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: harvested