ts_json_api 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,8 @@ module TsJsonApi
2
2
  module Logging
3
3
  class File
4
4
 
5
+ extend ActiveModel::Naming
6
+
5
7
  attr_reader :path, :options
6
8
 
7
9
  def initialize(options={})
@@ -44,10 +46,19 @@ module TsJsonApi
44
46
  json
45
47
  end
46
48
 
49
+ def basename
50
+ ::File.basename(@path)
51
+ end
52
+
53
+ # Support for dom_id in views
54
+ def to_key
55
+ [basename.parameterize]
56
+ end
57
+
47
58
  private
48
59
 
49
60
  def content_string(str)
50
- { time: Time.now, url: options[:url], content: str }.to_json
61
+ { time: Time.now.to_i, url: options[:url], content: str }.to_json
51
62
  end
52
63
 
53
64
  def create_dir_if_not_exists
@@ -1,3 +1,3 @@
1
1
  module TsJsonApi
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ts_json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: