templates 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,11 +6,15 @@ module Templates
6
6
  render :json => collect_templates
7
7
  end
8
8
 
9
+ def mtime
10
+ render :text => last_modify
11
+ end
12
+
9
13
  protected
10
14
 
11
15
  def collect_templates
12
16
 
13
- app_templates = {}
17
+ app_templates = { :mtime => last_modify }
14
18
 
15
19
  Dir.new("#{RAILS_ROOT}/app/controllers").entries.each do |controller_file_name|
16
20
 
@@ -56,5 +60,9 @@ module Templates
56
60
  app_templates
57
61
  end
58
62
 
63
+ def last_modify
64
+ `stat -f %m $(ls -t $(find #{Rails.root}/app/ -type f) | head -n 1)`.strip
65
+ end
66
+
59
67
  end
60
68
  end
@@ -1,3 +1,3 @@
1
1
  module Templates
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: templates
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sasha Koss
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-02 00:00:00 Z
18
+ date: 2011-05-27 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Rails engine which render selected templates to json