watch_tower 0.0.1.beta3 → 0.0.1.beta4

Sign up to get free protection for your applications and to get access to all the features.
data/Guardfile CHANGED
@@ -8,7 +8,8 @@ end
8
8
 
9
9
  guard 'sprockets2',
10
10
  sprockets: WatchTower::Server::App.sprockets,
11
- assets_path: 'lib/watch_tower/server/public/assets' do
11
+ assets_path: 'lib/watch_tower/server/public/assets',
12
+ gz: false do
12
13
  watch(%r{^lib/watch_tower/server/assets/.+$})
13
14
  watch('lib/watch_tower/server/app.rb')
14
15
  end
data/README.md CHANGED
@@ -14,6 +14,24 @@ Editors) and records the time you spend on each file and thus on the project
14
14
  in total, and using a web interface, it presents you with statistics on each
15
15
  project
16
16
 
17
+ # Features
18
+
19
+ - Track editors (see Supported Editors) and record all files tracked under
20
+ git or placed under __code_path__ defined in the config file.
21
+ - Display all projects on the home page that has been worked on the current
22
+ month, the date range can be changed using the date picker on the home page
23
+ - For each project, a detailed overview of each file with the elapsed time
24
+ within the selected date range
25
+
26
+ # Supported Editors
27
+
28
+ - TextMate
29
+ - Xcode
30
+
31
+ # Supported Operating Systems
32
+
33
+ - Mac OS X
34
+
17
35
  # Installation
18
36
 
19
37
  The installation has been made as simple as possible, here's the steps required:
@@ -33,7 +51,8 @@ is self explanatory.
33
51
  It is important to run
34
52
 
35
53
  ```bash
36
- $ watchtower load_bootloader
54
+ $ watchtower install_bootloader
55
+ $ watchtower reload_bootloader
37
56
  ```
38
57
 
39
58
  because the path to watchtower binary file is hardcoded in the boot loader.
data/Rakefile CHANGED
@@ -6,22 +6,24 @@ RSpec::Core::RakeTask.new(:spec)
6
6
 
7
7
  # Monky patch bundler
8
8
  Bundler::GemHelper.class_eval <<-END, __FILE__, __LINE__ + 1
9
+ # Tag the current version
9
10
  def tag_version
10
- sh %(git tag -a -m "Version \#{version}" \#{version_tag}) unless already_tagged?
11
- Bundler.ui.confirm "Tagged \#{version_tag}"
11
+ unless already_tagged?
12
+ sh %(git tag -a -m "Version \#{version}" \#{version_tag})
13
+ Bundler.ui.confirm "Tagged \#{version_tag}"
14
+ end
12
15
  yield if block_given?
13
16
  rescue
14
17
  Bundler.ui.error "Untagged \#{version_tag} due to error"
15
18
  sh_with_code "git tag -d \#{version_tag}"
16
19
  raise
17
20
  end
18
-
19
- def guard_clean
20
- end
21
-
21
+
22
+ # The original method raises an exception, we should overwrites it
22
23
  def guard_already_tagged
23
24
  end
24
-
25
+
26
+ # This method check if the tag has already been tagged
25
27
  def already_tagged?
26
28
  if sh('git tag').split(/\n/).include?(version_tag)
27
29
  true
@@ -28,6 +28,12 @@ module WatchTower
28
28
 
29
29
  # Install bootloader
30
30
  desc "install_bootloader", "Install Watch Tower's bootloader"
31
+ method_option :force,
32
+ type: :boolean,
33
+ required: false,
34
+ aliases: "-f",
35
+ default: false,
36
+ desc: "Force the installation of the bootloader"
31
37
  def install_bootloader
32
38
  # Install the bootloader
33
39
  install_bootloader_on_os
@@ -91,9 +97,7 @@ module WatchTower
91
97
  # Install bootloader on Mac OS X
92
98
  def install_bootloader_on_mac
93
99
  self.class.source_root(TEMPLATE_PATH)
94
- # copy_file 'watchtower.plist', File.join(ENV['HOME'], 'Library',
95
- # 'LaunchAgents', 'fr.technogate.WatchTower.plist')
96
- create_file bootloader_path_on_mac do
100
+ create_file bootloader_path_on_mac, force: options[:force] do
97
101
  ruby_binary = which('ruby')
98
102
  watch_tower_binary = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'bin', 'watchtower'))
99
103
  template = File.expand_path(find_in_source_paths('watchtower.plist.erb'))
@@ -53,6 +53,14 @@ module WatchTower
53
53
  editor.document.get.collect(&:path).collect(&:get)
54
54
  end
55
55
  end
56
+
57
+ # The editor's name for the log
58
+ # Child classes can overwrite this method
59
+ #
60
+ # @return [String]
61
+ def to_s
62
+ "\#{self.class.to_s.split('::').last} Editor"
63
+ end
56
64
  END
57
65
  end
58
66
  end
@@ -13,5 +13,5 @@ aside#date
13
13
 
14
14
  input
15
15
  border: none
16
- width: 201px
16
+ width: 199px
17
17
  height: 21px
@@ -243,7 +243,7 @@ aside#date {
243
243
  border: 1px solid #aaaaaa; }
244
244
  aside#date input {
245
245
  border: none;
246
- width: 201px;
246
+ width: 199px;
247
247
  height: 21px; }
248
248
  .file_tree {
249
249
  background: #f7f7f7;
@@ -4,7 +4,7 @@ module WatchTower
4
4
  MAJOR = 0
5
5
  MINOR = 0
6
6
  TINY = 1
7
- PRE = "beta3"
7
+ PRE = 'beta4'
8
8
 
9
9
  def self.version
10
10
  # Init the version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watch_tower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta3
4
+ version: 0.0.1.beta4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rb-appscript
16
- requirement: &2151847860 !ruby/object:Gem::Requirement
16
+ requirement: &2151764080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.6.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2151847860
24
+ version_requirements: *2151764080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2151847120 !ruby/object:Gem::Requirement
27
+ requirement: &2151763300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2151847120
35
+ version_requirements: *2151763300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: i18n
38
- requirement: &2151846120 !ruby/object:Gem::Requirement
38
+ requirement: &2151762780 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.6.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2151846120
46
+ version_requirements: *2151762780
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activerecord
49
- requirement: &2151845400 !ruby/object:Gem::Requirement
49
+ requirement: &2151776900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.1.1
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2151845400
57
+ version_requirements: *2151776900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sinatra
60
- requirement: &2151844720 !ruby/object:Gem::Requirement
60
+ requirement: &2151770720 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.3.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2151844720
68
+ version_requirements: *2151770720
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sinatra-snap
71
- requirement: &2151844120 !ruby/object:Gem::Requirement
71
+ requirement: &2151783520 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.3.2
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2151844120
79
+ version_requirements: *2151783520
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: haml
82
- requirement: &2151843400 !ruby/object:Gem::Requirement
82
+ requirement: &2151780300 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 3.1.3
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *2151843400
90
+ version_requirements: *2151780300
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: grit
93
- requirement: &2151859160 !ruby/object:Gem::Requirement
93
+ requirement: &2151793180 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 2.4.1
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *2151859160
101
+ version_requirements: *2151793180
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: coffee-script
104
- requirement: &2151858320 !ruby/object:Gem::Requirement
104
+ requirement: &2151791240 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 2.2.0
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2151858320
112
+ version_requirements: *2151791240
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: uglifier
115
- requirement: &2151857560 !ruby/object:Gem::Requirement
115
+ requirement: &2151790060 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 1.0.3
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *2151857560
123
+ version_requirements: *2151790060
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: sass
126
- requirement: &2151856480 !ruby/object:Gem::Requirement
126
+ requirement: &2151788520 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 3.1.10
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *2151856480
134
+ version_requirements: *2151788520
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: sprockets
137
- requirement: &2151855260 !ruby/object:Gem::Requirement
137
+ requirement: &2151787400 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 2.0.2
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *2151855260
145
+ version_requirements: *2151787400
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: guard
148
- requirement: &2151854100 !ruby/object:Gem::Requirement
148
+ requirement: &2151785960 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 0.8.4
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2151854100
156
+ version_requirements: *2151785960
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: guard-bundler
159
- requirement: &2151853260 !ruby/object:Gem::Requirement
159
+ requirement: &2151801340 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ~>
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 0.1.3
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2151853260
167
+ version_requirements: *2151801340
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: guard-rspec
170
- requirement: &2151852380 !ruby/object:Gem::Requirement
170
+ requirement: &2151799780 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 0.4.5
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *2151852380
178
+ version_requirements: *2151799780
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: guard-sprockets2
181
- requirement: &2151867560 !ruby/object:Gem::Requirement
181
+ requirement: &2151796240 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ~>
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 0.0.5
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2151867560
189
+ version_requirements: *2151796240
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: yard
192
- requirement: &2151864580 !ruby/object:Gem::Requirement
192
+ requirement: &2151808580 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ~>
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 0.7.2
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *2151864580
200
+ version_requirements: *2151808580
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: rspec
203
- requirement: &2151862900 !ruby/object:Gem::Requirement
203
+ requirement: &2151804180 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ~>
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: 2.6.0
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *2151862900
211
+ version_requirements: *2151804180
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: rspec-rails
214
- requirement: &2151862200 !ruby/object:Gem::Requirement
214
+ requirement: &2151817740 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ~>
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: 2.6.1
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *2151862200
222
+ version_requirements: *2151817740
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: capybara
225
- requirement: &2151872780 !ruby/object:Gem::Requirement
225
+ requirement: &2151816300 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ~>
@@ -230,10 +230,10 @@ dependencies:
230
230
  version: 1.1.1
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *2151872780
233
+ version_requirements: *2151816300
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: launchy
236
- requirement: &2151871180 !ruby/object:Gem::Requirement
236
+ requirement: &2151826240 !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
239
239
  - - ~>
@@ -241,10 +241,10 @@ dependencies:
241
241
  version: 2.0.5
242
242
  type: :development
243
243
  prerelease: false
244
- version_requirements: *2151871180
244
+ version_requirements: *2151826240
245
245
  - !ruby/object:Gem::Dependency
246
246
  name: mocha
247
- requirement: &2151870380 !ruby/object:Gem::Requirement
247
+ requirement: &2151822840 !ruby/object:Gem::Requirement
248
248
  none: false
249
249
  requirements:
250
250
  - - ~>
@@ -252,10 +252,10 @@ dependencies:
252
252
  version: 0.10.0
253
253
  type: :development
254
254
  prerelease: false
255
- version_requirements: *2151870380
255
+ version_requirements: *2151822840
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: factory_girl
258
- requirement: &2151869300 !ruby/object:Gem::Requirement
258
+ requirement: &2151820800 !ruby/object:Gem::Requirement
259
259
  none: false
260
260
  requirements:
261
261
  - - ~>
@@ -263,10 +263,10 @@ dependencies:
263
263
  version: 2.1.2
264
264
  type: :development
265
265
  prerelease: false
266
- version_requirements: *2151869300
266
+ version_requirements: *2151820800
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: timecop
269
- requirement: &2151868500 !ruby/object:Gem::Requirement
269
+ requirement: &2151820060 !ruby/object:Gem::Requirement
270
270
  none: false
271
271
  requirements:
272
272
  - - ~>
@@ -274,10 +274,10 @@ dependencies:
274
274
  version: 0.3.5
275
275
  type: :development
276
276
  prerelease: false
277
- version_requirements: *2151868500
277
+ version_requirements: *2151820060
278
278
  - !ruby/object:Gem::Dependency
279
279
  name: pry
280
- requirement: &2151881580 !ruby/object:Gem::Requirement
280
+ requirement: &2151819060 !ruby/object:Gem::Requirement
281
281
  none: false
282
282
  requirements:
283
283
  - - ~>
@@ -285,7 +285,7 @@ dependencies:
285
285
  version: 0.9.6.2
286
286
  type: :development
287
287
  prerelease: false
288
- version_requirements: *2151881580
288
+ version_requirements: *2151819060
289
289
  description: WatchTower helps you track the time you spend on each project.
290
290
  email:
291
291
  - wael.nasreddine@gmail.com
@@ -377,7 +377,7 @@ files:
377
377
  - lib/watch_tower/server/presenters/project_presenter.rb
378
378
  - lib/watch_tower/server/public/assets/WatchTower-58eff0713efffbc6054defddc879e0b1.jpg
379
379
  - lib/watch_tower/server/public/assets/application-6a1be75d4fd6a545faceb638e47a2486.js
380
- - lib/watch_tower/server/public/assets/application-90ce2ed0ccfaceec7a954b91e05be8d6.css
380
+ - lib/watch_tower/server/public/assets/application-e3e0c10519d824e8909bf09ecbad4c43.css
381
381
  - lib/watch_tower/server/public/assets/calendar-379834cd6e6321a940b662ace47f3032.gif
382
382
  - lib/watch_tower/server/public/assets/calendar-blue-d6aa74feef7ee4287532761db99a6c0a.gif
383
383
  - lib/watch_tower/server/public/assets/calendar-green-3752fe2996091379c8d321f759039385.gif